@bitrise/bitkit-v2 0.3.412 → 0.3.414

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.
Files changed (27) hide show
  1. package/dist/components/BitkitCalendar/components/CalendarSelect.js +14 -14
  2. package/dist/components/BitkitCalendar/components/CalendarSelect.js.map +1 -1
  3. package/dist/components/BitkitMultiselect/BitkitMultiselect.js +52 -55
  4. package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
  5. package/dist/components/BitkitSelect/BitkitSelect.js +23 -23
  6. package/dist/components/BitkitSelect/BitkitSelect.js.map +1 -1
  7. package/dist/theme/slot-recipes/Collapsible.recipe.js +0 -1
  8. package/dist/theme/slot-recipes/Collapsible.recipe.js.map +1 -1
  9. package/dist/theme/slot-recipes/InlineLoading.recipe.d.ts +2 -10
  10. package/dist/theme/slot-recipes/InlineLoading.recipe.js +2 -2
  11. package/dist/theme/slot-recipes/InlineLoading.recipe.js.map +1 -1
  12. package/dist/theme/slot-recipes/LabeledData.recipe.js +1 -2
  13. package/dist/theme/slot-recipes/LabeledData.recipe.js.map +1 -1
  14. package/dist/theme/slot-recipes/List.recipe.js +0 -1
  15. package/dist/theme/slot-recipes/List.recipe.js.map +1 -1
  16. package/dist/theme/slot-recipes/Markdown.recipe.js +7 -10
  17. package/dist/theme/slot-recipes/Markdown.recipe.js.map +1 -1
  18. package/dist/theme/slot-recipes/OverflowContent.recipe.js +0 -1
  19. package/dist/theme/slot-recipes/OverflowContent.recipe.js.map +1 -1
  20. package/dist/theme/slot-recipes/Stat.recipe.js +1 -2
  21. package/dist/theme/slot-recipes/Stat.recipe.js.map +1 -1
  22. package/dist/theme/slot-recipes/Table.recipe.js +1 -4
  23. package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
  24. package/dist/theme/slot-recipes/TreeView.recipe.js +0 -1
  25. package/dist/theme/slot-recipes/TreeView.recipe.js.map +1 -1
  26. package/dist/theme/slot-recipes/index.d.ts +2 -10
  27. package/package.json +1 -1
@@ -19,14 +19,15 @@ var CalendarSelect = (props) => {
19
19
  onValueChange,
20
20
  size: "md",
21
21
  value,
22
- children: [
23
- /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
24
- /* @__PURE__ */ jsxs(Select.Control, {
25
- ...controlProps,
26
- children: [/* @__PURE__ */ jsx(Select.Trigger, {
22
+ children: [/* @__PURE__ */ jsxs(Select.Control, {
23
+ ...controlProps,
24
+ children: [
25
+ /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
26
+ /* @__PURE__ */ jsx(Select.Trigger, {
27
27
  css: styles.trigger,
28
28
  children: /* @__PURE__ */ jsx(Select.ValueText, {})
29
- }), /* @__PURE__ */ jsx(Select.IndicatorGroup, {
29
+ }),
30
+ /* @__PURE__ */ jsx(Select.IndicatorGroup, {
30
31
  css: styles.indicatorGroup,
31
32
  children: /* @__PURE__ */ jsx(Select.Indicator, {
32
33
  asChild: true,
@@ -36,14 +37,13 @@ var CalendarSelect = (props) => {
36
37
  height: "20"
37
38
  })
38
39
  })
39
- })]
40
- }),
41
- /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
42
- collection,
43
- contentProps,
44
- size: "md"
45
- }) }) })
46
- ]
40
+ })
41
+ ]
42
+ }), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
43
+ collection,
44
+ contentProps,
45
+ size: "md"
46
+ }) }) })]
47
47
  });
48
48
  };
49
49
  CalendarSelect.displayName = "CalendarSelect";
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarSelect.js","names":[],"sources":["../../../../lib/components/BitkitCalendar/components/CalendarSelect.tsx"],"sourcesContent":["import { createListCollection } from '@chakra-ui/react/collection';\nimport { Portal } from '@chakra-ui/react/portal';\nimport {\n Select,\n type SelectContentProps,\n type SelectControlProps,\n type SelectRootProps,\n} from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport AssetSelectChevron from '../../../utilities/AssetSelectChevron.tsx';\nimport BitkitSelectMenu from '../../BitkitSelectMenu/BitkitSelectMenu.tsx';\n\nexport interface BitkitSelectProps {\n controlProps?: SelectControlProps;\n contentProps?: SelectContentProps;\n defaultValue?: string[];\n items: Array<{ group?: string; value: string; label: string }>;\n onValueChange?: SelectRootProps['onValueChange'];\n value?: string[];\n}\n\nconst CalendarSelect = (props: BitkitSelectProps) => {\n const { contentProps, controlProps, defaultValue, items, onValueChange, value } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n });\n\n const recipe = useSlotRecipe({ key: 'datePickerSelect' });\n const styles = recipe();\n\n return (\n <Select.Root\n collection={collection}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n size=\"md\"\n value={value}\n >\n <Select.HiddenSelect />\n <Select.Control {...controlProps}>\n <Select.Trigger css={styles.trigger}>\n <Select.ValueText />\n </Select.Trigger>\n <Select.IndicatorGroup css={styles.indicatorGroup}>\n <Select.Indicator asChild css={styles.indicator}>\n <AssetSelectChevron width=\"20\" height=\"20\" />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal>\n <Select.Positioner>\n <BitkitSelectMenu collection={collection} contentProps={contentProps} size=\"md\" />\n </Select.Positioner>\n </Portal>\n </Select.Root>\n );\n};\n\nCalendarSelect.displayName = 'CalendarSelect';\n\nexport default CalendarSelect;\n"],"mappings":";;;;;;;;AAsBA,IAAM,kBAAkB,UAA6B;CACnD,MAAM,EAAE,cAAc,cAAc,cAAc,OAAO,eAAe,UAAU;CAElF,MAAM,aAAa,qBAAqB;EACtC;EACA,UAAU,SAAS,KAAK,SAAS;CACnC,CAAC;CAGD,MAAM,SADS,cAAc,EAAE,KAAK,mBAAmB,CACxC,CAAA,CAAO;CAEtB,OACE,qBAAC,OAAO,MAAR;EACc;EACE;EACC;EACf,MAAK;EACE;EALT,UAAA;GAOE,oBAAC,OAAO,cAAR,CAAsB,CAAA;GACtB,qBAAC,OAAO,SAAR;IAAgB,GAAI;IAApB,UAAA,CACE,oBAAC,OAAO,SAAR;KAAgB,KAAK,OAAO;KAC1B,UAAA,oBAAC,OAAO,WAAR,CAAmB,CAAA;IACL,CAAA,GAChB,oBAAC,OAAO,gBAAR;KAAuB,KAAK,OAAO;KACjC,UAAA,oBAAC,OAAO,WAAR;MAAkB,SAAA;MAAQ,KAAK,OAAO;MACpC,UAAA,oBAAC,oBAAD;OAAoB,OAAM;OAAK,QAAO;MAAM,CAAA;KAC5B,CAAA;IACG,CAAA,CACT;;GAChB,oBAAC,QAAD,EAAA,UACE,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;IAA8B;IAA0B;IAAc,MAAK;GAAM,CAAA,EAChE,CAAA,EACb,CAAA;EACG;;AAEjB;AAEA,eAAe,cAAc"}
1
+ {"version":3,"file":"CalendarSelect.js","names":[],"sources":["../../../../lib/components/BitkitCalendar/components/CalendarSelect.tsx"],"sourcesContent":["import { createListCollection } from '@chakra-ui/react/collection';\nimport { Portal } from '@chakra-ui/react/portal';\nimport {\n Select,\n type SelectContentProps,\n type SelectControlProps,\n type SelectRootProps,\n} from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport AssetSelectChevron from '../../../utilities/AssetSelectChevron.tsx';\nimport BitkitSelectMenu from '../../BitkitSelectMenu/BitkitSelectMenu.tsx';\n\nexport interface BitkitSelectProps {\n controlProps?: SelectControlProps;\n contentProps?: SelectContentProps;\n defaultValue?: string[];\n items: Array<{ group?: string; value: string; label: string }>;\n onValueChange?: SelectRootProps['onValueChange'];\n value?: string[];\n}\n\nconst CalendarSelect = (props: BitkitSelectProps) => {\n const { contentProps, controlProps, defaultValue, items, onValueChange, value } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n });\n\n const recipe = useSlotRecipe({ key: 'datePickerSelect' });\n const styles = recipe();\n\n return (\n <Select.Root\n collection={collection}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n size=\"md\"\n value={value}\n >\n <Select.Control {...controlProps}>\n <Select.HiddenSelect />\n <Select.Trigger css={styles.trigger}>\n <Select.ValueText />\n </Select.Trigger>\n <Select.IndicatorGroup css={styles.indicatorGroup}>\n <Select.Indicator asChild css={styles.indicator}>\n <AssetSelectChevron width=\"20\" height=\"20\" />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal>\n <Select.Positioner>\n <BitkitSelectMenu collection={collection} contentProps={contentProps} size=\"md\" />\n </Select.Positioner>\n </Portal>\n </Select.Root>\n );\n};\n\nCalendarSelect.displayName = 'CalendarSelect';\n\nexport default CalendarSelect;\n"],"mappings":";;;;;;;;AAsBA,IAAM,kBAAkB,UAA6B;CACnD,MAAM,EAAE,cAAc,cAAc,cAAc,OAAO,eAAe,UAAU;CAElF,MAAM,aAAa,qBAAqB;EACtC;EACA,UAAU,SAAS,KAAK,SAAS;CACnC,CAAC;CAGD,MAAM,SADS,cAAc,EAAE,KAAK,mBAAmB,CACxC,CAAA,CAAO;CAEtB,OACE,qBAAC,OAAO,MAAR;EACc;EACE;EACC;EACf,MAAK;EACE;EALT,UAAA,CAOE,qBAAC,OAAO,SAAR;GAAgB,GAAI;GAApB,UAAA;IACE,oBAAC,OAAO,cAAR,CAAsB,CAAA;IACtB,oBAAC,OAAO,SAAR;KAAgB,KAAK,OAAO;KAC1B,UAAA,oBAAC,OAAO,WAAR,CAAmB,CAAA;IACL,CAAA;IAChB,oBAAC,OAAO,gBAAR;KAAuB,KAAK,OAAO;KACjC,UAAA,oBAAC,OAAO,WAAR;MAAkB,SAAA;MAAQ,KAAK,OAAO;MACpC,UAAA,oBAAC,oBAAD;OAAoB,OAAM;OAAK,QAAO;MAAM,CAAA;KAC5B,CAAA;IACG,CAAA;GACT;EAChB,CAAA,GAAA,oBAAC,QAAD,EAAA,UACE,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;GAA8B;GAA0B;GAAc,MAAK;EAAM,CAAA,EAChE,CAAA,EACb,CAAA,CACG;;AAEjB;AAEA,eAAe,cAAc"}
@@ -132,62 +132,59 @@ var BitkitMultiselect = forwardRef((props, ref) => {
132
132
  readOnly: effectiveState === "readOnly",
133
133
  scrollToIndexFn: ({ getElement }) => getElement()?.scrollIntoView({ block: "nearest" }),
134
134
  value,
135
- children: [
136
- /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
137
- /* @__PURE__ */ jsxs(Select.Control, {
138
- css: styles.control,
139
- className: "group",
140
- children: [
141
- /* @__PURE__ */ jsx(Select.Trigger, {
142
- css: styles.trigger,
143
- ...triggerProps
144
- }),
145
- /* @__PURE__ */ jsx(MultiselectOverlay, {
146
- constrained,
147
- isValueInvalid: hasInvalidValue ? isValueInvalid : void 0,
148
- placeholder,
149
- size,
150
- state: effectiveState
151
- }),
152
- /* @__PURE__ */ jsxs(Select.IndicatorGroup, {
153
- css: styles.indicatorGroup,
154
- children: [
155
- !constrained && /* @__PURE__ */ jsx(ClearAllButton, { state: effectiveState }),
156
- effectiveState === "error" && /* @__PURE__ */ jsx(Select.Indicator, {
157
- css: styles.indicator,
158
- children: /* @__PURE__ */ jsx(IconErrorCircleFilled, {
159
- size: iconSize,
160
- color: "icon/negative"
161
- })
162
- }),
163
- effectiveState === "warning" && /* @__PURE__ */ jsx(Select.Indicator, {
164
- css: styles.indicator,
165
- children: /* @__PURE__ */ jsx(IconWarningYellow, { size: iconSize })
166
- }),
167
- /* @__PURE__ */ jsx(Select.Indicator, {
168
- css: styles.indicator,
169
- asChild: true,
170
- children: /* @__PURE__ */ jsx(AssetSelectChevron, {})
171
- })
172
- ]
173
- })
174
- ]
175
- }),
176
- /* @__PURE__ */ jsx(Portal, {
177
- disabled: disablePortal || disablePortalFromContext,
178
- children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitMultiselectMenu, {
179
- collection,
180
- emptyHelperText,
181
- emptyLabel,
182
- isLoading,
183
- onScrolledToBottom,
184
- onSearchChange,
185
- searchValue,
135
+ children: [/* @__PURE__ */ jsxs(Select.Control, {
136
+ css: styles.control,
137
+ className: "group",
138
+ children: [
139
+ /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
140
+ /* @__PURE__ */ jsx(Select.Trigger, {
141
+ css: styles.trigger,
142
+ ...triggerProps
143
+ }),
144
+ /* @__PURE__ */ jsx(MultiselectOverlay, {
145
+ constrained,
146
+ isValueInvalid: hasInvalidValue ? isValueInvalid : void 0,
147
+ placeholder,
186
148
  size,
187
- children
188
- }) })
189
- })
190
- ]
149
+ state: effectiveState
150
+ }),
151
+ /* @__PURE__ */ jsxs(Select.IndicatorGroup, {
152
+ css: styles.indicatorGroup,
153
+ children: [
154
+ !constrained && /* @__PURE__ */ jsx(ClearAllButton, { state: effectiveState }),
155
+ effectiveState === "error" && /* @__PURE__ */ jsx(Select.Indicator, {
156
+ css: styles.indicator,
157
+ children: /* @__PURE__ */ jsx(IconErrorCircleFilled, {
158
+ size: iconSize,
159
+ color: "icon/negative"
160
+ })
161
+ }),
162
+ effectiveState === "warning" && /* @__PURE__ */ jsx(Select.Indicator, {
163
+ css: styles.indicator,
164
+ children: /* @__PURE__ */ jsx(IconWarningYellow, { size: iconSize })
165
+ }),
166
+ /* @__PURE__ */ jsx(Select.Indicator, {
167
+ css: styles.indicator,
168
+ asChild: true,
169
+ children: /* @__PURE__ */ jsx(AssetSelectChevron, {})
170
+ })
171
+ ]
172
+ })
173
+ ]
174
+ }), /* @__PURE__ */ jsx(Portal, {
175
+ disabled: disablePortal || disablePortalFromContext,
176
+ children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitMultiselectMenu, {
177
+ collection,
178
+ emptyHelperText,
179
+ emptyLabel,
180
+ isLoading,
181
+ onScrolledToBottom,
182
+ onSearchChange,
183
+ searchValue,
184
+ size,
185
+ children
186
+ }) })
187
+ })]
191
188
  })
