@react-spectrum/s2 0.11.0 → 0.11.2
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/Accordion.cjs +2 -2
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.mjs +2 -2
- package/dist/ActionBar.cjs +62 -62
- package/dist/ActionBar.css +61 -61
- package/dist/ActionBar.mjs +62 -62
- package/dist/ActionButton.cjs +202 -202
- package/dist/ActionButton.css +138 -138
- package/dist/ActionButton.mjs +202 -202
- package/dist/ActionButtonGroup.cjs +15 -15
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +15 -15
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +14 -14
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.mjs +14 -14
- package/dist/AvatarGroup.cjs +134 -134
- package/dist/AvatarGroup.css +33 -33
- package/dist/AvatarGroup.mjs +134 -134
- package/dist/Badge.cjs +206 -206
- package/dist/Badge.css +127 -127
- package/dist/Badge.mjs +206 -206
- package/dist/Breadcrumbs.cjs +254 -254
- package/dist/Breadcrumbs.css +109 -109
- package/dist/Breadcrumbs.mjs +254 -254
- package/dist/Button.cjs +341 -341
- package/dist/Button.css +177 -177
- package/dist/Button.mjs +341 -341
- package/dist/ButtonGroup.cjs +20 -20
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +20 -20
- package/dist/Calendar.cjs +126 -126
- package/dist/Calendar.css +134 -134
- package/dist/Calendar.mjs +126 -126
- package/dist/Card.cjs +304 -304
- package/dist/Card.css +209 -209
- package/dist/Card.mjs +304 -304
- package/dist/CardView.cjs +16 -16
- package/dist/CardView.css +16 -16
- package/dist/CardView.mjs +16 -16
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +170 -170
- package/dist/Checkbox.css +92 -92
- package/dist/Checkbox.mjs +170 -170
- package/dist/CheckboxGroup.cjs +45 -45
- package/dist/CheckboxGroup.css +38 -38
- package/dist/CheckboxGroup.mjs +45 -45
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +29 -29
- package/dist/ClearButton.css +29 -29
- package/dist/ClearButton.mjs +29 -29
- package/dist/CloseButton.cjs +54 -54
- package/dist/CloseButton.css +46 -46
- package/dist/CloseButton.mjs +54 -54
- package/dist/ColorArea.cjs +16 -16
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.mjs +16 -16
- package/dist/ColorField.cjs +32 -32
- package/dist/ColorField.css +28 -28
- package/dist/ColorField.mjs +32 -32
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +118 -118
- package/dist/ColorSlider.css +54 -54
- package/dist/ColorSlider.mjs +118 -118
- package/dist/ColorSwatch.cjs +29 -29
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.mjs +29 -29
- package/dist/ColorSwatchPicker.cjs +27 -27
- package/dist/ColorSwatchPicker.css +46 -46
- package/dist/ColorSwatchPicker.mjs +27 -27
- package/dist/ColorWheel.cjs +26 -26
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.mjs +26 -26
- package/dist/ComboBox.cjs +397 -397
- package/dist/ComboBox.css +181 -181
- package/dist/ComboBox.mjs +397 -397
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +60 -60
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +25 -25
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +25 -25
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/DateField.cjs +73 -73
- package/dist/DateField.css +77 -77
- package/dist/DateField.mjs +73 -73
- package/dist/DatePicker.cjs +180 -180
- package/dist/DatePicker.css +126 -126
- package/dist/DatePicker.mjs +180 -180
- package/dist/DateRangePicker.cjs +56 -56
- package/dist/DateRangePicker.css +60 -60
- package/dist/DateRangePicker.mjs +56 -56
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +82 -82
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +135 -135
- package/dist/Disclosure.css +106 -106
- package/dist/Disclosure.mjs +135 -135
- package/dist/Divider.cjs +25 -25
- package/dist/Divider.css +25 -25
- package/dist/Divider.mjs +25 -25
- package/dist/DropZone.cjs +62 -62
- package/dist/DropZone.css +58 -58
- package/dist/DropZone.mjs +62 -62
- package/dist/Field.cjs +370 -370
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +142 -142
- package/dist/Field.mjs +370 -370
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +9 -9
- package/dist/Form.css +9 -9
- package/dist/Form.mjs +9 -9
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +91 -91
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +256 -256
- package/dist/IllustratedMessage.css +78 -78
- package/dist/IllustratedMessage.mjs +256 -256
- package/dist/Image.cjs +13 -13
- package/dist/Image.css +14 -14
- package/dist/Image.mjs +13 -13
- package/dist/InlineAlert.cjs +117 -117
- package/dist/InlineAlert.css +98 -98
- package/dist/InlineAlert.mjs +117 -117
- package/dist/Link.cjs +54 -54
- package/dist/Link.css +46 -46
- package/dist/Link.mjs +54 -54
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +459 -459
- package/dist/Menu.css +185 -185
- package/dist/Menu.mjs +459 -459
- package/dist/Meter.cjs +163 -163
- package/dist/Meter.css +93 -93
- package/dist/Meter.mjs +163 -163
- package/dist/Modal.cjs +58 -58
- package/dist/Modal.css +50 -50
- package/dist/Modal.mjs +58 -58
- package/dist/NotificationBadge.cjs +58 -58
- package/dist/NotificationBadge.css +51 -51
- package/dist/NotificationBadge.mjs +58 -58
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.css +100 -100
- package/dist/NumberField.mjs +115 -115
- package/dist/Picker.cjs +283 -283
- package/dist/Picker.css +169 -169
- package/dist/Picker.mjs +283 -283
- package/dist/Popover.cjs +86 -86
- package/dist/Popover.css +66 -66
- package/dist/Popover.mjs +86 -86
- package/dist/ProgressBar.cjs +173 -173
- package/dist/ProgressBar.css +101 -101
- package/dist/ProgressBar.mjs +173 -173
- package/dist/ProgressCircle.cjs +31 -31
- package/dist/ProgressCircle.css +24 -24
- package/dist/ProgressCircle.mjs +31 -31
- package/dist/Provider.cjs +11 -11
- package/dist/Provider.css +10 -10
- package/dist/Provider.mjs +11 -11
- package/dist/Radio.cjs +154 -154
- package/dist/Radio.css +79 -79
- package/dist/Radio.mjs +154 -154
- package/dist/RadioGroup.cjs +42 -42
- package/dist/RadioGroup.css +38 -38
- package/dist/RadioGroup.mjs +42 -42
- package/dist/RangeCalendar.cjs +7 -7
- package/dist/RangeCalendar.css +10 -10
- package/dist/RangeCalendar.mjs +7 -7
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.css +46 -46
- package/dist/SearchField.mjs +42 -42
- package/dist/SegmentedControl.cjs +181 -181
- package/dist/SegmentedControl.css +118 -118
- package/dist/SegmentedControl.mjs +181 -181
- package/dist/SelectBoxGroup.cjs +142 -142
- package/dist/SelectBoxGroup.css +120 -120
- package/dist/SelectBoxGroup.mjs +142 -142
- package/dist/Slider.cjs +299 -299
- package/dist/Slider.css +151 -151
- package/dist/Slider.mjs +299 -299
- package/dist/StatusLight.cjs +125 -125
- package/dist/StatusLight.css +61 -61
- package/dist/StatusLight.mjs +125 -125
- package/dist/Switch.cjs +162 -162
- package/dist/Switch.css +74 -74
- package/dist/Switch.mjs +162 -162
- package/dist/TableView.cjs +319 -319
- package/dist/TableView.css +172 -172
- package/dist/TableView.mjs +319 -319
- package/dist/Tabs.cjs +115 -115
- package/dist/Tabs.css +100 -100
- package/dist/Tabs.mjs +115 -115
- package/dist/TabsPicker.cjs +127 -127
- package/dist/TabsPicker.css +111 -111
- package/dist/TabsPicker.mjs +127 -127
- package/dist/TagGroup.cjs +213 -213
- package/dist/TagGroup.css +147 -147
- package/dist/TagGroup.mjs +213 -213
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.css +54 -54
- package/dist/TextField.mjs +59 -59
- package/dist/TimeField.cjs +52 -52
- package/dist/TimeField.css +48 -48
- package/dist/TimeField.mjs +52 -52
- package/dist/Toast.cjs +120 -120
- package/dist/Toast.css +107 -107
- package/dist/Toast.mjs +120 -120
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.mjs +3 -3
- package/dist/Tooltip.cjs +83 -83
- package/dist/Tooltip.css +70 -70
- package/dist/Tooltip.mjs +83 -83
- package/dist/TreeView.cjs +146 -146
- package/dist/TreeView.css +147 -147
- package/dist/TreeView.mjs +146 -146
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/package.json +5 -5
- package/style/__tests__/style-macro.test.js +56 -56
- package/style/dist/main.cjs +24 -24
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +219 -219
- package/style/dist/spectrum-theme.mjs +210 -210
- package/style/dist/style-macro.cjs +80 -80
- package/style/dist/style-macro.mjs +75 -75
package/icons/Skeleton.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,oBAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC;QAClB,IAAI,eAAe,CAAC,aAAa,OAAO,IAAI,WAAW,CAAC,cAAc;YACpE,iEAAiE;YACjE,2EAA2E;YAC3E,aAAa,OAAO,GAAG,QAAQ,OAAO,CACpC;gBACE;oBAAC,oBAAoB;gBAAM;gBAC3B;oBAAC,oBAAoB;gBAAI;aAC1B,EACD;gBACE,UAAU;gBACV,YAAY;gBACZ,QAAQ;YACV;YAEF,aAAa,OAAO,CAAC,SAAS,GAAG;QACnC,OAAO,IAAI,CAAC,eAAe,aAAa,OAAO,EAAE;YAC/C,aAAa,OAAO,CAAC,MAAM;YAC3B,aAAa,OAAO,GAAG;QACzB;IACF,GAAG;QAAC;KAAY;AAClB;AASO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAkB;AACtD,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,8CAAoB;AACxC;AAUO,SAAS,0CAAS,YAAC,QAAQ,aAAE,SAAS,EAAgB;IAC3D,iDAAiD;IACjD,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B;;AAGP;AAEO,MAAM,sDAMJ,qEAAqE;AAEvE,SAAS,0CAAgB,QAAmB,EAAE,KAAgC;IACnF,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YAAY;QACd,yBAAW,gBAAC;sBAAc;;QAC1B,QAAQ;YACN,GAAG,KAAK;YACR,8DAA8D;YAC9D,2EAA2E;YAC3E,qBAAqB;QACvB;IACF;IACA,OAAO;QAAC;QAAU;KAAM;AAC1B;AAGO,SAAS,0CAAa,YAAC,QAAQ,EAAwB;IAC5D,qBACE,gBAAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WAAW;kBAKV;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,iBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WAAW,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MAAM,SAAS,GAAG,GAAU,SAAS,KAAK,CAAC,GAAG;IACrI,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BAAY,CAAA,GAAA,mBAAW,EAAE,UAAU;YAClC,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KAAK;;AAGX;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,
|
|
1
|
+
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAUM,SAAS,0CAAoB,WAAoB;IACtD,IAAI,eAAe,CAAA,GAAA,aAAK,EAAoB;IAC5C,IAAI,eAAe,CAAA,GAAA,oBAAY,EAAE;IACjC,OAAO,CAAA,GAAA,kBAAU,EAAE,CAAC;QAClB,IAAI,eAAe,CAAC,aAAa,OAAO,IAAI,WAAW,CAAC,cAAc;YACpE,iEAAiE;YACjE,2EAA2E;YAC3E,aAAa,OAAO,GAAG,QAAQ,OAAO,CACpC;gBACE;oBAAC,oBAAoB;gBAAM;gBAC3B;oBAAC,oBAAoB;gBAAI;aAC1B,EACD;gBACE,UAAU;gBACV,YAAY;gBACZ,QAAQ;YACV;YAEF,aAAa,OAAO,CAAC,SAAS,GAAG;QACnC,OAAO,IAAI,CAAC,eAAe,aAAa,OAAO,EAAE;YAC/C,aAAa,OAAO,CAAC,MAAM;YAC3B,aAAa,OAAO,GAAG;QACzB;IACF,GAAG;QAAC;KAAY;AAClB;AASO,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAkB;AACtD,SAAS;IACd,OAAO,CAAA,GAAA,iBAAS,EAAE,8CAAoB;AACxC;AAUO,SAAS,0CAAS,YAAC,QAAQ,aAAE,SAAS,EAAgB;IAC3D,iDAAiD;IACjD,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B;;AAGP;AAEO,MAAM,sDAMJ,qEAAqE;AAEvE,SAAS,0CAAgB,QAAmB,EAAE,KAAgC;IACnF,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YAAY;QACd,yBAAW,gBAAC;sBAAc;;QAC1B,QAAQ;YACN,GAAG,KAAK;YACR,8DAA8D;YAC9D,2EAA2E;YAC3E,qBAAqB;QACvB;IACF;IACA,OAAO;QAAC;QAAU;KAAM;AAC1B;AAGO,SAAS,0CAAa,YAAC,QAAQ,EAAwB;IAC5D,qBACE,gBAAC;QACC,6CAA6C;QAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QAClB,KAAK,0CAAoB;QACzB,WAAW;kBAKV;;AAGP;AAGO,SAAS,0CAAgB,YAAC,QAAQ,EAA8B;IACrE,IAAI,YAAY,CAAA,GAAA,iBAAS,EAAE;IAC3B,IAAI,YAAY,0CAAoB,aAAa;IACjD,IAAI,aAAa,MACf,OAAO;IAGT,IAAI,WAAW,SAAS,YAAY,CAAC,OAAO,wBAAwB,CAAC,UAAU,QAAQ,MAAM,SAAS,GAAG,GAAU,SAAS,KAAK,CAAC,GAAG;IACrI,qBACE,gBAAC,0CAAgB,QAAQ;QAAC,OAAO;kBAC9B,0BAAY,CAAA,GAAA,mBAAW,EAAE,UAAU;YAClC,KAAK,CAAA,GAAA,gBAAQ,EAAE,UAAU;YACzB,WAAW,AAAC,CAAA,SAAS,KAAK,CAAC,SAAS,IAAI,EAAC,IAAK,MAAM;YACpD,6CAA6C;YAC7C,OAAO,CAAA,GAAA,iBAAS,EAAE;QACpB,KAAK;;AAGX;AAGO,SAAS,0CAAgB,MAAmB;IACjD,IAAI,aAAa,CAAA,GAAA,iBAAS,EAAE;IAC5B,IAAI,YACF,OAAO,CAAA,GAAA,yCAAU,8BAA+B;IAElD,OAAO,UAAU;AACnB","sources":["packages/@react-spectrum/s2/src/Skeleton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {cloneElement, createContext, CSSProperties, ReactElement, ReactNode, Ref, useCallback, useContext, useRef} from 'react';\nimport {color, style} from '../style' with {type: 'macro'};\nimport {inertValue, mergeRefs} from '@react-aria/utils';\nimport {mergeStyles} from '../style/runtime';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport {StyleString} from '../style/types';\nimport {useMediaQuery} from '@react-spectrum/utils';\n\nexport function useLoadingAnimation(isAnimating: boolean): (element: HTMLElement | null) => void {\n let animationRef = useRef<Animation | null>(null);\n let reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\n return useCallback((element: HTMLElement | null) => {\n if (isAnimating && !animationRef.current && element && !reduceMotion) {\n // Use web animation API instead of CSS animations so that we can\n // synchronize it between all loading elements on the page (via startTime).\n animationRef.current = element.animate(\n [\n {backgroundPosition: '100%'},\n {backgroundPosition: '0%'}\n ],\n {\n duration: 2000,\n iterations: Infinity,\n easing: 'ease-in-out'\n }\n );\n animationRef.current.startTime = 0;\n } else if (!isAnimating && animationRef.current) {\n animationRef.current.cancel();\n animationRef.current = null;\n }\n }, [isAnimating]);\n}\n\nexport type SkeletonElement = ReactElement<{\n children: ReactNode,\n className?: string,\n ref?: Ref<HTMLElement>,\n inert?: boolean | 'true'\n}>;\n\nexport const SkeletonContext = createContext<boolean | null>(null);\nexport function useIsSkeleton(): boolean {\n return useContext(SkeletonContext) || false;\n}\n\nexport interface SkeletonProps {\n children: ReactNode,\n isLoading: boolean\n}\n\n/**\n * A Skeleton wraps around content to render it as a placeholder.\n */\nexport function Skeleton({children, isLoading}: SkeletonProps): ReactNode {\n // Disable all form components inside a skeleton.\n return (\n <SkeletonContext.Provider value={isLoading}>\n {children}\n </SkeletonContext.Provider>\n );\n}\n\nexport const loadingStyle = raw(`\n background-image: linear-gradient(to right, ${color('gray-100')} 33%, light-dark(${color('gray-25')}, ${color('gray-300')}), ${color('gray-100')} 66%);\n background-size: 300%;\n * {\n visibility: hidden;\n }\n`, 'L'); // add to a separate layer so it overrides default style macro styles\n\nexport function useSkeletonText(children: ReactNode, style: CSSProperties | undefined): [ReactNode, CSSProperties | undefined] {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n children = <SkeletonText>{children}</SkeletonText>;\n style = {\n ...style,\n // This ensures the ellipsis on truncated text is also hidden.\n // -webkit-text-fill-color overrides any `color` property that is also set.\n WebkitTextFillColor: 'transparent'\n };\n }\n return [children, style];\n}\n\n// Rendered inside <Text> to create skeleton line boxes via box-decoration-break.\nexport function SkeletonText({children}: {children: ReactNode}): ReactNode {\n return (\n <span\n // @ts-ignore - compatibility with React < 19\n inert={inertValue(true)}\n ref={useLoadingAnimation(true)}\n className={loadingStyle + style({\n color: 'transparent',\n boxDecorationBreak: 'clone',\n borderRadius: 'sm'\n })}>\n {children}\n </span>\n );\n}\n\n// Clones the child element and displays it with skeleton styling.\nexport function SkeletonWrapper({children}: {children: SkeletonElement}): ReactNode {\n let isLoading = useContext(SkeletonContext);\n let animation = useLoadingAnimation(isLoading || false);\n if (isLoading == null) {\n return children;\n }\n\n let childRef = 'ref' in children && !Object.getOwnPropertyDescriptor(children, 'ref')?.get ? children.ref as any : children.props.ref;\n return (\n <SkeletonContext.Provider value={null}>\n {isLoading ? cloneElement(children, {\n ref: mergeRefs(childRef, animation),\n className: (children.props.className || '') + ' ' + loadingStyle,\n // @ts-ignore - compatibility with React < 19\n inert: inertValue(true)\n }) : children}\n </SkeletonContext.Provider>\n );\n}\n\n// Adds default border radius around icons when displayed in a skeleton.\nexport function useSkeletonIcon(styles: StyleString): StyleString {\n let isSkeleton = useContext(SkeletonContext);\n if (isSkeleton) {\n return mergeStyles(style({borderRadius: 'sm'}), styles);\n }\n return styles || '' as StyleString;\n}\n"],"names":[],"version":3,"file":"Skeleton.mjs.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/s2",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Spectrum 2 UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@internationalized/date": "^3.9.0",
|
|
81
81
|
"@internationalized/number": "^3.6.5",
|
|
82
82
|
"@react-aria/calendar": "^3.9.1",
|
|
83
|
-
"@react-aria/collections": "3.0.0-rc.
|
|
83
|
+
"@react-aria/collections": "3.0.0-rc.7",
|
|
84
84
|
"@react-aria/focus": "^3.21.1",
|
|
85
85
|
"@react-aria/i18n": "^3.12.12",
|
|
86
86
|
"@react-aria/interactions": "^3.25.5",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"@react-types/table": "^3.13.3",
|
|
97
97
|
"@react-types/textfield": "^3.12.5",
|
|
98
98
|
"csstype": "^3.0.2",
|
|
99
|
-
"react-aria": "^3.43.
|
|
100
|
-
"react-aria-components": "^1.12.
|
|
99
|
+
"react-aria": "^3.43.2",
|
|
100
|
+
"react-aria-components": "^1.12.2",
|
|
101
101
|
"react-stately": "^3.41.0"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"publishConfig": {
|
|
108
108
|
"access": "public"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "7bbe432a2f3ac09448b09769b34d36d777267f2f"
|
|
111
111
|
}
|
|
@@ -40,14 +40,14 @@ describe('style-macro', () => {
|
|
|
40
40
|
"@layer _.a, _.b, _.c;
|
|
41
41
|
|
|
42
42
|
@layer _.b {
|
|
43
|
-
.
|
|
43
|
+
.Jbs112:first-child {
|
|
44
44
|
margin-top: 0.25rem;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
@layer _.c.p {
|
|
49
49
|
@media (min-width: 64rem) {
|
|
50
|
-
.
|
|
50
|
+
.Jbpv112:first-child {
|
|
51
51
|
margin-top: 0.5rem;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -55,7 +55,7 @@ describe('style-macro', () => {
|
|
|
55
55
|
|
|
56
56
|
"
|
|
57
57
|
`);
|
|
58
|
-
expect(js).toMatchInlineSnapshot('"
|
|
58
|
+
expect(js).toMatchInlineSnapshot('" Jbs112 Jbpv112"');
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
it('should support self references', () => {
|
|
@@ -69,47 +69,47 @@ describe('style-macro', () => {
|
|
|
69
69
|
"@layer _.a;
|
|
70
70
|
|
|
71
71
|
@layer _.a {
|
|
72
|
-
.
|
|
72
|
+
._kc112 {
|
|
73
73
|
border-top-width: 2px;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
.
|
|
77
|
+
.hc112 {
|
|
78
78
|
border-bottom-width: 2px;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.mCPFGYc112 {
|
|
83
83
|
border-inline-start-width: var(--m);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
.
|
|
87
|
+
.lc112 {
|
|
88
88
|
border-inline-end-width: 2px;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
.
|
|
92
|
+
.SMBFGYc112 {
|
|
93
93
|
padding-inline-start: var(--S);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
.Rv112 {
|
|
98
98
|
padding-inline-end: calc(var(--F, var(--M)) * 3 / 8);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
.ZjUQgKd112 {
|
|
103
103
|
width: calc(200px - var(--m) - var(--S));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
.-m_-
|
|
107
|
+
.-m_-mc112 {
|
|
108
108
|
--m: 2px;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
.-S_-
|
|
112
|
+
.-S_-Sv112 {
|
|
113
113
|
--S: calc(var(--F, var(--M)) * 3 / 8);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -117,7 +117,7 @@ describe('style-macro', () => {
|
|
|
117
117
|
"
|
|
118
118
|
`);
|
|
119
119
|
|
|
120
|
-
expect(js).toMatchInlineSnapshot('"
|
|
120
|
+
expect(js).toMatchInlineSnapshot('" _kc112 hc112 mCPFGYc112 lc112 SMBFGYc112 Rv112 ZjUQgKd112 -m_-mc112 -S_-Sv112"');
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
it('should support allowed overrides', () => {
|
|
@@ -134,9 +134,9 @@ describe('style-macro', () => {
|
|
|
134
134
|
color: 'green-400'
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
expect(js()).toMatchInlineSnapshot('"
|
|
138
|
-
expect(overrides).toMatchInlineSnapshot('"
|
|
139
|
-
expect(js({}, overrides)).toMatchInlineSnapshot('"
|
|
137
|
+
expect(js()).toMatchInlineSnapshot('" gw112 pg112"');
|
|
138
|
+
expect(overrides).toMatchInlineSnapshot('" g8tmWqb112 pHJ3AUd112"');
|
|
139
|
+
expect(js({}, overrides)).toMatchInlineSnapshot('" g8tmWqb112 pg112"');
|
|
140
140
|
});
|
|
141
141
|
|
|
142
142
|
it('should support allowed overrides for properties that expand into multiple', () => {
|
|
@@ -151,9 +151,9 @@ describe('style-macro', () => {
|
|
|
151
151
|
translateX: 40
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
expect(js()).toMatchInlineSnapshot('" -_7PloMd-
|
|
155
|
-
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-
|
|
156
|
-
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-
|
|
154
|
+
expect(js()).toMatchInlineSnapshot('" -_7PloMd-B112 __Ya112"');
|
|
155
|
+
expect(overrides).toMatchInlineSnapshot('" -_7PloMd-D112 __Ya112"');
|
|
156
|
+
expect(js({}, overrides)).toMatchInlineSnapshot('" -_7PloMd-D112 __Ya112"');
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
it('should support allowed overrides for shorthands', () => {
|
|
@@ -168,9 +168,9 @@ describe('style-macro', () => {
|
|
|
168
168
|
padding: 40
|
|
169
169
|
});
|
|
170
170
|
|
|
171
|
-
expect(js()).toMatchInlineSnapshot('"
|
|
172
|
-
expect(overrides).toMatchInlineSnapshot('"
|
|
173
|
-
expect(js({}, overrides)).toMatchInlineSnapshot('"
|
|
171
|
+
expect(js()).toMatchInlineSnapshot('" Tk112 Qk112 Sk112 Rk112"');
|
|
172
|
+
expect(overrides).toMatchInlineSnapshot('" Tm112 Qm112 Sm112 Rm112"');
|
|
173
|
+
expect(js({}, overrides)).toMatchInlineSnapshot('" Tm112 Qm112 Sm112 Rm112"');
|
|
174
174
|
});
|
|
175
175
|
|
|
176
176
|
it("should support allowed overrides for values that aren't defined", () => {
|
|
@@ -185,9 +185,9 @@ describe('style-macro', () => {
|
|
|
185
185
|
minWidth: 32
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
expect(js()).toMatchInlineSnapshot('"
|
|
189
|
-
expect(overrides).toMatchInlineSnapshot('"
|
|
190
|
-
expect(js({}, overrides)).toMatchInlineSnapshot('"
|
|
188
|
+
expect(js()).toMatchInlineSnapshot('" gE112"');
|
|
189
|
+
expect(overrides).toMatchInlineSnapshot('" Nk112"');
|
|
190
|
+
expect(js({}, overrides)).toMatchInlineSnapshot('" Nk112 gE112"');
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
it('should support runtime conditions', () => {
|
|
@@ -208,32 +208,32 @@ describe('style-macro', () => {
|
|
|
208
208
|
"@layer _.a;
|
|
209
209
|
|
|
210
210
|
@layer _.a {
|
|
211
|
-
.
|
|
211
|
+
.gH112 {
|
|
212
212
|
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
.
|
|
216
|
+
.gF112 {
|
|
217
217
|
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
.
|
|
221
|
+
.gE112 {
|
|
222
222
|
background-color: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
|
|
226
|
-
.
|
|
226
|
+
.pt112 {
|
|
227
227
|
color: light-dark(rgb(41, 41, 41), rgb(219, 219, 219));
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
|
|
231
|
-
.
|
|
231
|
+
.po112 {
|
|
232
232
|
color: light-dark(rgb(19, 19, 19), rgb(242, 242, 242));
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
.
|
|
236
|
+
.pm112 {
|
|
237
237
|
color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -241,9 +241,9 @@ describe('style-macro', () => {
|
|
|
241
241
|
"
|
|
242
242
|
`);
|
|
243
243
|
|
|
244
|
-
expect(js({})).toMatchInlineSnapshot('"
|
|
245
|
-
expect(js({isHovered: true})).toMatchInlineSnapshot('"
|
|
246
|
-
expect(js({isPressed: true})).toMatchInlineSnapshot('"
|
|
244
|
+
expect(js({})).toMatchInlineSnapshot('" gH112 pt112"');
|
|
245
|
+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF112 po112"');
|
|
246
|
+
expect(js({isPressed: true})).toMatchInlineSnapshot('" gE112 pm112"');
|
|
247
247
|
});
|
|
248
248
|
|
|
249
249
|
it('should support nested runtime conditions', () => {
|
|
@@ -262,32 +262,32 @@ describe('style-macro', () => {
|
|
|
262
262
|
"@layer _.a;
|
|
263
263
|
|
|
264
264
|
@layer _.a {
|
|
265
|
-
.
|
|
265
|
+
.gH112 {
|
|
266
266
|
background-color: light-dark(rgb(233, 233, 233), rgb(44, 44, 44));
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
|
|
270
|
-
.
|
|
270
|
+
.gF112 {
|
|
271
271
|
background-color: light-dark(rgb(225, 225, 225), rgb(50, 50, 50));
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
.
|
|
275
|
+
.g_h112 {
|
|
276
276
|
background-color: light-dark(rgb(75, 117, 255), rgb(64, 105, 253));
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
|
|
280
|
-
.
|
|
280
|
+
.g3112 {
|
|
281
281
|
background-color: light-dark(rgb(59, 99, 251), rgb(86, 129, 255));
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
"
|
|
286
286
|
`);
|
|
287
|
-
expect(js({})).toMatchInlineSnapshot('"
|
|
288
|
-
expect(js({isHovered: true})).toMatchInlineSnapshot('"
|
|
289
|
-
expect(js({isSelected: true})).toMatchInlineSnapshot('"
|
|
290
|
-
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('"
|
|
287
|
+
expect(js({})).toMatchInlineSnapshot('" gH112"');
|
|
288
|
+
expect(js({isHovered: true})).toMatchInlineSnapshot('" gF112"');
|
|
289
|
+
expect(js({isSelected: true})).toMatchInlineSnapshot('" g_h112"');
|
|
290
|
+
expect(js({isSelected: true, isHovered: true})).toMatchInlineSnapshot('" g3112"');
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
it('should support variant runtime conditions', () => {
|
|
@@ -301,9 +301,9 @@ describe('style-macro', () => {
|
|
|
301
301
|
}
|
|
302
302
|
});
|
|
303
303
|
|
|
304
|
-
expect(js({variant: 'accent'})).toMatchInlineSnapshot('"
|
|
305
|
-
expect(js({variant: 'primary'})).toMatchInlineSnapshot('"
|
|
306
|
-
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('"
|
|
304
|
+
expect(js({variant: 'accent'})).toMatchInlineSnapshot('" gY112"');
|
|
305
|
+
expect(js({variant: 'primary'})).toMatchInlineSnapshot('" gjQquMe112"');
|
|
306
|
+
expect(js({variant: 'secondary'})).toMatchInlineSnapshot('" gw112"');
|
|
307
307
|
});
|
|
308
308
|
|
|
309
309
|
it('supports runtime conditions nested inside css conditions', () => {
|
|
@@ -321,14 +321,14 @@ describe('style-macro', () => {
|
|
|
321
321
|
|
|
322
322
|
@layer _.b.l {
|
|
323
323
|
@media (forced-colors: active) {
|
|
324
|
-
.
|
|
324
|
+
.plb112 {
|
|
325
325
|
color: ButtonText;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
|
|
330
330
|
@media (forced-colors: active) {
|
|
331
|
-
.
|
|
331
|
+
.ple112 {
|
|
332
332
|
color: HighlightText;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
@@ -337,8 +337,8 @@ describe('style-macro', () => {
|
|
|
337
337
|
"
|
|
338
338
|
`);
|
|
339
339
|
|
|
340
|
-
expect(js({})).toMatchInlineSnapshot('"
|
|
341
|
-
expect(js({isSelected: true})).toMatchInlineSnapshot('"
|
|
340
|
+
expect(js({})).toMatchInlineSnapshot('" plb112"');
|
|
341
|
+
expect(js({isSelected: true})).toMatchInlineSnapshot('" ple112"');
|
|
342
342
|
});
|
|
343
343
|
|
|
344
344
|
it('should expand shorthand properties to longhands', () => {
|
|
@@ -346,27 +346,27 @@ describe('style-macro', () => {
|
|
|
346
346
|
padding: 24
|
|
347
347
|
});
|
|
348
348
|
|
|
349
|
-
expect(js).toMatchInlineSnapshot('"
|
|
349
|
+
expect(js).toMatchInlineSnapshot('" Th112 Qh112 Sh112 Rh112"');
|
|
350
350
|
expect(css).toMatchInlineSnapshot(`
|
|
351
351
|
"@layer _.a;
|
|
352
352
|
|
|
353
353
|
@layer _.a {
|
|
354
|
-
.
|
|
354
|
+
.Th112 {
|
|
355
355
|
padding-top: 24px;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
|
|
359
|
-
.
|
|
359
|
+
.Qh112 {
|
|
360
360
|
padding-bottom: 24px;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
.
|
|
364
|
+
.Sh112 {
|
|
365
365
|
padding-inline-start: 24px;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
|
|
369
|
-
.
|
|
369
|
+
.Rh112 {
|
|
370
370
|
padding-inline-end: 24px;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
@@ -384,7 +384,7 @@ describe('style-macro', () => {
|
|
|
384
384
|
"@layer _.a;
|
|
385
385
|
|
|
386
386
|
@layer _.a {
|
|
387
|
-
.
|
|
387
|
+
.gpQzfVb112 {
|
|
388
388
|
background-color: rgb(from light-dark(rgb(39, 77, 234), rgb(105, 149, 254)) r g b / 50%);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -405,7 +405,7 @@ describe('style-macro', () => {
|
|
|
405
405
|
"@layer _.a;
|
|
406
406
|
|
|
407
407
|
@layer _.a {
|
|
408
|
-
.-FUeYm-
|
|
408
|
+
.-FUeYm-gE112 {
|
|
409
409
|
--foo: light-dark(rgb(218, 218, 218), rgb(57, 57, 57));
|
|
410
410
|
}
|
|
411
411
|
}
|
package/style/dist/main.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var $
|
|
1
|
+
var $364a8b5208b4a0ee$exports = require("./spectrum-theme.cjs");
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
function $parcel$export(e, n, v, s) {
|
|
5
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
$parcel$export(module.exports, "size", () => $
|
|
9
|
-
$parcel$export(module.exports, "space", () => $
|
|
10
|
-
$parcel$export(module.exports, "fontRelative", () => $
|
|
11
|
-
$parcel$export(module.exports, "focusRing", () => $
|
|
12
|
-
$parcel$export(module.exports, "iconStyle", () => $
|
|
13
|
-
$parcel$export(module.exports, "baseColor", () => $
|
|
14
|
-
$parcel$export(module.exports, "color", () => $
|
|
15
|
-
$parcel$export(module.exports, "edgeToText", () => $
|
|
16
|
-
$parcel$export(module.exports, "lightDark", () => $
|
|
17
|
-
$parcel$export(module.exports, "linearGradient", () => $
|
|
18
|
-
$parcel$export(module.exports, "colorMix", () => $
|
|
19
|
-
$parcel$export(module.exports, "style", () => $
|
|
8
|
+
$parcel$export(module.exports, "size", () => $149d3f79c0701456$export$346677f925de839c);
|
|
9
|
+
$parcel$export(module.exports, "space", () => $149d3f79c0701456$export$a941ed4b947d12f8);
|
|
10
|
+
$parcel$export(module.exports, "fontRelative", () => $149d3f79c0701456$export$ba024f4caf693d15);
|
|
11
|
+
$parcel$export(module.exports, "focusRing", () => $149d3f79c0701456$export$8e24544ddba725ee);
|
|
12
|
+
$parcel$export(module.exports, "iconStyle", () => $149d3f79c0701456$export$dcc3981cc6efe940);
|
|
13
|
+
$parcel$export(module.exports, "baseColor", () => $364a8b5208b4a0ee$exports.baseColor);
|
|
14
|
+
$parcel$export(module.exports, "color", () => $364a8b5208b4a0ee$exports.color);
|
|
15
|
+
$parcel$export(module.exports, "edgeToText", () => $364a8b5208b4a0ee$exports.edgeToText);
|
|
16
|
+
$parcel$export(module.exports, "lightDark", () => $364a8b5208b4a0ee$exports.lightDark);
|
|
17
|
+
$parcel$export(module.exports, "linearGradient", () => $364a8b5208b4a0ee$exports.linearGradient);
|
|
18
|
+
$parcel$export(module.exports, "colorMix", () => $364a8b5208b4a0ee$exports.colorMix);
|
|
19
|
+
$parcel$export(module.exports, "style", () => $364a8b5208b4a0ee$exports.style);
|
|
20
20
|
/*
|
|
21
21
|
* Copyright 2024 Adobe. All rights reserved.
|
|
22
22
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -28,16 +28,16 @@ $parcel$export(module.exports, "style", () => $709ed173fa1293ee$exports.style);
|
|
|
28
28
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
29
|
* governing permissions and limitations under the License.
|
|
30
30
|
*/
|
|
31
|
-
function $
|
|
32
|
-
return `[${(0, $
|
|
31
|
+
function $149d3f79c0701456$export$346677f925de839c(px) {
|
|
32
|
+
return `[${(0, $364a8b5208b4a0ee$exports.size)(px)}]`;
|
|
33
33
|
}
|
|
34
|
-
function $
|
|
35
|
-
return `[${(0, $
|
|
34
|
+
function $149d3f79c0701456$export$a941ed4b947d12f8(px) {
|
|
35
|
+
return `[${(0, $364a8b5208b4a0ee$exports.space)(px)}]`;
|
|
36
36
|
}
|
|
37
|
-
function $
|
|
38
|
-
return `[${(0, $
|
|
37
|
+
function $149d3f79c0701456$export$ba024f4caf693d15(base, baseFontSize) {
|
|
38
|
+
return `[${(0, $364a8b5208b4a0ee$exports.fontRelative)(base, baseFontSize)}]`;
|
|
39
39
|
}
|
|
40
|
-
const $
|
|
40
|
+
const $149d3f79c0701456$export$8e24544ddba725ee = ()=>({
|
|
41
41
|
outlineStyle: {
|
|
42
42
|
default: 'none',
|
|
43
43
|
isFocusVisible: 'solid'
|
|
@@ -46,22 +46,22 @@ const $e9b3cd6ccd792adf$export$8e24544ddba725ee = ()=>({
|
|
|
46
46
|
outlineWidth: 2,
|
|
47
47
|
outlineOffset: 2
|
|
48
48
|
});
|
|
49
|
-
const $
|
|
49
|
+
const $149d3f79c0701456$var$iconSizes = {
|
|
50
50
|
XS: 14,
|
|
51
51
|
S: 16,
|
|
52
52
|
M: 20,
|
|
53
53
|
L: 22,
|
|
54
54
|
XL: 26
|
|
55
55
|
};
|
|
56
|
-
function $
|
|
56
|
+
function $149d3f79c0701456$export$dcc3981cc6efe940(options) {
|
|
57
57
|
let { size: size = 'M', color: color, ...styles } = options;
|
|
58
58
|
if (color) styles['--iconPrimary'] = {
|
|
59
59
|
type: 'fill',
|
|
60
60
|
value: color
|
|
61
61
|
};
|
|
62
|
-
styles['size'] = $
|
|
62
|
+
styles['size'] = $149d3f79c0701456$var$iconSizes[size];
|
|
63
63
|
// @ts-ignore
|
|
64
|
-
return (0, $
|
|
64
|
+
return (0, $364a8b5208b4a0ee$exports.style).call(this, styles);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
|
package/style/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {baseColor as $
|
|
1
|
+
import {baseColor as $27684d56c53d4b5c$export$49bbad2a916ab57c, color as $27684d56c53d4b5c$export$35e9368ef982300f, colorMix as $27684d56c53d4b5c$export$9b476054b78b89cd, edgeToText as $27684d56c53d4b5c$export$17b63977b35bb6d2, fontRelative as $27684d56c53d4b5c$export$ba024f4caf693d15, lightDark as $27684d56c53d4b5c$export$d19e682d444755ed, linearGradient as $27684d56c53d4b5c$export$46def8197cf4dd4c, size as $27684d56c53d4b5c$export$346677f925de839c, space as $27684d56c53d4b5c$export$a941ed4b947d12f8, style as $27684d56c53d4b5c$export$1d567c320f4763bc} from "./spectrum-theme.mjs";
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* Copyright 2024 Adobe. All rights reserved.
|
|
@@ -11,16 +11,16 @@ import {baseColor as $204ce7e475877bb1$export$49bbad2a916ab57c, color as $204ce7
|
|
|
11
11
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
|
-
function $
|
|
15
|
-
return `[${(0, $
|
|
14
|
+
function $d5eae7056e810ac4$export$346677f925de839c(px) {
|
|
15
|
+
return `[${(0, $27684d56c53d4b5c$export$346677f925de839c)(px)}]`;
|
|
16
16
|
}
|
|
17
|
-
function $
|
|
18
|
-
return `[${(0, $
|
|
17
|
+
function $d5eae7056e810ac4$export$a941ed4b947d12f8(px) {
|
|
18
|
+
return `[${(0, $27684d56c53d4b5c$export$a941ed4b947d12f8)(px)}]`;
|
|
19
19
|
}
|
|
20
|
-
function $
|
|
21
|
-
return `[${(0, $
|
|
20
|
+
function $d5eae7056e810ac4$export$ba024f4caf693d15(base, baseFontSize) {
|
|
21
|
+
return `[${(0, $27684d56c53d4b5c$export$ba024f4caf693d15)(base, baseFontSize)}]`;
|
|
22
22
|
}
|
|
23
|
-
const $
|
|
23
|
+
const $d5eae7056e810ac4$export$8e24544ddba725ee = ()=>({
|
|
24
24
|
outlineStyle: {
|
|
25
25
|
default: 'none',
|
|
26
26
|
isFocusVisible: 'solid'
|
|
@@ -29,24 +29,24 @@ const $e3600291d74c3d39$export$8e24544ddba725ee = ()=>({
|
|
|
29
29
|
outlineWidth: 2,
|
|
30
30
|
outlineOffset: 2
|
|
31
31
|
});
|
|
32
|
-
const $
|
|
32
|
+
const $d5eae7056e810ac4$var$iconSizes = {
|
|
33
33
|
XS: 14,
|
|
34
34
|
S: 16,
|
|
35
35
|
M: 20,
|
|
36
36
|
L: 22,
|
|
37
37
|
XL: 26
|
|
38
38
|
};
|
|
39
|
-
function $
|
|
39
|
+
function $d5eae7056e810ac4$export$dcc3981cc6efe940(options) {
|
|
40
40
|
let { size: size = 'M', color: color, ...styles } = options;
|
|
41
41
|
if (color) styles['--iconPrimary'] = {
|
|
42
42
|
type: 'fill',
|
|
43
43
|
value: color
|
|
44
44
|
};
|
|
45
|
-
styles['size'] = $
|
|
45
|
+
styles['size'] = $d5eae7056e810ac4$var$iconSizes[size];
|
|
46
46
|
// @ts-ignore
|
|
47
|
-
return (0, $
|
|
47
|
+
return (0, $27684d56c53d4b5c$export$1d567c320f4763bc).call(this, styles);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
export {$
|
|
51
|
+
export {$d5eae7056e810ac4$export$346677f925de839c as size, $d5eae7056e810ac4$export$a941ed4b947d12f8 as space, $d5eae7056e810ac4$export$ba024f4caf693d15 as fontRelative, $d5eae7056e810ac4$export$8e24544ddba725ee as focusRing, $d5eae7056e810ac4$export$dcc3981cc6efe940 as iconStyle, $27684d56c53d4b5c$export$49bbad2a916ab57c as baseColor, $27684d56c53d4b5c$export$35e9368ef982300f as color, $27684d56c53d4b5c$export$17b63977b35bb6d2 as edgeToText, $27684d56c53d4b5c$export$d19e682d444755ed as lightDark, $27684d56c53d4b5c$export$46def8197cf4dd4c as linearGradient, $27684d56c53d4b5c$export$9b476054b78b89cd as colorMix, $27684d56c53d4b5c$export$1d567c320f4763bc as style};
|
|
52
52
|
//# sourceMappingURL=module.mjs.map
|