timvir 0.1.47 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
- package/blocks/Arbitrary/index.js +20 -10
- package/blocks/Code/index.js +19 -9
- package/blocks/ColorBar/index.js +19 -9
- package/blocks/ColorBook/index.js +19 -9
- package/blocks/Cover/index.js +19 -9
- package/blocks/Exhibit/Exhibit.d.ts +1 -1
- package/blocks/Exhibit/index.js +19 -9
- package/blocks/Font/index.js +19 -9
- package/blocks/Grid/Grid.d.ts +1 -1
- package/blocks/Grid/index.js +21 -11
- package/blocks/Icon/Icon.d.ts +1 -1
- package/blocks/Icon/index.js +19 -9
- package/blocks/Message/index.js +19 -9
- package/blocks/Swatch/index.js +19 -9
- package/blocks/Viewport/index.js +19 -9
- package/blocks/WebLink/index.js +19 -9
- package/context/index.d.ts +2 -0
- package/core/components/Commands/Commands.d.ts +5 -0
- package/core/components/Commands/index.d.ts +1 -0
- package/core/components/Commands/internal/Action.d.ts +7 -0
- package/core/components/Commands/internal/Dialog.d.ts +8 -0
- package/core/components/Commands/internal/index.d.ts +2 -0
- package/core/components/Page/Page.d.ts +1 -1
- package/core/index.js +14910 -215
- package/core/layout.d.ts +2 -2
- package/core/styles.css +9 -0
- package/package.json +2 -2
- package/search/Search/docs/index.mdx +1 -1
- package/search/SearchBoxInput/SearchBoxInput.d.ts +1 -1
- package/search/SearchBoxListItem/SearchBoxListItem.d.ts +1 -1
- package/search/SearchBoxListItem/docs/index.mdx +1 -1
- package/search/index.js +19 -9
- package/styles.css +9 -0
|
@@ -7,5 +7,5 @@ declare const Root = "div";
|
|
|
7
7
|
interface Props extends React.ComponentPropsWithRef<typeof Root> {
|
|
8
8
|
ExhibitProps?: React.ComponentPropsWithRef<typeof Exhibit>;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "ExhibitProps"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export default _default;
|
|
@@ -9,24 +9,34 @@ import { useImmer } from 'use-immer';
|
|
|
9
9
|
* ```js
|
|
10
10
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
11
11
|
* ```
|
|
12
|
-
* If
|
|
12
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
13
13
|
*
|
|
14
14
|
* ```js
|
|
15
|
-
* cx(
|
|
15
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
18
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
19
19
|
*/
|
|
20
20
|
const cx = function cx() {
|
|
21
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
22
|
+
const atomicClasses = {};
|
|
23
|
+
const nonAtomicClasses = [];
|
|
24
|
+
|
|
25
|
+
for (const className of presentClassNames) {
|
|
26
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
27
|
+
const individualClassNames = className.split(' ');
|
|
28
|
+
|
|
29
|
+
for (const className of individualClassNames) {
|
|
30
|
+
if (className.startsWith('atm_')) {
|
|
31
|
+
const [, keyHash] = className.split('_');
|
|
32
|
+
atomicClasses[keyHash] = className;
|
|
33
|
+
} else {
|
|
34
|
+
nonAtomicClasses.push(className);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
return [...styleCollectionResult, ...classNamesResult].join(' ');
|
|
39
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
30
40
|
};
|
|
31
41
|
|
|
32
42
|
const bytesToHex = (() => {
|
package/blocks/Code/index.js
CHANGED
|
@@ -11,24 +11,34 @@ import { useImmer } from 'use-immer';
|
|
|
11
11
|
* ```js
|
|
12
12
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
13
13
|
* ```
|
|
14
|
-
* If
|
|
14
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
15
15
|
*
|
|
16
16
|
* ```js
|
|
17
|
-
* cx(
|
|
17
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
21
21
|
*/
|
|
22
22
|
const cx = function cx() {
|
|
23
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
23
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
24
|
+
const atomicClasses = {};
|
|
25
|
+
const nonAtomicClasses = [];
|
|
24
26
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// the class names
|
|
27
|
+
for (const className of presentClassNames) {
|
|
28
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
29
|
+
const individualClassNames = className.split(' ');
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
for (const className of individualClassNames) {
|
|
32
|
+
if (className.startsWith('atm_')) {
|
|
33
|
+
const [, keyHash] = className.split('_');
|
|
34
|
+
atomicClasses[keyHash] = className;
|
|
35
|
+
} else {
|
|
36
|
+
nonAtomicClasses.push(className);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
32
42
|
};
|
|
33
43
|
|
|
34
44
|
var theme = "tac6gx6";
|
package/blocks/ColorBar/index.js
CHANGED
|
@@ -8,24 +8,34 @@ import * as React from 'react';
|
|
|
8
8
|
* ```js
|
|
9
9
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
10
10
|
* ```
|
|
11
|
-
* If
|
|
11
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
12
12
|
*
|
|
13
13
|
* ```js
|
|
14
|
-
* cx(
|
|
14
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
17
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
18
18
|
*/
|
|
19
19
|
const cx = function cx() {
|
|
20
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
21
|
+
const atomicClasses = {};
|
|
22
|
+
const nonAtomicClasses = [];
|
|
21
23
|
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// the class names
|
|
24
|
+
for (const className of presentClassNames) {
|
|
25
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
26
|
+
const individualClassNames = className.split(' ');
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
for (const className of individualClassNames) {
|
|
29
|
+
if (className.startsWith('atm_')) {
|
|
30
|
+
const [, keyHash] = className.split('_');
|
|
31
|
+
atomicClasses[keyHash] = className;
|
|
32
|
+
} else {
|
|
33
|
+
nonAtomicClasses.push(className);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
/**
|
|
@@ -6,24 +6,34 @@ import * as React from 'react';
|
|
|
6
6
|
* ```js
|
|
7
7
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
8
8
|
* ```
|
|
9
|
-
* If
|
|
9
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
10
10
|
*
|
|
11
11
|
* ```js
|
|
12
|
-
* cx(
|
|
12
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
16
16
|
*/
|
|
17
17
|
const cx = function cx() {
|
|
18
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
18
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
+
const atomicClasses = {};
|
|
20
|
+
const nonAtomicClasses = [];
|
|
19
21
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// the class names
|
|
22
|
+
for (const className of presentClassNames) {
|
|
23
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
24
|
+
const individualClassNames = className.split(' ');
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
for (const className of individualClassNames) {
|
|
27
|
+
if (className.startsWith('atm_')) {
|
|
28
|
+
const [, keyHash] = className.split('_');
|
|
29
|
+
atomicClasses[keyHash] = className;
|
|
30
|
+
} else {
|
|
31
|
+
nonAtomicClasses.push(className);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
27
37
|
};
|
|
28
38
|
|
|
29
39
|
/**
|
package/blocks/Cover/index.js
CHANGED
|
@@ -7,24 +7,34 @@ import { fullWidth } from 'timvir/core';
|
|
|
7
7
|
* ```js
|
|
8
8
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
9
9
|
* ```
|
|
10
|
-
* If
|
|
10
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
* cx(
|
|
13
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
17
17
|
*/
|
|
18
18
|
const cx = function cx() {
|
|
19
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
+
const atomicClasses = {};
|
|
21
|
+
const nonAtomicClasses = [];
|
|
20
22
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// the class names
|
|
23
|
+
for (const className of presentClassNames) {
|
|
24
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
25
|
+
const individualClassNames = className.split(' ');
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
for (const className of individualClassNames) {
|
|
28
|
+
if (className.startsWith('atm_')) {
|
|
29
|
+
const [, keyHash] = className.split('_');
|
|
30
|
+
atomicClasses[keyHash] = className;
|
|
31
|
+
} else {
|
|
32
|
+
nonAtomicClasses.push(className);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
28
38
|
};
|
|
29
39
|
|
|
30
40
|
/**
|
|
@@ -15,5 +15,5 @@ interface Props extends React.ComponentProps<typeof Root> {
|
|
|
15
15
|
bleed?: string | number;
|
|
16
16
|
BackdropProps?: React.ComponentPropsWithoutRef<"div">;
|
|
17
17
|
}
|
|
18
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "caption" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bleed" | "BackdropProps"> & React.RefAttributes<HTMLElement>>;
|
|
19
19
|
export default _default;
|
package/blocks/Exhibit/index.js
CHANGED
|
@@ -8,24 +8,34 @@ import * as React from 'react';
|
|
|
8
8
|
* ```js
|
|
9
9
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
10
10
|
* ```
|
|
11
|
-
* If
|
|
11
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
12
12
|
*
|
|
13
13
|
* ```js
|
|
14
|
-
* cx(
|
|
14
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
17
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
18
18
|
*/
|
|
19
19
|
const cx = function cx() {
|
|
20
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
21
|
+
const atomicClasses = {};
|
|
22
|
+
const nonAtomicClasses = [];
|
|
21
23
|
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// the class names
|
|
24
|
+
for (const className of presentClassNames) {
|
|
25
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
26
|
+
const individualClassNames = className.split(' ');
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
for (const className of individualClassNames) {
|
|
29
|
+
if (className.startsWith('atm_')) {
|
|
30
|
+
const [, keyHash] = className.split('_');
|
|
31
|
+
atomicClasses[keyHash] = className;
|
|
32
|
+
} else {
|
|
33
|
+
nonAtomicClasses.push(className);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
/**
|
package/blocks/Font/index.js
CHANGED
|
@@ -8,24 +8,34 @@ import * as Icons from 'react-feather';
|
|
|
8
8
|
* ```js
|
|
9
9
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
10
10
|
* ```
|
|
11
|
-
* If
|
|
11
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
12
12
|
*
|
|
13
13
|
* ```js
|
|
14
|
-
* cx(
|
|
14
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
17
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
18
18
|
*/
|
|
19
19
|
const cx = function cx() {
|
|
20
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
21
|
+
const atomicClasses = {};
|
|
22
|
+
const nonAtomicClasses = [];
|
|
21
23
|
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// the class names
|
|
24
|
+
for (const className of presentClassNames) {
|
|
25
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
26
|
+
const individualClassNames = className.split(' ');
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
for (const className of individualClassNames) {
|
|
29
|
+
if (className.startsWith('atm_')) {
|
|
30
|
+
const [, keyHash] = className.split('_');
|
|
31
|
+
atomicClasses[keyHash] = className;
|
|
32
|
+
} else {
|
|
33
|
+
nonAtomicClasses.push(className);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
/**
|
package/blocks/Grid/Grid.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import * as React from "react";
|
|
|
5
5
|
declare const Root = "div";
|
|
6
6
|
interface Props extends React.ComponentProps<typeof Root> {
|
|
7
7
|
}
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export default _default;
|
package/blocks/Grid/index.js
CHANGED
|
@@ -6,24 +6,34 @@ import * as React from 'react';
|
|
|
6
6
|
* ```js
|
|
7
7
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
8
8
|
* ```
|
|
9
|
-
* If
|
|
9
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
10
10
|
*
|
|
11
11
|
* ```js
|
|
12
|
-
* cx(
|
|
12
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
16
16
|
*/
|
|
17
17
|
const cx = function cx() {
|
|
18
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
+
const atomicClasses = {};
|
|
20
|
+
const nonAtomicClasses = [];
|
|
21
|
+
|
|
22
|
+
for (const className of presentClassNames) {
|
|
23
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
24
|
+
const individualClassNames = className.split(' ');
|
|
25
|
+
|
|
26
|
+
for (const className of individualClassNames) {
|
|
27
|
+
if (className.startsWith('atm_')) {
|
|
28
|
+
const [, keyHash] = className.split('_');
|
|
29
|
+
atomicClasses[keyHash] = className;
|
|
30
|
+
} else {
|
|
31
|
+
nonAtomicClasses.push(className);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
27
37
|
};
|
|
28
38
|
|
|
29
39
|
/**
|
package/blocks/Icon/Icon.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ declare const Root = "div";
|
|
|
7
7
|
interface Props extends React.ComponentProps<typeof Root> {
|
|
8
8
|
descriptor: Descriptor;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "descriptor"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export default _default;
|
package/blocks/Icon/index.js
CHANGED
|
@@ -7,24 +7,34 @@ import * as React from 'react';
|
|
|
7
7
|
* ```js
|
|
8
8
|
* cx('red', isBig && 'big') // returns 'red big' if `isBig` is true, otherwise returns 'red'
|
|
9
9
|
* ```
|
|
10
|
-
* If
|
|
10
|
+
* If space separated atomic styles are provided, they are deduplicated according to the first hashed valued:
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
* cx(
|
|
13
|
+
* cx('atm_a_class1 atm_b_class2', 'atm_a_class3') // returns `atm_a_class3 atm_b_class2`
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @returns the combined, space separated class names that can be applied directly to the class attribute
|
|
17
17
|
*/
|
|
18
18
|
const cx = function cx() {
|
|
19
|
-
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
19
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
20
|
+
const atomicClasses = {};
|
|
21
|
+
const nonAtomicClasses = [];
|
|
20
22
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// the class names
|
|
23
|
+
for (const className of presentClassNames) {
|
|
24
|
+
// className could be the output of a previous cx call, so split by ' ' first
|
|
25
|
+
const individualClassNames = className.split(' ');
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
for (const className of individualClassNames) {
|
|
28
|
+
if (className.startsWith('atm_')) {
|
|
29
|
+
const [, keyHash] = className.split('_');
|
|
30
|
+
atomicClasses[keyHash] = className;
|
|
31
|
+
} else {
|
|
32
|
+
nonAtomicClasses.push(className);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
|
|
28
38
|
};
|
|
29
39
|
|
|
30
40
|
const Root$1 = "div";
|