192
189
  });
193
190
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitMultiselect.js","names":[],"sources":["../../../lib/components/BitkitMultiselect/BitkitMultiselect.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { useControllableState } from '@chakra-ui/react/hooks';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectRootProps, type SelectTriggerProps, useSelectContext } from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type ReactNode, useContext } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\nimport BitkitMultiselectMenu, {\n type BitkitMultiselectMenuItemProps,\n} from '../BitkitMultiselectMenu/BitkitMultiselectMenu';\nimport {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu';\nimport BitkitSelectMenuAction, { type BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';\nimport BitkitTag from '../BitkitTag/BitkitTag';\n\nexport type BitkitMultiselectTriggerProps = SelectTriggerProps;\n\nexport type BitkitMultiselectProps = Omit<BitkitFieldProps, 'children' | 'onChange' | 'state'> & {\n children?: BitkitSelectMenuActionChild;\n constrained?: boolean;\n defaultValue?: Array<string>;\n isLoading?: boolean;\n /** Reddens the offending tags and errors the field, like BitkitTagsInput. Pair with `errorText`. */\n isValueInvalid?: (value: string) => boolean;\n items: Array<BitkitMultiselectMenuItemProps>;\n onValueChange?: (newVal: Array<string>) => void;\n placeholder?: string;\n disablePortal?: boolean;\n selectProps?: Omit<SelectRootProps, 'collection' | 'defaultValue' | 'multiple' | 'onValueChange' | 'value'>;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n triggerProps?: BitkitMultiselectTriggerProps;\n value?: Array<string>;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps;\n\ntype MultiselectState = BitkitMultiselectProps['state'];\n\nconst NON_INTERACTIVE_STATES: ReadonlyArray<MultiselectState> = ['disabled', 'readOnly', 'error', 'warning'];\n\n/** Whether the clear-all button should be rendered (and the overlay should reserve extra room for it). */\nconst shouldShowClearButton = (constrained: boolean, selectionCount: number, state: MultiselectState): boolean =>\n !constrained && selectionCount > 0 && !NON_INTERACTIVE_STATES.includes(state);\n\ntype MultiselectOverlayProps = {\n constrained: boolean;\n isValueInvalid?: (value: string) => boolean;\n placeholder?: string;\n size: 'md' | 'lg';\n state?: MultiselectState;\n};\n\nconst MultiselectOverlay = ({ constrained, isValueInvalid, placeholder, size, state }: MultiselectOverlayProps) => {\n const select = useSelectContext();\n const recipe = useSlotRecipe({ key: 'multiselect' });\n const styles = recipe({ constrained, size });\n\n const selectedItems = select.selectedItems as Array<BitkitMultiselectMenuItemProps>;\n const selectedValues = select.value;\n const isDisabled = state === 'disabled';\n const isReadOnly = state === 'readOnly';\n const tagState = isDisabled ? 'disabled' : undefined;\n // Overlay reserves ~96px on the right when the clear-all is visible (to keep the chevron +\n // clear button out of the tag row), otherwise ~48px (chevron only). Using spacing tokens\n // because '80' (the minimum that fits both icons with gaps) isn't a valid token; '96' is\n // the next one up.\n const overlayPaddingEnd = shouldShowClearButton(constrained, selectedValues.length, state) ? '96' : '48';\n\n const resolvedPlaceholder = placeholder ?? (isReadOnly ? '(not selected)' : 'Select options');\n const canRemove = !isDisabled && !isReadOnly;\n\n const hasSelection = selectedValues.length > 0;\n\n const renderTags = () => {\n if (constrained) {\n return (\n <>\n {hasSelection && (\n <TagSlot>\n <BitkitTag\n size=\"sm\"\n colorVariant={selectedValues.some((v) => isValueInvalid?.(v)) ? 'red' : 'neutral'}\n labelText={String(selectedValues.length)}\n state={tagState}\n onRemove={canRemove ? () => select.clearValue() : undefined}\n />\n </TagSlot>\n )}\n <Text as=\"span\" css={styles.placeholderText} data-placeholder={hasSelection ? undefined : ''}>\n {resolvedPlaceholder}\n </Text>\n </>\n );\n }\n\n if (selectedItems.length === 0) {\n return (\n <Text as=\"span\" css={styles.placeholderText} data-placeholder=\"\">\n {resolvedPlaceholder}\n </Text>\n );\n }\n\n return selectedItems.map((item) => (\n <TagSlot key={item.value}>\n <BitkitTag\n size=\"sm\"\n colorVariant={isValueInvalid?.(item.value) ? 'red' : 'neutral'}\n labelText={item.label}\n state={tagState}\n onRemove={canRemove ? () => select.setValue(selectedValues.filter((v) => v !== item.value)) : undefined}\n />\n </TagSlot>\n ));\n };\n\n return (\n <Box css={styles.overlay} pointerEvents=\"none\" paddingInlineEnd={overlayPaddingEnd}>\n <Box css={styles.tagsBlock}>{renderTags()}</Box>\n </Box>\n );\n};\n\nconst TagSlot = ({ children }: { children: ReactNode }) => (\n <Box data-slot=\"tag\" display=\"inline-flex\" pointerEvents=\"auto\">\n {children}\n </Box>\n);\n\ntype ClearAllButtonProps = {\n state?: MultiselectState;\n};\n\nconst ClearAllButton = ({ state }: ClearAllButtonProps) => {\n const select = useSelectContext();\n\n // Constrained mode has its own inline clear-all on the counter tag; this is the non-constrained trigger-level clear.\n if (!shouldShowClearButton(false, select.value.length, state)) return null;\n\n return (\n <BitkitCloseButton size=\"sm\" colorVariant=\"neutral\" aria-label=\"Clear all\" onClick={() => select.clearValue()} />\n );\n};\n\nconst BitkitMultiselect = forwardRef<HTMLDivElement, BitkitMultiselectProps>((props, ref) => {\n const {\n children,\n constrained = false,\n defaultValue,\n emptyHelperText,\n emptyLabel,\n isLoading,\n isValueInvalid,\n items,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n placeholder,\n disablePortal,\n searchValue,\n selectProps,\n size = 'lg',\n state,\n triggerProps,\n value,\n ...fieldProps\n } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n isItemDisabled: (item) => !!item.disabled,\n });\n\n const recipe = useSlotRecipe({ key: 'multiselect' });\n const styles = recipe({ constrained, size });\n\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const iconSize = size === 'lg' ? '24' : '16';\n\n const [currentValues, setCurrentValues] = useControllableState<Array<string>>({\n value,\n defaultValue: defaultValue ?? [],\n });\n const isInteractive = state !== 'disabled' && state !== 'readOnly';\n const hasInvalidValue = isInteractive && !!isValueInvalid && currentValues.some(isValueInvalid);\n const effectiveState = hasInvalidValue ? 'error' : state;\n const isInvalid = effectiveState === 'error' || !!fieldProps.errorText;\n\n return (\n <BitkitField ref={ref} state={effectiveState} {...fieldProps}>\n <Select.Root\n collection={collection}\n multiple\n {...selectProps}\n defaultValue={defaultValue}\n disabled={effectiveState === 'disabled'}\n invalid={isInvalid}\n onValueChange={(details) => {\n setCurrentValues(details.value);\n onValueChange?.(details.value);\n }}\n readOnly={effectiveState === 'readOnly'}\n // Zag's default scrollIntoView gates on `isScrollable(contentEl)`. Our content is\n // overflow:hidden + flex column (so the sticky-bottom create row stays visible while\n // the inner itemList Box scrolls). That gate fails, so keyboard highlight never\n // scrolls the items into view. Providing scrollToIndexFn bypasses the gate and lets\n // the browser's native scrollIntoView walk up to the real scroll container (itemList).\n scrollToIndexFn={({ getElement }) => getElement()?.scrollIntoView({ block: 'nearest' })}\n value={value}\n >\n <Select.HiddenSelect />\n <Select.Control css={styles.control} className=\"group\">\n <Select.Trigger css={styles.trigger} {...triggerProps} />\n <MultiselectOverlay\n constrained={constrained}\n isValueInvalid={hasInvalidValue ? isValueInvalid : undefined}\n placeholder={placeholder}\n size={size}\n state={effectiveState}\n />\n <Select.IndicatorGroup css={styles.indicatorGroup}>\n {!constrained && <ClearAllButton state={effectiveState} />}\n {effectiveState === 'error' && (\n <Select.Indicator css={styles.indicator}>\n <IconErrorCircleFilled size={iconSize} color=\"icon/negative\" />\n </Select.Indicator>\n )}\n {effectiveState === 'warning' && (\n <Select.Indicator css={styles.indicator}>\n <IconWarningYellow size={iconSize} />\n </Select.Indicator>\n )}\n <Select.Indicator css={styles.indicator} asChild>\n <AssetSelectChevron />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Select.Positioner>\n <BitkitMultiselectMenu\n collection={collection}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={onSearchChange}\n searchValue={searchValue}\n size={size}\n >\n {children}\n </BitkitMultiselectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n </BitkitField>\n );\n});\n\nBitkitMultiselect.displayName = 'BitkitMultiselect';\n\nexport default withSubComponents(BitkitMultiselect, { Action: BitkitSelectMenuAction });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkDA,IAAM,yBAA0D;CAAC;CAAY;CAAY;CAAS;AAAS;;AAG3G,IAAM,yBAAyB,aAAsB,gBAAwB,UAC3E,CAAC,eAAe,iBAAiB,KAAK,CAAC,uBAAuB,SAAS,KAAK;AAU9E,IAAM,sBAAsB,EAAE,aAAa,gBAAgB,aAAa,MAAM,YAAqC;CACjH,MAAM,SAAS,iBAAiB;CAEhC,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;EAAE;EAAa;CAAK,CAAC;CAE3C,MAAM,gBAAgB,OAAO;CAC7B,MAAM,iBAAiB,OAAO;CAC9B,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,UAAU;CAC7B,MAAM,WAAW,aAAa,aAAa,KAAA;CAK3C,MAAM,oBAAoB,sBAAsB,aAAa,eAAe,QAAQ,KAAK,IAAI,OAAO;CAEpG,MAAM,sBAAsB,gB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AlBT,UAAA;IAoBE,oBAAC,OAAO,cAAR,CAAsB,CAAA;IACtB,qBAAC,OAAO,SAAR;KAAgB,KAAK,OAAO;KAAS,WAAU;KAA/C,UAAA;MACE,oBAAC,OAAO,SAAR;OAAgB,KAAK,OAAO;OAAS,GAAI;MAAe,CAAA;MACxD,oBAAC,oBAAD;OACe;OACb,gBAAgB,kBAAkB,iBAAiB,KAAA;OACtC;OACP;OACN,OAAO;MACR,CAAA;MACD,qBAAC,OAAO,gBAAR;OAAuB,KAAK,OAAO;OAAnC,UAAA;QACG,CAAC,eAAe,oBAAC,gBAAD,EAAgB,OAAO,eAAiB,CAAA;QACxD,mBAAmB,WAClB,oBAAC,OAAO,WAAR;SAAkB,KAAK,OAAO;SAC5B,UAAA,oBAAC,uBAAD;UAAuB,MAAM;UAAU,OAAM;SAAiB,CAAA;QAC9C,CAAA;QAEnB,mBAAmB,aAClB,oBAAC,OAAO,WAAR;SAAkB,KAAK,OAAO;SAC5B,UAAA,oBAAC,mBAAD,EAAmB,MAAM,SAAW,CAAA;QACpB,CAAA;QAEpB,oBAAC,OAAO,WAAR;SAAkB,KAAK,OAAO;SAAW,SAAA;SACvC,UAAA,oBAAC,oBAAD,CAAqB,CAAA;QACL,CAAA;OACG;;KACT;;IAChB,oBAAC,QAAD;KAAQ,UAAU,iBAAiB;KACjC,UAAA,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,uBAAD;MACc;MACK;MACL;MACD;MACS;MACJ;MACH;MACP;MAEL;KACoB,CAAA,EACN,CAAA;IACb,CAAA;GACG;;CACF,CAAA;AAEjB,CAAC;AAED,kBAAkB,cAAc;AAEhC,IAAA,4BAAe,kBAAkB,mBAAmB,EAAE,QAAQ,uBAAuB,CAAC"}
1
+ {"version":3,"file":"BitkitMultiselect.js","names":[],"sources":["../../../lib/components/BitkitMultiselect/BitkitMultiselect.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { useControllableState } from '@chakra-ui/react/hooks';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectRootProps, type SelectTriggerProps, useSelectContext } from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type ReactNode, useContext } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\nimport BitkitMultiselectMenu, {\n type BitkitMultiselectMenuItemProps,\n} from '../BitkitMultiselectMenu/BitkitMultiselectMenu';\nimport {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu';\nimport BitkitSelectMenuAction, { type BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';\nimport BitkitTag from '../BitkitTag/BitkitTag';\n\nexport type BitkitMultiselectTriggerProps = SelectTriggerProps;\n\nexport type BitkitMultiselectProps = Omit<BitkitFieldProps, 'children' | 'onChange' | 'state'> & {\n children?: BitkitSelectMenuActionChild;\n constrained?: boolean;\n defaultValue?: Array<string>;\n isLoading?: boolean;\n /** Reddens the offending tags and errors the field, like BitkitTagsInput. Pair with `errorText`. */\n isValueInvalid?: (value: string) => boolean;\n items: Array<BitkitMultiselectMenuItemProps>;\n onValueChange?: (newVal: Array<string>) => void;\n placeholder?: string;\n disablePortal?: boolean;\n selectProps?: Omit<SelectRootProps, 'collection' | 'defaultValue' | 'multiple' | 'onValueChange' | 'value'>;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n triggerProps?: BitkitMultiselectTriggerProps;\n value?: Array<string>;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps;\n\ntype MultiselectState = BitkitMultiselectProps['state'];\n\nconst NON_INTERACTIVE_STATES: ReadonlyArray<MultiselectState> = ['disabled', 'readOnly', 'error', 'warning'];\n\n/** Whether the clear-all button should be rendered (and the overlay should reserve extra room for it). */\nconst shouldShowClearButton = (constrained: boolean, selectionCount: number, state: MultiselectState): boolean =>\n !constrained && selectionCount > 0 && !NON_INTERACTIVE_STATES.includes(state);\n\ntype MultiselectOverlayProps = {\n constrained: boolean;\n isValueInvalid?: (value: string) => boolean;\n placeholder?: string;\n size: 'md' | 'lg';\n state?: MultiselectState;\n};\n\nconst MultiselectOverlay = ({ constrained, isValueInvalid, placeholder, size, state }: MultiselectOverlayProps) => {\n const select = useSelectContext();\n const recipe = useSlotRecipe({ key: 'multiselect' });\n const styles = recipe({ constrained, size });\n\n const selectedItems = select.selectedItems as Array<BitkitMultiselectMenuItemProps>;\n const selectedValues = select.value;\n const isDisabled = state === 'disabled';\n const isReadOnly = state === 'readOnly';\n const tagState = isDisabled ? 'disabled' : undefined;\n // Overlay reserves ~96px on the right when the clear-all is visible (to keep the chevron +\n // clear button out of the tag row), otherwise ~48px (chevron only). Using spacing tokens\n // because '80' (the minimum that fits both icons with gaps) isn't a valid token; '96' is\n // the next one up.\n const overlayPaddingEnd = shouldShowClearButton(constrained, selectedValues.length, state) ? '96' : '48';\n\n const resolvedPlaceholder = placeholder ?? (isReadOnly ? '(not selected)' : 'Select options');\n const canRemove = !isDisabled && !isReadOnly;\n\n const hasSelection = selectedValues.length > 0;\n\n const renderTags = () => {\n if (constrained) {\n return (\n <>\n {hasSelection && (\n <TagSlot>\n <BitkitTag\n size=\"sm\"\n colorVariant={selectedValues.some((v) => isValueInvalid?.(v)) ? 'red' : 'neutral'}\n labelText={String(selectedValues.length)}\n state={tagState}\n onRemove={canRemove ? () => select.clearValue() : undefined}\n />\n </TagSlot>\n )}\n <Text as=\"span\" css={styles.placeholderText} data-placeholder={hasSelection ? undefined : ''}>\n {resolvedPlaceholder}\n </Text>\n </>\n );\n }\n\n if (selectedItems.length === 0) {\n return (\n <Text as=\"span\" css={styles.placeholderText} data-placeholder=\"\">\n {resolvedPlaceholder}\n </Text>\n );\n }\n\n return selectedItems.map((item) => (\n <TagSlot key={item.value}>\n <BitkitTag\n size=\"sm\"\n colorVariant={isValueInvalid?.(item.value) ? 'red' : 'neutral'}\n labelText={item.label}\n state={tagState}\n onRemove={canRemove ? () => select.setValue(selectedValues.filter((v) => v !== item.value)) : undefined}\n />\n </TagSlot>\n ));\n };\n\n return (\n <Box css={styles.overlay} pointerEvents=\"none\" paddingInlineEnd={overlayPaddingEnd}>\n <Box css={styles.tagsBlock}>{renderTags()}</Box>\n </Box>\n );\n};\n\nconst TagSlot = ({ children }: { children: ReactNode }) => (\n <Box data-slot=\"tag\" display=\"inline-flex\" pointerEvents=\"auto\">\n {children}\n </Box>\n);\n\ntype ClearAllButtonProps = {\n state?: MultiselectState;\n};\n\nconst ClearAllButton = ({ state }: ClearAllButtonProps) => {\n const select = useSelectContext();\n\n // Constrained mode has its own inline clear-all on the counter tag; this is the non-constrained trigger-level clear.\n if (!shouldShowClearButton(false, select.value.length, state)) return null;\n\n return (\n <BitkitCloseButton size=\"sm\" colorVariant=\"neutral\" aria-label=\"Clear all\" onClick={() => select.clearValue()} />\n );\n};\n\nconst BitkitMultiselect = forwardRef<HTMLDivElement, BitkitMultiselectProps>((props, ref) => {\n const {\n children,\n constrained = false,\n defaultValue,\n emptyHelperText,\n emptyLabel,\n isLoading,\n isValueInvalid,\n items,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n placeholder,\n disablePortal,\n searchValue,\n selectProps,\n size = 'lg',\n state,\n triggerProps,\n value,\n ...fieldProps\n } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n isItemDisabled: (item) => !!item.disabled,\n });\n\n const recipe = useSlotRecipe({ key: 'multiselect' });\n const styles = recipe({ constrained, size });\n\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const iconSize = size === 'lg' ? '24' : '16';\n\n const [currentValues, setCurrentValues] = useControllableState<Array<string>>({\n value,\n defaultValue: defaultValue ?? [],\n });\n const isInteractive = state !== 'disabled' && state !== 'readOnly';\n const hasInvalidValue = isInteractive && !!isValueInvalid && currentValues.some(isValueInvalid);\n const effectiveState = hasInvalidValue ? 'error' : state;\n const isInvalid = effectiveState === 'error' || !!fieldProps.errorText;\n\n return (\n <BitkitField ref={ref} state={effectiveState} {...fieldProps}>\n <Select.Root\n collection={collection}\n multiple\n {...selectProps}\n defaultValue={defaultValue}\n disabled={effectiveState === 'disabled'}\n invalid={isInvalid}\n onValueChange={(details) => {\n setCurrentValues(details.value);\n onValueChange?.(details.value);\n }}\n readOnly={effectiveState === 'readOnly'}\n // Zag's default scrollIntoView gates on `isScrollable(contentEl)`. Our content is\n // overflow:hidden + flex column (so the sticky-bottom create row stays visible while\n // the inner itemList Box scrolls). That gate fails, so keyboard highlight never\n // scrolls the items into view. Providing scrollToIndexFn bypasses the gate and lets\n // the browser's native scrollIntoView walk up to the real scroll container (itemList).\n scrollToIndexFn={({ getElement }) => getElement()?.scrollIntoView({ block: 'nearest' })}\n value={value}\n >\n <Select.Control css={styles.control} className=\"group\">\n <Select.HiddenSelect />\n <Select.Trigger css={styles.trigger} {...triggerProps} />\n <MultiselectOverlay\n constrained={constrained}\n isValueInvalid={hasInvalidValue ? isValueInvalid : undefined}\n placeholder={placeholder}\n size={size}\n state={effectiveState}\n />\n <Select.IndicatorGroup css={styles.indicatorGroup}>\n {!constrained && <ClearAllButton state={effectiveState} />}\n {effectiveState === 'error' && (\n <Select.Indicator css={styles.indicator}>\n <IconErrorCircleFilled size={iconSize} color=\"icon/negative\" />\n </Select.Indicator>\n )}\n {effectiveState === 'warning' && (\n <Select.Indicator css={styles.indicator}>\n <IconWarningYellow size={iconSize} />\n </Select.Indicator>\n )}\n <Select.Indicator css={styles.indicator} asChild>\n <AssetSelectChevron />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Select.Positioner>\n <BitkitMultiselectMenu\n collection={collection}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={onSearchChange}\n searchValue={searchValue}\n size={size}\n >\n {children}\n </BitkitMultiselectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n </BitkitField>\n );\n});\n\nBitkitMultiselect.displayName = 'BitkitMultiselect';\n\nexport default withSubComponents(BitkitMultiselect, { Action: BitkitSelectMenuAction });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkDA,IAAM,yBAA0D;CAAC;CAAY;CAAY;CAAS;AAAS;;AAG3G,IAAM,yBAAyB,aAAsB,gBAAwB,UAC3E,CAAC,eAAe,iBAAiB,KAAK,CAAC,uBAAuB,SAAS,KAAK;AAU9E,IAAM,sBAAsB,EAAE,aAAa,gBAAgB,aAAa,MAAM,YAAqC;CACjH,MAAM,SAAS,iBAAiB;CAEhC,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;EAAE;EAAa;CAAK,CAAC;CAE3C,MAAM,gBAAgB,OAAO;CAC7B,MAAM,iBAAiB,OAAO;CAC9B,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,UAAU;CAC7B,MAAM,WAAW,aAAa,aAAa,KAAA;CAK3C,MAAM,oBAAoB,sBAAsB,aAAa,eAAe,QAAQ,KAAK,IAAI,OAAO;CAEpG,MAAM,sBAAsB,gBAAgB,aAAa,mBAAmB;CAC5E,MAAM,YAAY,CAAC,cAAc,CAAC;CAElC,MAAM,eAAe,eAAe,SAAS;CAE7C,MAAM,mBAAmB;EACvB,IAAI,aACF,OACE,qBAAA,YAAA,EAAA,UAAA,CACG,gBACC,oBAAC,SAAD,EAAA,UACE,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xD,oBAAC,oBAAD;MACe;MACb,gBAAgB,kBAAkB,iBAAiB,KAAA;MACtC;MACP;MACN,OAAO;KACR,CAAA;KACD,qBAAC,OAAO,gBAAR;MAAuB,KAAK,OAAO;MAAnC,UAAA;OACG,CAAC,eAAe,oBAAC,gBAAD,EAAgB,OAAO,eAAiB,CAAA;OACxD,mBAAmB,WAClB,oBAAC,OAAO,WAAR;QAAkB,KAAK,OAAO;QAC5B,UAAA,oBAAC,uBAAD;SAAuB,MAAM;SAAU,OAAM;QAAiB,CAAA;OAC9C,CAAA;OAEnB,mBAAmB,aAClB,oBAAC,OAAO,WAAR;QAAkB,KAAK,OAAO;QAC5B,UAAA,oBAAC,mBAAD,EAAmB,MAAM,SAAW,CAAA;OACpB,CAAA;OAEpB,oBAAC,OAAO,WAAR;QAAkB,KAAK,OAAO;QAAW,SAAA;QACvC,UAAA,oBAAC,oBAAD,CAAqB,CAAA;OACL,CAAA;MACG;;IACT;GAChB,CAAA,GAAA,oBAAC,QAAD;IAAQ,UAAU,iBAAiB;IACjC,UAAA,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,uBAAD;KACc;KACK;KACL;KACD;KACS;KACJ;KACH;KACP;KAEL;IACoB,CAAA,EACN,CAAA;GACb,CAAA,CACG;;CACF,CAAA;AAEjB,CAAC;AAED,kBAAkB,cAAc;AAEhC,IAAA,4BAAe,kBAAkB,mBAAmB,EAAE,QAAQ,uBAAuB,CAAC"}
@@ -80,18 +80,19 @@ var BitkitSelect = forwardRef((props, ref) => {
80
80
  readOnly: state === "readOnly",
81
81
  scrollToIndexFn: ({ getElement }) => getElement()?.scrollIntoView({ block: "nearest" }),
82
82
  value: value === void 0 ? void 0 : value ? [value] : [],
83
- children: [
84
- /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
85
- /* @__PURE__ */ jsxs(Select.Control, {
86
- className: "group",
87
- children: [/* @__PURE__ */ jsx(Select.Trigger, {
83
+ children: [/* @__PURE__ */ jsxs(Select.Control, {
84
+ className: "group",
85
+ children: [
86
+ /* @__PURE__ */ jsx(Select.HiddenSelect, {}),
87
+ /* @__PURE__ */ jsx(Select.Trigger, {
88
88
  ...triggerProps,
89
89
  children: /* @__PURE__ */ jsx(SelectValue, {
90
90
  placeholder,
91
91
  size,
92
92
  state
93
93
  })
94
- }), /* @__PURE__ */ jsxs(Select.IndicatorGroup, { children: [
94
+ }),
95
+ /* @__PURE__ */ jsxs(Select.IndicatorGroup, { children: [
95
96
  state === "error" && /* @__PURE__ */ jsx(Select.Indicator, { children: /* @__PURE__ */ jsx(IconErrorCircleFilled, {
96
97
  size: size === "lg" ? "24" : "16",
97
98
  color: "icon/negative"
@@ -101,23 +102,22 @@ var BitkitSelect = forwardRef((props, ref) => {
101
102
  asChild: true,
102
103
  children: /* @__PURE__ */ jsx(AssetSelectChevron, {})
103
104
  })
104
- ] })]
105
- }),
106
- /* @__PURE__ */ jsx(Portal, {
107
- disabled: disablePortal || disablePortalFromContext,
108
- children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
109
- collection,
110
- emptyHelperText,
111
- emptyLabel,
112
- isLoading,
113
- onScrolledToBottom,
114
- onSearchChange,
115
- searchValue,
116
- size,
117
- children
118
- }) })
119
- })
120
- ]
105
+ ] })
106
+ ]
107
+ }), /* @__PURE__ */ jsx(Portal, {
108
+ disabled: disablePortal || disablePortalFromContext,
109
+ children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
110
+ collection,
111
+ emptyHelperText,
112
+ emptyLabel,
113
+ isLoading,
114
+ onScrolledToBottom,
115
+ onSearchChange,
116
+ searchValue,
117
+ size,
118
+ children
119
+ }) })
120
+ })]
121
121
  })
