Skip to content

Instantly share code, notes, and snippets.

View interactivellama's full-sized avatar

Stephen James interactivellama

View GitHub Profile
// This is NOT accessible to keyboard-only users at this time.
import React from 'react';
import Dropdown from '~/components/menu-dropdown';
import DataTable from '~/components/data-table'; // `~` is replaced with design-system-react at runtime
import DataTableColumn from '~/components/data-table/column';
import DataTableCell from '~/components/data-table/cell';
import DataTableRowActions from '~/components/data-table/row-actions';
import IconSettings from '~/components/icon-settings';
@interactivellama
interactivellama / component-examples.jsx
Last active March 14, 2019 04:53
doc site component examples
const React = require('react');
const createReactClassInternal = require('create-react-class');
const PropTypesInternal = require('prop-types');
const ReactDOM = require('react-dom');
const classNames = require('classnames');
const trim = require('lodash.trim');
import { transform } from 'babel-standalone';
import CodeMirrorEditor from './code-mirror-editor';
import * as SLDS from '@salesforce/design-system-react';
@interactivellama
interactivellama / component-renderer.jsx
Created March 14, 2019 04:50
doc site component renderer
/*
Copyright (c) 2015, salesforce.com, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LI
@interactivellama
interactivellama / dsr-axe-output.txt
Created February 4, 2019 21:28
DSR a11y output
sjames-ltm:design-system-react sjames$ npm run test:a11y
> design-system-react@0.9.4 test:a11y /Users/sjames/www/design-system-react
> cross-env NODE_ENV=test npx jest --config=tests/a11y-config.json
=> Loading custom .babelrc
console.warn utilities/warning/low-priority-warning.js:17
Warning: [Design System React] SLDSInlineEdit is a deprecated component. Bugfixes can be contributed, but new features and additional alignment with SLDS may be declined. For a multiple input form, please use the pattern located at https://www.lightningdesignsystem.com/components/form-element/#Record-Detail that swaps out a read-only `Input` with a base `Input`. For a single input, please use a `Popover` paired with `<Button category="utility" iconName="edit" variant="icon" />` as the trigger.
console.warn utilities/warning/low-priority-warning.js:17
cd ..Last login: Sat Sep 1 10:12:35 on tty??
sjames-ltm:design-system-react sjames$ cd ..
sjames-ltm:www sjames$ git clone git@github.com:salesforce/design-system-react.git dsr-test
Cloning into 'dsr-test'...
remote: Counting objects: 63519, done.
remote: Compressing objects: 100% (496/496), done.
remote: Total 63519 (delta 170), reused 441 (delta 116), pack-reused 62884
Receiving objects: 100% (63519/63519), 89.78 MiB | 5.03 MiB/s, done.
Resolving deltas: 100% (42491/42491), done.
/* eslint-disable no-console, react/prop-types */
import React from 'react';
import Input from '~/components/input';
import Button from '~/components/button';
import InputIcon from '~/components/icon/input-icon';
import Popover from '~/components/popover';
import IconSettings from '~/components/icon-settings';
class Example extends React.Component {
constructor (props) {
import React from 'react';
import { normalize, schema } from 'normalizr';
import PropTypes from 'prop-types';
import IconSettings from '~/components/icon-settings';
import Tree from '~/components/tree';
import Icon from '~/components/icon';
import log from '~/utilities/log';
import Search from '../../forms/input/search';
{
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressResultsExplorerNotice": false,
"suppressShowKeyBindingsNotice": true,
sjames-ltm:design-system-react sjames$ cd ..
sjames-ltm:www sjames$ git clone git@github.com:salesforce/design-system-react.git dsr-test2
Cloning into 'dsr-test2'...
remote: Counting objects: 59632, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 59632 (delta 0), reused 0 (delta 0), pack-reused 59628
Receiving objects: 100% (59632/59632), 83.93 MiB | 2.78 MiB/s, done.
Resolving deltas: 100% (39949/39949), done.
sjames-ltm:www sjames$ cd dsr-test2
sjames-ltm:dsr-test2 sjames$ npm install
/*
* STORY-BASED SNAPSHOT TESTING
*
* This uses StoryShots to iterate over stories created in Storybook to
* automatically create DOM and image snapshot tests.
*
* For more information, please visit:
* https://github.com/storybooks/storybook/tree/master/addons/storyshots
*/