@epilot/volt-ui-experimental-griffel 0.1.0-experiment.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/README.md +157 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/components/accordion/accordion.d.ts +14 -0
- package/dist/components/accordion/accordion.js +167 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +36 -0
- package/dist/components/alert-dialog/alert-dialog.js +270 -0
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/avatar/avatar-group.d.ts +7 -0
- package/dist/components/avatar/avatar-group.js +143 -0
- package/dist/components/avatar/avatar-group.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +17 -0
- package/dist/components/avatar/avatar.js +173 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/badge/badge.d.ts +41 -0
- package/dist/components/badge/badge.js +137 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +31 -0
- package/dist/components/breadcrumb/breadcrumb.js +111 -0
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/button/button.d.ts +12 -0
- package/dist/components/button/button.js +168 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +30 -0
- package/dist/components/button-group/button-group.js +123 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/callout/callout.d.ts +23 -0
- package/dist/components/callout/callout.js +312 -0
- package/dist/components/callout/callout.js.map +1 -0
- package/dist/components/card/card.d.ts +9 -0
- package/dist/components/card/card.js +172 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +4 -0
- package/dist/components/checkbox/checkbox.js +123 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/collapsible-sidebar/collapsible-sidebar.d.ts +33 -0
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js +216 -0
- package/dist/components/collapsible-sidebar/collapsible-sidebar.js.map +1 -0
- package/dist/components/command/command.d.ts +85 -0
- package/dist/components/command/command.js +358 -0
- package/dist/components/command/command.js.map +1 -0
- package/dist/components/date-range-picker/date-range-picker-utils.d.ts +2 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +34 -0
- package/dist/components/date-range-picker/date-range-picker.js +393 -0
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/date-range-picker/range-calendar.d.ts +15 -0
- package/dist/components/date-range-picker/range-calendar.js +143 -0
- package/dist/components/date-range-picker/range-calendar.js.map +1 -0
- package/dist/components/date-time-picker/calendar.d.ts +28 -0
- package/dist/components/date-time-picker/calendar.js +632 -0
- package/dist/components/date-time-picker/calendar.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker-context.d.ts +39 -0
- package/dist/components/date-time-picker/date-time-picker-context.js +79 -0
- package/dist/components/date-time-picker/date-time-picker-context.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker-input.d.ts +13 -0
- package/dist/components/date-time-picker/date-time-picker-input.js +229 -0
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker-panel.d.ts +15 -0
- package/dist/components/date-time-picker/date-time-picker-panel.js +276 -0
- package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker-popover.d.ts +6 -0
- package/dist/components/date-time-picker/date-time-picker-popover.js +26 -0
- package/dist/components/date-time-picker/date-time-picker-popover.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker-utils.d.ts +37 -0
- package/dist/components/date-time-picker/date-time-picker-utils.js +103 -0
- package/dist/components/date-time-picker/date-time-picker-utils.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +47 -0
- package/dist/components/date-time-picker/date-time-picker.js +112 -0
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/date-time-picker/time-picker.d.ts +12 -0
- package/dist/components/date-time-picker/time-picker.js +269 -0
- package/dist/components/date-time-picker/time-picker.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +27 -0
- package/dist/components/dialog/dialog.js +333 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +27 -0
- package/dist/components/drawer/drawer.js +437 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +41 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +424 -0
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/field/field-combobox.d.ts +90 -0
- package/dist/components/field/field-combobox.js +457 -0
- package/dist/components/field/field-combobox.js.map +1 -0
- package/dist/components/field/field-select.d.ts +4 -0
- package/dist/components/field/field-select.js +26 -0
- package/dist/components/field/field-select.js.map +1 -0
- package/dist/components/field/field.d.ts +76 -0
- package/dist/components/field/field.js +482 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/label/label.d.ts +21 -0
- package/dist/components/label/label.js +87 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/list/list.d.ts +46 -0
- package/dist/components/list/list.js +770 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/option-card/option-card.d.ts +39 -0
- package/dist/components/option-card/option-card.js +454 -0
- package/dist/components/option-card/option-card.js.map +1 -0
- package/dist/components/pill/pill.d.ts +27 -0
- package/dist/components/pill/pill.js +159 -0
- package/dist/components/pill/pill.js.map +1 -0
- package/dist/components/popover/popover.d.ts +14 -0
- package/dist/components/popover/popover.js +138 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/radio/radio.d.ts +6 -0
- package/dist/components/radio/radio.js +138 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/scroll-overflow/scroll-overflow.d.ts +38 -0
- package/dist/components/scroll-overflow/scroll-overflow.js +485 -0
- package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -0
- package/dist/components/segmented-control/segmented-control.d.ts +11 -0
- package/dist/components/segmented-control/segmented-control.js +262 -0
- package/dist/components/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/select/select.d.ts +26 -0
- package/dist/components/select/select.js +509 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/separator/separator.d.ts +30 -0
- package/dist/components/separator/separator.js +42 -0
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +24 -0
- package/dist/components/skeleton/skeleton.js +121 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +25 -0
- package/dist/components/spinner/spinner.js +95 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/switch/switch.d.ts +17 -0
- package/dist/components/switch/switch.js +251 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/table/table.d.ts +50 -0
- package/dist/components/table/table.js +262 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +18 -0
- package/dist/components/tabs/tabs.js +180 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/text/text.d.ts +22 -0
- package/dist/components/text/text.js +80 -0
- package/dist/components/text/text.js.map +1 -0
- package/dist/components/toast/toast.d.ts +10 -0
- package/dist/components/toast/toast.js +240 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toggle/toggle-group.d.ts +10 -0
- package/dist/components/toggle/toggle-group.js +49 -0
- package/dist/components/toggle/toggle-group.js.map +1 -0
- package/dist/components/toggle/toggle.d.ts +10 -0
- package/dist/components/toggle/toggle.js +124 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +15 -0
- package/dist/components/tooltip/tooltip.js +167 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +253 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/clear-button.d.ts +5 -0
- package/dist/lib/clear-button.js +52 -0
- package/dist/lib/clear-button.js.map +1 -0
- package/dist/lib/icons.d.ts +3 -0
- package/dist/lib/icons.js +15 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +57 -0
- package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2599 -0
- package/dist/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +368 -0
- package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +236 -0
- package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
- package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.js +23 -0
- package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/constants.js +34 -0
- package/dist/node_modules/@griffel/core/src/constants.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/getAtomicDebugSequenceTree.js +27 -0
- package/dist/node_modules/@griffel/core/src/devtools/getAtomicDebugSequenceTree.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/getResetDebugSequence.js +19 -0
- package/dist/node_modules/@griffel/core/src/devtools/getResetDebugSequence.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/getSourceURLfromError.js +18 -0
- package/dist/node_modules/@griffel/core/src/devtools/getSourceURLfromError.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/injectDevTools.js +26 -0
- package/dist/node_modules/@griffel/core/src/devtools/injectDevTools.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/isDevToolsEnabled.js +12 -0
- package/dist/node_modules/@griffel/core/src/devtools/isDevToolsEnabled.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/mergeDebugSequence.js +15 -0
- package/dist/node_modules/@griffel/core/src/devtools/mergeDebugSequence.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/react-render-tracker/stackTrace.js +40 -0
- package/dist/node_modules/@griffel/core/src/devtools/react-render-tracker/stackTrace.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/store.js +22 -0
- package/dist/node_modules/@griffel/core/src/devtools/store.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/devtools/utils.js +22 -0
- package/dist/node_modules/@griffel/core/src/devtools/utils.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/index.js +52 -0
- package/dist/node_modules/@griffel/core/src/index.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/insertionFactory.js +10 -0
- package/dist/node_modules/@griffel/core/src/insertionFactory.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/makeResetStyles.js +26 -0
- package/dist/node_modules/@griffel/core/src/makeResetStyles.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/makeStyles.js +33 -0
- package/dist/node_modules/@griffel/core/src/makeStyles.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/mergeClasses.js +49 -0
- package/dist/node_modules/@griffel/core/src/mergeClasses.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/renderer/createDOMRenderer.js +43 -0
- package/dist/node_modules/@griffel/core/src/renderer/createDOMRenderer.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/renderer/createIsomorphicStyleSheet.js +23 -0
- package/dist/node_modules/@griffel/core/src/renderer/createIsomorphicStyleSheet.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/renderer/getStyleSheetForBucket.js +81 -0
- package/dist/node_modules/@griffel/core/src/renderer/getStyleSheetForBucket.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/renderer/safeInsertRule.js +19 -0
- package/dist/node_modules/@griffel/core/src/renderer/safeInsertRule.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/resolveStyleRulesForSlots.js +15 -0
- package/dist/node_modules/@griffel/core/src/resolveStyleRulesForSlots.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileAtomicCSSRule.js +28 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileAtomicCSSRule.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileCSSRules.js +23 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileCSSRules.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileKeyframeCSS.js +27 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileKeyframeCSS.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileResetCSSRules.js +31 -0
- package/dist/node_modules/@griffel/core/src/runtime/compileResetCSSRules.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/getStyleBucketName.js +34 -0
- package/dist/node_modules/@griffel/core/src/runtime/getStyleBucketName.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/reduceToClassNameForSlots.js +33 -0
- package/dist/node_modules/@griffel/core/src/runtime/reduceToClassNameForSlots.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/resolveResetStyleRules.js +95 -0
- package/dist/node_modules/@griffel/core/src/runtime/resolveResetStyleRules.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/resolveStyleRules.js +187 -0
- package/dist/node_modules/@griffel/core/src/runtime/resolveStyleRules.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/shorthands.js +146 -0
- package/dist/node_modules/@griffel/core/src/runtime/shorthands.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/globalPlugin.js +29 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/globalPlugin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/isAtRuleElement.js +15 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/isAtRuleElement.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/prefixerPlugin.js +107 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/prefixerPlugin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/rulesheetPlugin.js +9 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/rulesheetPlugin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/scopePlugin.js +41 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/scopePlugin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/sortClassesInAtRulesPlugin.js +8 -0
- package/dist/node_modules/@griffel/core/src/runtime/stylis/sortClassesInAtRulesPlugin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/cssifyObject.js +19 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/cssifyObject.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/generateCombinedMediaQuery.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/generateCombinedMediaQuery.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashClassName.js +11 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashClassName.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashPropertyKey.js +16 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashPropertyKey.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashSequence.js +17 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hashSequence.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hyphenateProperty.js +16 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/hyphenateProperty.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isContainerQuerySelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isContainerQuerySelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isLayerSelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isLayerSelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isMediaQuerySelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isMediaQuerySelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isNestedSelector.js +8 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isNestedSelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isObject.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isObject.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isResetValue.js +8 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isResetValue.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isScopeSelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isScopeSelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isSupportQuerySelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/isSupportQuerySelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/normalizeCSSBucketEntry.js +11 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/normalizeCSSBucketEntry.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/normalizeNestedProperty.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/normalizeNestedProperty.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/trimSelector.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/utils/trimSelector.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/logError.js +7 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/logError.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/warnAboutUnresolvedRule.js +22 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/warnAboutUnresolvedRule.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/warnAboutUnsupportedProperties.js +16 -0
- package/dist/node_modules/@griffel/core/src/runtime/warnings/warnAboutUnsupportedProperties.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/border.js +19 -0
- package/dist/node_modules/@griffel/core/src/shorthands/border.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderBottom.js +16 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderBottom.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderColor.js +8 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderColor.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderLeft.js +16 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderLeft.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderRadius.js +12 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderRadius.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderRight.js +16 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderRight.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderStyle.js +8 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderStyle.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderTop.js +16 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderTop.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderWidth.js +8 -0
- package/dist/node_modules/@griffel/core/src/shorthands/borderWidth.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/flex.js +66 -0
- package/dist/node_modules/@griffel/core/src/shorthands/flex.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/gap.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/gap.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/generateStyles.js +14 -0
- package/dist/node_modules/@griffel/core/src/shorthands/generateStyles.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/gridArea.js +31 -0
- package/dist/node_modules/@griffel/core/src/shorthands/gridArea.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/inset.js +13 -0
- package/dist/node_modules/@griffel/core/src/shorthands/inset.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/margin.js +8 -0
- package/dist/node_modules/@griffel/core/src/shorthands/margin.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/marginBlock.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/marginBlock.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/marginInline.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/marginInline.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/outline.js +11 -0
- package/dist/node_modules/@griffel/core/src/shorthands/outline.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/overflow.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/overflow.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/padding.js +8 -0
- package/dist/node_modules/@griffel/core/src/shorthands/padding.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/paddingBlock.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/paddingBlock.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/paddingInline.js +10 -0
- package/dist/node_modules/@griffel/core/src/shorthands/paddingInline.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/textDecoration.js +19 -0
- package/dist/node_modules/@griffel/core/src/shorthands/textDecoration.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/transition.js +19 -0
- package/dist/node_modules/@griffel/core/src/shorthands/transition.js.map +1 -0
- package/dist/node_modules/@griffel/core/src/shorthands/utils.js +19 -0
- package/dist/node_modules/@griffel/core/src/shorthands/utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +240 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +128 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +76 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +252 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +121 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +263 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +228 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +138 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +653 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +244 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +222 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/core/dist/floating-ui.core.js +528 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +131 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +72 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +239 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +184 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +534 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +863 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +133 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +164 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +34 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +138 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +340 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +55 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +28 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +33 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +53 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +18 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js.map +1 -0
- package/dist/node_modules/cmdk/dist/index.js +313 -0
- package/dist/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +8 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +516 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +60 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +53 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +19 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +12 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +9 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js.map +1 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +21 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +1 -0
- package/dist/node_modules/date-fns/addDays.js +11 -0
- package/dist/node_modules/date-fns/addDays.js.map +1 -0
- package/dist/node_modules/date-fns/addMonths.js +21 -0
- package/dist/node_modules/date-fns/addMonths.js.map +1 -0
- package/dist/node_modules/date-fns/constants.js +10 -0
- package/dist/node_modules/date-fns/constants.js.map +1 -0
- package/dist/node_modules/date-fns/constructFrom.js +9 -0
- package/dist/node_modules/date-fns/constructFrom.js.map +1 -0
- package/dist/node_modules/date-fns/constructNow.js +9 -0
- package/dist/node_modules/date-fns/constructNow.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +17 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +1 -0
- package/dist/node_modules/date-fns/eachDayOfInterval.js +18 -0
- package/dist/node_modules/date-fns/eachDayOfInterval.js.map +1 -0
- package/dist/node_modules/date-fns/endOfWeek.js +10 -0
- package/dist/node_modules/date-fns/endOfWeek.js.map +1 -0
- package/dist/node_modules/date-fns/format.js +60 -0
- package/dist/node_modules/date-fns/format.js.map +1 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +12 -0
- package/dist/node_modules/date-fns/getDayOfYear.js.map +1 -0
- package/dist/node_modules/date-fns/getDefaultOptions.js +9 -0
- package/dist/node_modules/date-fns/getDefaultOptions.js.map +1 -0
- package/dist/node_modules/date-fns/getISODay.js +10 -0
- package/dist/node_modules/date-fns/getISODay.js.map +1 -0
- package/dist/node_modules/date-fns/getISOWeek.js +13 -0
- package/dist/node_modules/date-fns/getISOWeek.js.map +1 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +16 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js.map +1 -0
- package/dist/node_modules/date-fns/getWeek.js +13 -0
- package/dist/node_modules/date-fns/getWeek.js.map +1 -0
- package/dist/node_modules/date-fns/getWeekYear.js +18 -0
- package/dist/node_modules/date-fns/getWeekYear.js.map +1 -0
- package/dist/node_modules/date-fns/isAfter.js +9 -0
- package/dist/node_modules/date-fns/isAfter.js.map +1 -0
- package/dist/node_modules/date-fns/isBefore.js +9 -0
- package/dist/node_modules/date-fns/isBefore.js.map +1 -0
- package/dist/node_modules/date-fns/isDate.js +8 -0
- package/dist/node_modules/date-fns/isDate.js.map +1 -0
- package/dist/node_modules/date-fns/isSameDay.js +15 -0
- package/dist/node_modules/date-fns/isSameDay.js.map +1 -0
- package/dist/node_modules/date-fns/isSameMonth.js +14 -0
- package/dist/node_modules/date-fns/isSameMonth.js.map +1 -0
- package/dist/node_modules/date-fns/isToday.js +14 -0
- package/dist/node_modules/date-fns/isToday.js.map +1 -0
- package/dist/node_modules/date-fns/isValid.js +10 -0
- package/dist/node_modules/date-fns/isValid.js.map +1 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +19 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +32 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +16 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatDistance.js +164 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatLong.js +38 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatRelative.js +12 -0
- package/dist/node_modules/date-fns/locale/de/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de/_lib/localize.js +162 -0
- package/dist/node_modules/date-fns/locale/de/_lib/localize.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de/_lib/match.js +113 -0
- package/dist/node_modules/date-fns/locale/de/_lib/match.js.map +1 -0
- package/dist/node_modules/date-fns/locale/de.js +22 -0
- package/dist/node_modules/date-fns/locale/de.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +71 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +34 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +12 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +156 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +111 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/node_modules/date-fns/locale/en-US.js +22 -0
- package/dist/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js +71 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js +34 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js +12 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/localize.js +122 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/match.js +111 -0
- package/dist/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/node_modules/date-fns/locale/fr.js +22 -0
- package/dist/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/Parser.js +23 -0
- package/dist/node_modules/date-fns/parse/_lib/Parser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/Setter.js +42 -0
- package/dist/node_modules/date-fns/parse/_lib/Setter.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/constants.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/constants.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js +62 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +52 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js +46 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js +31 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +22 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +23 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +33 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +33 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +34 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +34 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +100 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +49 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +49 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +41 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +75 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +49 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +70 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +33 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +72 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +33 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +75 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +72 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +23 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +23 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js +50 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers.js +68 -0
- package/dist/node_modules/date-fns/parse/_lib/parsers.js.map +1 -0
- package/dist/node_modules/date-fns/parse/_lib/utils.js +104 -0
- package/dist/node_modules/date-fns/parse/_lib/utils.js.map +1 -0
- package/dist/node_modules/date-fns/parse.js +90 -0
- package/dist/node_modules/date-fns/parse.js.map +1 -0
- package/dist/node_modules/date-fns/setDay.js +13 -0
- package/dist/node_modules/date-fns/setDay.js.map +1 -0
- package/dist/node_modules/date-fns/setHours.js +10 -0
- package/dist/node_modules/date-fns/setHours.js.map +1 -0
- package/dist/node_modules/date-fns/setISODay.js +12 -0
- package/dist/node_modules/date-fns/setISODay.js.map +1 -0
- package/dist/node_modules/date-fns/setISOWeek.js +11 -0
- package/dist/node_modules/date-fns/setISOWeek.js.map +1 -0
- package/dist/node_modules/date-fns/setMinutes.js +10 -0
- package/dist/node_modules/date-fns/setMinutes.js.map +1 -0
- package/dist/node_modules/date-fns/setWeek.js +11 -0
- package/dist/node_modules/date-fns/setWeek.js.map +1 -0
- package/dist/node_modules/date-fns/startOfDay.js +10 -0
- package/dist/node_modules/date-fns/startOfDay.js.map +1 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js.map +1 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +1 -0
- package/dist/node_modules/date-fns/startOfMonth.js +10 -0
- package/dist/node_modules/date-fns/startOfMonth.js.map +1 -0
- package/dist/node_modules/date-fns/startOfWeek.js +12 -0
- package/dist/node_modules/date-fns/startOfWeek.js.map +1 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +14 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js.map +1 -0
- package/dist/node_modules/date-fns/startOfYear.js +10 -0
- package/dist/node_modules/date-fns/startOfYear.js.map +1 -0
- package/dist/node_modules/date-fns/subMonths.js +9 -0
- package/dist/node_modules/date-fns/subMonths.js.map +1 -0
- package/dist/node_modules/date-fns/toDate.js +9 -0
- package/dist/node_modules/date-fns/toDate.js.map +1 -0
- package/dist/node_modules/date-fns/transpose.js +19 -0
- package/dist/node_modules/date-fns/transpose.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +113 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +69 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/rifm/dist/rifm.esm.js +87 -0
- package/dist/node_modules/rifm/dist/rifm.esm.js.map +1 -0
- package/dist/node_modules/rtl-css-js/dist/esm/convert-9768a965.js +303 -0
- package/dist/node_modules/rtl-css-js/dist/esm/convert-9768a965.js.map +1 -0
- package/dist/node_modules/sonner/dist/index.js +747 -0
- package/dist/node_modules/sonner/dist/index.js.map +1 -0
- package/dist/node_modules/stylis/src/Enum.js +16 -0
- package/dist/node_modules/stylis/src/Enum.js.map +1 -0
- package/dist/node_modules/stylis/src/Middleware.js +19 -0
- package/dist/node_modules/stylis/src/Middleware.js.map +1 -0
- package/dist/node_modules/stylis/src/Parser.js +128 -0
- package/dist/node_modules/stylis/src/Parser.js.map +1 -0
- package/dist/node_modules/stylis/src/Serializer.js +29 -0
- package/dist/node_modules/stylis/src/Serializer.js.map +1 -0
- package/dist/node_modules/stylis/src/Tokenizer.js +151 -0
- package/dist/node_modules/stylis/src/Tokenizer.js.map +1 -0
- package/dist/node_modules/stylis/src/Utility.js +51 -0
- package/dist/node_modules/stylis/src/Utility.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +9 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/renderer/contract.d.ts +43 -0
- package/dist/renderer/contract.js +8 -0
- package/dist/renderer/contract.js.map +1 -0
- package/dist/renderer/index.d.ts +22 -0
- package/dist/renderer/index.js +59 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/insertion-point.d.ts +35 -0
- package/dist/renderer/insertion-point.js +30 -0
- package/dist/renderer/insertion-point.js.map +1 -0
- package/dist/renderer/rule-key.d.ts +14 -0
- package/dist/renderer/rule-key.js +12 -0
- package/dist/renderer/rule-key.js.map +1 -0
- package/dist/renderer/sheet-adoption.d.ts +32 -0
- package/dist/renderer/sheet-adoption.js +30 -0
- package/dist/renderer/sheet-adoption.js.map +1 -0
- package/dist/styles/make-styles.d.ts +43 -0
- package/dist/styles/make-styles.js +22 -0
- package/dist/styles/make-styles.js.map +1 -0
- package/dist/tokens/class-salt.generated.d.ts +2 -0
- package/dist/tokens/class-salt.generated.js +5 -0
- package/dist/tokens/class-salt.generated.js.map +1 -0
- package/dist/tokens/core.generated.d.ts +3 -0
- package/dist/tokens/core.generated.js +487 -0
- package/dist/tokens/core.generated.js.map +1 -0
- package/dist/tokens/ensure-sheet.d.ts +3 -0
- package/dist/tokens/ensure-sheet.js +14 -0
- package/dist/tokens/ensure-sheet.js.map +1 -0
- package/dist/tokens/index.d.ts +952 -0
- package/dist/tokens/index.js +958 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/install.d.ts +33 -0
- package/dist/tokens/install.js +14 -0
- package/dist/tokens/install.js.map +1 -0
- package/dist/tokens/palette.generated.d.ts +3 -0
- package/dist/tokens/palette.generated.js +1078 -0
- package/dist/tokens/palette.generated.js.map +1 -0
- package/dist/tokens.json +1911 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../../../src/components/avatar/avatar.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\nimport { mergeClasses } from \"@griffel/core\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport { ensurePaletteTokens } from \"../../tokens/install\"\nimport * as tokens from \"../../tokens\"\n\nif (typeof document !== \"undefined\") {\n ensurePaletteTokens()\n}\n\nexport type AvatarColor =\n | \"gray\"\n | \"blue\"\n | \"sky\"\n | \"cyan\"\n | \"teal\"\n | \"mint\"\n | \"green\"\n | \"lime\"\n | \"yellow\"\n | \"orange\"\n | \"bronze\"\n | \"red\"\n | \"pink\"\n | \"purple\"\n | \"indigo\"\nexport type AvatarSize = \"sm\" | \"base\" | \"lg\"\n\nconst AUTO_COLORS: AvatarColor[] = [\n \"blue\",\n \"sky\",\n \"cyan\",\n \"teal\",\n \"mint\",\n \"green\",\n \"lime\",\n \"orange\",\n \"bronze\",\n \"pink\",\n \"purple\",\n \"indigo\",\n]\n\nconst colorForSeed = (seed: string): AvatarColor => {\n let hash = 0\n for (let i = 0; i < seed.length; i++) {\n hash = (hash * 31 + seed.charCodeAt(i)) >>> 0\n }\n return AUTO_COLORS[hash % AUTO_COLORS.length]\n}\n\nconst colorVars: Record<AvatarColor, React.CSSProperties> = {\n gray: {\n \"--avatar-background\": tokens.gray3,\n \"--avatar-foreground\": tokens.grayA12,\n } as React.CSSProperties,\n blue: {\n \"--avatar-background\": tokens.blue3,\n \"--avatar-foreground\": tokens.blueA12,\n } as React.CSSProperties,\n sky: {\n \"--avatar-background\": tokens.sky3,\n \"--avatar-foreground\": tokens.skyA12,\n } as React.CSSProperties,\n cyan: {\n \"--avatar-background\": tokens.cyan3,\n \"--avatar-foreground\": tokens.cyanA12,\n } as React.CSSProperties,\n teal: {\n \"--avatar-background\": tokens.teal3,\n \"--avatar-foreground\": tokens.tealA12,\n } as React.CSSProperties,\n mint: {\n \"--avatar-background\": tokens.mint3,\n \"--avatar-foreground\": tokens.mintA12,\n } as React.CSSProperties,\n green: {\n \"--avatar-background\": tokens.green3,\n \"--avatar-foreground\": tokens.greenA12,\n } as React.CSSProperties,\n lime: {\n \"--avatar-background\": tokens.lime3,\n \"--avatar-foreground\": tokens.limeA12,\n } as React.CSSProperties,\n yellow: {\n \"--avatar-background\": tokens.yellow3,\n \"--avatar-foreground\": tokens.yellowA12,\n } as React.CSSProperties,\n orange: {\n \"--avatar-background\": tokens.orange3,\n \"--avatar-foreground\": tokens.orangeA12,\n } as React.CSSProperties,\n bronze: {\n \"--avatar-background\": tokens.bronze3,\n \"--avatar-foreground\": tokens.bronzeA12,\n } as React.CSSProperties,\n red: {\n \"--avatar-background\": tokens.red3,\n \"--avatar-foreground\": tokens.redA12,\n } as React.CSSProperties,\n pink: {\n \"--avatar-background\": tokens.pink3,\n \"--avatar-foreground\": tokens.pinkA12,\n } as React.CSSProperties,\n purple: {\n \"--avatar-background\": tokens.purple3,\n \"--avatar-foreground\": tokens.purpleA12,\n } as React.CSSProperties,\n indigo: {\n \"--avatar-background\": tokens.indigo3,\n \"--avatar-foreground\": tokens.indigoA12,\n } as React.CSSProperties,\n}\n\nconst AvatarGroupContext = React.createContext<{ size?: AvatarSize } | null>(\n null\n)\n\nconst useStyles = makeVoltStyles({\n root: {\n position: \"relative\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n overflowX: \"hidden\",\n overflowY: \"hidden\",\n borderRadius: \"9999px\",\n backgroundColor: \"var(--avatar-background)\",\n color: \"var(--avatar-foreground)\",\n fontWeight: tokens.fontWeightMedium,\n textTransform: \"uppercase\",\n },\n sm: {\n width: \"1.5rem\",\n height: \"1.5rem\",\n fontSize: tokens.textXs,\n },\n base: {\n width: \"2rem\",\n height: \"2rem\",\n fontSize: tokens.textSm,\n },\n lg: {\n width: \"2.5rem\",\n height: \"2.5rem\",\n fontSize: tokens.textBase,\n },\n image: {\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n },\n fallback: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n height: \"100%\",\n },\n})\n\nexport type AvatarProps = Omit<\n React.ComponentProps<typeof AvatarPrimitive.Root>,\n \"className\" | \"color\" | \"children\"\n> & {\n className?: string\n src?: string\n alt?: string\n initials?: string\n color?: AvatarColor\n size?: AvatarSize\n}\n\nexport const Avatar = React.forwardRef<\n React.ComponentRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>(function Avatar(\n { className, src, alt, initials, color, size, style, ...props },\n ref\n) {\n const styles = useStyles()\n const group = React.useContext(AvatarGroupContext)\n const resolvedSize = size ?? group?.size ?? \"base\"\n const resolvedColor = color ?? colorForSeed(alt ?? initials ?? \"\")\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n data-slot=\"avatar\"\n {...{ [SLOT_ATTR]: \"avatar\" }}\n className={mergeClasses(styles.root, styles[resolvedSize], className)}\n style={{ ...colorVars[resolvedColor], ...style }}\n {...props}\n >\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n {...{ [SLOT_ATTR]: \"avatar-image\" }}\n src={src}\n alt={alt}\n className={styles.image}\n />\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n {...{ [SLOT_ATTR]: \"avatar-fallback\" }}\n className={styles.fallback}\n aria-hidden=\"true\"\n >\n {initials}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n )\n})\n\nexport { AvatarGroupContext }\n"],"names":["ensurePaletteTokens","AUTO_COLORS","colorForSeed","seed","hash","i","colorVars","tokens.gray3","tokens.grayA12","tokens.blue3","tokens.blueA12","tokens.sky3","tokens.skyA12","tokens.cyan3","tokens.cyanA12","tokens.teal3","tokens.tealA12","tokens.mint3","tokens.mintA12","tokens.green3","tokens.greenA12","tokens.lime3","tokens.limeA12","tokens.yellow3","tokens.yellowA12","tokens.orange3","tokens.orangeA12","tokens.bronze3","tokens.bronzeA12","tokens.red3","tokens.redA12","tokens.pink3","tokens.pinkA12","tokens.purple3","tokens.purpleA12","tokens.indigo3","tokens.indigoA12","AvatarGroupContext","React","useStyles","makeVoltStyles","tokens.fontWeightMedium","tokens.textXs","tokens.textSm","tokens.textBase","Avatar","className","src","alt","initials","color","size","style","props","ref","styles","group","resolvedSize","resolvedColor","jsxs","AvatarPrimitive.Root","SLOT_ATTR","mergeClasses","jsx","AvatarPrimitive.Image","AvatarPrimitive.Fallback"],"mappings":";;;;;;;;AASI,OAAO,WAAa,OACtBA,EAAA;AAqBF,MAAMC,IAA6B;AAAA,EACjC;AAAA,EACA;AAAA,EAC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AWD,EAAkB,GAC3CoB,IAAeN,MAAQK,KAAA,gBAAAA,EAAO,SAAQ,QACtCE,IAAgBR,KAAShD,GAAa8C,KAAOC,KAAY,EAAE;AAEjE,SACE,gBAAAU;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAAN;AAAA,MACA,aAAU;AAAA,MACJ,CAACO,CAAS,GAAG;AAAA,MACnB,WAAWC,GAAaP,EAAO,MAAMA,EAAOE,CAAY,GAAGX,CAAS;AAAA,MACpE,OAAO,EAAE,GAAGxC,GAAUoD,CAAa,GAAG,GAAGN,EAAA;AAAA,MACxC,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAU;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACJ,CAACH,CAAS,GAAG;AAAA,YACnB,KAAAd;AAAA,YACA,KAAAC;AAAA,YACA,WAAWO,EAAO;AAAA,UAAA;AAAA,QAAA;AAAA,QAEpB,gBAAAQ;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACJ,CAACJ,CAAS,GAAG;AAAA,YACnB,WAAWN,EAAO;AAAA,YAClB,eAAY;AAAA,YAEX,UAAAN;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* REFERENCE COMPONENT — the colour-matrix collapse. Read this before writing another component
|
|
4
|
+
* that takes a `color` prop.
|
|
5
|
+
*
|
|
6
|
+
* v1 enumerates 20 colours x 3 styles as 60 `compoundVariants`, each a distinct class string like
|
|
7
|
+
* `volt-bg-mint-soft`. Because those names are built by interpolation, Tailwind's scanner cannot
|
|
8
|
+
* see them, which is what `safelist.css` exists to force — 9 lines that emit ~945 rules, 65.6 KB
|
|
9
|
+
* and 59% of v1's entire rule count. The Griffel PoC carried the same shape forward as 60 static
|
|
10
|
+
* style objects.
|
|
11
|
+
*
|
|
12
|
+
* Here the colour is a VALUE, not part of a class name. Three atoms read three custom properties;
|
|
13
|
+
* the component sets those properties inline from the `color` prop. Total rules: one small set per
|
|
14
|
+
* style variant, regardless of how many colours exist. Adding a 22nd palette family costs zero
|
|
15
|
+
* rules.
|
|
16
|
+
*
|
|
17
|
+
* Two consequences worth knowing:
|
|
18
|
+
* - `color` may legitimately arrive from a runtime expression (`getColorForEntityLabel(label)` and
|
|
19
|
+
* `WCAG_BADGE_MAP[level].color` both exist in consumer code today), which no build step can
|
|
20
|
+
* resolve. That is exactly why the palette sheet cannot be statically shaken, and why this
|
|
21
|
+
* component calls `ensurePaletteTokens()`.
|
|
22
|
+
* - Selectors key on SLOT_ATTR, never on `data-slot`. `data-slot` values are shared with v1, so a
|
|
23
|
+
* rule keyed on one also matches v1-rendered DOM — the StyleX track had a v1 icon compute to
|
|
24
|
+
* 0x0 through a green gate this way. `data-slot` is still emitted, purely as a diagnostic.
|
|
25
|
+
*/
|
|
26
|
+
declare const COLORS: readonly ["accent", "neutral", "gray", "success", "warning", "error", "info", "blue", "sky", "mint", "lime", "green", "teal", "cyan", "indigo", "purple", "pink", "red", "orange", "yellow", "bronze"];
|
|
27
|
+
export type BadgeColor = (typeof COLORS)[number];
|
|
28
|
+
export type BadgeVariant = "soft" | "solid" | "surface";
|
|
29
|
+
export type BadgeSize = "sm" | "base" | "lg";
|
|
30
|
+
export type BadgeProps = Omit<React.ComponentProps<"span">, "color"> & {
|
|
31
|
+
color?: BadgeColor;
|
|
32
|
+
/**
|
|
33
|
+
* Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute
|
|
34
|
+
* and made a badge unable to take both a visual treatment and an inline style. Retrocompat is
|
|
35
|
+
* not a requirement here, so the collision is fixed rather than inherited.
|
|
36
|
+
*/
|
|
37
|
+
variant?: BadgeVariant;
|
|
38
|
+
size?: BadgeSize;
|
|
39
|
+
};
|
|
40
|
+
export declare const Badge: React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
41
|
+
export { COLORS as BADGE_COLORS };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { shorthands as b } from "../../node_modules/@griffel/core/src/index.js";
|
|
4
|
+
import { SLOT_ATTR as S } from "../../renderer/contract.js";
|
|
5
|
+
import { makeVoltStyles as x } from "../../styles/make-styles.js";
|
|
6
|
+
import { radiusMd as y, spacingElement3 as w, spacingElement1 as r, textBase as R, radiusSm as $, spacingElement2 as C, textSm as O, textXs as k, errorA8 as A, accentA8 as B, fontWeightNormal as T } from "../../tokens/index.js";
|
|
7
|
+
import { ensurePaletteTokens as W } from "../../tokens/install.js";
|
|
8
|
+
import { NS as l } from "../../tokens/core.generated.js";
|
|
9
|
+
import { mergeClasses as E } from "../../node_modules/@griffel/core/src/mergeClasses.js";
|
|
10
|
+
const F = [
|
|
11
|
+
"accent",
|
|
12
|
+
"neutral",
|
|
13
|
+
"gray",
|
|
14
|
+
"success",
|
|
15
|
+
"warning",
|
|
16
|
+
"error",
|
|
17
|
+
"info",
|
|
18
|
+
"blue",
|
|
19
|
+
"sky",
|
|
20
|
+
"mint",
|
|
21
|
+
"lime",
|
|
22
|
+
"green",
|
|
23
|
+
"teal",
|
|
24
|
+
"cyan",
|
|
25
|
+
"indigo",
|
|
26
|
+
"purple",
|
|
27
|
+
"pink",
|
|
28
|
+
"red",
|
|
29
|
+
"orange",
|
|
30
|
+
"yellow",
|
|
31
|
+
"bronze"
|
|
32
|
+
], n = "--volt2-badge-bg", i = "--volt2-badge-fg", a = "--volt2-badge-bd", d = (e) => e === "neutral" ? "gray" : e, t = (e, o) => `var(--volt2-${l}-sem-${d(e)}-${o})`, I = (e, o) => `var(--volt2-${l}-${d(e)}-${o})`, z = {
|
|
33
|
+
soft: (e) => ({
|
|
34
|
+
[n]: t(e, "soft"),
|
|
35
|
+
[i]: t(e, "default"),
|
|
36
|
+
[a]: "transparent"
|
|
37
|
+
}),
|
|
38
|
+
solid: (e) => ({
|
|
39
|
+
[n]: t(e, "solid"),
|
|
40
|
+
[i]: t(e, "contrast"),
|
|
41
|
+
[a]: "transparent"
|
|
42
|
+
}),
|
|
43
|
+
surface: (e) => ({
|
|
44
|
+
[n]: t(e, "surface"),
|
|
45
|
+
[i]: t(e, "default"),
|
|
46
|
+
[a]: I(e, "a6")
|
|
47
|
+
})
|
|
48
|
+
}, L = x({
|
|
49
|
+
root: {
|
|
50
|
+
display: "inline-flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
justifyContent: "center",
|
|
53
|
+
width: "fit-content",
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
overflow: "hidden",
|
|
57
|
+
fontWeight: T,
|
|
58
|
+
// NEVER write a CSS shorthand in a Griffel style object. Atoms are one declaration each, so a
|
|
59
|
+
// shorthand cannot be resolved against a longhand — `border` and a later `borderColor` would
|
|
60
|
+
// both survive with the winner decided by insertion order. Griffel warns at runtime, which
|
|
61
|
+
// means the mistake ships silently in production where nobody reads the console.
|
|
62
|
+
// `shorthands.*` expands to the individual longhands.
|
|
63
|
+
...b.border("1px", "solid", `var(${a})`),
|
|
64
|
+
// The whole point: one rule each, colour supplied per instance.
|
|
65
|
+
backgroundColor: `var(${n})`,
|
|
66
|
+
color: `var(${i})`,
|
|
67
|
+
transitionProperty: "color, box-shadow",
|
|
68
|
+
":focus-visible": {
|
|
69
|
+
outlineWidth: "2px",
|
|
70
|
+
outlineStyle: "solid",
|
|
71
|
+
outlineOffset: "2px",
|
|
72
|
+
outlineColor: B
|
|
73
|
+
},
|
|
74
|
+
// v1 `aria-invalid:outline-error-a8`. Declared after the focus ring so an invalid focused
|
|
75
|
+
// badge paints the error ring, matching v1's variant ordering.
|
|
76
|
+
"&[aria-invalid]": {
|
|
77
|
+
outlineColor: A
|
|
78
|
+
},
|
|
79
|
+
"& > svg": { pointerEvents: "none" }
|
|
80
|
+
},
|
|
81
|
+
sm: {
|
|
82
|
+
fontSize: k,
|
|
83
|
+
lineHeight: "1rem",
|
|
84
|
+
letterSpacing: "0.04px",
|
|
85
|
+
gap: r,
|
|
86
|
+
paddingInline: r,
|
|
87
|
+
minWidth: "1rem",
|
|
88
|
+
borderRadius: "3px",
|
|
89
|
+
"& > svg": { width: "0.75rem", height: "0.75rem" }
|
|
90
|
+
},
|
|
91
|
+
base: {
|
|
92
|
+
fontSize: O,
|
|
93
|
+
lineHeight: "1.25rem",
|
|
94
|
+
gap: r,
|
|
95
|
+
paddingInline: C,
|
|
96
|
+
minWidth: "1.25rem",
|
|
97
|
+
borderRadius: $,
|
|
98
|
+
"& > svg": { width: "1rem", height: "1rem" }
|
|
99
|
+
},
|
|
100
|
+
lg: {
|
|
101
|
+
fontSize: R,
|
|
102
|
+
lineHeight: "1.5rem",
|
|
103
|
+
gap: r,
|
|
104
|
+
paddingInline: w,
|
|
105
|
+
minWidth: "1.5rem",
|
|
106
|
+
borderRadius: y,
|
|
107
|
+
"& > svg": { width: "1rem", height: "1rem" }
|
|
108
|
+
}
|
|
109
|
+
}), M = v.forwardRef(
|
|
110
|
+
function({
|
|
111
|
+
className: o,
|
|
112
|
+
color: m = "accent",
|
|
113
|
+
variant: g = "soft",
|
|
114
|
+
size: p = "base",
|
|
115
|
+
style: c,
|
|
116
|
+
...f
|
|
117
|
+
}, u) {
|
|
118
|
+
W();
|
|
119
|
+
const s = L();
|
|
120
|
+
return /* @__PURE__ */ h(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
ref: u,
|
|
124
|
+
"data-slot": "badge",
|
|
125
|
+
[S]: "badge",
|
|
126
|
+
className: E(s.root, s[p], o),
|
|
127
|
+
style: { ...z[g](m), ...c },
|
|
128
|
+
...f
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
export {
|
|
134
|
+
F as BADGE_COLORS,
|
|
135
|
+
M as Badge
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@griffel/core\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport { NS } from \"../../tokens\"\nimport { ensurePaletteTokens } from \"../../tokens/install\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * REFERENCE COMPONENT — the colour-matrix collapse. Read this before writing another component\n * that takes a `color` prop.\n *\n * v1 enumerates 20 colours x 3 styles as 60 `compoundVariants`, each a distinct class string like\n * `volt-bg-mint-soft`. Because those names are built by interpolation, Tailwind's scanner cannot\n * see them, which is what `safelist.css` exists to force — 9 lines that emit ~945 rules, 65.6 KB\n * and 59% of v1's entire rule count. The Griffel PoC carried the same shape forward as 60 static\n * style objects.\n *\n * Here the colour is a VALUE, not part of a class name. Three atoms read three custom properties;\n * the component sets those properties inline from the `color` prop. Total rules: one small set per\n * style variant, regardless of how many colours exist. Adding a 22nd palette family costs zero\n * rules.\n *\n * Two consequences worth knowing:\n * - `color` may legitimately arrive from a runtime expression (`getColorForEntityLabel(label)` and\n * `WCAG_BADGE_MAP[level].color` both exist in consumer code today), which no build step can\n * resolve. That is exactly why the palette sheet cannot be statically shaken, and why this\n * component calls `ensurePaletteTokens()`.\n * - Selectors key on SLOT_ATTR, never on `data-slot`. `data-slot` values are shared with v1, so a\n * rule keyed on one also matches v1-rendered DOM — the StyleX track had a v1 icon compute to\n * 0x0 through a green gate this way. `data-slot` is still emitted, purely as a diagnostic.\n */\n\nconst COLORS = [\n \"accent\",\n \"neutral\",\n \"gray\",\n \"success\",\n \"warning\",\n \"error\",\n \"info\",\n \"blue\",\n \"sky\",\n \"mint\",\n \"lime\",\n \"green\",\n \"teal\",\n \"cyan\",\n \"indigo\",\n \"purple\",\n \"pink\",\n \"red\",\n \"orange\",\n \"yellow\",\n \"bronze\",\n] as const\n\nexport type BadgeColor = (typeof COLORS)[number]\nexport type BadgeVariant = \"soft\" | \"solid\" | \"surface\"\nexport type BadgeSize = \"sm\" | \"base\" | \"lg\"\n\n/** The three slots a variant can paint. Set inline; read by the atoms below. */\nconst BG = \"--volt2-badge-bg\"\nconst FG = \"--volt2-badge-fg\"\nconst BD = \"--volt2-badge-bd\"\n\nconst resolveColor = (color: BadgeColor): string =>\n color === \"neutral\" ? \"gray\" : color\n\nconst semantic = (color: BadgeColor, slot: string): string =>\n `var(--volt2-${NS}-sem-${resolveColor(color)}-${slot})`\nconst primitive = (color: BadgeColor, step: string): string =>\n `var(--volt2-${NS}-${resolveColor(color)}-${step})`\n\n/**\n * Which token each variant pulls into each slot. This replaces the 60-entry compound matrix: it is\n * data about three variants, not about 60 combinations.\n */\nconst VARIANT_SLOTS: Record<\n BadgeVariant,\n (color: BadgeColor) => Record<string, string>\n> = {\n soft: (c) => ({\n [BG]: semantic(c, \"soft\"),\n [FG]: semantic(c, \"default\"),\n [BD]: \"transparent\",\n }),\n solid: (c) => ({\n [BG]: semantic(c, \"solid\"),\n [FG]: semantic(c, \"contrast\"),\n [BD]: \"transparent\",\n }),\n surface: (c) => ({\n [BG]: semantic(c, \"surface\"),\n [FG]: semantic(c, \"default\"),\n [BD]: primitive(c, \"a6\"),\n }),\n}\n\nconst useStyles = makeVoltStyles({\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"fit-content\",\n whiteSpace: \"nowrap\",\n flexShrink: 0,\n overflow: \"hidden\",\n fontWeight: tokens.fontWeightNormal,\n // NEVER write a CSS shorthand in a Griffel style object. Atoms are one declaration each, so a\n // shorthand cannot be resolved against a longhand — `border` and a later `borderColor` would\n // both survive with the winner decided by insertion order. Griffel warns at runtime, which\n // means the mistake ships silently in production where nobody reads the console.\n // `shorthands.*` expands to the individual longhands.\n ...shorthands.border(\"1px\", \"solid\", `var(${BD})`),\n // The whole point: one rule each, colour supplied per instance.\n backgroundColor: `var(${BG})`,\n color: `var(${FG})`,\n transitionProperty: \"color, box-shadow\",\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n // v1 `aria-invalid:outline-error-a8`. Declared after the focus ring so an invalid focused\n // badge paints the error ring, matching v1's variant ordering.\n \"&[aria-invalid]\": {\n outlineColor: tokens.errorA8,\n },\n \"& > svg\": { pointerEvents: \"none\" },\n },\n sm: {\n fontSize: tokens.textXs,\n lineHeight: \"1rem\",\n letterSpacing: \"0.04px\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement1,\n minWidth: \"1rem\",\n borderRadius: \"3px\",\n \"& > svg\": { width: \"0.75rem\", height: \"0.75rem\" },\n },\n base: {\n fontSize: tokens.textSm,\n lineHeight: \"1.25rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement2,\n minWidth: \"1.25rem\",\n borderRadius: tokens.radiusSm,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n lg: {\n fontSize: tokens.textBase,\n lineHeight: \"1.5rem\",\n gap: tokens.spacingElement1,\n paddingInline: tokens.spacingElement3,\n minWidth: \"1.5rem\",\n borderRadius: tokens.radiusMd,\n \"& > svg\": { width: \"1rem\", height: \"1rem\" },\n },\n})\n\nexport type BadgeProps = Omit<React.ComponentProps<\"span\">, \"color\"> & {\n color?: BadgeColor\n /**\n * Named `variant`, not `style`. v1 called this `style`, which shadows the HTML `style` attribute\n * and made a badge unable to take both a visual treatment and an inline style. Retrocompat is\n * not a requirement here, so the collision is fixed rather than inherited.\n */\n variant?: BadgeVariant\n size?: BadgeSize\n}\n\nexport const Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n function Badge(\n {\n className,\n color = \"accent\",\n variant = \"soft\",\n size = \"base\",\n style,\n ...props\n },\n ref\n ) {\n // A decorative family can arrive from an expression the build cannot see, so the palette has to\n // be present whenever this component renders at all.\n ensurePaletteTokens()\n\n const styles = useStyles()\n\n return (\n <span\n ref={ref}\n data-slot=\"badge\"\n {...{ [SLOT_ATTR]: \"badge\" }}\n className={mergeClasses(styles.root, styles[size], className)}\n style={\n { ...VARIANT_SLOTS[variant](color), ...style } as React.CSSProperties\n }\n {...props}\n />\n )\n }\n)\n\nexport { COLORS as BADGE_COLORS }\n"],"names":["COLORS","BG","FG","BD","resolveColor","color","semantic","slot","NS","primitive","step","VARIANT_SLOTS","c","useStyles","makeVoltStyles","tokens.fontWeightNormal","shorthands","tokens.accentA8","tokens.errorA8","tokens.textXs","tokens.spacingElement1","tokens.textSm","tokens.spacingElement2","tokens.radiusSm","tokens.textBase","tokens.spacingElement3","tokens.radiusMd","Badge","React","className","variant","size","style","props","ref","ensurePaletteTokens","styles","jsx","SLOT_ATTR","mergeClasses"],"mappings":";;;;;;;;;AAmCA,MAAMA,IAAS;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOMC,IAAK,oBACLC,IAAK,oBACLC,IAAK,oBAELC,IAAe,CAACC,MACpBA,MAAU,YAAY,SAASA,GAE3BC,IAAW,CAACD,GAAmBE,MACnC,eAAeC,CAAE,QAAQJ,EAAaC,CAAK,CAAC,IAAIE,CAAI,KAChDE,IAAY,CAACJ,GAAmBK,MACpC,eAAeF,CAAE,IAAIJ,EAAaC,CAAK,CAAC,IAAIK,CAAI,KAM5CC,IAGF;AAAA,EACF,MAAM,CAACC,OAAO;AAAA,IACZ,CAACX,CAAE,GAAGK,EAASM,GAAG,MAAM;AAAA,IACxB,CAACV,CAAE,GAAGI,EAASM,GAAG,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MAAM;AAAA,IACJ,UAAUC;AAAAA,IACV,YAAY;AAAA,IACZ,KAAKD;AAAAA,IACL,eAAeE;AAAAA,IACf,UAAU;AAAA,IACV,cAAcC;AAAAA,IACd,WAAW,EAAE,OAAO,QAAQ,QAAQ,OAAA;AAAA,EAAO;AAAA,EAE7C,IAAI;AAAA,IACF,UAAUC;AAAAA,IACV,YAAY;AAAA,IACZ,KAAKJ;AAAAA,IACL,eAAeK;AAAAA,IACf,UAAU;AAAA,IACV,cAAcC;AAAAA,IACd,WAAW,EAAE,OAAO,QAAQ,QAAQ,OAAA;AAAA,EAAO;AAE/C,CAAC,GAaYC,IAAQC,EAAM;AAAA,EACzB,SACE;AAAA,IACE,WAAAC;AAAA,IACA,OAAAxB,IAAQ;AAAA,IACR,SAAAyB,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,GACA;AAGA,IAAAC,EAAA;AAEA,UAAMC,IAASvB,EAAA;AAEf,WACE,gBAAAwB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,aAAU;AAAA,QACJ,CAACI,CAAS,GAAG;AAAA,QACnB,WAAWC,EAAaH,EAAO,MAAMA,EAAOL,CAAI,GAAGF,CAAS;AAAA,QAC5D,OACE,EAAE,GAAGlB,EAAcmB,CAAO,EAAEzB,CAAK,GAAG,GAAG2B,EAAA;AAAA,QAExC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Breadcrumb — Card's compound pattern applied to the nav / ol / li structure.
|
|
4
|
+
*
|
|
5
|
+
* v1's `Breadcrumb` walks its children and interleaves a presentational separator `<li>` between
|
|
6
|
+
* them; `BreadcrumbItem` decides between a link and a plain page by whether a `href` exists. The
|
|
7
|
+
* `nav` / `ol` / `li` semantics and the `aria-current="page"` handling are the real value of this
|
|
8
|
+
* component and are reproduced exactly.
|
|
9
|
+
*
|
|
10
|
+
* v1 renders the link branch through Radix `Slot` when `asChild` is set — dropped here per
|
|
11
|
+
* CONVENTIONS rule 6 (no Radix dependency). There is no `asChild` escape hatch; a consumer wanting
|
|
12
|
+
* a non-`<a>` link anchors it themselves.
|
|
13
|
+
*
|
|
14
|
+
* `BreadcrumbItem` with a `href` renders an `<a>` (slot `breadcrumb-link`); without one, a `<span>`
|
|
15
|
+
* (slot `breadcrumb-page`). Either way the item is wrapped in a `breadcrumb-item` `<li>`. The nav
|
|
16
|
+
* itself has no base styles in v1 — it is left to the caller's className — so it carries only the
|
|
17
|
+
* slot attributes.
|
|
18
|
+
*
|
|
19
|
+
* The link's `transition-colors` expands to Tailwind v4's default property list plus the 150ms
|
|
20
|
+
* `cubic-bezier(0.4, 0, 0.2, 1)` easing — literals from the framework's default theme, which is
|
|
21
|
+
* visible motion and cannot be read from the v1 file (Rule 0: flagged, not approximated away).
|
|
22
|
+
*/
|
|
23
|
+
export type BreadcrumbProps = React.ComponentProps<"nav"> & {
|
|
24
|
+
separator?: React.ReactNode;
|
|
25
|
+
};
|
|
26
|
+
export declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<BreadcrumbProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
27
|
+
export type BreadcrumbItemProps = Omit<React.ComponentProps<"a">, "href"> & {
|
|
28
|
+
href?: string;
|
|
29
|
+
isCurrent?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<BreadcrumbItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { shorthands as u } from "../../node_modules/@griffel/core/src/index.js";
|
|
4
|
+
import { SLOT_ATTR as c } from "../../renderer/contract.js";
|
|
5
|
+
import { makeVoltStyles as x } from "../../styles/make-styles.js";
|
|
6
|
+
import { semGrayDefault as p, fontWeightSemibold as b, accentA8 as B, semGrayLight as f, textBase as S, spacingElement1 as L, spacingElement2 as I } from "../../tokens/index.js";
|
|
7
|
+
import { mergeClasses as g } from "../../node_modules/@griffel/core/src/mergeClasses.js";
|
|
8
|
+
const h = x({
|
|
9
|
+
list: {
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
// gap-2
|
|
13
|
+
...u.gap(I),
|
|
14
|
+
fontSize: S
|
|
15
|
+
},
|
|
16
|
+
separator: {
|
|
17
|
+
color: f
|
|
18
|
+
},
|
|
19
|
+
item: {
|
|
20
|
+
display: "inline-flex",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
// gap-1
|
|
23
|
+
...u.gap(L)
|
|
24
|
+
},
|
|
25
|
+
link: {
|
|
26
|
+
fontWeight: b,
|
|
27
|
+
color: f,
|
|
28
|
+
transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke",
|
|
29
|
+
transitionDuration: "150ms",
|
|
30
|
+
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
31
|
+
cursor: "pointer",
|
|
32
|
+
":hover": {
|
|
33
|
+
color: p,
|
|
34
|
+
textDecorationLine: "underline"
|
|
35
|
+
},
|
|
36
|
+
":focus-visible": {
|
|
37
|
+
outlineWidth: "2px",
|
|
38
|
+
outlineStyle: "solid",
|
|
39
|
+
outlineOffset: "2px",
|
|
40
|
+
outlineColor: B
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
page: {
|
|
44
|
+
fontWeight: b,
|
|
45
|
+
color: p
|
|
46
|
+
}
|
|
47
|
+
}), D = t.forwardRef(
|
|
48
|
+
function({ separator: o = "/", className: a, children: i, ...n }, m) {
|
|
49
|
+
const l = h(), r = t.Children.toArray(i).filter(t.isValidElement);
|
|
50
|
+
return /* @__PURE__ */ e(
|
|
51
|
+
"nav",
|
|
52
|
+
{
|
|
53
|
+
ref: m,
|
|
54
|
+
"data-slot": "breadcrumb",
|
|
55
|
+
[c]: "breadcrumb",
|
|
56
|
+
"aria-label": "Breadcrumb",
|
|
57
|
+
className: a,
|
|
58
|
+
...n,
|
|
59
|
+
children: /* @__PURE__ */ e("ol", { className: l.list, children: r.map((d, s) => /* @__PURE__ */ k(t.Fragment, { children: [
|
|
60
|
+
s > 0 && /* @__PURE__ */ e(
|
|
61
|
+
"li",
|
|
62
|
+
{
|
|
63
|
+
role: "presentation",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: l.separator,
|
|
66
|
+
children: o
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
d
|
|
70
|
+
] }, s)) })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
), E = t.forwardRef(function({ href: o, isCurrent: a = !1, className: i, children: n, ...m }, l) {
|
|
75
|
+
const r = h(), s = !!o ? /* @__PURE__ */ e(
|
|
76
|
+
"a",
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "breadcrumb-link",
|
|
79
|
+
[c]: "breadcrumb-link",
|
|
80
|
+
href: o,
|
|
81
|
+
className: g(r.link, i),
|
|
82
|
+
...a ? { "aria-current": "page" } : {},
|
|
83
|
+
...m,
|
|
84
|
+
children: n
|
|
85
|
+
}
|
|
86
|
+
) : /* @__PURE__ */ e(
|
|
87
|
+
"span",
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "breadcrumb-page",
|
|
90
|
+
[c]: "breadcrumb-page",
|
|
91
|
+
className: g(r.page, i),
|
|
92
|
+
...a ? { "aria-current": "page" } : {},
|
|
93
|
+
children: n
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
return /* @__PURE__ */ e(
|
|
97
|
+
"li",
|
|
98
|
+
{
|
|
99
|
+
ref: l,
|
|
100
|
+
"data-slot": "breadcrumb-item",
|
|
101
|
+
[c]: "breadcrumb-item",
|
|
102
|
+
className: r.item,
|
|
103
|
+
children: s
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
D as Breadcrumb,
|
|
109
|
+
E as BreadcrumbItem
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@griffel/core\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Breadcrumb — Card's compound pattern applied to the nav / ol / li structure.\n *\n * v1's `Breadcrumb` walks its children and interleaves a presentational separator `<li>` between\n * them; `BreadcrumbItem` decides between a link and a plain page by whether a `href` exists. The\n * `nav` / `ol` / `li` semantics and the `aria-current=\"page\"` handling are the real value of this\n * component and are reproduced exactly.\n *\n * v1 renders the link branch through Radix `Slot` when `asChild` is set — dropped here per\n * CONVENTIONS rule 6 (no Radix dependency). There is no `asChild` escape hatch; a consumer wanting\n * a non-`<a>` link anchors it themselves.\n *\n * `BreadcrumbItem` with a `href` renders an `<a>` (slot `breadcrumb-link`); without one, a `<span>`\n * (slot `breadcrumb-page`). Either way the item is wrapped in a `breadcrumb-item` `<li>`. The nav\n * itself has no base styles in v1 — it is left to the caller's className — so it carries only the\n * slot attributes.\n *\n * The link's `transition-colors` expands to Tailwind v4's default property list plus the 150ms\n * `cubic-bezier(0.4, 0, 0.2, 1)` easing — literals from the framework's default theme, which is\n * visible motion and cannot be read from the v1 file (Rule 0: flagged, not approximated away).\n */\n\nexport type BreadcrumbProps = React.ComponentProps<\"nav\"> & {\n separator?: React.ReactNode\n}\n\nconst useStyles = makeVoltStyles({\n list: {\n display: \"flex\",\n alignItems: \"center\",\n // gap-2\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textBase,\n },\n separator: {\n color: tokens.semGrayLight,\n },\n item: {\n display: \"inline-flex\",\n alignItems: \"center\",\n // gap-1\n ...shorthands.gap(tokens.spacingElement1),\n },\n link: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayLight,\n transitionProperty:\n \"color, background-color, border-color, text-decoration-color, fill, stroke\",\n transitionDuration: \"150ms\",\n transitionTimingFunction: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n cursor: \"pointer\",\n \":hover\": {\n color: tokens.semGrayDefault,\n textDecorationLine: \"underline\",\n },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n outlineColor: tokens.accentA8,\n },\n },\n page: {\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.semGrayDefault,\n },\n})\n\nexport const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n function Breadcrumb({ separator = \"/\", className, children, ...props }, ref) {\n const styles = useStyles()\n const items = React.Children.toArray(children).filter(React.isValidElement)\n\n return (\n <nav\n ref={ref}\n data-slot=\"breadcrumb\"\n {...{ [SLOT_ATTR]: \"breadcrumb\" }}\n aria-label=\"Breadcrumb\"\n className={className}\n {...props}\n >\n <ol className={styles.list}>\n {items.map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <li\n role=\"presentation\"\n aria-hidden=\"true\"\n className={styles.separator}\n >\n {separator}\n </li>\n )}\n {child}\n </React.Fragment>\n ))}\n </ol>\n </nav>\n )\n }\n)\n\nexport type BreadcrumbItemProps = Omit<React.ComponentProps<\"a\">, \"href\"> & {\n href?: string\n isCurrent?: boolean\n}\n\nexport const BreadcrumbItem = React.forwardRef<\n HTMLLIElement,\n BreadcrumbItemProps\n>(function BreadcrumbItem(\n { href, isCurrent = false, className, children, ...props },\n ref\n) {\n const styles = useStyles()\n const isLink = !!href\n\n const content = isLink ? (\n <a\n data-slot=\"breadcrumb-link\"\n {...{ [SLOT_ATTR]: \"breadcrumb-link\" }}\n href={href}\n className={mergeClasses(styles.link, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n {...props}\n >\n {children}\n </a>\n ) : (\n <span\n data-slot=\"breadcrumb-page\"\n {...{ [SLOT_ATTR]: \"breadcrumb-page\" }}\n className={mergeClasses(styles.page, className)}\n {...(isCurrent ? { \"aria-current\": \"page\" as const } : {})}\n >\n {children}\n </span>\n )\n\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n {...{ [SLOT_ATTR]: \"breadcrumb-item\" }}\n className={styles.item}\n >\n {content}\n </li>\n )\n})\n"],"names":["useStyles","makeVoltStyles","shorthands","tokens.spacingElement2","tokens.textBase","tokens.semGrayLight","tokens.spacingElement1","tokens.fontWeightSemibold","tokens.semGrayDefault","tokens.accentA8","Breadcrumb","React","separator","className","children","props","ref","styles","items","jsx","SLOT_ATTR","child","index","jsxs","BreadcrumbItem","href","isCurrent","content","mergeClasses"],"mappings":";;;;;;;AAkCA,MAAMA,IAAYC,EAAe;AAAA,EAC/B,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,IAEZ,GAAGC,EAAW,IAAIC,CAAsB;AAAA,IACxC,UAAUC;AAAAA,EAAO;AAAA,EAEnB,WAAW;AAAA,IACT,OAAOC;AAAAA,EAAO;AAAA,EAEhB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,YAAY;AAAA;AAAA,IAEZ,GAAGH,EAAW,IAAII,CAAsB;AAAA,EAAA;AAAA,EAE1C,MAAM;AAAA,IACJ,YAAYC;AAAAA,IACZ,OAAOF;AAAAA,IACP,oBACE;AAAA,IACF,oBAAoB;AAAA,IACpB,0BAA0B;AAAA,IAC1B,QAAQ;AAAA,IACR,UAAU;AAAA,MACR,OAAOG;AAAAA,MACP,oBAAoB;AAAA,IAAA;AAAA,IAEtB,kBAAkB;AAAA,MAChB,cAAc;AAAA,MACd,cAAc;AAAA,MACd,eAAe;AAAA,MACf,cAAcC;AAAAA,IAAO;AAAA,EACvB;A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OAAA,IAAoB,CAAA;AAAA,MACtD,GAAGX;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA,IAGH,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACJ,CAACC,CAAS,GAAG;AAAA,MACnB,WAAWQ,EAAaX,EAAO,MAAMJ,CAAS;AAAA,MAC7C,GAAIa,IAAY,EAAE,gBAAgB,OAAA,IAAoB,CAAA;AAAA,MAEtD,UAAAZ;AAAA,IAAA;AAAA,EAAA;AAIL,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,aAAU;AAAA,MACJ,CAACI,CAAS,GAAG;AAAA,MACnB,WAAWH,EAAO;AAAA,MAEjB,UAAAU;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "tertiary" | "ghost";
|
|
3
|
+
export type ButtonSize = "xs" | "sm" | "base" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg";
|
|
4
|
+
export type ButtonShape = "normal" | "rounded";
|
|
5
|
+
export type ButtonProps = Omit<React.ComponentProps<"button">, "variant" | "size" | "shape" | "destructive" | "className" | "render"> & {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
shape?: ButtonShape;
|
|
9
|
+
destructive?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import * as S from "react";
|
|
3
|
+
import { shorthands as o } from "../../node_modules/@griffel/core/src/index.js";
|
|
4
|
+
import { SLOT_ATTR as k } from "../../renderer/contract.js";
|
|
5
|
+
import { makeVoltStyles as x } from "../../styles/make-styles.js";
|
|
6
|
+
import { radiusLg as y, textLg as w, textBase as A, textSm as B, textXs as H, errorA8 as t, semErrorSoft as s, errorA11 as l, semErrorSoftHover as E, semErrorSolidHover as c, semErrorContrast as z, semErrorSolid as I, grayA8 as L, semAccentSoft as i, grayA12 as R, accentA8 as n, accentA11 as m, semAccentSoftHover as D, semAccentSolidHover as a, semAccentContrast as T, semAccentSolid as W, fontWeightSemibold as X, spacingElement3 as j } from "../../tokens/index.js";
|
|
7
|
+
import { mergeClasses as O } from "../../node_modules/@griffel/core/src/mergeClasses.js";
|
|
8
|
+
const N = "button", P = x({
|
|
9
|
+
root: {
|
|
10
|
+
display: "inline-flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
fontWeight: X,
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
transitionProperty: "all",
|
|
16
|
+
cursor: "pointer",
|
|
17
|
+
flexShrink: 0,
|
|
18
|
+
":disabled": { opacity: 0.5 },
|
|
19
|
+
":focus-visible": {
|
|
20
|
+
outlineWidth: "2px",
|
|
21
|
+
outlineStyle: "solid",
|
|
22
|
+
outlineOffset: "2px"
|
|
23
|
+
},
|
|
24
|
+
"& svg": {
|
|
25
|
+
flexShrink: 0,
|
|
26
|
+
pointerEvents: "none",
|
|
27
|
+
color: "currentColor"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
primary: {
|
|
31
|
+
backgroundColor: W,
|
|
32
|
+
color: T,
|
|
33
|
+
":hover": { backgroundColor: a },
|
|
34
|
+
":active": { backgroundColor: a },
|
|
35
|
+
":focus-visible": { outlineColor: n }
|
|
36
|
+
},
|
|
37
|
+
secondary: {
|
|
38
|
+
backgroundColor: i,
|
|
39
|
+
color: m,
|
|
40
|
+
":hover": { backgroundColor: D },
|
|
41
|
+
":focus-visible": { outlineColor: n }
|
|
42
|
+
},
|
|
43
|
+
tertiary: {
|
|
44
|
+
backgroundColor: "transparent",
|
|
45
|
+
color: m,
|
|
46
|
+
":hover": { backgroundColor: i },
|
|
47
|
+
":focus-visible": { outlineColor: n }
|
|
48
|
+
},
|
|
49
|
+
ghost: {
|
|
50
|
+
backgroundColor: "transparent",
|
|
51
|
+
color: R,
|
|
52
|
+
":hover": { backgroundColor: i },
|
|
53
|
+
":focus-visible": { outlineColor: L }
|
|
54
|
+
},
|
|
55
|
+
primaryDestructive: {
|
|
56
|
+
backgroundColor: I,
|
|
57
|
+
color: z,
|
|
58
|
+
":hover": { backgroundColor: c },
|
|
59
|
+
":active": { backgroundColor: c },
|
|
60
|
+
":focus-visible": { outlineColor: t }
|
|
61
|
+
},
|
|
62
|
+
secondaryDestructive: {
|
|
63
|
+
backgroundColor: s,
|
|
64
|
+
color: l,
|
|
65
|
+
":hover": { backgroundColor: E },
|
|
66
|
+
":focus-visible": { outlineColor: t }
|
|
67
|
+
},
|
|
68
|
+
tertiaryDestructive: {
|
|
69
|
+
backgroundColor: "transparent",
|
|
70
|
+
color: l,
|
|
71
|
+
":hover": { backgroundColor: s },
|
|
72
|
+
":focus-visible": { outlineColor: t }
|
|
73
|
+
},
|
|
74
|
+
xs: {
|
|
75
|
+
...o.paddingInline("0.5rem"),
|
|
76
|
+
...o.paddingBlock("0.25rem"),
|
|
77
|
+
minHeight: "1.25rem",
|
|
78
|
+
fontSize: H,
|
|
79
|
+
gap: "4px",
|
|
80
|
+
"& svg": { width: "0.75rem", height: "0.75rem" }
|
|
81
|
+
},
|
|
82
|
+
sm: {
|
|
83
|
+
...o.paddingInline(j),
|
|
84
|
+
...o.paddingBlock("0.25rem"),
|
|
85
|
+
minHeight: "1.5rem",
|
|
86
|
+
fontSize: B,
|
|
87
|
+
gap: "0.375rem",
|
|
88
|
+
"& svg": { width: "0.875rem", height: "0.875rem" }
|
|
89
|
+
},
|
|
90
|
+
base: {
|
|
91
|
+
...o.paddingInline("1rem"),
|
|
92
|
+
...o.paddingBlock("0.25rem"),
|
|
93
|
+
minHeight: "2rem",
|
|
94
|
+
fontSize: A,
|
|
95
|
+
gap: "0.5rem",
|
|
96
|
+
"& svg": { width: "1rem", height: "1rem" }
|
|
97
|
+
},
|
|
98
|
+
lg: {
|
|
99
|
+
...o.paddingInline("1.25rem"),
|
|
100
|
+
...o.paddingBlock("0.25rem"),
|
|
101
|
+
minHeight: "2.5rem",
|
|
102
|
+
fontSize: w,
|
|
103
|
+
gap: "0.5rem",
|
|
104
|
+
"& svg": { width: "1rem", height: "1rem" }
|
|
105
|
+
},
|
|
106
|
+
iconXs: {
|
|
107
|
+
width: "1.5rem",
|
|
108
|
+
height: "1.5rem",
|
|
109
|
+
"& svg": { width: "0.75rem", height: "0.75rem" }
|
|
110
|
+
},
|
|
111
|
+
iconSm: {
|
|
112
|
+
width: "1.75rem",
|
|
113
|
+
height: "1.75rem",
|
|
114
|
+
"& svg": { width: "0.875rem", height: "0.875rem" }
|
|
115
|
+
},
|
|
116
|
+
icon: {
|
|
117
|
+
width: "2rem",
|
|
118
|
+
height: "2rem",
|
|
119
|
+
"& svg": { width: "1.125rem", height: "1.125rem" }
|
|
120
|
+
},
|
|
121
|
+
iconLg: {
|
|
122
|
+
width: "2.5rem",
|
|
123
|
+
height: "2.5rem",
|
|
124
|
+
"& svg": { width: "1.5rem", height: "1.5rem" }
|
|
125
|
+
},
|
|
126
|
+
normal: { borderRadius: y },
|
|
127
|
+
rounded: { borderRadius: "9999px" }
|
|
128
|
+
}), K = S.forwardRef(
|
|
129
|
+
function({
|
|
130
|
+
variant: e = "primary",
|
|
131
|
+
size: g = "base",
|
|
132
|
+
shape: d = "rounded",
|
|
133
|
+
destructive: h = !1,
|
|
134
|
+
className: u,
|
|
135
|
+
...p
|
|
136
|
+
}, b) {
|
|
137
|
+
const r = P(), f = h && e !== "ghost" ? `${e}Destructive` : e, v = {
|
|
138
|
+
xs: "xs",
|
|
139
|
+
sm: "sm",
|
|
140
|
+
base: "base",
|
|
141
|
+
lg: "lg",
|
|
142
|
+
"icon-xs": "iconXs",
|
|
143
|
+
"icon-sm": "iconSm",
|
|
144
|
+
icon: "icon",
|
|
145
|
+
"icon-lg": "iconLg"
|
|
146
|
+
}[g];
|
|
147
|
+
return /* @__PURE__ */ C(
|
|
148
|
+
N,
|
|
149
|
+
{
|
|
150
|
+
ref: b,
|
|
151
|
+
"data-slot": "button",
|
|
152
|
+
[k]: "button",
|
|
153
|
+
className: O(
|
|
154
|
+
r.root,
|
|
155
|
+
r[f],
|
|
156
|
+
r[v],
|
|
157
|
+
r[d],
|
|
158
|
+
u
|
|
159
|
+
),
|
|
160
|
+
...p
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
export {
|
|
166
|
+
K as Button
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/components/button/button.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@griffel/core\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Base UI's type declarations resolve `react` from the hoisted root's `@types/react` (v19), while\n * this package pins `@types/react` 18 in its own node_modules. Re-typing the primitive onto OUR\n * `React` keeps the button's pass-through props and ref on one React type for this package.\n */\n/**\n * A native `<button>`, no primitive.\n *\n * v1's only Radix use here is `Slot`, purely to implement `asChild` — and v2 dropped `asChild`\n * deliberately. Base UI's button primitive was therefore supplying nothing v1 had: it added a\n * dependency, and with it the `@types/react` 19 requirement, for a plain element.\n */\nconst ButtonBase = \"button\" as const\n\nconst useStyles = makeVoltStyles({\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontWeight: tokens.fontWeightSemibold,\n whiteSpace: \"nowrap\",\n transitionProperty: \"all\",\n cursor: \"pointer\",\n flexShrink: 0,\n \":disabled\": { opacity: 0.5 },\n \":focus-visible\": {\n outlineWidth: \"2px\",\n outlineStyle: \"solid\",\n outlineOffset: \"2px\",\n },\n \"& svg\": {\n flexShrink: 0,\n pointerEvents: \"none\",\n color: \"currentColor\",\n },\n },\n primary: {\n backgroundColor: tokens.semAccentSolid,\n color: tokens.semAccentContrast,\n \":hover\": { backgroundColor: tokens.semAccentSolidHover },\n \":active\": { backgroundColor: tokens.semAccentSolidHover },\n \":focus-visible\": { outlineColor: tokens.accentA8 },\n },\n secondary: {\n backgroundColor: tokens.semAccentSoft,\n color: tokens.accentA11,\n \":hover\": { backgroundColor: tokens.semAccentSoftHover },\n \":focus-visible\": { outlineColor: tokens.accentA8 },\n },\n tertiary: {\n backgroundColor: \"transparent\",\n color: tokens.accentA11,\n \":hover\": { backgroundColor: tokens.semAccentSoft },\n \":focus-visible\": { outlineColor: tokens.accentA8 },\n },\n ghost: {\n backgroundColor: \"transparent\",\n color: tokens.grayA12,\n \":hover\": { backgroundColor: tokens.semAccentSoft },\n \":focus-visible\": { outlineColor: tokens.grayA8 },\n },\n primaryDestructive: {\n backgroundColor: tokens.semErrorSolid,\n color: tokens.semErrorContrast,\n \":hover\": { backgroundColor: tokens.semErrorSolidHover },\n \":active\": { backgroundColor: tokens.semErrorSolidHover },\n \":focus-visible\": { outlineColor: tokens.errorA8 },\n },\n secondaryDestructive: {\n backgroundColor: tokens.semErrorSoft,\n color: tokens.errorA11,\n \":hover\": { backgroundColor: tokens.semErrorSoftHover },\n \":focus-visible\": { outlineColor: tokens.errorA8 },\n },\n tertiaryDestructive: {\n backgroundColor: \"transparent\",\n color: tokens.errorA11,\n \":hover\": { backgroundColor: tokens.semErrorSoft },\n \":focus-visible\": { outlineColor: tokens.errorA8 },\n },\n xs: {\n ...shorthands.paddingInline(\"0.5rem\"),\n ...shorthands.paddingBlock(\"0.25rem\"),\n minHeight: \"1.25rem\",\n fontSize: tokens.textXs,\n gap: \"4px\",\n \"& svg\": { width: \"0.75rem\", height: \"0.75rem\" },\n },\n sm: {\n ...shorthands.paddingInline(tokens.spacingElement3),\n ...shorthands.paddingBlock(\"0.25rem\"),\n minHeight: \"1.5rem\",\n fontSize: tokens.textSm,\n gap: \"0.375rem\",\n \"& svg\": { width: \"0.875rem\", height: \"0.875rem\" },\n },\n base: {\n ...shorthands.paddingInline(\"1rem\"),\n ...shorthands.paddingBlock(\"0.25rem\"),\n minHeight: \"2rem\",\n fontSize: tokens.textBase,\n gap: \"0.5rem\",\n \"& svg\": { width: \"1rem\", height: \"1rem\" },\n },\n lg: {\n ...shorthands.paddingInline(\"1.25rem\"),\n ...shorthands.paddingBlock(\"0.25rem\"),\n minHeight: \"2.5rem\",\n fontSize: tokens.textLg,\n gap: \"0.5rem\",\n \"& svg\": { width: \"1rem\", height: \"1rem\" },\n },\n iconXs: {\n width: \"1.5rem\",\n height: \"1.5rem\",\n \"& svg\": { width: \"0.75rem\", height: \"0.75rem\" },\n },\n iconSm: {\n width: \"1.75rem\",\n height: \"1.75rem\",\n \"& svg\": { width: \"0.875rem\", height: \"0.875rem\" },\n },\n icon: {\n width: \"2rem\",\n height: \"2rem\",\n \"& svg\": { width: \"1.125rem\", height: \"1.125rem\" },\n },\n iconLg: {\n width: \"2.5rem\",\n height: \"2.5rem\",\n \"& svg\": { width: \"1.5rem\", height: \"1.5rem\" },\n },\n normal: { borderRadius: tokens.radiusLg },\n rounded: { borderRadius: \"9999px\" },\n})\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"tertiary\" | \"ghost\"\nexport type ButtonSize =\n | \"xs\"\n | \"sm\"\n | \"base\"\n | \"lg\"\n | \"icon-xs\"\n | \"icon-sm\"\n | \"icon\"\n | \"icon-lg\"\nexport type ButtonShape = \"normal\" | \"rounded\"\n\nexport type ButtonProps = Omit<\n React.ComponentProps<\"button\">,\n \"variant\" | \"size\" | \"shape\" | \"destructive\" | \"className\" | \"render\"\n> & {\n variant?: ButtonVariant\n size?: ButtonSize\n shape?: ButtonShape\n destructive?: boolean\n className?: string\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n variant = \"primary\",\n size = \"base\",\n shape = \"rounded\",\n destructive = false,\n className,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const variantSlot:\n | ButtonVariant\n | \"primaryDestructive\"\n | \"secondaryDestructive\"\n | \"tertiaryDestructive\" =\n destructive && variant !== \"ghost\"\n ? (`${variant}Destructive` as\n | \"primaryDestructive\"\n | \"secondaryDestructive\"\n | \"tertiaryDestructive\")\n : variant\n const sizeSlot:\n | \"xs\"\n | \"sm\"\n | \"base\"\n | \"lg\"\n | \"iconXs\"\n | \"iconSm\"\n | \"icon\"\n | \"iconLg\" = (\n {\n xs: \"xs\",\n sm: \"sm\",\n base: \"base\",\n lg: \"lg\",\n \"icon-xs\": \"iconXs\",\n \"icon-sm\": \"iconSm\",\n icon: \"icon\",\n \"icon-lg\": \"iconLg\",\n } as const\n )[size]\n\n return (\n <ButtonBase\n ref={ref}\n data-slot=\"button\"\n {...{ [SLOT_ATTR]: \"button\" }}\n className={mergeClasses(\n styles.root,\n styles[variantSlot],\n styles[sizeSlot],\n styles[shape],\n className\n )}\n {...props}\n />\n )\n }\n)\n"],"names":["ButtonBase","useStyles","makeVoltStyles","tokens.fontWeightSemibold","tokens.semAccentSolid","tokens.semAccentContrast","tokens.semAccentSolidHover","tokens.accentA8","tokens.semAccentSoft","tokens.accentA11","tokens.semAccentSoftHover","tokens.grayA12","tokens.grayA8","tokens.semErrorSolid","tokens.semErrorContrast","tokens.semErrorSolidHover","tokens.errorA8","tokens.semErrorSoft","tokens.errorA11","tokens.semErrorSoftHover","shorthands","tokens.textXs","tokens.spacingElement3","tokens.textSm","tokens.textBase","tokens.textLg","tokens.radiusLg","Button","React","variant","size","shape","destructive","className","props","ref","styles","variantSlot","sizeSlot","jsx","SLOT_ATTR","mergeClasses"],"mappings":";;;;;;;AAoBA,MAAMA,IAAa,UAEbC,IAAYC,EAAe;AAAA,EAC/B,MAAM;AAAA,IAC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from "react";
|
|
2
|
+
import { type SeparatorProps } from "../separator/separator";
|
|
3
|
+
/**
|
|
4
|
+
* ButtonGroup — compound component family for grouping buttons, text, and separators.
|
|
5
|
+
*
|
|
6
|
+
* One `makeVoltStyles` call for the whole family, one slot per sub-component (following `card.tsx`).
|
|
7
|
+
*
|
|
8
|
+
* No Base UI primitive is needed: v1 only used Radix `Slot` for `asChild` on `ButtonGroupText`,
|
|
9
|
+
* which CONVENTIONS rule 6 drops.
|
|
10
|
+
*
|
|
11
|
+
* `ButtonGroup` handles both `horizontal` and `vertical` orientations, removing adjoining border
|
|
12
|
+
* radius and borders on adjacent children. Sibling focus-visible elements are elevated (`z-index: 10`)
|
|
13
|
+
* and made relative so focus rings are never obscured by subsequent siblings.
|
|
14
|
+
*
|
|
15
|
+
* Nested button groups gain a gap via a `:has()` selector keyed on `SLOT_ATTR` (never on `data-slot`,
|
|
16
|
+
* per CONVENTIONS rule 4).
|
|
17
|
+
*
|
|
18
|
+
* `ButtonGroupText` provides a matching text container (`gray-a4`, subtle border, `shadow-xs`).
|
|
19
|
+
*
|
|
20
|
+
* `ButtonGroupSeparator` composes `Separator` with transparent background and stretch alignment.
|
|
21
|
+
*/
|
|
22
|
+
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
23
|
+
export type ButtonGroupProps = React.ComponentProps<"div"> & {
|
|
24
|
+
orientation?: ButtonGroupOrientation;
|
|
25
|
+
};
|
|
26
|
+
export declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export type ButtonGroupTextProps = React.ComponentProps<"div">;
|
|
28
|
+
export declare const ButtonGroupText: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export type ButtonGroupSeparatorProps = SeparatorProps;
|
|
30
|
+
export declare const ButtonGroupSeparator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|