122
122
  });
123
123
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitSelect.js","names":[],"sources":["../../../lib/components/BitkitSelect/BitkitSelect.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectRootProps, type SelectTriggerProps, useSelectContext } from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, useContext } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron.tsx';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport { withSubComponents } from '../../utilities/withSubComponents.ts';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField.tsx';\nimport BitkitSelectMenu, {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuItemProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu.tsx';\nimport BitkitSelectMenuAction, {\n type BitkitSelectMenuActionChild,\n} from '../BitkitSelectMenu/BitkitSelectMenuAction.tsx';\nimport { selectSizeMap } from '../BitkitSelectMenu/SelectMenuShell.tsx';\n\nexport type BitkitSelectTriggerProps = SelectTriggerProps;\n\nexport type BitkitSelectProps = Omit<BitkitFieldProps, 'children' | 'onChange' | 'state'> & {\n children?: BitkitSelectMenuActionChild;\n defaultValue?: string;\n isLoading?: boolean;\n items: Array<BitkitSelectMenuItemProps>;\n onValueChange?: (newVal: string) => void;\n placeholder?: string;\n disablePortal?: boolean;\n selectProps?: Omit<SelectRootProps, 'collection' | 'defaultValue' | 'onValueChange' | 'size' | 'value'>;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n triggerProps?: BitkitSelectTriggerProps;\n value?: string;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps;\n\ntype SelectValueProps = {\n placeholder?: string;\n size: NonNullable<BitkitSelectProps['size']>;\n state?: BitkitSelectProps['state'];\n};\n\nconst SelectValue = ({ placeholder, state, size }: SelectValueProps) => {\n const select = useSelectContext();\n const items = select.selectedItems as Array<BitkitSelectMenuItemProps>;\n\n const Icon = items[0]?.icon;\n const avatar = items[0]?.avatar;\n const label = items[0]?.label;\n\n const { avatarSize, iconSize } = selectSizeMap[size];\n\n const recipe = useSlotRecipe({ key: 'select' });\n const styles = recipe({ size });\n\n return items[0] ? (\n <Select.ValueText placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')}>\n {avatar ? (\n // Same avatar handling as the menu item (see BitkitSelectMenu.tsx). The `data-slot`\n // lets the trigger recipe shrink its vertical padding so the avatar row keeps the\n // 48/40 trigger height (see the `&:has([data-slot=\"avatar\"])` rule in Select.recipe.ts).\n <Box data-slot=\"avatar\" css={styles.avatar}>\n <BitkitAvatar variant=\"image\" src={avatar} name={label} size={avatarSize} />\n </Box>\n ) : (\n Icon && <Icon css={styles.valueIcon} size={iconSize} flexShrink={0} />\n )}\n <Text as=\"span\" overflow=\"hidden\" textOverflow=\"ellipsis\" whiteSpace=\"nowrap\" minWidth=\"0\">\n {label}\n </Text>\n </Select.ValueText>\n ) : (\n <Select.ValueText\n placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')}\n display=\"block\"\n overflow=\"hidden\"\n textOverflow=\"ellipsis\"\n whiteSpace=\"nowrap\"\n />\n );\n};\n\nconst BitkitSelect = forwardRef<HTMLDivElement, BitkitSelectProps>((props: BitkitSelectProps, ref) => {\n const {\n children,\n defaultValue,\n emptyHelperText,\n emptyLabel,\n isLoading,\n items,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n placeholder,\n disablePortal,\n searchValue,\n selectProps,\n size = 'lg',\n state,\n triggerProps,\n value,\n ...fieldProps\n } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n isItemDisabled: (item) => !!item.disabled,\n });\n\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n\n return (\n <BitkitField ref={ref} state={state} {...fieldProps}>\n <Select.Root\n collection={collection}\n size={size}\n {...selectProps}\n defaultValue={defaultValue ? [defaultValue] : undefined}\n disabled={state === 'disabled'}\n hasStatusIcon={state === 'error' || state === 'warning'}\n invalid={isInvalid}\n onValueChange={(newVal) => onValueChange?.(newVal.value[0])}\n readOnly={state === 'readOnly'}\n // Bypass Zag's isScrollable(contentEl) gate — our Content is overflow:hidden flex\n // column, so the real scroll container is itemList. See BitkitMultiselect for why.\n scrollToIndexFn={({ getElement }) => getElement()?.scrollIntoView({ block: 'nearest' })}\n // Stay controlled whenever `value` is provided — including `''` (\"nothing selected\"). A\n // truthiness check (`value ? … : undefined`) passes `undefined` for `''`, which flips\n // Select.Root to uncontrolled: it then ignores `value`, so resets don't take and\n // onValueChange stops firing when the same option is re-selected.\n value={value === undefined ? undefined : value ? [value] : []}\n >\n <Select.HiddenSelect />\n <Select.Control className=\"group\">\n <Select.Trigger {...triggerProps}>\n <SelectValue placeholder={placeholder} size={size} state={state} />\n </Select.Trigger>\n <Select.IndicatorGroup>\n {state === 'error' && (\n <Select.Indicator>\n <IconErrorCircleFilled size={size === 'lg' ? '24' : '16'} color=\"icon/negative\" />\n </Select.Indicator>\n )}\n {state === 'warning' && (\n <Select.Indicator>\n <IconWarningYellow size={size === 'lg' ? '24' : '16'} />\n </Select.Indicator>\n )}\n <Select.Indicator asChild>\n <AssetSelectChevron />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Select.Positioner>\n <BitkitSelectMenu\n collection={collection}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={onSearchChange}\n searchValue={searchValue}\n size={size}\n >\n {children}\n </BitkitSelectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n </BitkitField>\n );\n});\n\nBitkitSelect.displayName = 'BitkitSelect';\n\nexport default withSubComponents(BitkitSelect, { Action: BitkitSelectMenuAction });\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkDA,IAAM,eAAe,EAAE,aAAa,OAAO,WAA6B;CAEtE,MAAM,QADS,iBACD,CAAA,CAAO;CAErB,MAAM,OAAO,MAAM,EAAE,EAAE;CACvB,MAAM,SAAS,MAAM,EAAE,EAAE;CACzB,MAAM,QAAQ,MAAM,EAAE,EAAE;CAExB,MAAM,EAAE,YAAY,aAAa,cAAc;CAG/C,MAAM,SADS,cAAc,EAAE,KAAK,SAAS,CAC9B,CAAA,CAAO,EAAE,KAAK,CAAC;CAE9B,OAAO,MAAM,KACX,qBAAC,OAAO,WAAR;EAAkB,aAAa,gBAAgB,UAAU,aAAa,mBAAmB;EAAzF,UAAA,CACG,SAIC,oBAAC,KAAD;GAAK,aAAU;GAAS,KAAK,OAAO;GAClC,UAAA,oBAAC,cAAD;IAAc,SAAQ;IAAQ,KAAK;IAAQ,MAAM;IAAO,MAAM;GAAa,CAAA;EACxE,CAAA,IAEL,QAAQ,oBAAC,MAAD;GAAM,KAAK,OAAO;GAAW,MAAM;GAAU,YAAY;EAAI,CAAA,GAEvE,oBAAC,MAAD;GAAM,IAAG;GAAO,UAAS;GAAS,cAAa;GAAW,YAAW;GAAS,UAAS;GACpF,UAAA;EACG,CAAA,CACU;CAElB,CAAA,IAAA,oBAAC,OAAO,WAAR;EACE,aAAa,gBAAgB,UAAU,aAAa,mBAAmB;EACvE,SAAQ;EACR,UAAS;EACT,cAAa;EACb,YAAW;CACZ,CAAA;AAEL;AAEA,IAAM,eAAe,YAA+C,OAA0B,QAAQ;CACpG,MAAM,EACJ,UACA,cACA,iBACA,YACA,WACA,OACA,oBACA,gBACA,eACA,aACA,eACA,aACA,aACA,OAAO,MACP,OACA,cACA,OACA,GAAG,eACD;CAEJ,MAAM,aAAa,qBAAqB;EACtC;EACA,UAAU,SAAS,KAAK,SAAS;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A,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;MACc;MACK;MACL;MACD;MACS;MACJ;MACH;MACP;MAEL;KACe,CAAA,EACD,CAAA;IACb,CAAA;GACG;;CACF,CAAA;AAEjB,CAAC;AAED,aAAa,cAAc;AAE3B,IAAA,uBAAe,kBAAkB,cAAc,EAAE,QAAQ,uBAAuB,CAAC"}
1
+ {"version":3,"file":"BitkitSelect.js","names":[],"sources":["../../../lib/components/BitkitSelect/BitkitSelect.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectRootProps, type SelectTriggerProps, useSelectContext } from '@chakra-ui/react/select';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, useContext } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron.tsx';\nimport BitkitPortalContext from '../../utilities/BitkitPortalContext';\nimport { withSubComponents } from '../../utilities/withSubComponents.ts';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField.tsx';\nimport BitkitSelectMenu, {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuItemProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu.tsx';\nimport BitkitSelectMenuAction, {\n type BitkitSelectMenuActionChild,\n} from '../BitkitSelectMenu/BitkitSelectMenuAction.tsx';\nimport { selectSizeMap } from '../BitkitSelectMenu/SelectMenuShell.tsx';\n\nexport type BitkitSelectTriggerProps = SelectTriggerProps;\n\nexport type BitkitSelectProps = Omit<BitkitFieldProps, 'children' | 'onChange' | 'state'> & {\n children?: BitkitSelectMenuActionChild;\n defaultValue?: string;\n isLoading?: boolean;\n items: Array<BitkitSelectMenuItemProps>;\n onValueChange?: (newVal: string) => void;\n placeholder?: string;\n disablePortal?: boolean;\n selectProps?: Omit<SelectRootProps, 'collection' | 'defaultValue' | 'onValueChange' | 'size' | 'value'>;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n triggerProps?: BitkitSelectTriggerProps;\n value?: string;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps;\n\ntype SelectValueProps = {\n placeholder?: string;\n size: NonNullable<BitkitSelectProps['size']>;\n state?: BitkitSelectProps['state'];\n};\n\nconst SelectValue = ({ placeholder, state, size }: SelectValueProps) => {\n const select = useSelectContext();\n const items = select.selectedItems as Array<BitkitSelectMenuItemProps>;\n\n const Icon = items[0]?.icon;\n const avatar = items[0]?.avatar;\n const label = items[0]?.label;\n\n const { avatarSize, iconSize } = selectSizeMap[size];\n\n const recipe = useSlotRecipe({ key: 'select' });\n const styles = recipe({ size });\n\n return items[0] ? (\n <Select.ValueText placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')}>\n {avatar ? (\n // Same avatar handling as the menu item (see BitkitSelectMenu.tsx). The `data-slot`\n // lets the trigger recipe shrink its vertical padding so the avatar row keeps the\n // 48/40 trigger height (see the `&:has([data-slot=\"avatar\"])` rule in Select.recipe.ts).\n <Box data-slot=\"avatar\" css={styles.avatar}>\n <BitkitAvatar variant=\"image\" src={avatar} name={label} size={avatarSize} />\n </Box>\n ) : (\n Icon && <Icon css={styles.valueIcon} size={iconSize} flexShrink={0} />\n )}\n <Text as=\"span\" overflow=\"hidden\" textOverflow=\"ellipsis\" whiteSpace=\"nowrap\" minWidth=\"0\">\n {label}\n </Text>\n </Select.ValueText>\n ) : (\n <Select.ValueText\n placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')}\n display=\"block\"\n overflow=\"hidden\"\n textOverflow=\"ellipsis\"\n whiteSpace=\"nowrap\"\n />\n );\n};\n\nconst BitkitSelect = forwardRef<HTMLDivElement, BitkitSelectProps>((props: BitkitSelectProps, ref) => {\n const {\n children,\n defaultValue,\n emptyHelperText,\n emptyLabel,\n isLoading,\n items,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n placeholder,\n disablePortal,\n searchValue,\n selectProps,\n size = 'lg',\n state,\n triggerProps,\n value,\n ...fieldProps\n } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n isItemDisabled: (item) => !!item.disabled,\n });\n\n const { disablePortal: disablePortalFromContext } = useContext(BitkitPortalContext);\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n\n return (\n <BitkitField ref={ref} state={state} {...fieldProps}>\n <Select.Root\n collection={collection}\n size={size}\n {...selectProps}\n defaultValue={defaultValue ? [defaultValue] : undefined}\n disabled={state === 'disabled'}\n hasStatusIcon={state === 'error' || state === 'warning'}\n invalid={isInvalid}\n onValueChange={(newVal) => onValueChange?.(newVal.value[0])}\n readOnly={state === 'readOnly'}\n // Bypass Zag's isScrollable(contentEl) gate — our Content is overflow:hidden flex\n // column, so the real scroll container is itemList. See BitkitMultiselect for why.\n scrollToIndexFn={({ getElement }) => getElement()?.scrollIntoView({ block: 'nearest' })}\n // Stay controlled whenever `value` is provided — including `''` (\"nothing selected\"). A\n // truthiness check (`value ? … : undefined`) passes `undefined` for `''`, which flips\n // Select.Root to uncontrolled: it then ignores `value`, so resets don't take and\n // onValueChange stops firing when the same option is re-selected.\n value={value === undefined ? undefined : value ? [value] : []}\n >\n <Select.Control className=\"group\">\n <Select.HiddenSelect />\n <Select.Trigger {...triggerProps}>\n <SelectValue placeholder={placeholder} size={size} state={state} />\n </Select.Trigger>\n <Select.IndicatorGroup>\n {state === 'error' && (\n <Select.Indicator>\n <IconErrorCircleFilled size={size === 'lg' ? '24' : '16'} color=\"icon/negative\" />\n </Select.Indicator>\n )}\n {state === 'warning' && (\n <Select.Indicator>\n <IconWarningYellow size={size === 'lg' ? '24' : '16'} />\n </Select.Indicator>\n )}\n <Select.Indicator asChild>\n <AssetSelectChevron />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal disabled={disablePortal || disablePortalFromContext}>\n <Select.Positioner>\n <BitkitSelectMenu\n collection={collection}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={onSearchChange}\n searchValue={searchValue}\n size={size}\n >\n {children}\n </BitkitSelectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n </BitkitField>\n );\n});\n\nBitkitSelect.displayName = 'BitkitSelect';\n\nexport default withSubComponents(BitkitSelect, { Action: BitkitSelectMenuAction });\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkDA,IAAM,eAAe,EAAE,aAAa,OAAO,WAA6B;CAEtE,MAAM,QADS,iBACD,CAAA,CAAO;CAErB,MAAM,OAAO,MAAM,EAAE,EAAE;CACvB,MAAM,SAAS,MAAM,EAAE,EAAE;CACzB,MAAM,QAAQ,MAAM,EAAE,EAAE;CAExB,MAAM,EAAE,YAAY,aAAa,cAAc;CAG/C,MAAM,SADS,cAAc,EAAE,KAAK,SAAS,CAC9B,CAAA,CAAO,EAAE,KAAK,CAAC;CAE9B,OAAO,MAAM,KACX,qBAAC,OAAO,WAAR;EAAkB,aAAa,gBAAgB,UAAU,aAAa,mBAAmB;EAAzF,UAAA,CACG,SAIC,oBAAC,KAAD;GAAK,aAAU;GAAS,KAAK,OAAO;GAClC,UAAA,oBAAC,cAAD;IAAc,SAAQ;IAAQ,KAAK;IAAQ,MAAM;IAAO,MAAM;GAAa,CAAA;EACxE,CAAA,IAEL,QAAQ,oBAAC,MAAD;GAAM,KAAK,OAAO;GAAW,MAAM;GAAU,YAAY;EAAI,CAAA,GAEvE,oBAAC,MAAD;GAAM,IAAG;GAAO,UAAS;GAAS,cAAa;GAAW,YAAW;GAAS,UAAS;GACpF,UAAA;EACG,CAAA,CACU;CAEl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C,uBAAD;OAAuB,MAAM,SAAS,OAAO,OAAO;OAAM,OAAM;MAAiB,CAAA,EACjE,CAAA;MAEnB,UAAU,aACT,oBAAC,OAAO,WAAR,EAAA,UACE,oBAAC,mBAAD,EAAmB,MAAM,SAAS,OAAO,OAAO,KAAO,CAAA,EACvC,CAAA;MAEpB,oBAAC,OAAO,WAAR;OAAkB,SAAA;OAChB,UAAA,oBAAC,oBAAD,CAAqB,CAAA;MACL,CAAA;KACG,EAAA,CAAA;IACT;GAChB,CAAA,GAAA,oBAAC,QAAD;IAAQ,UAAU,iBAAiB;IACjC,UAAA,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;KACc;KACK;KACL;KACD;KACS;KACJ;KACH;KACP;KAEL;IACe,CAAA,EACD,CAAA;GACb,CAAA,CACG;;CACF,CAAA;AAEjB,CAAC;AAED,aAAa,cAAc;AAE3B,IAAA,uBAAe,kBAAkB,cAAc,EAAE,QAAQ,uBAAuB,CAAC"}
@@ -7,7 +7,6 @@ var collapsibleSlotRecipe = defineSlotRecipe({
7
7
  base: {
8
8
  root: {
9
9
  width: "100%",
10
- color: "text/body",
11
10
  textStyle: "body/lg/regular"
12
11
  },
13
12
  content: {
@@ -1 +1 @@
1
- {"version":3,"file":"Collapsible.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Collapsible.recipe.ts"],"sourcesContent":["import { collapsibleAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst collapsibleSlotRecipe = defineSlotRecipe({\n className: 'collapsible',\n slots: [...collapsibleAnatomy.keys()],\n base: {\n root: {\n width: '100%',\n color: 'text/body',\n textStyle: 'body/lg/regular',\n },\n content: {\n overflow: 'hidden',\n position: 'relative',\n _open: {\n animationName: 'expand-height',\n animationDuration: 'moderate',\n },\n _closed: {\n animationName: 'collapse-height',\n animationDuration: 'moderate',\n _after: {\n content: '\"\"',\n position: 'absolute',\n insetInlineStart: 0,\n insetInlineEnd: 0,\n bottom: 0,\n height: '32',\n background: 'linear-gradient(to top, {colors.neutral.100}, transparent)',\n pointerEvents: 'none',\n },\n },\n },\n trigger: {\n display: 'flex',\n alignItems: 'center',\n color: 'text/link',\n cursor: 'pointer',\n gap: '4',\n textStyle: 'body/md/regular',\n paddingBlockStart: '8',\n width: 'fit-content',\n _hover: {\n color: 'text/link-hover',\n _active: {\n color: 'text/primary',\n },\n },\n _active: {\n color: 'text/primary',\n },\n },\n indicator: {},\n },\n});\n\nexport default collapsibleSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,wBAAwB,iBAAiB;CAC7C,WAAW;CACX,OAAO,CAAC,GAAG,mBAAmB,KAAK,CAAC;CACpC,MAAM;EACJ,MAAM;GACJ,OAAO;GACP,OAAO;GACP,WAAW;EACb;EACA,SAAS;GACP,UAAU;GACV,UAAU;GACV,OAAO;IACL,eAAe;IACf,mBAAmB;GACrB;GACA,SAAS;IACP,eAAe;IACf,mBAAmB;IACnB,QAAQ;KACN,SAAS;KACT,UAAU;KACV,kBAAkB;KAClB,gBAAgB;KAChB,QAAQ;KACR,QAAQ;KACR,YAAY;KACZ,eAAe;IACjB;GACF;EACF;EACA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,OAAO;GACP,QAAQ;GACR,KAAK;GACL,WAAW;GACX,mBAAmB;GACnB,OAAO;GACP,QAAQ;IACN,OAAO;IACP,SAAS,EACP,OAAO,eACT;GACF;GACA,SAAS,EACP,OAAO,eACT;EACF;EACA,WAAW,CAAC;CACd;AACF,CAAC"}
1
+ {"version":3,"file":"Collapsible.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Collapsible.recipe.ts"],"sourcesContent":["import { collapsibleAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst collapsibleSlotRecipe = defineSlotRecipe({\n className: 'collapsible',\n slots: [...collapsibleAnatomy.keys()],\n base: {\n root: {\n width: '100%',\n textStyle: 'body/lg/regular',\n },\n content: {\n overflow: 'hidden',\n position: 'relative',\n _open: {\n animationName: 'expand-height',\n animationDuration: 'moderate',\n },\n _closed: {\n animationName: 'collapse-height',\n animationDuration: 'moderate',\n _after: {\n content: '\"\"',\n position: 'absolute',\n insetInlineStart: 0,\n insetInlineEnd: 0,\n bottom: 0,\n height: '32',\n background: 'linear-gradient(to top, {colors.neutral.100}, transparent)',\n pointerEvents: 'none',\n },\n },\n },\n trigger: {\n display: 'flex',\n alignItems: 'center',\n color: 'text/link',\n cursor: 'pointer',\n gap: '4',\n textStyle: 'body/md/regular',\n paddingBlockStart: '8',\n width: 'fit-content',\n _hover: {\n color: 'text/link-hover',\n _active: {\n color: 'text/primary',\n },\n },\n _active: {\n color: 'text/primary',\n },\n },\n indicator: {},\n },\n});\n\nexport default collapsibleSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,wBAAwB,iBAAiB;CAC7C,WAAW;CACX,OAAO,CAAC,GAAG,mBAAmB,KAAK,CAAC;CACpC,MAAM;EACJ,MAAM;GACJ,OAAO;GACP,WAAW;EACb;EACA,SAAS;GACP,UAAU;GACV,UAAU;GACV,OAAO;IACL,eAAe;IACf,mBAAmB;GACrB;GACA,SAAS;IACP,eAAe;IACf,mBAAmB;IACnB,QAAQ;KACN,SAAS;KACT,UAAU;KACV,kBAAkB;KAClB,gBAAgB;KAChB,QAAQ;KACR,QAAQ;KACR,YAAY;KACZ,eAAe;IACjB;GACF;EACF;EACA,SAAS;GACP,SAAS;GACT,YAAY;GACZ,OAAO;GACP,QAAQ;GACR,KAAK;GACL,WAAW;GACX,mBAAmB;GACnB,OAAO;GACP,QAAQ;IACN,OAAO;IACP,SAAS,EACP,OAAO,eACT;GACF;GACA,SAAS,EACP,OAAO,eACT;EACF;EACA,WAAW,CAAC;CACd;AACF,CAAC"}
@@ -17,21 +17,13 @@ declare const inlineLoadingRecipe: import('@chakra-ui/react').SlotRecipeDefiniti
17
17
  };
18
18
  };
19
19
  status: {
20
- error: {
21
- root: {
22
- color: "text/body";
23
- };
24
- };
20
+ error: {};
25
21
  loading: {
26
22
  root: {
27
23
  color: "text/secondary";
28
24
  };
29
25
  };
30
- success: {
31
- root: {
32
- color: "text/body";
33
- };
34
- };
26
+ success: {};
35
27
  };
36
28
  }>;
37
29
  export default inlineLoadingRecipe;
@@ -18,9 +18,9 @@ var inlineLoadingRecipe = defineSlotRecipe({
18
18
  lg: { label: { textStyle: "body/lg/regular" } }
19
19
  },
20
20
  status: {
21
- error: { root: { color: "text/body" } },
21
+ error: {},
22
22
  loading: { root: { color: "text/secondary" } },
23
- success: { root: { color: "text/body" } }
23
+ success: {}
24
24
  }
25
25
  },
26
26
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"InlineLoading.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/InlineLoading.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst inlineLoadingRecipe = defineSlotRecipe({\n className: 'inline-loading',\n slots: ['root', 'label'],\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '8',\n },\n label: {},\n },\n variants: {\n size: {\n sm: {\n label: { textStyle: 'body/sm/regular' },\n },\n md: {\n label: { textStyle: 'body/md/regular' },\n },\n lg: {\n label: { textStyle: 'body/lg/regular' },\n },\n },\n status: {\n error: {\n root: { color: 'text/body' },\n },\n loading: {\n root: { color: 'text/secondary' },\n },\n success: {\n root: { color: 'text/body' },\n },\n },\n },\n defaultVariants: {\n size: 'md',\n status: 'loading',\n },\n});\n\nexport default inlineLoadingRecipe;\n"],"mappings":";;AAEA,IAAM,sBAAsB,iBAAiB;CAC3C,WAAW;CACX,OAAO,CAAC,QAAQ,OAAO;CACvB,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,OAAO,CAAC;CACV;CACA,UAAU;EACR,MAAM;GACJ,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;GACA,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;GACA,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;EACF;EACA,QAAQ;GACN,OAAO,EACL,MAAM,EAAE,OAAO,YAAY,EAC7B;GACA,SAAS,EACP,MAAM,EAAE,OAAO,iBAAiB,EAClC;GACA,SAAS,EACP,MAAM,EAAE,OAAO,YAAY,EAC7B;EACF;CACF;CACA,iBAAiB;EACf,MAAM;EACN,QAAQ;CACV;AACF,CAAC"}
1
+ {"version":3,"file":"InlineLoading.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/InlineLoading.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst inlineLoadingRecipe = defineSlotRecipe({\n className: 'inline-loading',\n slots: ['root', 'label'],\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '8',\n },\n label: {},\n },\n variants: {\n size: {\n sm: {\n label: { textStyle: 'body/sm/regular' },\n },\n md: {\n label: { textStyle: 'body/md/regular' },\n },\n lg: {\n label: { textStyle: 'body/lg/regular' },\n },\n },\n status: {\n error: {},\n loading: {\n root: { color: 'text/secondary' },\n },\n success: {},\n },\n },\n defaultVariants: {\n size: 'md',\n status: 'loading',\n },\n});\n\nexport default inlineLoadingRecipe;\n"],"mappings":";;AAEA,IAAM,sBAAsB,iBAAiB;CAC3C,WAAW;CACX,OAAO,CAAC,QAAQ,OAAO;CACvB,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,OAAO,CAAC;CACV;CACA,UAAU;EACR,MAAM;GACJ,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;GACA,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;GACA,IAAI,EACF,OAAO,EAAE,WAAW,kBAAkB,EACxC;EACF;EACA,QAAQ;GACN,OAAO,CAAC;GACR,SAAS,EACP,MAAM,EAAE,OAAO,iBAAiB,EAClC;GACA,SAAS,CAAC;EACZ;CACF;CACA,iBAAiB;EACf,MAAM;EACN,QAAQ;CACV;AACF,CAAC"}
@@ -26,8 +26,7 @@ var labeledDataSlotRecipe = defineSlotRecipe({
26
26
  alignItems: "baseline",
27
27
  gap: "2",
28
28
  fontFeatureSettings: "pnum",
29
- fontVariantNumeric: "proportional-nums",
30
- color: "text/body"
29
+ fontVariantNumeric: "proportional-nums"
31
30
  },
32
31
  limit: {
33
32
  color: "text/secondary",
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledData.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/LabeledData.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst labeledDataSlotRecipe = defineSlotRecipe({\n className: 'labeled-data',\n slots: ['root', 'label', 'value', 'limit', 'helpText'],\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n },\n label: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n textStyle: 'body/md/semibold',\n },\n value: {\n display: 'inline-flex',\n alignItems: 'baseline',\n gap: '2',\n fontFeatureSettings: 'pnum',\n fontVariantNumeric: 'proportional-nums',\n color: 'text/body',\n },\n limit: {\n color: 'text/secondary',\n fontWeight: 'initial',\n letterSpacing: 'initial',\n },\n helpText: {\n textStyle: 'body/md/regular',\n color: 'text/tertiary',\n },\n },\n variants: {\n size: {\n lg: {\n label: { color: 'text/primary' },\n value: { textStyle: 'comp/data/sm' },\n limit: { textStyle: 'body/md/regular' },\n },\n '2xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/md' },\n limit: { textStyle: 'body/xl/regular' },\n },\n '3xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/lg' },\n limit: { textStyle: 'body/2xl/regular' },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default labeledDataSlotRecipe;\n"],"mappings":";;AAEA,IAAM,wBAAwB,iBAAiB;CAC7C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAS;EAAS;EAAS;CAAU;CACrD,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,WAAW;EACb;EACA,OAAO;GACL,SAAS;GACT,YAAY;GACZ,KAAK;GACL,qBAAqB;GACrB,oBAAoB;GACpB,OAAO;EACT;EACA,OAAO;GACL,OAAO;GACP,YAAY;GACZ,eAAe;EACjB;EACA,UAAU;GACR,WAAW;GACX,OAAO;EACT;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,OAAO,EAAE,OAAO,eAAe;GAC/B,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,kBAAkB;EACxC;EACA,OAAO;GACL,OAAO,EAAE,OAAO,iBAAiB;GACjC,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,kBAAkB;EACxC;EACA,OAAO;GACL,OAAO,EAAE,OAAO,iBAAiB;GACjC,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,mBAAmB;EACzC;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"LabeledData.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/LabeledData.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst labeledDataSlotRecipe = defineSlotRecipe({\n className: 'labeled-data',\n slots: ['root', 'label', 'value', 'limit', 'helpText'],\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n },\n label: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n textStyle: 'body/md/semibold',\n },\n value: {\n display: 'inline-flex',\n alignItems: 'baseline',\n gap: '2',\n fontFeatureSettings: 'pnum',\n fontVariantNumeric: 'proportional-nums',\n },\n limit: {\n color: 'text/secondary',\n fontWeight: 'initial',\n letterSpacing: 'initial',\n },\n helpText: {\n textStyle: 'body/md/regular',\n color: 'text/tertiary',\n },\n },\n variants: {\n size: {\n lg: {\n label: { color: 'text/primary' },\n value: { textStyle: 'comp/data/sm' },\n limit: { textStyle: 'body/md/regular' },\n },\n '2xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/md' },\n limit: { textStyle: 'body/xl/regular' },\n },\n '3xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/lg' },\n limit: { textStyle: 'body/2xl/regular' },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default labeledDataSlotRecipe;\n"],"mappings":";;AAEA,IAAM,wBAAwB,iBAAiB;CAC7C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAS;EAAS;EAAS;CAAU;CACrD,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,WAAW;EACb;EACA,OAAO;GACL,SAAS;GACT,YAAY;GACZ,KAAK;GACL,qBAAqB;GACrB,oBAAoB;EACtB;EACA,OAAO;GACL,OAAO;GACP,YAAY;GACZ,eAAe;EACjB;EACA,UAAU;GACR,WAAW;GACX,OAAO;EACT;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,OAAO,EAAE,OAAO,eAAe;GAC/B,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,kBAAkB;EACxC;EACA,OAAO;GACL,OAAO,EAAE,OAAO,iBAAiB;GACjC,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,kBAAkB;EACxC;EACA,OAAO;GACL,OAAO,EAAE,OAAO,iBAAiB;GACjC,OAAO,EAAE,WAAW,eAAe;GACnC,OAAO,EAAE,WAAW,mBAAmB;EACzC;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
@@ -12,7 +12,6 @@ var listSlotRecipe = defineSlotRecipe({
12
12
  },
13
13
  item: {
14
14
  alignItems: "flex-start",
15
- color: "text/body",
16
15
  display: "inline-flex",
17
16
  whiteSpace: "normal"
18
17
  },
@@ -1 +1 @@
1
- {"version":3,"file":"List.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/List.recipe.ts"],"sourcesContent":["import { listAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst listSlotRecipe = defineSlotRecipe({\n className: 'list',\n slots: listAnatomy.keys(),\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '8',\n },\n item: {\n alignItems: 'flex-start',\n color: 'text/body',\n display: 'inline-flex',\n whiteSpace: 'normal',\n },\n indicator: {\n alignItems: 'center',\n color: 'text/secondary',\n display: 'inline-flex',\n flexShrink: 0,\n justifyContent: 'center',\n },\n },\n variants: {\n size: {\n lg: {\n item: {\n textStyle: 'body/lg/regular',\n },\n indicator: {\n height: '24',\n width: '24',\n },\n },\n md: {\n item: {\n textStyle: 'body/md/regular',\n },\n indicator: {\n height: '20',\n width: '20',\n },\n },\n sm: {\n item: {\n textStyle: 'body/sm/regular',\n },\n indicator: {\n height: '16',\n width: '16',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default listSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,iBAAiB,iBAAiB;CACtC,WAAW;CACX,OAAO,YAAY,KAAK;CACxB,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,MAAM;GACJ,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;EACd;EACA,WAAW;GACT,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;EAClB;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;EACA,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;EACA,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"List.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/List.recipe.ts"],"sourcesContent":["import { listAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst listSlotRecipe = defineSlotRecipe({\n className: 'list',\n slots: listAnatomy.keys(),\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '8',\n },\n item: {\n alignItems: 'flex-start',\n display: 'inline-flex',\n whiteSpace: 'normal',\n },\n indicator: {\n alignItems: 'center',\n color: 'text/secondary',\n display: 'inline-flex',\n flexShrink: 0,\n justifyContent: 'center',\n },\n },\n variants: {\n size: {\n lg: {\n item: {\n textStyle: 'body/lg/regular',\n },\n indicator: {\n height: '24',\n width: '24',\n },\n },\n md: {\n item: {\n textStyle: 'body/md/regular',\n },\n indicator: {\n height: '20',\n width: '20',\n },\n },\n sm: {\n item: {\n textStyle: 'body/sm/regular',\n },\n indicator: {\n height: '16',\n width: '16',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport default listSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,iBAAiB,iBAAiB;CACtC,WAAW;CACX,OAAO,YAAY,KAAK;CACxB,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,YAAY;EACd;EACA,WAAW;GACT,YAAY;GACZ,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;EAClB;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;EACA,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;EACA,IAAI;GACF,MAAM,EACJ,WAAW,kBACb;GACA,WAAW;IACT,QAAQ;IACR,OAAO;GACT;EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
@@ -3,16 +3,13 @@ import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
3
3
  var markdownSlotRecipe = defineSlotRecipe({
4
4
  className: "markdown",
5
5
  slots: ["root", "blockquote"],
6
- base: {
7
- root: { color: "text/body" },
8
- blockquote: {
9
- borderInlineStart: "2px solid",
10
- borderColor: "border/regular",
11
- paddingInlineStart: "16",
12
- paddingBlock: "8",
13
- color: "text/secondary"
14
- }
15
- },
6
+ base: { blockquote: {
7
+ borderInlineStart: "2px solid",
8
+ borderColor: "border/regular",
9
+ paddingInlineStart: "16",
10
+ paddingBlock: "8",
11
+ color: "text/secondary"
12
+ } },
16
13
  variants: { size: {
17
14
  sm: { root: { textStyle: "body/sm/regular" } },
18
15
  md: { root: { textStyle: "body/md/regular" } },
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Markdown.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst markdownSlotRecipe = defineSlotRecipe({\n className: 'markdown',\n slots: ['root', 'blockquote'],\n base: {\n root: {\n color: 'text/body',\n },\n blockquote: {\n borderInlineStart: '2px solid',\n borderColor: 'border/regular',\n paddingInlineStart: '16',\n paddingBlock: '8',\n color: 'text/secondary',\n },\n },\n variants: {\n size: {\n sm: {\n root: {\n textStyle: 'body/sm/regular',\n },\n },\n md: {\n root: {\n textStyle: 'body/md/regular',\n },\n },\n lg: {\n root: {\n textStyle: 'body/lg/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nexport default markdownSlotRecipe;\n"],"mappings":";;AAEA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,CAAC,QAAQ,YAAY;CAC5B,MAAM;EACJ,MAAM,EACJ,OAAO,YACT;EACA,YAAY;GACV,mBAAmB;GACnB,aAAa;GACb,oBAAoB;GACpB,cAAc;GACd,OAAO;EACT;CACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;EACA,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;EACA,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
1
+ {"version":3,"file":"Markdown.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Markdown.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst markdownSlotRecipe = defineSlotRecipe({\n className: 'markdown',\n slots: ['root', 'blockquote'],\n base: {\n blockquote: {\n borderInlineStart: '2px solid',\n borderColor: 'border/regular',\n paddingInlineStart: '16',\n paddingBlock: '8',\n color: 'text/secondary',\n },\n },\n variants: {\n size: {\n sm: {\n root: {\n textStyle: 'body/sm/regular',\n },\n },\n md: {\n root: {\n textStyle: 'body/md/regular',\n },\n },\n lg: {\n root: {\n textStyle: 'body/lg/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nexport default markdownSlotRecipe;\n"],"mappings":";;AAEA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,CAAC,QAAQ,YAAY;CAC5B,MAAM,EACJ,YAAY;EACV,mBAAmB;EACnB,aAAa;EACb,oBAAoB;EACpB,cAAc;EACd,OAAO;CACT,EACF;CACA,UAAU,EACR,MAAM;EACJ,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;EACA,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;EACA,IAAI,EACF,MAAM,EACJ,WAAW,kBACb,EACF;CACF,EACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
@@ -14,7 +14,6 @@ var overflowContentSlotRecipe = defineSlotRecipe({
14
14
  gap: "4"
15
15
  },
16
16
  preview: {
17
- color: "text/body",
18
17
  flex: "1",
19
18
  minWidth: 0,
20
19
  overflow: "hidden",
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowContent.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/OverflowContent.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst overflowContentSlotRecipe = defineSlotRecipe({\n className: 'overflowContent',\n slots: ['root', 'preview', 'action'] as const,\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '4',\n },\n preview: {\n color: 'text/body',\n flex: '1',\n minWidth: 0,\n overflow: 'hidden',\n position: 'relative',\n textOverflow: 'ellipsis',\n textStyle: 'body/md/regular',\n whiteSpace: 'nowrap',\n _after: {\n background: 'linear-gradient(to left, {colors.neutral.100} 0%, transparent 100%)',\n content: '\"\"',\n height: '100%',\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n width: '32',\n },\n },\n action: {\n flexShrink: '0',\n },\n },\n});\n\nexport default overflowContentSlotRecipe;\n"],"mappings":";;AAEA,IAAM,4BAA4B,iBAAiB;CACjD,WAAW;CACX,OAAO;EAAC;EAAQ;EAAW;CAAQ;CACnC,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,SAAS;GACP,OAAO;GACP,MAAM;GACN,UAAU;GACV,UAAU;GACV,UAAU;GACV,cAAc;GACd,WAAW;GACX,YAAY;GACZ,QAAQ;IACN,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,eAAe;IACf,UAAU;IACV,OAAO;IACP,KAAK;IACL,OAAO;GACT;EACF;EACA,QAAQ,EACN,YAAY,IACd;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"OverflowContent.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/OverflowContent.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst overflowContentSlotRecipe = defineSlotRecipe({\n className: 'overflowContent',\n slots: ['root', 'preview', 'action'] as const,\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '4',\n },\n preview: {\n flex: '1',\n minWidth: 0,\n overflow: 'hidden',\n position: 'relative',\n textOverflow: 'ellipsis',\n textStyle: 'body/md/regular',\n whiteSpace: 'nowrap',\n _after: {\n background: 'linear-gradient(to left, {colors.neutral.100} 0%, transparent 100%)',\n content: '\"\"',\n height: '100%',\n pointerEvents: 'none',\n position: 'absolute',\n right: 0,\n top: 0,\n width: '32',\n },\n },\n action: {\n flexShrink: '0',\n },\n },\n});\n\nexport default overflowContentSlotRecipe;\n"],"mappings":";;AAEA,IAAM,4BAA4B,iBAAiB;CACjD,WAAW;CACX,OAAO;EAAC;EAAQ;EAAW;CAAQ;CACnC,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,SAAS;GACP,MAAM;GACN,UAAU;GACV,UAAU;GACV,UAAU;GACV,cAAc;GACd,WAAW;GACX,YAAY;GACZ,QAAQ;IACN,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,eAAe;IACf,UAAU;IACV,OAAO;IACP,KAAK;IACL,OAAO;GACT;EACF;EACA,QAAQ,EACN,YAAY,IACd;CACF;AACF,CAAC"}
@@ -25,8 +25,7 @@ var statSlotRecipe = defineSlotRecipe({
25
25
  gap: "4",
26
26
  alignItems: "center",
27
27
  fontFeatureSettings: "pnum",
28
- fontVariantNumeric: "proportional-nums",
29
- color: "text/body"
28
+ fontVariantNumeric: "proportional-nums"
30
29
  },
31
30
  helpText: {
32
31
  display: "inline-flex",
@@ -1 +1 @@
1
- {"version":3,"file":"Stat.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Stat.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst statSlotRecipe = defineSlotRecipe({\n className: 'stat',\n slots: ['root', 'label', 'value', 'helpText'],\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n },\n label: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n textStyle: 'body/md/semibold',\n },\n value: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n fontFeatureSettings: 'pnum',\n fontVariantNumeric: 'proportional-nums',\n color: 'text/body',\n },\n helpText: {\n display: 'inline-flex',\n flexWrap: 'wrap',\n gap: '4',\n textStyle: 'body/md/regular',\n },\n },\n variants: {\n size: {\n lg: {\n label: { color: 'text/primary' },\n value: { textStyle: 'comp/data/sm' },\n },\n '2xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/md' },\n },\n '3xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/lg' },\n },\n },\n variant: {\n default: {},\n compact: {\n root: {\n display: 'inline-flex',\n alignItems: 'flex-end',\n },\n value: {\n textStyle: 'body/md/regular',\n },\n helpText: {\n textStyle: 'body/sm/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default statSlotRecipe;\n"],"mappings":";;AAEA,IAAM,iBAAiB,iBAAiB;CACtC,WAAW;CACX,OAAO;EAAC;EAAQ;EAAS;EAAS;CAAU;CAC5C,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,WAAW;EACb;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,qBAAqB;GACrB,oBAAoB;GACpB,OAAO;EACT;EACA,UAAU;GACR,SAAS;GACT,UAAU;GACV,KAAK;GACL,WAAW;EACb;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF,OAAO,EAAE,OAAO,eAAe;IAC/B,OAAO,EAAE,WAAW,eAAe;GACrC;GACA,OAAO;IACL,OAAO,EAAE,OAAO,iBAAiB;IACjC,OAAO,EAAE,WAAW,eAAe;GACrC;GACA,OAAO;IACL,OAAO,EAAE,OAAO,iBAAiB;IACjC,OAAO,EAAE,WAAW,eAAe;GACrC;EACF;EACA,SAAS;GACP,SAAS,CAAC;GACV,SAAS;IACP,MAAM;KACJ,SAAS;KACT,YAAY;IACd;IACA,OAAO,EACL,WAAW,kBACb;IACA,UAAU,EACR,WAAW,kBACb;GACF;EACF;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
1
+ {"version":3,"file":"Stat.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Stat.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst statSlotRecipe = defineSlotRecipe({\n className: 'stat',\n slots: ['root', 'label', 'value', 'helpText'],\n base: {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n },\n label: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n textStyle: 'body/md/semibold',\n },\n value: {\n display: 'inline-flex',\n gap: '4',\n alignItems: 'center',\n fontFeatureSettings: 'pnum',\n fontVariantNumeric: 'proportional-nums',\n },\n helpText: {\n display: 'inline-flex',\n flexWrap: 'wrap',\n gap: '4',\n textStyle: 'body/md/regular',\n },\n },\n variants: {\n size: {\n lg: {\n label: { color: 'text/primary' },\n value: { textStyle: 'comp/data/sm' },\n },\n '2xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/md' },\n },\n '3xl': {\n label: { color: 'text/secondary' },\n value: { textStyle: 'comp/data/lg' },\n },\n },\n variant: {\n default: {},\n compact: {\n root: {\n display: 'inline-flex',\n alignItems: 'flex-end',\n },\n value: {\n textStyle: 'body/md/regular',\n },\n helpText: {\n textStyle: 'body/sm/regular',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default statSlotRecipe;\n"],"mappings":";;AAEA,IAAM,iBAAiB,iBAAiB;CACtC,WAAW;CACX,OAAO;EAAC;EAAQ;EAAS;EAAS;CAAU;CAC5C,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,WAAW;EACb;EACA,OAAO;GACL,SAAS;GACT,KAAK;GACL,YAAY;GACZ,qBAAqB;GACrB,oBAAoB;EACtB;EACA,UAAU;GACR,SAAS;GACT,UAAU;GACV,KAAK;GACL,WAAW;EACb;CACF;CACA,UAAU;EACR,MAAM;GACJ,IAAI;IACF,OAAO,EAAE,OAAO,eAAe;IAC/B,OAAO,EAAE,WAAW,eAAe;GACrC;GACA,OAAO;IACL,OAAO,EAAE,OAAO,iBAAiB;IACjC,OAAO,EAAE,WAAW,eAAe;GACrC;GACA,OAAO;IACL,OAAO,EAAE,OAAO,iBAAiB;IACjC,OAAO,EAAE,WAAW,eAAe;GACrC;EACF;EACA,SAAS;GACP,SAAS,CAAC;GACV,SAAS;IACP,MAAM;KACJ,SAAS;KACT,YAAY;IACd;IACA,OAAO,EACL,WAAW,kBACb;IACA,UAAU,EACR,WAAW,kBACb;GACF;EACF;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
@@ -37,10 +37,7 @@ var tableSlotRecipe = defineSlotRecipe({
37
37
  textAlign: "start",
38
38
  "& > * + *": { marginBlockStart: "4" }
39
39
  },
40
- cell: {
41
- color: "text/body",
42
- textStyle: "body/md/regular"
43
- },
40
+ cell: { textStyle: "body/md/regular" },
44
41
  actionsCell: {
45
42
  textAlign: "end",
46
43
  whiteSpace: "nowrap",
@@ -1 +1 @@
1
- {"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\n// A tinted row means \"selected\", and only a Checkbox or a Radio marks it — plus `data-selected` on\n// the row itself, the explicit opt-in for a table that tints on its own terms (a switched-on row,\n// say). Everything else is left alone, which is the narrowing over a bare `input:checked`: a switch\n// renders a hidden input[type=\"checkbox\"] too, so a toggle in a data cell read as a selected row.\n//\n// `[data-part=\"item\"]` is the load-bearing half of the radio branch. Ark's SegmentGroup is Zag's\n// radio-group anatomy renamed, so a segment sits under its own scope — but scope alone would still\n// match `RadioGroup.Root`, which wraps the whole table in the `Selectable` pattern, and with it every\n// checked radio inside. Requiring `item` on the same element pins the match to a single radio.\n//\n// Known gap: BitkitSelectableTag is a `Checkbox.Root` underneath, so one in a data cell tints its\n// row. It has no consumers today; when it gets one, put `data-selectable-tag` on its `Checkbox.Root`\n// and `:not([data-selectable-tag])` on the checkbox branch here.\nconst selectedRow =\n '&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]';\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n color: 'text/body',\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n [selectedRow]: {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAeA,IAAM,cACJ;AAEF,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO;EACL,GAAG,aAAa,KAAK;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAAkB,IACpB;EACF;EACA,MAAM;GACJ,OAAO;GACP,WAAW;EACb;EACA,aAAa;GACX,WAAW;GACX,YAAY;GAIZ,OAAO;EACT;EACA,cAAc;GACZ,YAAY;GACZ,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,kBAAkB;GAChB,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,oBAAoB;GAClB,YAAY;GACZ,SAAS;GACT,KAAK;GACL,mBAAmB;EACrB;EAIA,mBAAmB;GACjB,OAAO;GACP,QAAQ;GACR,MAAM;GACN,eAAe;GACf,UAAU;GACV,gBAAgB;GAChB,qBAAqB;GACrB,qBAAqB;GACrB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;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
1
+ {"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\n// A tinted row means \"selected\", and only a Checkbox or a Radio marks it — plus `data-selected` on\n// the row itself, the explicit opt-in for a table that tints on its own terms (a switched-on row,\n// say). Everything else is left alone, which is the narrowing over a bare `input:checked`: a switch\n// renders a hidden input[type=\"checkbox\"] too, so a toggle in a data cell read as a selected row.\n//\n// `[data-part=\"item\"]` is the load-bearing half of the radio branch. Ark's SegmentGroup is Zag's\n// radio-group anatomy renamed, so a segment sits under its own scope — but scope alone would still\n// match `RadioGroup.Root`, which wraps the whole table in the `Selectable` pattern, and with it every\n// checked radio inside. Requiring `item` on the same element pins the match to a single radio.\n//\n// Known gap: BitkitSelectableTag is a `Checkbox.Root` underneath, so one in a data cell tints its\n// row. It has no consumers today; when it gets one, put `data-selectable-tag` on its `Checkbox.Root`\n// and `:not([data-selectable-tag])` on the checkbox branch here.\nconst selectedRow =\n '&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]';\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n [selectedRow]: {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAeA,IAAM,cACJ;AAEF,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO;EACL,GAAG,aAAa,KAAK;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAA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BAAgB;KAChB,gBAAgB;KAChB,SAAS;IACX;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;GACA,QAAQ;GACR,SAAS;EACX;EAIA;GACE,KAAK;IACH,MAAM,EACJ,eAAe,KACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
@@ -58,7 +58,6 @@ var treeViewSlotRecipe = defineSlotRecipe({
58
58
  display: "flex",
59
59
  flexDirection: "column",
60
60
  textStyle: "body/md/regular",
61
- color: "text/body",
62
61
  "--tree-item-gap": "spacing.8",
63
62
  "--tree-indentation": "spacing.16",
64
63
  "--tree-padding-inline-start": "spacing.8",
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/TreeView.recipe.ts"],"sourcesContent":["import { treeViewAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst baseItemStyle = {\n display: 'flex',\n alignItems: 'flex-start',\n gap: 'var(--tree-item-gap)',\n cursor: 'pointer',\n userSelect: 'none',\n position: 'relative',\n '--tree-depth': 'calc(var(--depth) - 1)',\n '--tree-indentation-offset': 'calc(var(--tree-indentation) * var(--tree-depth))',\n '--tree-icon-offset': 'calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)',\n '--tree-offset': 'calc(var(--tree-padding-inline-start) + var(--tree-indentation-offset) + var(--tree-icon-offset))',\n paddingInlineStart: 'var(--tree-offset)',\n focusVisibleRing: 'inside',\n focusRingWidth: '2px',\n _hover: {\n background: 'background/secondary',\n _active: {\n background: 'background/tertiary',\n },\n },\n _active: {\n background: 'background/tertiary',\n },\n _selected: {\n background: 'background/selected',\n _hover: {\n background: 'background/selected-hover',\n _active: {\n background: 'background/selected-hover',\n },\n },\n _active: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n opacity: 0.4,\n cursor: 'not-allowed',\n },\n} as const;\n\nconst baseTextStyle = {\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n} as const;\n\nconst treeViewSlotRecipe = defineSlotRecipe({\n className: 'bitkit-tree-view',\n slots: [...treeViewAnatomy.keys(), 'actionGroup', 'suffixGroup', 'secondaryText'],\n base: {\n root: {\n width: 'full',\n display: 'flex',\n flexDirection: 'column',\n },\n tree: {\n display: 'flex',\n flexDirection: 'column',\n textStyle: 'body/md/regular',\n color: 'text/body',\n '--tree-item-gap': 'spacing.8',\n '--tree-indentation': 'spacing.16',\n '--tree-padding-inline-start': 'spacing.8',\n '--tree-icon-size': 'spacing.16',\n _icon: {\n boxSize: 'var(--tree-icon-size)',\n },\n },\n label: {\n fontWeight: 'medium',\n textStyle: 'body/sm/regular',\n },\n branch: {\n position: 'relative',\n },\n branchContent: {\n position: 'relative',\n overflow: 'hidden',\n _open: {\n animationName: 'expand-height, fade-in',\n animationDuration: 'moderate',\n },\n _closed: {\n animationName: 'collapse-height, fade-out',\n animationDuration: 'moderate',\n },\n },\n branchIndicator: {\n display: 'flex',\n justifyContent: 'center',\n color: 'icon/secondary',\n },\n branchTrigger: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n branchControl: {\n ...baseItemStyle,\n },\n item: {\n ...baseItemStyle,\n },\n branchText: baseTextStyle,\n itemText: baseTextStyle,\n branchIndentGuide: {},\n itemIndicator: {},\n nodeCheckbox: {\n display: 'inline-flex',\n },\n suffixGroup: {\n display: 'flex',\n gap: '8',\n alignItems: 'center',\n justifyContent: 'flex-end',\n color: 'text/secondary',\n '[data-selected] > &, [data-state=\"open\"] > &': {\n color: 'text/primary',\n },\n paddingInlineStart: '16',\n flexShrink: 0,\n _groupHover: {\n display: 'none',\n },\n },\n actionGroup: {\n display: 'none',\n alignItems: 'center',\n justifyContent: 'flex-end',\n paddingInlineStart: '16',\n flexShrink: 0,\n _groupHover: {\n display: 'flex',\n },\n },\n secondaryText: {\n textStyle: 'body/sm/regular',\n color: 'text/secondary',\n },\n },\n variants: {\n variant: {\n files: {\n branchControl: {\n borderRadius: '4',\n paddingInlineEnd: '16',\n '& > svg': {\n marginBlockStart: '8',\n },\n '& > .badge': {\n marginBlockStart: '6',\n },\n },\n item: {\n borderRadius: '4',\n paddingInlineEnd: '16',\n '& > svg': {\n marginBlockStart: '8',\n },\n '& > .badge': {\n marginBlockStart: '6',\n },\n },\n branchIndicator: {\n alignItems: 'flex-start',\n marginBlockStart: '8',\n alignSelf: 'stretch',\n position: 'relative',\n _open: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: '16',\n insetBlockEnd: 0,\n insetInlineStart: '50%',\n width: '1',\n background: 'border/regular',\n },\n },\n },\n branchText: {\n paddingBlock: '6',\n },\n itemText: {\n paddingBlock: '6',\n },\n suffixGroup: {\n height: rem(31),\n '& > span': {\n marginBlockEnd: '-1',\n },\n },\n branchIndentGuide: {\n height: '100%',\n width: '1',\n background: 'border/regular',\n position: 'absolute',\n insetBlockStart: 0,\n '--tree-depth': 'calc(var(--depth) - 1)',\n '--tree-indentation-offset': 'calc(var(--tree-indentation) * var(--tree-depth))',\n '--tree-offset': 'calc(var(--tree-padding-inline-start) + var(--tree-indentation-offset))',\n '--tree-icon-offset': 'calc(var(--tree-icon-size) * 0.5 * var(--depth))',\n insetInlineStart: 'calc(var(--tree-offset) + var(--tree-icon-offset))',\n zIndex: 1,\n },\n },\n navigation: {\n branchControl: {\n borderRadius: 0,\n paddingInlineEnd: '16',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 'var(--tree-offset)',\n insetInlineEnd: 0,\n height: '1',\n background: 'border/minimal',\n },\n _selected: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlock: 0,\n insetInlineEnd: 0,\n width: '4',\n background: 'border/selected',\n borderRadius: '0 2px 2px 0',\n },\n },\n },\n item: {\n borderRadius: 0,\n paddingInlineEnd: '16',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 'var(--tree-offset)',\n insetInlineEnd: 0,\n height: '1',\n background: 'border/minimal',\n },\n // Direct-child selector (not Chakra's _icon) — the item also hosts nested SVGs in\n // suffix/action/expand slots, and _icon's `:where(svg, [role=img])` would recolor\n // and push those down too.\n '& > svg': {\n color: 'icon/secondary',\n marginBlockStart: rem(9),\n },\n _selected: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlock: 0,\n insetInlineEnd: 0,\n width: '4',\n background: 'border/selected',\n borderRadius: '0 2px 2px 0',\n },\n },\n },\n branchIndicator: {\n marginBlockStart: '8',\n transformOrigin: 'center',\n transitionDuration: 'normal',\n transitionProperty: 'transform',\n transitionTimingFunction: 'default',\n _open: {\n transform: 'rotate(90deg)',\n },\n },\n branchText: {\n paddingBlock: '8',\n gap: '4',\n _open: {\n textStyle: 'body/md/semibold',\n color: 'text/primary',\n },\n },\n itemText: {\n paddingBlock: '8',\n },\n suffixGroup: {\n height: rem(35),\n '& > span': {\n marginBlockEnd: '-1',\n },\n },\n branchIndentGuide: {\n display: 'none',\n },\n },\n },\n },\n defaultVariants: {\n variant: 'files',\n },\n});\n\nexport default treeViewSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,gBAAgB;CACpB,SAAS;CACT,YAAY;CACZ,KAAK;CACL,QAAQ;CACR,YAAY;CACZ,UA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AM;IACJ,cAAc;IACd,kBAAkB;IAClB,aAAa;KACX,SAAS;KACT,UAAU;KACV,iBAAiB;KACjB,kBAAkB;KAClB,gBAAgB;KAChB,QAAQ;KACR,YAAY;IACd;IAIA,WAAW;KACT,OAAO;KACP,kBAAkB,IAAI,CAAC;IACzB;IACA,WAAW,EACT,YAAY;KACV,SAAS;KACT,UAAU;KACV,YAAY;KACZ,gBAAgB;KAChB,OAAO;KACP,YAAY;KACZ,cAAc;IAChB,EACF;GACF;GACA,iBAAiB;IACf,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,0BAA0B;IAC1B,OAAO,EACL,WAAW,gBACb;GACF;GACA,YAAY;IACV,cAAc;IACd,KAAK;IACL,OAAO;KACL,WAAW;KACX,OAAO;IACT;GACF;GACA,UAAU,EACR,cAAc,IAChB;GACA,aAAa;IACX,QAAQ,IAAI,EAAE;IACd,YAAY,EACV,gBAAgB,KAClB;GACF;GACA,mBAAmB,EACjB,SAAS,OACX;EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,QACX;AACF,CAAC"}
1
+ {"version":3,"file":"TreeView.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/TreeView.recipe.ts"],"sourcesContent":["import { treeViewAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst baseItemStyle = {\n display: 'flex',\n alignItems: 'flex-start',\n gap: 'var(--tree-item-gap)',\n cursor: 'pointer',\n userSelect: 'none',\n position: 'relative',\n '--tree-depth': 'calc(var(--depth) - 1)',\n '--tree-indentation-offset': 'calc(var(--tree-indentation) * var(--tree-depth))',\n '--tree-icon-offset': 'calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)',\n '--tree-offset': 'calc(var(--tree-padding-inline-start) + var(--tree-indentation-offset) + var(--tree-icon-offset))',\n paddingInlineStart: 'var(--tree-offset)',\n focusVisibleRing: 'inside',\n focusRingWidth: '2px',\n _hover: {\n background: 'background/secondary',\n _active: {\n background: 'background/tertiary',\n },\n },\n _active: {\n background: 'background/tertiary',\n },\n _selected: {\n background: 'background/selected',\n _hover: {\n background: 'background/selected-hover',\n _active: {\n background: 'background/selected-hover',\n },\n },\n _active: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n opacity: 0.4,\n cursor: 'not-allowed',\n },\n} as const;\n\nconst baseTextStyle = {\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n} as const;\n\nconst treeViewSlotRecipe = defineSlotRecipe({\n className: 'bitkit-tree-view',\n slots: [...treeViewAnatomy.keys(), 'actionGroup', 'suffixGroup', 'secondaryText'],\n base: {\n root: {\n width: 'full',\n display: 'flex',\n flexDirection: 'column',\n },\n tree: {\n display: 'flex',\n flexDirection: 'column',\n textStyle: 'body/md/regular',\n '--tree-item-gap': 'spacing.8',\n '--tree-indentation': 'spacing.16',\n '--tree-padding-inline-start': 'spacing.8',\n '--tree-icon-size': 'spacing.16',\n _icon: {\n boxSize: 'var(--tree-icon-size)',\n },\n },\n label: {\n fontWeight: 'medium',\n textStyle: 'body/sm/regular',\n },\n branch: {\n position: 'relative',\n },\n branchContent: {\n position: 'relative',\n overflow: 'hidden',\n _open: {\n animationName: 'expand-height, fade-in',\n animationDuration: 'moderate',\n },\n _closed: {\n animationName: 'collapse-height, fade-out',\n animationDuration: 'moderate',\n },\n },\n branchIndicator: {\n display: 'flex',\n justifyContent: 'center',\n color: 'icon/secondary',\n },\n branchTrigger: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n branchControl: {\n ...baseItemStyle,\n },\n item: {\n ...baseItemStyle,\n },\n branchText: baseTextStyle,\n itemText: baseTextStyle,\n branchIndentGuide: {},\n itemIndicator: {},\n nodeCheckbox: {\n display: 'inline-flex',\n },\n suffixGroup: {\n display: 'flex',\n gap: '8',\n alignItems: 'center',\n justifyContent: 'flex-end',\n color: 'text/secondary',\n '[data-selected] > &, [data-state=\"open\"] > &': {\n color: 'text/primary',\n },\n paddingInlineStart: '16',\n flexShrink: 0,\n _groupHover: {\n display: 'none',\n },\n },\n actionGroup: {\n display: 'none',\n alignItems: 'center',\n justifyContent: 'flex-end',\n paddingInlineStart: '16',\n flexShrink: 0,\n _groupHover: {\n display: 'flex',\n },\n },\n secondaryText: {\n textStyle: 'body/sm/regular',\n color: 'text/secondary',\n },\n },\n variants: {\n variant: {\n files: {\n branchControl: {\n borderRadius: '4',\n paddingInlineEnd: '16',\n '& > svg': {\n marginBlockStart: '8',\n },\n '& > .badge': {\n marginBlockStart: '6',\n },\n },\n item: {\n borderRadius: '4',\n paddingInlineEnd: '16',\n '& > svg': {\n marginBlockStart: '8',\n },\n '& > .badge': {\n marginBlockStart: '6',\n },\n },\n branchIndicator: {\n alignItems: 'flex-start',\n marginBlockStart: '8',\n alignSelf: 'stretch',\n position: 'relative',\n _open: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: '16',\n insetBlockEnd: 0,\n insetInlineStart: '50%',\n width: '1',\n background: 'border/regular',\n },\n },\n },\n branchText: {\n paddingBlock: '6',\n },\n itemText: {\n paddingBlock: '6',\n },\n suffixGroup: {\n height: rem(31),\n '& > span': {\n marginBlockEnd: '-1',\n },\n },\n branchIndentGuide: {\n height: '100%',\n width: '1',\n background: 'border/regular',\n position: 'absolute',\n insetBlockStart: 0,\n '--tree-depth': 'calc(var(--depth) - 1)',\n '--tree-indentation-offset': 'calc(var(--tree-indentation) * var(--tree-depth))',\n '--tree-offset': 'calc(var(--tree-padding-inline-start) + var(--tree-indentation-offset))',\n '--tree-icon-offset': 'calc(var(--tree-icon-size) * 0.5 * var(--depth))',\n insetInlineStart: 'calc(var(--tree-offset) + var(--tree-icon-offset))',\n zIndex: 1,\n },\n },\n navigation: {\n branchControl: {\n borderRadius: 0,\n paddingInlineEnd: '16',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 'var(--tree-offset)',\n insetInlineEnd: 0,\n height: '1',\n background: 'border/minimal',\n },\n _selected: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlock: 0,\n insetInlineEnd: 0,\n width: '4',\n background: 'border/selected',\n borderRadius: '0 2px 2px 0',\n },\n },\n },\n item: {\n borderRadius: 0,\n paddingInlineEnd: '16',\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 'var(--tree-offset)',\n insetInlineEnd: 0,\n height: '1',\n background: 'border/minimal',\n },\n // Direct-child selector (not Chakra's _icon) — the item also hosts nested SVGs in\n // suffix/action/expand slots, and _icon's `:where(svg, [role=img])` would recolor\n // and push those down too.\n '& > svg': {\n color: 'icon/secondary',\n marginBlockStart: rem(9),\n },\n _selected: {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetBlock: 0,\n insetInlineEnd: 0,\n width: '4',\n background: 'border/selected',\n borderRadius: '0 2px 2px 0',\n },\n },\n },\n branchIndicator: {\n marginBlockStart: '8',\n transformOrigin: 'center',\n transitionDuration: 'normal',\n transitionProperty: 'transform',\n transitionTimingFunction: 'default',\n _open: {\n transform: 'rotate(90deg)',\n },\n },\n branchText: {\n paddingBlock: '8',\n gap: '4',\n _open: {\n textStyle: 'body/md/semibold',\n color: 'text/primary',\n },\n },\n itemText: {\n paddingBlock: '8',\n },\n suffixGroup: {\n height: rem(35),\n '& > span': {\n marginBlockEnd: '-1',\n },\n },\n branchIndentGuide: {\n display: 'none',\n },\n },\n },\n },\n defaultVariants: {\n variant: 'files',\n },\n});\n\nexport default treeViewSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,gBAAgB;CACpB,SAAS;CACT,YAAY;CACZ,KAAK;CACL,QAAQ;CACR,YAAY;CACZ,UAAU;CACV,gBAAgB;CAChB,6BAA6B;CAC7B,sBAAsB;CACtB,iBAAiB;CACjB,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,QAAQ;EACN,YAAY;EACZ,SA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T,OAAO;KACP,kBAAkB,IAAI,CAAC;IACzB;IACA,WAAW,EACT,YAAY;KACV,SAAS;KACT,UAAU;KACV,YAAY;KACZ,gBAAgB;KAChB,OAAO;KACP,YAAY;KACZ,cAAc;IAChB,EACF;GACF;GACA,iBAAiB;IACf,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,0BAA0B;IAC1B,OAAO,EACL,WAAW,gBACb;GACF;GACA,YAAY;IACV,cAAc;IACd,KAAK;IACL,OAAO;KACL,WAAW;KACX,OAAO;IACT;GACF;GACA,UAAU,EACR,cAAc,IAChB;GACA,aAAa;IACX,QAAQ,IAAI,EAAE;IACd,YAAY,EACV,gBAAgB,KAClB;GACF;GACA,mBAAmB,EACjB,SAAS,OACX;EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,QACX;AACF,CAAC"}
@@ -996,21 +996,13 @@ declare const slotRecipes: {
996
996
  };
997
997
  };
998
998
  status: {
999
- error: {
1000
- root: {
1001
- color: "text/body";
1002
- };
1003
- };
999
+ error: {};
1004
1000
  loading: {
1005
1001
  root: {
1006
1002
  color: "text/secondary";
1007
1003
  };
1008
1004
  };
1009
- success: {
1010
- root: {
1011
- color: "text/body";
1012
- };
1013
- };
1005
+ success: {};
1014
1006
  };
1015
1007
  }>;
1016
1008
  list: import('@chakra-ui/react').SlotRecipeDefinition<"root" | "item" | "indicator", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.412",
4
+ "version": "0.3.414",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",