@doist/reactist 11.5.0 → 12.0.1
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/dist/reactist.cjs.development.js +1344 -1499
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +18 -21
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/es/components/checkbox/checkbox.js +7 -9
- package/es/components/checkbox/checkbox.js.map +1 -1
- package/es/components/color-picker/color-picker.js +24 -28
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +16 -18
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/deprecated-loading/deprecated-loading.js +7 -10
- package/es/components/deprecated-loading/deprecated-loading.js.map +1 -1
- package/es/components/deprecated-modal/deprecated-modal.js +69 -101
- package/es/components/deprecated-modal/deprecated-modal.js.map +1 -1
- package/es/components/deprecated-modal/index.js +4 -4
- package/es/components/deprecated-modal/index.js.map +1 -1
- package/es/components/dropdown/dropdown.js +86 -85
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/icons/CloseIcon.svg.js +9 -11
- package/es/components/icons/CloseIcon.svg.js.map +1 -1
- package/es/components/input/input.js +4 -3
- package/es/components/input/input.js.map +1 -1
- package/es/components/key-capturer/key-capturer.js +22 -19
- package/es/components/key-capturer/key-capturer.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +20 -26
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/menu/menu.js +112 -142
- package/es/components/menu/menu.js.map +1 -1
- package/es/components/notification/notification.js +32 -32
- package/es/components/notification/notification.js.map +1 -1
- package/es/components/popover/popover.js +85 -91
- package/es/components/popover/popover.js.map +1 -1
- package/es/components/popover/positioning-utils.js +49 -65
- package/es/components/popover/positioning-utils.js.map +1 -1
- package/es/components/progress-bar/progress-bar.js +8 -8
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/select/select.js +20 -25
- package/es/components/select/select.js.map +1 -1
- package/es/components/time/time-utils.js +30 -47
- package/es/components/time/time-utils.js.map +1 -1
- package/es/components/time/time.js +43 -56
- package/es/components/time/time.js.map +1 -1
- package/es/components/tooltip/tooltip.js +43 -46
- package/es/components/tooltip/tooltip.js.map +1 -1
- package/es/hooks/use-previous/use-previous.js +2 -2
- package/es/hooks/use-previous/use-previous.js.map +1 -1
- package/es/new-components/alert/alert.js +7 -6
- package/es/new-components/alert/alert.js.map +1 -1
- package/es/new-components/avatar/avatar.js +19 -18
- package/es/new-components/avatar/avatar.js.map +1 -1
- package/es/new-components/avatar/utils.js +12 -9
- package/es/new-components/avatar/utils.js.map +1 -1
- package/es/new-components/base-button/base-button.js +25 -29
- package/es/new-components/base-button/base-button.js.map +1 -1
- package/es/new-components/base-field/base-field.js +20 -18
- package/es/new-components/base-field/base-field.js.map +1 -1
- package/es/new-components/box/box.js +51 -52
- package/es/new-components/box/box.js.map +1 -1
- package/es/new-components/button/button.js +13 -15
- package/es/new-components/button/button.js.map +1 -1
- package/es/new-components/button-link/button-link.js +13 -15
- package/es/new-components/button-link/button-link.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-field.js +25 -33
- package/es/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/es/new-components/checkbox-field/checkbox-icon.js +21 -19
- package/es/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/new-components/columns/columns.js +24 -27
- package/es/new-components/columns/columns.js.map +1 -1
- package/es/new-components/common-helpers.js +3 -3
- package/es/new-components/common-helpers.js.map +1 -1
- package/es/new-components/divider/divider.js +7 -6
- package/es/new-components/divider/divider.js.map +1 -1
- package/es/new-components/heading/heading.js +17 -17
- package/es/new-components/heading/heading.js.map +1 -1
- package/es/new-components/hidden/hidden.js +14 -13
- package/es/new-components/hidden/hidden.js.map +1 -1
- package/es/new-components/hidden-visually/hidden-visually.js +3 -2
- package/es/new-components/hidden-visually/hidden-visually.js.map +1 -1
- package/es/new-components/icons/alert-icon.js +13 -11
- package/es/new-components/icons/alert-icon.js.map +1 -1
- package/es/new-components/icons/close-icon.js +2 -1
- package/es/new-components/icons/close-icon.js.map +1 -1
- package/es/new-components/icons/password-hidden-icon.js +2 -1
- package/es/new-components/icons/password-hidden-icon.js.map +1 -1
- package/es/new-components/icons/password-visible-icon.js +2 -1
- package/es/new-components/icons/password-visible-icon.js.map +1 -1
- package/es/new-components/inline/inline.js +15 -19
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/loading/loading.js +12 -10
- package/es/new-components/loading/loading.js.map +1 -1
- package/es/new-components/modal/modal.js +64 -66
- package/es/new-components/modal/modal.js.map +1 -1
- package/es/new-components/modal/modal.module.css.js +1 -1
- package/es/new-components/notice/notice.js +5 -4
- package/es/new-components/notice/notice.js.map +1 -1
- package/es/new-components/password-field/password-field.js +40 -46
- package/es/new-components/password-field/password-field.js.map +1 -1
- package/es/new-components/responsive-props.js +5 -5
- package/es/new-components/responsive-props.js.map +1 -1
- package/es/new-components/select-field/select-field.js +23 -23
- package/es/new-components/select-field/select-field.js.map +1 -1
- package/es/new-components/spinner/spinner.js +3 -3
- package/es/new-components/spinner/spinner.js.map +1 -1
- package/es/new-components/stack/stack.js +18 -22
- package/es/new-components/stack/stack.js.map +1 -1
- package/es/new-components/switch-field/switch-field.js +31 -41
- package/es/new-components/switch-field/switch-field.js.map +1 -1
- package/es/new-components/tabs/tabs.js +92 -78
- package/es/new-components/tabs/tabs.js.map +1 -1
- package/es/new-components/tabs/tabs.module.css.js +1 -1
- package/es/new-components/text/text.js +16 -17
- package/es/new-components/text/text.js.map +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-area/text-area.js +14 -14
- package/es/new-components/text-area/text-area.js.map +1 -1
- package/es/new-components/text-field/text-field.js +21 -22
- package/es/new-components/text-field/text-field.js.map +1 -1
- package/es/new-components/text-link/text-link.js +10 -10
- package/es/new-components/text-link/text-link.js.map +1 -1
- package/es/new-components/text-link/text-link.module.css.js +1 -1
- package/es/utils/polymorphism.js.map +1 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/checkbox/checkbox.js +1 -1
- package/lib/components/checkbox/checkbox.js.map +1 -1
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/deprecated-button/deprecated-button.d.ts +3 -3
- package/lib/components/deprecated-button/deprecated-button.js +1 -1
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/deprecated-loading/deprecated-loading.js +1 -1
- package/lib/components/deprecated-loading/deprecated-loading.js.map +1 -1
- package/lib/components/deprecated-modal/deprecated-modal.d.ts +2 -2
- package/lib/components/deprecated-modal/deprecated-modal.js +1 -1
- package/lib/components/deprecated-modal/deprecated-modal.js.map +1 -1
- package/lib/components/deprecated-modal/index.js.map +1 -1
- package/lib/components/dropdown/dropdown.d.ts +5 -2
- package/lib/components/dropdown/dropdown.js +1 -1
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/icons/CloseIcon.svg.js +1 -1
- package/lib/components/icons/CloseIcon.svg.js.map +1 -1
- package/lib/components/input/input.js +1 -1
- package/lib/components/input/input.js.map +1 -1
- package/lib/components/key-capturer/key-capturer.d.ts +1 -1
- package/lib/components/key-capturer/key-capturer.js +1 -1
- package/lib/components/key-capturer/key-capturer.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/menu/menu.d.ts +7 -7
- package/lib/components/menu/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/components/notification/notification.js +1 -1
- package/lib/components/notification/notification.js.map +1 -1
- package/lib/components/popover/popover.d.ts +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover.js.map +1 -1
- package/lib/components/popover/positioning-utils.js +1 -1
- package/lib/components/popover/positioning-utils.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.js +1 -1
- package/lib/components/progress-bar/progress-bar.js.map +1 -1
- package/lib/components/select/select.js +1 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/time/time-utils.js +1 -1
- package/lib/components/time/time-utils.js.map +1 -1
- package/lib/components/time/time.js +1 -1
- package/lib/components/time/time.js.map +1 -1
- package/lib/components/tooltip/index.d.ts +1 -2
- package/lib/components/tooltip/tooltip.d.ts +3 -3
- package/lib/components/tooltip/tooltip.js +1 -1
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/hooks/use-previous/use-previous.js +1 -1
- package/lib/hooks/use-previous/use-previous.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/new-components/alert/alert.d.ts +1 -1
- package/lib/new-components/alert/alert.js +1 -1
- package/lib/new-components/alert/alert.js.map +1 -1
- package/lib/new-components/avatar/avatar.js +1 -1
- package/lib/new-components/avatar/avatar.js.map +1 -1
- package/lib/new-components/avatar/utils.d.ts +1 -1
- package/lib/new-components/avatar/utils.js +1 -1
- package/lib/new-components/avatar/utils.js.map +1 -1
- package/lib/new-components/base-button/base-button.js +1 -1
- package/lib/new-components/base-button/base-button.js.map +1 -1
- package/lib/new-components/base-field/base-field.d.ts +1 -1
- package/lib/new-components/base-field/base-field.js +1 -1
- package/lib/new-components/base-field/base-field.js.map +1 -1
- package/lib/new-components/box/box.js +1 -1
- package/lib/new-components/box/box.js.map +1 -1
- package/lib/new-components/button/button.d.ts +1 -58
- package/lib/new-components/button/button.js +1 -1
- package/lib/new-components/button/button.js.map +1 -1
- package/lib/new-components/button-link/button-link.js +1 -1
- package/lib/new-components/button-link/button-link.js.map +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.d.ts +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/new-components/checkbox-field/checkbox-icon.js +1 -1
- package/lib/new-components/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/new-components/columns/columns.js +1 -1
- package/lib/new-components/columns/columns.js.map +1 -1
- package/lib/new-components/common-helpers.js +1 -1
- package/lib/new-components/common-helpers.js.map +1 -1
- package/lib/new-components/common-types.d.ts +2 -2
- package/lib/new-components/divider/divider.js +1 -1
- package/lib/new-components/divider/divider.js.map +1 -1
- package/lib/new-components/heading/heading.d.ts +2 -2
- package/lib/new-components/heading/heading.js +1 -1
- package/lib/new-components/heading/heading.js.map +1 -1
- package/lib/new-components/hidden/hidden.js +1 -1
- package/lib/new-components/hidden/hidden.js.map +1 -1
- package/lib/new-components/hidden-visually/hidden-visually.js +1 -1
- package/lib/new-components/hidden-visually/hidden-visually.js.map +1 -1
- package/lib/new-components/icons/alert-icon.d.ts +1 -1
- package/lib/new-components/icons/alert-icon.js +1 -1
- package/lib/new-components/icons/alert-icon.js.map +1 -1
- package/lib/new-components/icons/close-icon.js +1 -1
- package/lib/new-components/icons/close-icon.js.map +1 -1
- package/lib/new-components/icons/password-hidden-icon.js +1 -1
- package/lib/new-components/icons/password-hidden-icon.js.map +1 -1
- package/lib/new-components/icons/password-visible-icon.js +1 -1
- package/lib/new-components/icons/password-visible-icon.js.map +1 -1
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/loading/loading.d.ts +1 -1
- package/lib/new-components/loading/loading.js +1 -1
- package/lib/new-components/loading/loading.js.map +1 -1
- package/lib/new-components/modal/modal.js +1 -1
- package/lib/new-components/modal/modal.js.map +1 -1
- package/lib/new-components/modal/modal.module.css.js +1 -1
- package/lib/new-components/notice/notice.d.ts +1 -1
- package/lib/new-components/notice/notice.js +1 -1
- package/lib/new-components/notice/notice.js.map +1 -1
- package/lib/new-components/password-field/password-field.d.ts +1 -1
- package/lib/new-components/password-field/password-field.js +1 -1
- package/lib/new-components/password-field/password-field.js.map +1 -1
- package/lib/new-components/responsive-props.d.ts +1 -1
- package/lib/new-components/responsive-props.js +1 -1
- package/lib/new-components/responsive-props.js.map +1 -1
- package/lib/new-components/select-field/select-field.d.ts +1 -1
- package/lib/new-components/select-field/select-field.js +1 -1
- package/lib/new-components/select-field/select-field.js.map +1 -1
- package/lib/new-components/spinner/spinner.js +1 -1
- package/lib/new-components/spinner/spinner.js.map +1 -1
- package/lib/new-components/stack/stack.js +1 -1
- package/lib/new-components/stack/stack.js.map +1 -1
- package/lib/new-components/switch-field/switch-field.d.ts +1 -1
- package/lib/new-components/switch-field/switch-field.js +1 -1
- package/lib/new-components/switch-field/switch-field.js.map +1 -1
- package/lib/new-components/tabs/tabs.d.ts +13 -3
- package/lib/new-components/tabs/tabs.js +1 -1
- package/lib/new-components/tabs/tabs.js.map +1 -1
- package/lib/new-components/tabs/tabs.module.css.js +1 -1
- package/lib/new-components/test-helpers.d.ts +4 -3
- package/lib/new-components/text/text.js +1 -1
- package/lib/new-components/text/text.js.map +1 -1
- package/lib/new-components/text/text.module.css.js +1 -1
- package/lib/new-components/text-area/text-area.js +1 -1
- package/lib/new-components/text-area/text-area.js.map +1 -1
- package/lib/new-components/text-field/text-field.d.ts +1 -1
- package/lib/new-components/text-field/text-field.js +1 -1
- package/lib/new-components/text-field/text-field.js.map +1 -1
- package/lib/new-components/text-link/text-link.js +1 -1
- package/lib/new-components/text-link/text-link.js.map +1 -1
- package/lib/new-components/text-link/text-link.module.css.js +1 -1
- package/lib/utils/polymorphism.js.map +1 -1
- package/package.json +45 -38
- package/styles/base-field.css +1 -1
- package/styles/checkbox-field.css +1 -1
- package/styles/menu.css +1 -1
- package/styles/modal.css +1 -1
- package/styles/modal.module.css.css +1 -1
- package/styles/password-field.css +1 -1
- package/styles/reactist.css +6 -6
- package/styles/select-field.css +1 -1
- package/styles/switch-field.css +1 -1
- package/styles/tabs.css +1 -1
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-area.css +1 -1
- package/styles/text-field.css +1 -1
- package/styles/text-link.css +1 -1
- package/styles/text-link.module.css.css +1 -1
- package/styles/text.css +1 -1
- package/styles/text.module.css.css +1 -1
|
@@ -11,62 +11,5 @@ export declare type ButtonProps = NativeButtonProps & BaseButtonProps & {
|
|
|
11
11
|
*
|
|
12
12
|
* @see ButtonLink
|
|
13
13
|
*/
|
|
14
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
15
|
-
variant: "primary" | "secondary" | "tertiary" | "quaternary";
|
|
16
|
-
tone?: "normal" | "destructive" | undefined;
|
|
17
|
-
size?: "normal" | "small" | "large" | undefined;
|
|
18
|
-
disabled?: boolean | undefined;
|
|
19
|
-
loading?: boolean | undefined;
|
|
20
|
-
tooltip?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (() => React.ReactNode) | null | undefined;
|
|
21
|
-
tooltipGapSize?: number | undefined;
|
|
22
|
-
} & {
|
|
23
|
-
icon: React.ReactChild;
|
|
24
|
-
'aria-label': string;
|
|
25
|
-
children?: undefined;
|
|
26
|
-
startIcon?: undefined;
|
|
27
|
-
endIcon?: undefined;
|
|
28
|
-
width?: undefined;
|
|
29
|
-
align?: undefined;
|
|
30
|
-
} & {
|
|
31
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
32
|
-
exceptionallySetClassName?: string | undefined;
|
|
33
|
-
} & React.RefAttributes<HTMLButtonElement>) | (Pick<React.AllHTMLAttributes<HTMLButtonElement>, "aria-label" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "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"> & {
|
|
34
|
-
variant: "primary" | "secondary" | "tertiary" | "quaternary";
|
|
35
|
-
tone?: "normal" | "destructive" | undefined;
|
|
36
|
-
size?: "normal" | "small" | "large" | undefined;
|
|
37
|
-
disabled?: boolean | undefined;
|
|
38
|
-
loading?: boolean | undefined;
|
|
39
|
-
tooltip?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (() => React.ReactNode) | null | undefined;
|
|
40
|
-
tooltipGapSize?: number | undefined;
|
|
41
|
-
} & {
|
|
42
|
-
children: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal;
|
|
43
|
-
startIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
44
|
-
endIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
45
|
-
icon?: undefined;
|
|
46
|
-
} & {
|
|
47
|
-
width?: "auto" | undefined;
|
|
48
|
-
align?: undefined;
|
|
49
|
-
} & {
|
|
50
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
51
|
-
exceptionallySetClassName?: string | undefined;
|
|
52
|
-
} & React.RefAttributes<HTMLButtonElement>) | (Pick<React.AllHTMLAttributes<HTMLButtonElement>, "aria-label" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "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"> & {
|
|
53
|
-
variant: "primary" | "secondary" | "tertiary" | "quaternary";
|
|
54
|
-
tone?: "normal" | "destructive" | undefined;
|
|
55
|
-
size?: "normal" | "small" | "large" | undefined;
|
|
56
|
-
disabled?: boolean | undefined;
|
|
57
|
-
loading?: boolean | undefined;
|
|
58
|
-
tooltip?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | (() => React.ReactNode) | null | undefined;
|
|
59
|
-
tooltipGapSize?: number | undefined;
|
|
60
|
-
} & {
|
|
61
|
-
children: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal;
|
|
62
|
-
startIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
63
|
-
endIcon?: string | number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
|
|
64
|
-
icon?: undefined;
|
|
65
|
-
} & {
|
|
66
|
-
width: "small" | "large" | "xsmall" | "medium" | "xlarge" | "full";
|
|
67
|
-
align?: "start" | "center" | "end" | undefined;
|
|
68
|
-
} & {
|
|
69
|
-
type?: "button" | "submit" | "reset" | undefined;
|
|
70
|
-
exceptionallySetClassName?: string | undefined;
|
|
71
|
-
} & React.RefAttributes<HTMLButtonElement>)>;
|
|
14
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
72
15
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("../base-button/base-button.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("../base-button/base-button.js");const r=["variant","tone","size","type","disabled","exceptionallySetClassName"];exports.Button=t.forwardRef((function(o,s){let{variant:l,tone:n="normal",size:i="normal",type:u="button",disabled:b=!1,exceptionallySetClassName:p}=o,c=e.objectWithoutProperties(o,r);return t.createElement(a.BaseButton,e.objectSpread2(e.objectSpread2({},c),{},{as:"button",ref:s,variant:l,tone:n,size:i,type:u,disabled:b,exceptionallySetClassName:p}))}));
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../src/new-components/button/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\n\ntype NativeButtonProps = Omit<\n React.AllHTMLAttributes<HTMLButtonElement>,\n 'aria-disabled' | 'className' | keyof BaseButtonProps\n>\n\nexport type ButtonProps = NativeButtonProps &\n BaseButtonProps & {\n type?: 'button' | 'submit' | 'reset'\n exceptionallySetClassName?: string\n }\n\n/**\n * A semantic button that also looks like a button, and provides all the necessary visual variants.\n * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).\n *\n * @see ButtonLink\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant,\n tone = 'normal',\n size = 'normal',\n type = 'button',\n disabled = false,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as=\"button\"\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n type={type}\n disabled={disabled}\n exceptionallySetClassName={exceptionallySetClassName}\n />\n )\n})\n"],"names":["React","ref","variant","tone","size","type","disabled","exceptionallySetClassName","props","BaseButton","as"],"mappings":"
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/new-components/button/button.tsx"],"sourcesContent":["import * as React from 'react'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\n\ntype NativeButtonProps = Omit<\n React.AllHTMLAttributes<HTMLButtonElement>,\n 'aria-disabled' | 'className' | keyof BaseButtonProps\n>\n\nexport type ButtonProps = NativeButtonProps &\n BaseButtonProps & {\n type?: 'button' | 'submit' | 'reset'\n exceptionallySetClassName?: string\n }\n\n/**\n * A semantic button that also looks like a button, and provides all the necessary visual variants.\n * It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).\n *\n * @see ButtonLink\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n variant,\n tone = 'normal',\n size = 'normal',\n type = 'button',\n disabled = false,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as=\"button\"\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n type={type}\n disabled={disabled}\n exceptionallySetClassName={exceptionallySetClassName}\n />\n )\n})\n"],"names":["React","ref","variant","tone","size","type","disabled","exceptionallySetClassName","props","BaseButton","as"],"mappings":"8RAqBsBA,cAAiD,WAUnEC,OATAC,QACIA,EADJC,KAEIA,EAAO,SAFXC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,SAKIA,GAAW,EALfC,0BAMIA,KACGC,iCAIP,OACIR,gBAACS,gDACOD,OACJE,GAAG,SACHT,IAAKA,EACLC,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,KAAMA,EACNC,SAAUA,EACVC,0BAA2BA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),r=require("../../utils/polymorphism.js"),o=require("../base-button/base-button.js");const a=["as","variant","tone","size","exceptionallySetClassName","openInNewTab"];exports.ButtonLink=r.polymorphicComponent((function(r,n){let{as:s="a",variant:i,tone:l="normal",size:p="normal",exceptionallySetClassName:u,openInNewTab:c=!1}=r,b=e.objectWithoutProperties(r,a);return t.createElement(o.BaseButton,e.objectSpread2(e.objectSpread2({},b),{},{as:s,ref:n,variant:i,tone:l,size:p,exceptionallySetClassName:u,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0}))}));
|
|
2
2
|
//# sourceMappingURL=button-link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-link.js","sources":["../../../src/new-components/button-link/button-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\nimport type { OpenInNewTab } from '../common-types'\n\ntype NativeLinkProps = Omit<\n JSX.IntrinsicElements['a'],\n 'aria-disabled' | 'target' | 'rel' | 'className'\n>\n\nexport type ButtonLinkProps = NativeLinkProps & BaseButtonProps & OpenInNewTab\n\n/**\n * A semantic link that looks like a button, exactly matching the `Button` component in all visual\n * aspects.\n *\n * @see Button\n */\nexport const ButtonLink = polymorphicComponent<'a', ButtonLinkProps>(function ButtonLink(\n {\n as = 'a',\n variant,\n tone = 'normal',\n size = 'normal',\n exceptionallySetClassName,\n openInNewTab = false,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as={as}\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n exceptionallySetClassName={exceptionallySetClassName}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n"],"names":["polymorphicComponent","ref","as","variant","tone","size","exceptionallySetClassName","openInNewTab","props","React","BaseButton","target","undefined","rel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-link.js","sources":["../../../src/new-components/button-link/button-link.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { BaseButton } from '../base-button'\nimport type { BaseButtonProps } from '../base-button'\nimport type { OpenInNewTab } from '../common-types'\n\ntype NativeLinkProps = Omit<\n JSX.IntrinsicElements['a'],\n 'aria-disabled' | 'target' | 'rel' | 'className'\n>\n\nexport type ButtonLinkProps = NativeLinkProps & BaseButtonProps & OpenInNewTab\n\n/**\n * A semantic link that looks like a button, exactly matching the `Button` component in all visual\n * aspects.\n *\n * @see Button\n */\nexport const ButtonLink = polymorphicComponent<'a', ButtonLinkProps>(function ButtonLink(\n {\n as = 'a',\n variant,\n tone = 'normal',\n size = 'normal',\n exceptionallySetClassName,\n openInNewTab = false,\n ...props\n },\n ref,\n) {\n return (\n <BaseButton\n {...props}\n as={as}\n ref={ref}\n variant={variant}\n tone={tone}\n size={size}\n exceptionallySetClassName={exceptionallySetClassName}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n />\n )\n})\n"],"names":["polymorphicComponent","ref","as","variant","tone","size","exceptionallySetClassName","openInNewTab","props","React","BaseButton","target","undefined","rel"],"mappings":"6UAmB0BA,wBAA2C,WAUjEC,OATAC,GACIA,EAAK,IADTC,QAEIA,EAFJC,KAGIA,EAAO,SAHXC,KAIIA,EAAO,SAJXC,0BAKIA,EALJC,aAMIA,GAAe,KACZC,iCAIP,OACIC,gBAACC,gDACOF,OACJN,GAAIA,EACJD,IAAKA,EACLE,QAASA,EACTC,KAAMA,EACNC,KAAMA,EACNC,0BAA2BA,EAC3BK,OAAQJ,EAAe,cAAWK,EAClCC,IAAKN,EAAe,2BAAwBK"}
|
|
@@ -16,6 +16,6 @@ declare type CheckboxFieldProps = Omit<JSX.IntrinsicElements['input'], 'type' |
|
|
|
16
16
|
/** Defines whether or not the checkbox can be of a `mixed` state. */
|
|
17
17
|
indeterminate?: boolean;
|
|
18
18
|
};
|
|
19
|
-
declare const CheckboxField: React.ForwardRefExoticComponent<Pick<CheckboxFieldProps, "disabled" | "aria-controls" | "aria-describedby" | "aria-label" | "aria-labelledby" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "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" | "label" | "indeterminate"> & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
+
declare const CheckboxField: React.ForwardRefExoticComponent<Pick<CheckboxFieldProps, "disabled" | "aria-controls" | "aria-describedby" | "aria-label" | "aria-labelledby" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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" | "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" | "label" | "indeterminate"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
20
|
export { CheckboxField };
|
|
21
21
|
export type { CheckboxFieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),n=require("../box/box.js"),t=require("../text/text.js"),a=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),n=require("../box/box.js"),t=require("../text/text.js"),a=require("ariakit-utils"),r=require("./checkbox-icon.js"),o=require("./checkbox-field.module.css.js");const c=["label","disabled","indeterminate","defaultChecked","onChange"];exports.CheckboxField=l.forwardRef((function(u,d){var i,s,b;let{label:f,disabled:h,indeterminate:k,defaultChecked:p,onChange:x}=u,m=e.objectWithoutProperties(u,c);"boolean"!=typeof k||"boolean"==typeof m.checked||(console.warn("Cannot use indeterminate on an uncontrolled checkbox"),k=void 0),f||m["aria-label"]||m["aria-labelledby"]||console.warn("A Checkbox needs a label");const[y,j]=l.useState(!1),[C,q]=l.useState(null!=(i=null!=(s=m.checked)?s:p)&&i),g=null!=(b=m.checked)?b:C,v=l.useRef(null),B=a.useForkRef(v,d);return l.useEffect((function(){v.current&&"boolean"==typeof k&&(v.current.indeterminate=k)}),[k]),l.createElement(n.Box,{as:"label",display:"flex",alignItems:"center",className:[o.default.container,h?o.default.disabled:null,g?o.default.checked:null,y?o.default.keyFocused:null]},l.createElement("input",e.objectSpread2(e.objectSpread2({},m),{},{ref:B,type:"checkbox","aria-checked":k?"mixed":g,checked:g,disabled:h,onChange:e=>{null==x||x(e),e.defaultPrevented||q(e.currentTarget.checked)},onBlur:e=>{j(!1),null==m||null==m.onBlur||m.onBlur(e)},onKeyUp:e=>{j(!0),null==m||null==m.onKeyUp||m.onKeyUp(e)}})),l.createElement(r.CheckboxIcon,{checked:g,disabled:h,indeterminate:k,"aria-hidden":!0}),f?l.createElement(t.Text,null,f):null)}));
|
|
2
2
|
//# sourceMappingURL=checkbox-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-field.js","sources":["../../../src/new-components/checkbox-field/checkbox-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useForkRef } from '
|
|
1
|
+
{"version":3,"file":"checkbox-field.js","sources":["../../../src/new-components/checkbox-field/checkbox-field.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useForkRef } from 'ariakit-utils'\nimport { Box } from '../box'\nimport { Text } from '../text'\nimport { CheckboxIcon } from './checkbox-icon'\n\nimport styles from './checkbox-field.module.css'\n\ntype CheckboxFieldProps = Omit<\n JSX.IntrinsicElements['input'],\n | 'type'\n | 'className'\n | 'disabled'\n | 'aria-controls'\n | 'aria-describedby'\n | 'aria-label'\n | 'aria-labelledby'\n> & {\n 'aria-checked'?: never\n /** Identifies the set of checkboxes controlled by the mixed checkbox for assistive technologies. */\n 'aria-controls'?: string\n /** Identifies the element (or elements) that describes the checkbox for assistive technologies. */\n 'aria-describedby'?: string\n /** Defines a string value that labels the current checkbox for assistive technologies. */\n 'aria-label'?: string\n /** Identifies the element (or elements) that labels the current checkbox for assistive technologies. */\n 'aria-labelledby'?: string\n /** Defines whether or not the checkbox is disabled. */\n disabled?: boolean\n /** The label for the checkbox element. */\n label?: string\n /** Defines whether or not the checkbox can be of a `mixed` state. */\n indeterminate?: boolean\n}\n\nconst CheckboxField = React.forwardRef<HTMLInputElement, CheckboxFieldProps>(function CheckboxField(\n { label, disabled, indeterminate, defaultChecked, onChange, ...props },\n ref,\n) {\n const isControlledComponent = typeof props.checked === 'boolean'\n if (typeof indeterminate === 'boolean' && !isControlledComponent) {\n // eslint-disable-next-line no-console\n console.warn('Cannot use indeterminate on an uncontrolled checkbox')\n indeterminate = undefined\n }\n\n if (!label && !props['aria-label'] && !props['aria-labelledby']) {\n // eslint-disable-next-line no-console\n console.warn('A Checkbox needs a label')\n }\n\n const [keyFocused, setKeyFocused] = React.useState(false)\n const [checkedState, setChecked] = React.useState(props.checked ?? defaultChecked ?? false)\n const isChecked = props.checked ?? checkedState\n\n const internalRef = React.useRef<HTMLInputElement>(null)\n const combinedRef = useForkRef(internalRef, ref)\n React.useEffect(\n function setIndeterminate() {\n if (internalRef.current && typeof indeterminate === 'boolean') {\n internalRef.current.indeterminate = indeterminate\n }\n },\n [indeterminate],\n )\n\n return (\n <Box\n as=\"label\"\n display=\"flex\"\n alignItems=\"center\"\n className={[\n styles.container,\n disabled ? styles.disabled : null,\n isChecked ? styles.checked : null,\n keyFocused ? styles.keyFocused : null,\n ]}\n >\n <input\n {...props}\n ref={combinedRef}\n type=\"checkbox\"\n aria-checked={indeterminate ? 'mixed' : isChecked}\n checked={isChecked}\n disabled={disabled}\n onChange={(event) => {\n onChange?.(event)\n if (!event.defaultPrevented) {\n setChecked(event.currentTarget.checked)\n }\n }}\n onBlur={(event) => {\n setKeyFocused(false)\n props?.onBlur?.(event)\n }}\n onKeyUp={(event) => {\n setKeyFocused(true)\n props?.onKeyUp?.(event)\n }}\n />\n <CheckboxIcon\n checked={isChecked}\n disabled={disabled}\n indeterminate={indeterminate}\n aria-hidden\n />\n {label ? <Text>{label}</Text> : null}\n </Box>\n )\n})\n\nexport { CheckboxField }\nexport type { CheckboxFieldProps }\n"],"names":["React","ref","label","disabled","indeterminate","defaultChecked","onChange","props","checked","console","warn","undefined","keyFocused","setKeyFocused","checkedState","setChecked","isChecked","internalRef","combinedRef","useForkRef","current","Box","as","display","alignItems","className","styles","container","type","event","defaultPrevented","currentTarget","onBlur","onKeyUp","CheckboxIcon","Text"],"mappings":"kZAmCsBA,cAAuD,WAEzEC,iBADAC,MAAEA,EAAFC,SAASA,EAATC,cAAmBA,EAAnBC,eAAkCA,EAAlCC,SAAkDA,KAAaC,iCAIlC,kBAAlBH,GAD4C,kBAAlBG,EAAMC,UAGvCC,QAAQC,KAAK,wDACbN,OAAgBO,GAGfT,GAAUK,EAAM,eAAkBA,EAAM,oBAEzCE,QAAQC,KAAK,4BAGjB,MAAOE,EAAYC,GAAiBb,YAAe,IAC5Cc,EAAcC,GAAcf,6BAAeO,EAAMC,WAAWH,OAC7DW,WAAYT,EAAMC,WAAWM,EAE7BG,EAAcjB,SAA+B,MAC7CkB,EAAcC,aAAWF,EAAahB,GAU5C,OATAD,aACI,WACQiB,EAAYG,SAAoC,kBAAlBhB,IAC9Ba,EAAYG,QAAQhB,cAAgBA,KAG5C,CAACA,IAIDJ,gBAACqB,OACGC,GAAG,QACHC,QAAQ,OACRC,WAAW,SACXC,UAAW,CACPC,UAAOC,UACPxB,EAAWuB,UAAOvB,SAAW,KAC7Ba,EAAYU,UAAOlB,QAAU,KAC7BI,EAAac,UAAOd,WAAa,OAGrCZ,2DACQO,OACJN,IAAKiB,EACLU,KAAK,0BACSxB,EAAgB,QAAUY,EACxCR,QAASQ,EACTb,SAAUA,EACVG,SAAWuB,UACPvB,GAAAA,EAAWuB,GACNA,EAAMC,kBACPf,EAAWc,EAAME,cAAcvB,UAGvCwB,OAASH,IACLhB,GAAc,SACdN,SAAAA,EAAOyB,QAAPzB,EAAOyB,OAASH,IAEpBI,QAAUJ,IACNhB,GAAc,SACdN,SAAAA,EAAO0B,SAAP1B,EAAO0B,QAAUJ,OAGzB7B,gBAACkC,gBACG1B,QAASQ,EACTb,SAAUA,EACVC,cAAeA,qBAGlBF,EAAQF,gBAACmC,YAAMjC,GAAgB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),a=require("react");const t=["checked","indeterminate","disabled"],r={checked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z",unchecked:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z",mixed:"M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z",filled:"M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z"};exports.CheckboxIcon=function(i){let{checked:c,indeterminate:d,disabled:l}=i,n=e.objectWithoutProperties(i,t);const o=function({checked:e,indeterminate:a,disabled:t}){return a?"mixed":e?"checked":t?"filled":"unchecked"}({checked:c,indeterminate:d,disabled:l});return a.createElement("svg",e.objectSpread2({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},n),a.createElement("path",{fill:"currentColor",fillRule:"nonzero",d:r[o]}))};
|
|
2
2
|
//# sourceMappingURL=checkbox-icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-icon.js","sources":["../../../src/new-components/checkbox-field/checkbox-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst svgPath = {\n checked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',\n unchecked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',\n mixed:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',\n filled:\n 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',\n} as const\n\ntype Props = React.SVGProps<SVGSVGElement> & {\n checked?: boolean\n indeterminate?: boolean\n disabled?: boolean\n}\n\nfunction getPathKey({ checked, indeterminate, disabled }: Props): keyof typeof svgPath {\n if (indeterminate) {\n return 'mixed' // indeterminate, when true, overrides the checked state\n }\n\n if (checked) {\n return 'checked'\n }\n\n // We only used 'filled' when unchecked AND disabled, because the default unchecked icon\n // is not enough to convey the disabled state with opacity alone. For all other cases\n // above, when disabled, we use the same icon the corresponds to that state, and the\n // opacity conveys the fact that the checkbox is disabled.\n // See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390\n if (disabled) {\n return 'filled'\n }\n\n return 'unchecked'\n}\n\nfunction CheckboxIcon({ checked, indeterminate, disabled, ...props }: Props) {\n const pathKey = getPathKey({ checked, indeterminate, disabled })\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" fillRule=\"nonzero\" d={svgPath[pathKey]} />\n </svg>\n )\n}\n\nexport { CheckboxIcon }\n"],"names":["svgPath","checked","unchecked","mixed","filled","indeterminate","disabled","props","pathKey","React","xmlns","width","height","viewBox","fill","fillRule","d"],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkbox-icon.js","sources":["../../../src/new-components/checkbox-field/checkbox-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nconst svgPath = {\n checked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',\n unchecked:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',\n mixed:\n 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2 7H8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2z',\n filled:\n 'M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4Z',\n} as const\n\ntype Props = React.SVGProps<SVGSVGElement> & {\n checked?: boolean\n indeterminate?: boolean\n disabled?: boolean\n}\n\nfunction getPathKey({ checked, indeterminate, disabled }: Props): keyof typeof svgPath {\n if (indeterminate) {\n return 'mixed' // indeterminate, when true, overrides the checked state\n }\n\n if (checked) {\n return 'checked'\n }\n\n // We only used 'filled' when unchecked AND disabled, because the default unchecked icon\n // is not enough to convey the disabled state with opacity alone. For all other cases\n // above, when disabled, we use the same icon the corresponds to that state, and the\n // opacity conveys the fact that the checkbox is disabled.\n // See https://twist.com/a/1585/ch/414345/t/2257308/c/65201390\n if (disabled) {\n return 'filled'\n }\n\n return 'unchecked'\n}\n\nfunction CheckboxIcon({ checked, indeterminate, disabled, ...props }: Props) {\n const pathKey = getPathKey({ checked, indeterminate, disabled })\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" fillRule=\"nonzero\" d={svgPath[pathKey]} />\n </svg>\n )\n}\n\nexport { CheckboxIcon }\n"],"names":["svgPath","checked","unchecked","mixed","filled","indeterminate","disabled","props","pathKey","getPathKey","React","xmlns","width","height","viewBox","fill","fillRule","d"],"mappings":"mMAEMA,EAAU,CACZC,QACI,4LACJC,UACI,kJACJC,MACI,iHACJC,OACI,gJA8BR,gBAAsBH,QAAEA,EAAFI,cAAWA,EAAXC,SAA0BA,KAAaC,iCACzD,MAAMC,EAtBV,UAAoBP,QAAEA,EAAFI,cAAWA,EAAXC,SAA0BA,IAC1C,OAAID,EACO,QAGPJ,EACO,UAQPK,EACO,SAGJ,YAISG,CAAW,CAAER,QAAAA,EAASI,cAAAA,EAAeC,SAAAA,IACrD,OACII,uCACIC,MAAM,6BACNC,MAAM,KACNC,OAAO,KACPC,QAAQ,aACJP,GAEJG,wBAAMK,KAAK,eAAeC,SAAS,UAAUC,EAAGjB,EAAQQ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../../utils/polymorphism.js"),o=require("../responsive-props.js"),r=require("../box/box.js"),s=require("./columns.module.css.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),l=require("../../utils/polymorphism.js"),o=require("../responsive-props.js"),r=require("../box/box.js"),s=require("./columns.module.css.js");const a=["width","children","exceptionallySetClassName"],i=["space","align","alignY","collapseBelow","children","exceptionallySetClassName"],n=l.polymorphicComponent((function(l,i){let{width:n="auto",children:p,exceptionallySetClassName:c}=l,u=e.objectWithoutProperties(l,a);return t.createElement(r.Box,e.objectSpread2(e.objectSpread2({},u),{},{className:[c,s.default.column,"content"!==n?o.getClassNames(s.default,"columnWidth",n.replace("/","-")):null],minWidth:0,width:"content"!==n?"full":void 0,height:"full",flexShrink:"content"===n?0:void 0,ref:i}),p)})),p=l.polymorphicComponent((function(l,a){let{space:n,align:p="left",alignY:c="top",collapseBelow:u,children:m,exceptionallySetClassName:d}=l,f=e.objectWithoutProperties(l,i);return t.createElement(r.Box,e.objectSpread2(e.objectSpread2({},f),{},{className:[d,o.getClassNames(s.default,"space",n)],display:"flex",flexDirection:"desktop"===u?{mobile:"column",tablet:"column",desktop:"row"}:"tablet"===u?{mobile:"column",tablet:"row"}:"row",alignItems:o.mapResponsiveProp(c,e=>"top"===e?"flexStart":"bottom"===e?"flexEnd":e),justifyContent:o.mapResponsiveProp(p,e=>"left"===e?"flexStart":"right"===e?"flexEnd":e),ref:a}),m)}));exports.Column=n,exports.Columns=p;
|
|
2
2
|
//# sourceMappingURL=columns.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columns.js","sources":["../../../src/new-components/columns/columns.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\n\nimport styles from './columns.module.css'\n\ntype ColumnWidth =\n | 'auto'\n | 'content'\n | '1/2'\n | '1/3'\n | '2/3'\n | '1/4'\n | '3/4'\n | '1/5'\n | '2/5'\n | '3/5'\n | '4/5'\n\ninterface ColumnProps {\n width?: ColumnWidth\n}\n\nconst Column = polymorphicComponent<'div', ColumnProps>(function Column(\n { width = 'auto', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.column,\n width !== 'content'\n ? getClassNames(styles, 'columnWidth', width.replace('/', '-'))\n : null,\n ]}\n minWidth={0}\n width={width !== 'content' ? 'full' : undefined}\n height=\"full\"\n flexShrink={width === 'content' ? 0 : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\ntype ColumnsHorizontalAlignment = 'left' | 'center' | 'right'\ntype ColumnsVerticalAlignment = 'top' | 'center' | 'bottom' | 'baseline'\ntype ColumnsCollapseBelow = Exclude<ResponsiveBreakpoints, 'mobile'>\n\ninterface ColumnsProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<ColumnsHorizontalAlignment>\n alignY?: ResponsiveProp<ColumnsVerticalAlignment>\n collapseBelow?: ResponsiveBreakpoints\n}\n\nconst Columns = polymorphicComponent<'div', ColumnsProps>(function Columns(\n {\n space,\n align = 'left',\n alignY = 'top',\n collapseBelow,\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n display=\"flex\"\n flexDirection={\n collapseBelow === 'desktop'\n ? { mobile: 'column', tablet: 'column', desktop: 'row' }\n : collapseBelow === 'tablet'\n ? { mobile: 'column', tablet: 'row' }\n : 'row'\n }\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : alignY,\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : align,\n )}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type {\n ColumnProps,\n ColumnsProps,\n ColumnWidth,\n ColumnsCollapseBelow,\n ColumnsHorizontalAlignment,\n ColumnsVerticalAlignment,\n}\n\nexport { Column, Columns }\n"],"names":["Column","polymorphicComponent","ref","width","children","exceptionallySetClassName","props","React","Box","className","styles","column","getClassNames","replace","minWidth","undefined","height","flexShrink","Columns","space","align","alignY","collapseBelow","display","flexDirection","mobile","tablet","desktop","alignItems","mapResponsiveProp","justifyContent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"columns.js","sources":["../../../src/new-components/columns/columns.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { getClassNames, mapResponsiveProp } from '../responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp, ResponsiveBreakpoints } from '../responsive-props'\nimport type { Space } from '../common-types'\nimport type { ReusableBoxProps } from '../box'\n\nimport styles from './columns.module.css'\n\ntype ColumnWidth =\n | 'auto'\n | 'content'\n | '1/2'\n | '1/3'\n | '2/3'\n | '1/4'\n | '3/4'\n | '1/5'\n | '2/5'\n | '3/5'\n | '4/5'\n\ninterface ColumnProps {\n width?: ColumnWidth\n}\n\nconst Column = polymorphicComponent<'div', ColumnProps>(function Column(\n { width = 'auto', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.column,\n width !== 'content'\n ? getClassNames(styles, 'columnWidth', width.replace('/', '-'))\n : null,\n ]}\n minWidth={0}\n width={width !== 'content' ? 'full' : undefined}\n height=\"full\"\n flexShrink={width === 'content' ? 0 : undefined}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\ntype ColumnsHorizontalAlignment = 'left' | 'center' | 'right'\ntype ColumnsVerticalAlignment = 'top' | 'center' | 'bottom' | 'baseline'\ntype ColumnsCollapseBelow = Exclude<ResponsiveBreakpoints, 'mobile'>\n\ninterface ColumnsProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<ColumnsHorizontalAlignment>\n alignY?: ResponsiveProp<ColumnsVerticalAlignment>\n collapseBelow?: ResponsiveBreakpoints\n}\n\nconst Columns = polymorphicComponent<'div', ColumnsProps>(function Columns(\n {\n space,\n align = 'left',\n alignY = 'top',\n collapseBelow,\n children,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n return (\n <Box\n {...props}\n className={[exceptionallySetClassName, getClassNames(styles, 'space', space)]}\n display=\"flex\"\n flexDirection={\n collapseBelow === 'desktop'\n ? { mobile: 'column', tablet: 'column', desktop: 'row' }\n : collapseBelow === 'tablet'\n ? { mobile: 'column', tablet: 'row' }\n : 'row'\n }\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : alignY,\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : align,\n )}\n ref={ref}\n >\n {children}\n </Box>\n )\n})\n\nexport type {\n ColumnProps,\n ColumnsProps,\n ColumnWidth,\n ColumnsCollapseBelow,\n ColumnsHorizontalAlignment,\n ColumnsVerticalAlignment,\n}\n\nexport { Column, Columns }\n"],"names":["Column","polymorphicComponent","ref","width","children","exceptionallySetClassName","props","React","Box","className","styles","column","getClassNames","replace","minWidth","undefined","height","flexShrink","Columns","space","align","alignY","collapseBelow","display","flexDirection","mobile","tablet","desktop","alignItems","mapResponsiveProp","justifyContent"],"mappings":"8aA4BMA,EAASC,wBAAyC,WAEpDC,OADAC,MAAEA,EAAQ,OAAVC,SAAkBA,EAAlBC,0BAA4BA,KAA8BC,iCAG1D,OACIC,gBAACC,yCACOF,OACJG,UAAW,CACPJ,EACAK,UAAOC,OACG,YAAVR,EACMS,gBAAcF,UAAQ,cAAeP,EAAMU,QAAQ,IAAK,MACxD,MAEVC,SAAU,EACVX,MAAiB,YAAVA,EAAsB,YAASY,EACtCC,OAAO,OACPC,WAAsB,YAAVd,EAAsB,OAAIY,EACtCb,IAAKA,IAEJE,MAgBPc,EAAUjB,wBAA0C,WAUtDC,OATAiB,MACIA,EADJC,MAEIA,EAAQ,OAFZC,OAGIA,EAAS,MAHbC,cAIIA,EAJJlB,SAKIA,EALJC,0BAMIA,KACGC,iCAIP,OACIC,gBAACC,yCACOF,OACJG,UAAW,CAACJ,EAA2BO,gBAAcF,UAAQ,QAASS,IACtEI,QAAQ,OACRC,cACsB,YAAlBF,EACM,CAAEG,OAAQ,SAAUC,OAAQ,SAAUC,QAAS,OAC7B,WAAlBL,EACA,CAAEG,OAAQ,SAAUC,OAAQ,OAC5B,MAEVE,WAAYC,oBAAkBR,EAASA,GACxB,QAAXA,EAAmB,YAAyB,WAAXA,EAAsB,UAAYA,GAEvES,eAAgBD,oBAAkBT,EAAQA,GAC5B,SAAVA,EAAmB,YAAwB,UAAVA,EAAoB,UAAYA,GAErElB,IAAKA,IAEJE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");let r=0;function t(e){return e+"-"+r++}exports.generateElementId=t,exports.useId=function(r){const n=e.useRef(null!=r?r:null);return n.current||(n.current=t("element")),n.current};
|
|
2
2
|
//# sourceMappingURL=common-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-helpers.js","sources":["../../src/new-components/common-helpers.ts"],"sourcesContent":["import * as React from 'react'\n\nlet uid = 0\nfunction uniqueId() {\n return uid++\n}\n\nexport function generateElementId(prefix: string): string {\n const num = uniqueId()\n return `${prefix}-${num}`\n}\n\nexport function useId(providedId?: string): string {\n const ref = React.useRef<string | null>(providedId ?? null)\n if (!ref.current) {\n ref.current = generateElementId('element')\n }\n return ref.current\n}\n"],"names":["uid","generateElementId","prefix","providedId","ref","React","current"],"mappings":"
|
|
1
|
+
{"version":3,"file":"common-helpers.js","sources":["../../src/new-components/common-helpers.ts"],"sourcesContent":["import * as React from 'react'\n\nlet uid = 0\nfunction uniqueId() {\n return uid++\n}\n\nexport function generateElementId(prefix: string): string {\n const num = uniqueId()\n return `${prefix}-${num}`\n}\n\nexport function useId(providedId?: string): string {\n const ref = React.useRef<string | null>(providedId ?? null)\n if (!ref.current) {\n ref.current = generateElementId('element')\n }\n return ref.current\n}\n"],"names":["uid","generateElementId","prefix","providedId","ref","React","current"],"mappings":"2FAEA,IAAIA,EAAM,WAKMC,EAAkBC,GAE9B,OAAUA,MALHF,uDAQWG,GAClB,MAAMC,EAAMC,eAA4BF,EAAAA,EAAc,MAItD,OAHKC,EAAIE,UACLF,EAAIE,QAAUL,EAAkB,YAE7BG,EAAIE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import classNames from 'classnames';
|
|
1
|
+
import type classNames from 'classnames';
|
|
2
2
|
import type { HTMLAttributes } from 'react';
|
|
3
3
|
export declare type Space = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
4
4
|
export declare type SpaceWithNegatives = Space | '-xsmall' | '-small' | '-medium' | '-large' | '-xlarge' | '-xxlarge';
|
|
5
|
-
export declare type Tone = 'normal' | 'secondary' | 'danger';
|
|
5
|
+
export declare type Tone = 'normal' | 'secondary' | 'danger' | 'positive';
|
|
6
6
|
export declare type AlertTone = 'info' | 'positive' | 'caution' | 'critical';
|
|
7
7
|
export declare type DividerWeight = 'primary' | 'secondary' | 'tertiary' | 'none';
|
|
8
8
|
declare type ClassValue = Parameters<typeof classNames>[number];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),t=require("../responsive-props.js"),s=require("../box/box.js"),i=require("./divider.module.css.js");const o=["weight"];exports.Divider=function(u){let{weight:a="tertiary"}=u,l=e.objectWithoutProperties(u,o);return r.createElement(s.Box,e.objectSpread2({as:"hr",className:t.getClassNames(i.default,"weight",a)},l))};
|
|
2
2
|
//# sourceMappingURL=divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../../src/new-components/divider/divider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport type { DividerWeight } from '../common-types'\n\nimport styles from './divider.module.css'\n\ninterface DividerProps {\n weight?: Exclude<DividerWeight, 'none'>\n}\n\nfunction Divider({ weight = 'tertiary', ...props }: DividerProps) {\n return <Box as=\"hr\" className={getClassNames(styles, 'weight', weight)} {...props} />\n}\n\nexport type { DividerProps, DividerWeight }\nexport { Divider }\n"],"names":["weight","props","React","Box","as","className","getClassNames","styles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"divider.js","sources":["../../../src/new-components/divider/divider.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport type { DividerWeight } from '../common-types'\n\nimport styles from './divider.module.css'\n\ninterface DividerProps {\n weight?: Exclude<DividerWeight, 'none'>\n}\n\nfunction Divider({ weight = 'tertiary', ...props }: DividerProps) {\n return <Box as=\"hr\" className={getClassNames(styles, 'weight', weight)} {...props} />\n}\n\nexport type { DividerProps, DividerWeight }\nexport { Divider }\n"],"names":["weight","props","React","Box","as","className","getClassNames","styles"],"mappings":"2RAWA,gBAAiBA,OAAEA,EAAS,cAAeC,iCACvC,OAAOC,gBAACC,uBAAIC,GAAG,KAAKC,UAAWC,gBAAcC,UAAQ,SAAUP,IAAaC"}
|
|
@@ -58,7 +58,7 @@ declare type HeadingProps = SupportedHeadingElementProps & {
|
|
|
58
58
|
*/
|
|
59
59
|
align?: BoxProps['textAlign'];
|
|
60
60
|
};
|
|
61
|
-
declare const Heading: React.ForwardRefExoticComponent<Pick<
|
|
61
|
+
declare const Heading: React.ForwardRefExoticComponent<Pick<SupportedHeadingElementProps & {
|
|
62
62
|
children: React.ReactNode;
|
|
63
63
|
/**
|
|
64
64
|
* The semantic level of the heading.
|
|
@@ -92,7 +92,7 @@ declare const Heading: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedH
|
|
|
92
92
|
*
|
|
93
93
|
* @default 'normal'
|
|
94
94
|
*/
|
|
95
|
-
tone?:
|
|
95
|
+
tone?: Tone | undefined;
|
|
96
96
|
/**
|
|
97
97
|
* Used to truncate the heading to a given number of lines.
|
|
98
98
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),l=require("react"),t=require("../responsive-props.js"),a=require("../box/box.js"),s=require("./heading.module.css.js");const r=["level","weight","size","tone","children","lineClamp","align","exceptionallySetClassName"];exports.Heading=l.forwardRef((function(i,n){let{level:o,weight:u="regular",size:p,tone:d="normal",children:g,lineClamp:c,align:m,exceptionallySetClassName:f}=i,h=e.objectWithoutProperties(i,r);const C="h"+o,x="string"==typeof c?parseInt(c,10)>1:(c||0)>1;return l.createElement(a.Box,e.objectSpread2(e.objectSpread2({},h),{},{className:[f,s.default.heading,"regular"!==u?t.getClassNames(s.default,"weight",u):null,"normal"!==d?t.getClassNames(s.default,"tone",d):null,t.getClassNames(s.default,"size",p),x?s.default.lineClampMultipleLines:null,c?t.getClassNames(s.default,"lineClamp",c.toString()):null],textAlign:m,paddingRight:c?"xsmall":void 0,as:C,ref:n}),g)}));
|
|
2
2
|
//# sourceMappingURL=heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","sources":["../../../src/new-components/heading/heading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport styles from './heading.module.css'\nimport type { ObfuscatedClassName } from '../../utils/polymorphism'\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'\ntype HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\ntype SupportedHeadingElementProps = Omit<\n JSX.IntrinsicElements[HeadingElement],\n 'className' | 'children'\n>\n\ntype HeadingProps = SupportedHeadingElementProps & {\n children: React.ReactNode\n /**\n * The semantic level of the heading.\n */\n level: HeadingLevel\n /**\n * The weight of the heading. Used to de-emphasize the heading visually when using 'light'.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'light'\n /**\n * Shifts the default heading visual text size up or down, depending on the original size\n * imposed by the `level`. The heading continues to be semantically at the given level.\n *\n * By default, no value is applied, and the default size from the level is applied. The values\n * have the following effect:\n *\n * - 'smaller' shifts the default level size down in the font-size scale (it tends to make the\n * level look visually as if it were of the immediately lower level).\n * - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the\n * scale.\n * - 'largest' can be thought of as applying 'larger' twice.\n *\n * @see level\n * @default undefined\n */\n size?: 'smaller' | 'larger' | 'largest'\n /**\n * The tone (semantic color) of the heading.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the heading to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the heading text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Heading = React.forwardRef<HTMLHeadingElement, HeadingProps & ObfuscatedClassName>(\n function Heading(\n {\n level,\n weight = 'regular',\n size,\n tone = 'normal',\n children,\n lineClamp,\n align,\n exceptionallySetClassName,\n ...props\n },\n ref,\n ) {\n // In TypeScript v4.1, this would be properly recognized without needing the type assertion\n // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types\n const headingElementName = `h${level}` as HeadingElement\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1\n\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.heading,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n getClassNames(styles, 'size', size),\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n as={headingElementName}\n ref={ref}\n >\n {children}\n </Box>\n )\n },\n)\n\nexport type { HeadingProps, HeadingLevel }\nexport { Heading }\n"],"names":["React","ref","level","weight","size","tone","children","lineClamp","align","exceptionallySetClassName","props","headingElementName","lineClampMultipleLines","parseInt","Box","className","styles","heading","getClassNames","toString","textAlign","paddingRight","undefined","as"],"mappings":"
|
|
1
|
+
{"version":3,"file":"heading.js","sources":["../../../src/new-components/heading/heading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { getClassNames } from '../responsive-props'\nimport { Box } from '../box'\nimport styles from './heading.module.css'\nimport type { ObfuscatedClassName } from '../../utils/polymorphism'\nimport type { Tone } from '../common-types'\nimport type { BoxProps } from '../box'\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'\ntype HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\ntype SupportedHeadingElementProps = Omit<\n JSX.IntrinsicElements[HeadingElement],\n 'className' | 'children'\n>\n\ntype HeadingProps = SupportedHeadingElementProps & {\n children: React.ReactNode\n /**\n * The semantic level of the heading.\n */\n level: HeadingLevel\n /**\n * The weight of the heading. Used to de-emphasize the heading visually when using 'light'.\n *\n * @default 'regular'\n */\n weight?: 'regular' | 'light'\n /**\n * Shifts the default heading visual text size up or down, depending on the original size\n * imposed by the `level`. The heading continues to be semantically at the given level.\n *\n * By default, no value is applied, and the default size from the level is applied. The values\n * have the following effect:\n *\n * - 'smaller' shifts the default level size down in the font-size scale (it tends to make the\n * level look visually as if it were of the immediately lower level).\n * - 'larger' has the opposite effect than 'smaller' shifting the visual font size up in the\n * scale.\n * - 'largest' can be thought of as applying 'larger' twice.\n *\n * @see level\n * @default undefined\n */\n size?: 'smaller' | 'larger' | 'largest'\n /**\n * The tone (semantic color) of the heading.\n *\n * @default 'normal'\n */\n tone?: Tone\n /**\n * Used to truncate the heading to a given number of lines.\n *\n * It will add an ellipsis (`…`) to the text at the end of the last line, only if the text was\n * truncated. If the text fits without it being truncated, no ellipsis is added.\n *\n * By default, the text is not truncated at all, no matter how many lines it takes to render it.\n *\n * @default undefined\n */\n lineClamp?: 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5'\n /**\n * How to align the heading text horizontally.\n *\n * @default 'start'\n */\n align?: BoxProps['textAlign']\n}\n\nconst Heading = React.forwardRef<HTMLHeadingElement, HeadingProps & ObfuscatedClassName>(\n function Heading(\n {\n level,\n weight = 'regular',\n size,\n tone = 'normal',\n children,\n lineClamp,\n align,\n exceptionallySetClassName,\n ...props\n },\n ref,\n ) {\n // In TypeScript v4.1, this would be properly recognized without needing the type assertion\n // https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types\n const headingElementName = `h${level}` as HeadingElement\n const lineClampMultipleLines =\n typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1\n\n return (\n <Box\n {...props}\n className={[\n exceptionallySetClassName,\n styles.heading,\n weight !== 'regular' ? getClassNames(styles, 'weight', weight) : null,\n tone !== 'normal' ? getClassNames(styles, 'tone', tone) : null,\n getClassNames(styles, 'size', size),\n lineClampMultipleLines ? styles.lineClampMultipleLines : null,\n lineClamp ? getClassNames(styles, 'lineClamp', lineClamp.toString()) : null,\n ]}\n textAlign={align}\n // Prevents emojis from being cut-off\n // See https://github.com/Doist/reactist/pull/528\n paddingRight={lineClamp ? 'xsmall' : undefined}\n as={headingElementName}\n ref={ref}\n >\n {children}\n </Box>\n )\n },\n)\n\nexport type { HeadingProps, HeadingLevel }\nexport { Heading }\n"],"names":["React","ref","level","weight","size","tone","children","lineClamp","align","exceptionallySetClassName","props","headingElementName","lineClampMultipleLines","parseInt","Box","className","styles","heading","getClassNames","toString","textAlign","paddingRight","undefined","as"],"mappings":"4WAsEgBA,cACZ,WAYIC,OAXAC,MACIA,EADJC,OAEIA,EAAS,UAFbC,KAGIA,EAHJC,KAIIA,EAAO,SAJXC,SAKIA,EALJC,UAMIA,EANJC,MAOIA,EAPJC,0BAQIA,KACGC,iCAMP,MAAMC,MAAyBT,EACzBU,EACmB,iBAAdL,EAAyBM,SAASN,EAAW,IAAM,GAAKA,GAAa,GAAK,EAErF,OACIP,gBAACc,yCACOJ,OACJK,UAAW,CACPN,EACAO,UAAOC,QACI,YAAXd,EAAuBe,gBAAcF,UAAQ,SAAUb,GAAU,KACxD,WAATE,EAAoBa,gBAAcF,UAAQ,OAAQX,GAAQ,KAC1Da,gBAAcF,UAAQ,OAAQZ,GAC9BQ,EAAyBI,UAAOJ,uBAAyB,KACzDL,EAAYW,gBAAcF,UAAQ,YAAaT,EAAUY,YAAc,MAE3EC,UAAWZ,EAGXa,aAAcd,EAAY,cAAWe,EACrCC,GAAIZ,EACJV,IAAKA,IAEJK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),i=require("../../utils/polymorphism.js"),n=require("../box/box.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),i=require("../../utils/polymorphism.js"),n=require("../box/box.js"),t=require("./hidden.module.css.js");const l=["display","children","exceptionallySetClassName"];exports.Hidden=i.polymorphicComponent((function(i,r){let{display:s="block",children:a,exceptionallySetClassName:d}=i,b=e.objectWithoutProperties(i,l);const p="print"in b&&b.print,c="above"in b,u="below"in b,h="below"in b&&"desktop"===b.below||"above"in b&&"mobile"===b.above;return c&&u&&console.warn('<Hidden /> should receive either above="…" or below="…" but not both'),c||u||p||console.warn("<Hidden /> did not receive any criteria to hide itself"),"above"in b&&delete b.above,"below"in b&&delete b.below,"print"in b&&delete b.print,o.createElement(n.Box,e.objectSpread2(e.objectSpread2({},b),{},{ref:r,className:[d,p?t.default.hiddenOnPrint:null],display:c&&u?"none":{mobile:u?"none":s,tablet:h?"none":s,desktop:c?"none":s}}),a)}));
|
|
2
2
|
//# sourceMappingURL=hidden.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden.js","sources":["../../../src/new-components/hidden/hidden.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport styles from './hidden.module.css'\nimport type { ResponsiveBreakpoints } from '../responsive-props'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\ntype AboveProp = {\n /**\n * Hides the element on viewport sizes equal or larger to the one given.\n *\n * It is not supported to pass it alongside `below`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see below\n */\n above: Exclude<ResponsiveBreakpoints, 'desktop'>\n below?: never\n}\n\ntype BelowProp = {\n /**\n * Hides the element on viewport sizes equal or smaller to the one given.\n *\n * It is not supported to pass it alongside `above`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see above\n */\n below: Exclude<ResponsiveBreakpoints, 'mobile'>\n above?: never\n}\n\ntype CommonProps = {\n children: React.ReactNode\n /**\n * hides the element when on print media.\n */\n print?: boolean\n /**\n * Useful if you want the element to be an inline element when it is visible.\n */\n display?: 'inline' | 'block'\n}\n\ntype HiddenProps = CommonProps & (AboveProp | BelowProp | Required<Pick<CommonProps, 'print'>>)\n\n/**\n * A component that allows to specify how to hide itself on certain responsive screen sizes, or on\n * print media.\n *\n * @see HiddenProps\n * @see HiddenVisually for hiding content only visually, while keeping it available for assistive\n * technologies.\n */\nconst Hidden = polymorphicComponent<'div', HiddenProps>(function Hidden(\n { display = 'block', children, exceptionallySetClassName, ...props },\n ref,\n) {\n const hiddenOnPrint = 'print' in props && props.print\n\n const hiddenOnDesktop = 'above' in props\n const hiddenOnMobile = 'below' in props\n const hiddenOnTablet =\n ('below' in props && props.below === 'desktop') ||\n ('above' in props && props.above === 'mobile')\n\n if (hiddenOnDesktop && hiddenOnMobile) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> should receive either above=\"…\" or below=\"…\" but not both')\n }\n\n if (!hiddenOnDesktop && !hiddenOnMobile && !hiddenOnPrint) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> did not receive any criteria to hide itself')\n }\n\n // We need to delete these so they do not get forwarded to the Box\n if ('above' in props) delete props['above']\n if ('below' in props) delete props['below']\n if ('print' in props) delete props['print']\n\n return (\n <Box\n {...props}\n ref={ref}\n className={[exceptionallySetClassName, hiddenOnPrint ? styles.hiddenOnPrint : null]}\n display={\n hiddenOnDesktop && hiddenOnMobile\n ? 'none'\n : {\n mobile: hiddenOnMobile ? 'none' : display,\n tablet: hiddenOnTablet ? 'none' : display,\n desktop: hiddenOnDesktop ? 'none' : display,\n }\n }\n >\n {children}\n </Box>\n )\n})\n\nexport { Hidden }\nexport type { HiddenProps }\n"],"names":["polymorphicComponent","ref","display","children","exceptionallySetClassName","props","hiddenOnPrint","print","hiddenOnDesktop","hiddenOnMobile","hiddenOnTablet","below","above","console","warn","React","Box","className","styles","mobile","tablet","desktop"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hidden.js","sources":["../../../src/new-components/hidden/hidden.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport styles from './hidden.module.css'\nimport type { ResponsiveBreakpoints } from '../responsive-props'\nimport { polymorphicComponent } from '../../utils/polymorphism'\n\ntype AboveProp = {\n /**\n * Hides the element on viewport sizes equal or larger to the one given.\n *\n * It is not supported to pass it alongside `below`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see below\n */\n above: Exclude<ResponsiveBreakpoints, 'desktop'>\n below?: never\n}\n\ntype BelowProp = {\n /**\n * Hides the element on viewport sizes equal or smaller to the one given.\n *\n * It is not supported to pass it alongside `above`, and the resulting behavior is undefined\n * (most likely itʼll hide the element all the time to make it apparent that there's a problem).\n *\n * @see above\n */\n below: Exclude<ResponsiveBreakpoints, 'mobile'>\n above?: never\n}\n\ntype CommonProps = {\n children: React.ReactNode\n /**\n * hides the element when on print media.\n */\n print?: boolean\n /**\n * Useful if you want the element to be an inline element when it is visible.\n */\n display?: 'inline' | 'block'\n}\n\ntype HiddenProps = CommonProps & (AboveProp | BelowProp | Required<Pick<CommonProps, 'print'>>)\n\n/**\n * A component that allows to specify how to hide itself on certain responsive screen sizes, or on\n * print media.\n *\n * @see HiddenProps\n * @see HiddenVisually for hiding content only visually, while keeping it available for assistive\n * technologies.\n */\nconst Hidden = polymorphicComponent<'div', HiddenProps>(function Hidden(\n { display = 'block', children, exceptionallySetClassName, ...props },\n ref,\n) {\n const hiddenOnPrint = 'print' in props && props.print\n\n const hiddenOnDesktop = 'above' in props\n const hiddenOnMobile = 'below' in props\n const hiddenOnTablet =\n ('below' in props && props.below === 'desktop') ||\n ('above' in props && props.above === 'mobile')\n\n if (hiddenOnDesktop && hiddenOnMobile) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> should receive either above=\"…\" or below=\"…\" but not both')\n }\n\n if (!hiddenOnDesktop && !hiddenOnMobile && !hiddenOnPrint) {\n // eslint-disable-next-line no-console\n console.warn('<Hidden /> did not receive any criteria to hide itself')\n }\n\n // We need to delete these so they do not get forwarded to the Box\n if ('above' in props) delete props['above']\n if ('below' in props) delete props['below']\n if ('print' in props) delete props['print']\n\n return (\n <Box\n {...props}\n ref={ref}\n className={[exceptionallySetClassName, hiddenOnPrint ? styles.hiddenOnPrint : null]}\n display={\n hiddenOnDesktop && hiddenOnMobile\n ? 'none'\n : {\n mobile: hiddenOnMobile ? 'none' : display,\n tablet: hiddenOnTablet ? 'none' : display,\n desktop: hiddenOnDesktop ? 'none' : display,\n }\n }\n >\n {children}\n </Box>\n )\n})\n\nexport { Hidden }\nexport type { HiddenProps }\n"],"names":["polymorphicComponent","ref","display","children","exceptionallySetClassName","props","hiddenOnPrint","print","hiddenOnDesktop","hiddenOnMobile","hiddenOnTablet","below","above","console","warn","React","Box","className","styles","mobile","tablet","desktop"],"mappings":"sUAsDeA,wBAAyC,WAEpDC,OADAC,QAAEA,EAAU,QAAZC,SAAqBA,EAArBC,0BAA+BA,KAA8BC,iCAG7D,MAAMC,EAAgB,UAAWD,GAASA,EAAME,MAE1CC,EAAkB,UAAWH,EAC7BI,EAAiB,UAAWJ,EAC5BK,EACD,UAAWL,GAAyB,YAAhBA,EAAMM,OAC1B,UAAWN,GAAyB,WAAhBA,EAAMO,MAiB/B,OAfIJ,GAAmBC,GAEnBI,QAAQC,KAAK,wEAGZN,GAAoBC,GAAmBH,GAExCO,QAAQC,KAAK,0DAIb,UAAWT,UAAcA,EAAK,MAC9B,UAAWA,UAAcA,EAAK,MAC9B,UAAWA,UAAcA,EAAK,MAG9BU,gBAACC,yCACOX,OACJJ,IAAKA,EACLgB,UAAW,CAACb,EAA2BE,EAAgBY,UAAOZ,cAAgB,MAC9EJ,QACIM,GAAmBC,EACb,OACA,CACIU,OAAQV,EAAiB,OAASP,EAClCkB,OAAQV,EAAiB,OAASR,EAClCmB,QAASb,EAAkB,OAASN,KAIjDC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),r=require("react"),l=require("../../utils/polymorphism.js"),o=require("../box/box.js"),i=require("./hidden-visually.module.css.js");exports.HiddenVisually=l.polymorphicComponent((function(l,s){return r.createElement(o.Box,e.objectSpread2(e.objectSpread2({},l),{},{ref:s,position:"absolute",overflow:"hidden",className:i.default.hiddenVisually}))}));
|
|
2
2
|
//# sourceMappingURL=hidden-visually.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-visually.js","sources":["../../../src/new-components/hidden-visually/hidden-visually.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport styles from './hidden-visually.module.css'\n\ntype Props = {\n children: React.ReactNode\n}\n\n/**\n * Provides content to assistive technologies while hiding it from the screen.\n *\n * @see Hidden for fully hiding content, and only under certain conditions.\n */\nconst HiddenVisually = polymorphicComponent<'div', Props, 'omitClassName'>(function HiddenVisually(\n props,\n ref,\n) {\n return (\n <Box\n {...props}\n ref={ref}\n position=\"absolute\"\n overflow=\"hidden\"\n className={styles.hiddenVisually}\n />\n )\n})\n\nexport { HiddenVisually }\n"],"names":["polymorphicComponent","props","ref","React","Box","position","overflow","className","styles","hiddenVisually"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hidden-visually.js","sources":["../../../src/new-components/hidden-visually/hidden-visually.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../../utils/polymorphism'\nimport { Box } from '../box'\nimport styles from './hidden-visually.module.css'\n\ntype Props = {\n children: React.ReactNode\n}\n\n/**\n * Provides content to assistive technologies while hiding it from the screen.\n *\n * @see Hidden for fully hiding content, and only under certain conditions.\n */\nconst HiddenVisually = polymorphicComponent<'div', Props, 'omitClassName'>(function HiddenVisually(\n props,\n ref,\n) {\n return (\n <Box\n {...props}\n ref={ref}\n position=\"absolute\"\n overflow=\"hidden\"\n className={styles.hiddenVisually}\n />\n )\n})\n\nexport { HiddenVisually }\n"],"names":["polymorphicComponent","props","ref","React","Box","position","overflow","className","styles","hiddenVisually"],"mappings":"4RAcuBA,wBAAoD,SACvEC,EACAC,GAEA,OACIC,gBAACC,yCACOH,OACJC,IAAKA,EACLG,SAAS,WACTC,SAAS,SACTC,UAAWC,UAAOC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react");const l=["tone"],n={info:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1.18-11.84a.84.84 0 1 1-1.68 0 .84.84 0 0 1 1.68 0zM12.5 10a.5.5 0 0 1 .5.5V15h1a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1h1v-4h-1a.5.5 0 0 1 0-1h1.5z",fill:"currentColor"}))},positive:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-4.354-8.104a.5.5 0 0 1 .708 0l2.146 2.147 5.146-5.147a.5.5 0 0 1 .708.708l-5.5 5.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 0-.708z",fill:"currentColor"}))},caution:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m3.254 16.992 7.018-12.03a2 2 0 0 1 3.455 0l7.018 12.03A2 2 0 0 1 19.018 20H4.982a2 2 0 0 1-1.728-3.008zm8.242-11.887a1 1 0 0 0-.36.36l-7.018 12.03A1 1 0 0 0 4.982 19h14.036a1 1 0 0 0 .864-1.504l-7.018-12.03a1 1 0 0 0-1.368-.36zM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014a.987.987 0 1 0-1.971.055l.236 4.25c.053.945 1.445.945 1.498 0l.236-4.25.001-.027v-.028z",fill:"currentColor"}))},critical:function(l){return t.createElement("svg",e.objectSpread2({width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM2.5 12a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0zM13 15.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014A.987.987 0 0 0 12 7.5h-.027l-.028.002a.987.987 0 0 0-.93 1.04l.236 4.25c.053.944 1.445.944 1.498 0l.236-4.25.001-.028v-.027z",fill:"currentColor"}))}};exports.AlertIcon=function(r){let{tone:o}=r,a=e.objectWithoutProperties(r,l);const i=n[o];return i?t.createElement(i,e.objectSpread2({},a)):null};
|
|
2
2
|
//# sourceMappingURL=alert-icon.js.map
|