@bitrise/bitkit-v2 0.3.412-beta.2661 → 0.3.413
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BitkitCalendar/components/CalendarSelect.js +14 -14
- package/dist/components/BitkitCalendar/components/CalendarSelect.js.map +1 -1
- package/dist/components/BitkitCombobox/BitkitCombobox.d.ts +5 -5
- package/dist/components/BitkitCombobox/BitkitCombobox.js +7 -3
- package/dist/components/BitkitCombobox/BitkitCombobox.js.map +1 -1
- package/dist/components/BitkitControlButton/BitkitControlButton.js +0 -1
- package/dist/components/BitkitControlButton/BitkitControlButton.js.map +1 -1
- package/dist/components/BitkitGroupHeading/BitkitGroupHeading.d.ts +0 -2
- package/dist/components/BitkitGroupHeading/BitkitGroupHeading.js +11 -15
- package/dist/components/BitkitGroupHeading/BitkitGroupHeading.js.map +1 -1
- package/dist/components/BitkitMultiselect/BitkitMultiselect.d.ts +9 -5
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js +71 -62
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.d.ts +3 -3
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js.map +1 -1
- package/dist/components/BitkitSelect/BitkitSelect.d.ts +5 -5
- package/dist/components/BitkitSelect/BitkitSelect.js +24 -23
- package/dist/components/BitkitSelect/BitkitSelect.js.map +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +10 -3
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js +5 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js.map +1 -1
- package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +3 -3
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js +10 -2
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js.map +1 -1
- package/dist/components/BitkitSidebar/BitkitSidebar.d.ts +45 -0
- package/dist/components/BitkitSidebar/BitkitSidebar.js +147 -0
- package/dist/components/BitkitSidebar/BitkitSidebar.js.map +1 -0
- package/dist/components/BitkitTagsInput/BitkitTagsInput.js +10 -8
- package/dist/components/BitkitTagsInput/BitkitTagsInput.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/main.js +2 -3
- package/dist/theme/slot-recipes/GroupHeading.recipe.js +1 -4
- package/dist/theme/slot-recipes/GroupHeading.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Select.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Select.recipe.js +5 -0
- package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Sidebar.recipe.d.ts +22 -0
- package/dist/theme/slot-recipes/Sidebar.recipe.js +143 -0
- package/dist/theme/slot-recipes/Sidebar.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/Tour.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/index.d.ts +23 -287
- package/dist/theme/slot-recipes/index.js +2 -4
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/docs/v1-to-v2-migration-guide.md +6 -9
- package/package.json +1 -1
- package/dist/components/BitkitPageHeader/BitkitPageHeader.d.ts +0 -120
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js +0 -103
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js.map +0 -1
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.d.ts +0 -74
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js +0 -263
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js.map +0 -1
- package/dist/theme/slot-recipes/PageHeader.recipe.d.ts +0 -202
- package/dist/theme/slot-recipes/PageHeader.recipe.js +0 -354
- package/dist/theme/slot-recipes/PageHeader.recipe.js.map +0 -1
- package/dist/theme/slot-recipes/PageSidebar.recipe.d.ts +0 -85
- package/dist/theme/slot-recipes/PageSidebar.recipe.js +0 -276
- package/dist/theme/slot-recipes/PageSidebar.recipe.js.map +0 -1
- package/dist/utilities/useIsTruncated.d.ts +0 -27
- package/dist/utilities/useIsTruncated.js +0 -54
- package/dist/utilities/useIsTruncated.js.map +0 -1
|
@@ -4,8 +4,9 @@ import IconWarningYellow from "../../icons/IconWarningYellow.js";
|
|
|
4
4
|
import BitkitLabel from "../BitkitLabel/BitkitLabel.js";
|
|
5
5
|
import BitkitField from "../BitkitField/BitkitField.js";
|
|
6
6
|
import { chakra, useSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
7
|
-
import { forwardRef
|
|
7
|
+
import { forwardRef } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useControllableState } from "@chakra-ui/react/hooks";
|
|
9
10
|
import { TagsInput } from "@chakra-ui/react/tags-input";
|
|
10
11
|
//#region lib/components/BitkitTagsInput/BitkitTagsInput.tsx
|
|
11
12
|
var rejectEmpty = ({ inputValue }) => inputValue.trim().length > 0;
|
|
@@ -19,15 +20,16 @@ var BitkitTagsInput = forwardRef((props, ref) => {
|
|
|
19
20
|
const { addOnPaste = true, blurBehavior = "add", defaultValue, delimiter = /[\s,]+/, isValueInvalid, max, onValueChange, placeholder, size = "lg", state, validate, value, badge, label, optional, tooltip, ...fieldProps } = props;
|
|
20
21
|
const effectiveValidate = (details) => rejectEmpty(details) && (validate?.(details) ?? true);
|
|
21
22
|
const styles = useSlotRecipe({ key: "tagsInput" })({ size });
|
|
22
|
-
const [
|
|
23
|
-
|
|
23
|
+
const [currentValues, setCurrentValues] = useControllableState({
|
|
24
|
+
value,
|
|
25
|
+
defaultValue: defaultValue ?? []
|
|
26
|
+
});
|
|
27
|
+
const hasInvalidValue = state !== "disabled" && state !== "readOnly" && !!isValueInvalid && currentValues.some(isValueInvalid);
|
|
28
|
+
const effectiveState = hasInvalidValue ? "error" : state;
|
|
24
29
|
const handleValueChange = (details) => {
|
|
25
|
-
|
|
30
|
+
setCurrentValues(details.value);
|
|
26
31
|
onValueChange?.(details);
|
|
27
32
|
};
|
|
28
|
-
const hasInvalidTag = !!isValueInvalid && currentValues.some(isValueInvalid);
|
|
29
|
-
const effectiveState = hasInvalidTag && state !== "disabled" && state !== "readOnly" ? "error" : state;
|
|
30
|
-
const showInvalidTags = hasInvalidTag && effectiveState !== "disabled" && effectiveState !== "readOnly";
|
|
31
33
|
const hasWarning = effectiveState === "warning" || !!fieldProps.warningText;
|
|
32
34
|
const isInvalid = effectiveState === "error" || !!fieldProps.errorText;
|
|
33
35
|
const isDisabled = effectiveState === "disabled";
|
|
@@ -74,7 +76,7 @@ var BitkitTagsInput = forwardRef((props, ref) => {
|
|
|
74
76
|
index,
|
|
75
77
|
value: tagValue,
|
|
76
78
|
children: [/* @__PURE__ */ jsxs(TagsInput.ItemPreview, {
|
|
77
|
-
"data-invalid":
|
|
79
|
+
"data-invalid": hasInvalidValue && isValueInvalid?.(tagValue) || void 0,
|
|
78
80
|
children: [/* @__PURE__ */ jsx(TagsInput.ItemText, { children: tagValue }), !isReadOnly && /* @__PURE__ */ jsx(TagsInput.ItemDeleteTrigger, { children: /* @__PURE__ */ jsx(IconCross, { size: "16" }) })]
|
|
79
81
|
}), /* @__PURE__ */ jsx(TagsInput.ItemInput, {})]
|
|
80
82
|
}, tagValue)), /* @__PURE__ */ jsx(TagsInput.Input, { placeholder })]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTagsInput.js","names":[],"sources":["../../../lib/components/BitkitTagsInput/BitkitTagsInput.tsx"],"sourcesContent":["import { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { TagsInput } from '@chakra-ui/react/tags-input';\nimport { forwardRef, useState } from 'react';\n\nimport { IconCross, IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\nimport BitkitLabel from '../BitkitLabel/BitkitLabel';\n\n// `counterText` is derived from `max`, so it isn't a public prop here.\nexport interface BitkitTagsInputProps extends Omit<BitkitFieldProps, 'children' | 'counterText' | 'state'> {\n addOnPaste?: TagsInput.RootProps['addOnPaste'];\n blurBehavior?: TagsInput.RootProps['blurBehavior'];\n defaultValue?: string[];\n delimiter?: TagsInput.RootProps['delimiter'];\n /**\n * Predicate that marks individual tags as invalid: a tag whose value returns `true` is rendered\n * in the red color set (like BitkitTag `colorVariant=\"red\"`). Unlike `validate` — which gates\n * whether a tag can be *added* — this styles tags that are already in the list (e.g. a pasted\n * or pre-filled value that fails a format check). While any tag is invalid the whole field flips\n * to the error state automatically; pass `errorText` to surface the accompanying message.\n */\n isValueInvalid?: (value: string) => boolean;\n max?: number;\n onValueChange?: TagsInput.RootProps['onValueChange'];\n placeholder?: string;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n validate?: TagsInput.RootProps['validate'];\n value?: string[];\n}\n\nconst rejectEmpty: NonNullable<TagsInput.RootProps['validate']> = ({ inputValue }) => inputValue.trim().length > 0;\n\n/**\n * A field for entering a list of short string tags: type and commit a tag with Enter or a delimiter\n * (comma or whitespace by default); pasting splits on the same delimiter. Tags can be removed one at\n * a time or cleared all at once, and empty/whitespace-only input is rejected. Pass `max` to cap the\n * number of tags — a live counter is then shown next to the label.\n */\nconst BitkitTagsInput = forwardRef<HTMLDivElement, BitkitTagsInputProps>((props, ref) => {\n const {\n addOnPaste = true,\n blurBehavior = 'add',\n defaultValue,\n // Greedy `+` collapses runs of whitespace/commas into a single delimiter so pasting\n // \"alpha, beta\" doesn't spawn an empty tag between the alpha and beta.\n delimiter = /[\\s,]+/,\n isValueInvalid,\n max,\n onValueChange,\n placeholder,\n size = 'lg',\n state,\n validate,\n value,\n // Label chrome is rendered via TagsInput.Label (see below), not BitkitField, so it\n // associates with TagsInput.Input. Pull these out of the props forwarded to BitkitField.\n badge,\n label,\n optional,\n tooltip,\n ...fieldProps\n } = props;\n\n // Always reject empty/whitespace-only input (covers leading/trailing delimiters on paste\n // and blurBehavior=\"add\" with an empty input). Chain with a user-supplied validate if any.\n const effectiveValidate: NonNullable<TagsInput.RootProps['validate']> = (details) =>\n rejectEmpty(details) && (validate?.(details) ?? true);\n\n const styles = useSlotRecipe({ key: 'tagsInput' })({ size });\n\n // Mirror the tag list so we can detect invalid tags outside TagsInput.Context (the Root's\n // `invalid` prop, which drives the control border, must be known before the context renders).\n // In controlled mode `value` is authoritative; uncontrolled we track our own copy via onValueChange.\n const [uncontrolledValues, setUncontrolledValues] = useState<string[]>(defaultValue ?? []);\n const currentValues = value ?? uncontrolledValues;\n const handleValueChange: NonNullable<TagsInput.RootProps['onValueChange']> = (details) => {\n if (value === undefined) {\n setUncontrolledValues(details.value);\n }\n onValueChange?.(details);\n };\n\n const hasInvalidTag = !!isValueInvalid && currentValues.some(isValueInvalid);\n const effectiveState = hasInvalidTag && state !== 'disabled' && state !== 'readOnly' ? 'error' : state;\n const showInvalidTags = hasInvalidTag && effectiveState !== 'disabled' && effectiveState !== 'readOnly';\n\n const hasWarning = effectiveState === 'warning' || !!fieldProps.warningText;\n const isInvalid = effectiveState === 'error' || !!fieldProps.errorText;\n const isDisabled = effectiveState === 'disabled';\n const isReadOnly = effectiveState === 'readOnly';\n\n let statusIcon = undefined;\n if (isInvalid) {\n statusIcon = <IconErrorCircleFilled color=\"icon/negative\" size={size === 'lg' ? '24' : '16'} />;\n } else if (hasWarning) {\n statusIcon = <IconWarningYellow size={size === 'lg' ? '24' : '16'} />;\n }\n\n return (\n <TagsInput.Root\n addOnPaste={addOnPaste}\n blurBehavior={blurBehavior}\n defaultValue={defaultValue}\n delimiter={delimiter}\n disabled={isDisabled}\n invalid={isInvalid}\n max={max}\n onValueChange={handleValueChange}\n readOnly={isReadOnly}\n size={size}\n validate={effectiveValidate}\n value={value}\n >\n <TagsInput.Context>\n {({ value: tagValues }) => (\n // Strip any stray runtime `counterText` (not a public prop) so it can't slip through\n // `fieldProps` into BitkitField and resurrect an orphaned Field.Label; the counter is\n // rendered via TagsInput.Label instead.\n <BitkitField optional={optional} ref={ref} state={effectiveState} {...fieldProps} counterText={undefined}>\n {(!!label || !!badge || max !== undefined) && (\n // Chakra's Field.Label wires htmlFor to the Field machine's control, which the\n // TagsInput input never claims (separate Ark machine). TagsInput.Label is the\n // documented composition — it associates with TagsInput.Input.\n <TagsInput.Label asChild>\n <BitkitLabel\n badge={badge}\n counterText={max !== undefined ? `${tagValues.length}/${max}` : undefined}\n optional={optional}\n tooltip={tooltip}\n >\n {label}\n </BitkitLabel>\n </TagsInput.Label>\n )}\n <TagsInput.Control>\n <chakra.div css={styles.tagsBlock}>\n {tagValues.map((tagValue, index) => (\n <TagsInput.Item index={index} key={tagValue} value={tagValue}>\n <TagsInput.ItemPreview data-invalid={(showInvalidTags && isValueInvalid?.(tagValue)) || undefined}>\n <TagsInput.ItemText>{tagValue}</TagsInput.ItemText>\n {!isReadOnly && (\n <TagsInput.ItemDeleteTrigger>\n <IconCross size=\"16\" />\n </TagsInput.ItemDeleteTrigger>\n )}\n </TagsInput.ItemPreview>\n <TagsInput.ItemInput />\n </TagsInput.Item>\n ))}\n <TagsInput.Input placeholder={placeholder} />\n </chakra.div>\n {(statusIcon || (tagValues.length > 0 && !isDisabled && !isReadOnly)) && (\n <chakra.div css={styles.suffixBlock}>\n {statusIcon}\n {tagValues.length > 0 && !isDisabled && !isReadOnly && (\n <TagsInput.ClearTrigger css={styles.clearTrigger}>\n <IconCross size={size === 'lg' ? '24' : '16'} />\n </TagsInput.ClearTrigger>\n )}\n </chakra.div>\n )}\n </TagsInput.Control>\n <TagsInput.HiddenInput />\n </BitkitField>\n )}\n </TagsInput.Context>\n </TagsInput.Root>\n );\n});\n\nBitkitTagsInput.displayName = 'BitkitTagsInput';\nexport default BitkitTagsInput;\n"],"mappings":";;;;;;;;;;AA+BA,IAAM,eAA6D,EAAE,iBAAiB,WAAW,KAAK,CAAC,CAAC,SAAS;;;;;;;AAQjH,IAAM,kBAAkB,YAAkD,OAAO,QAAQ;CACvF,MAAM,EACJ,aAAa,MACb,eAAe,OACf,cAGA,YAAY,UACZ,gBACA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ources":["../../../lib/components/BitkitTagsInput/BitkitTagsInput.tsx"],"sourcesContent":["import { useControllableState } from '@chakra-ui/react/hooks';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { TagsInput } from '@chakra-ui/react/tags-input';\nimport { forwardRef } from 'react';\n\nimport { IconCross, IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField';\nimport BitkitLabel from '../BitkitLabel/BitkitLabel';\n\n// `counterText` is derived from `max`, so it isn't a public prop here.\nexport interface BitkitTagsInputProps extends Omit<BitkitFieldProps, 'children' | 'counterText' | 'state'> {\n addOnPaste?: TagsInput.RootProps['addOnPaste'];\n blurBehavior?: TagsInput.RootProps['blurBehavior'];\n defaultValue?: string[];\n delimiter?: TagsInput.RootProps['delimiter'];\n /**\n * Predicate that marks individual tags as invalid: a tag whose value returns `true` is rendered\n * in the red color set (like BitkitTag `colorVariant=\"red\"`). Unlike `validate` — which gates\n * whether a tag can be *added* — this styles tags that are already in the list (e.g. a pasted\n * or pre-filled value that fails a format check). While any tag is invalid the whole field flips\n * to the error state automatically; pass `errorText` to surface the accompanying message.\n */\n isValueInvalid?: (value: string) => boolean;\n max?: number;\n onValueChange?: TagsInput.RootProps['onValueChange'];\n placeholder?: string;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n validate?: TagsInput.RootProps['validate'];\n value?: string[];\n}\n\nconst rejectEmpty: NonNullable<TagsInput.RootProps['validate']> = ({ inputValue }) => inputValue.trim().length > 0;\n\n/**\n * A field for entering a list of short string tags: type and commit a tag with Enter or a delimiter\n * (comma or whitespace by default); pasting splits on the same delimiter. Tags can be removed one at\n * a time or cleared all at once, and empty/whitespace-only input is rejected. Pass `max` to cap the\n * number of tags — a live counter is then shown next to the label.\n */\nconst BitkitTagsInput = forwardRef<HTMLDivElement, BitkitTagsInputProps>((props, ref) => {\n const {\n addOnPaste = true,\n blurBehavior = 'add',\n defaultValue,\n // Greedy `+` collapses runs of whitespace/commas into a single delimiter so pasting\n // \"alpha, beta\" doesn't spawn an empty tag between the alpha and beta.\n delimiter = /[\\s,]+/,\n isValueInvalid,\n max,\n onValueChange,\n placeholder,\n size = 'lg',\n state,\n validate,\n value,\n // Label chrome is rendered via TagsInput.Label (see below), not BitkitField, so it\n // associates with TagsInput.Input. Pull these out of the props forwarded to BitkitField.\n badge,\n label,\n optional,\n tooltip,\n ...fieldProps\n } = props;\n\n // Always reject empty/whitespace-only input (covers leading/trailing delimiters on paste\n // and blurBehavior=\"add\" with an empty input). Chain with a user-supplied validate if any.\n const effectiveValidate: NonNullable<TagsInput.RootProps['validate']> = (details) =>\n rejectEmpty(details) && (validate?.(details) ?? true);\n\n const styles = useSlotRecipe({ key: 'tagsInput' })({ size });\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 handleValueChange: NonNullable<TagsInput.RootProps['onValueChange']> = (details) => {\n setCurrentValues(details.value);\n onValueChange?.(details);\n };\n\n const hasWarning = effectiveState === 'warning' || !!fieldProps.warningText;\n const isInvalid = effectiveState === 'error' || !!fieldProps.errorText;\n const isDisabled = effectiveState === 'disabled';\n const isReadOnly = effectiveState === 'readOnly';\n\n let statusIcon = undefined;\n if (isInvalid) {\n statusIcon = <IconErrorCircleFilled color=\"icon/negative\" size={size === 'lg' ? '24' : '16'} />;\n } else if (hasWarning) {\n statusIcon = <IconWarningYellow size={size === 'lg' ? '24' : '16'} />;\n }\n\n return (\n <TagsInput.Root\n addOnPaste={addOnPaste}\n blurBehavior={blurBehavior}\n defaultValue={defaultValue}\n delimiter={delimiter}\n disabled={isDisabled}\n invalid={isInvalid}\n max={max}\n onValueChange={handleValueChange}\n readOnly={isReadOnly}\n size={size}\n validate={effectiveValidate}\n value={value}\n >\n <TagsInput.Context>\n {({ value: tagValues }) => (\n // Strip any stray runtime `counterText` (not a public prop) so it can't slip through\n // `fieldProps` into BitkitField and resurrect an orphaned Field.Label; the counter is\n // rendered via TagsInput.Label instead.\n <BitkitField optional={optional} ref={ref} state={effectiveState} {...fieldProps} counterText={undefined}>\n {(!!label || !!badge || max !== undefined) && (\n // Chakra's Field.Label wires htmlFor to the Field machine's control, which the\n // TagsInput input never claims (separate Ark machine). TagsInput.Label is the\n // documented composition — it associates with TagsInput.Input.\n <TagsInput.Label asChild>\n <BitkitLabel\n badge={badge}\n counterText={max !== undefined ? `${tagValues.length}/${max}` : undefined}\n optional={optional}\n tooltip={tooltip}\n >\n {label}\n </BitkitLabel>\n </TagsInput.Label>\n )}\n <TagsInput.Control>\n <chakra.div css={styles.tagsBlock}>\n {tagValues.map((tagValue, index) => (\n <TagsInput.Item index={index} key={tagValue} value={tagValue}>\n <TagsInput.ItemPreview data-invalid={(hasInvalidValue && isValueInvalid?.(tagValue)) || undefined}>\n <TagsInput.ItemText>{tagValue}</TagsInput.ItemText>\n {!isReadOnly && (\n <TagsInput.ItemDeleteTrigger>\n <IconCross size=\"16\" />\n </TagsInput.ItemDeleteTrigger>\n )}\n </TagsInput.ItemPreview>\n <TagsInput.ItemInput />\n </TagsInput.Item>\n ))}\n <TagsInput.Input placeholder={placeholder} />\n </chakra.div>\n {(statusIcon || (tagValues.length > 0 && !isDisabled && !isReadOnly)) && (\n <chakra.div css={styles.suffixBlock}>\n {statusIcon}\n {tagValues.length > 0 && !isDisabled && !isReadOnly && (\n <TagsInput.ClearTrigger css={styles.clearTrigger}>\n <IconCross size={size === 'lg' ? '24' : '16'} />\n </TagsInput.ClearTrigger>\n )}\n </chakra.div>\n )}\n </TagsInput.Control>\n <TagsInput.HiddenInput />\n </BitkitField>\n )}\n </TagsInput.Context>\n </TagsInput.Root>\n );\n});\n\nBitkitTagsInput.displayName = 'BitkitTagsInput';\nexport default BitkitT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A;GACb;EAEE,CAAA,EAAA,CAAA;CACL,CAAA;AAEpB,CAAC;AAED,gBAAgB,cAAc"}
|
|
@@ -49,8 +49,6 @@ export { default as BitkitNumberInput, type BitkitNumberInputProps } from './Bit
|
|
|
49
49
|
export { default as BitkitOverflowContent, type BitkitOverflowContentProps, } from './BitkitOverflowContent/BitkitOverflowContent';
|
|
50
50
|
export { default as BitkitOverflowTooltip, type BitkitOverflowTooltipProps, } from './BitkitOverflowTooltip/BitkitOverflowTooltip';
|
|
51
51
|
export { default as BitkitPageFooter, type BitkitPageFooterItemProps, type BitkitPageFooterProps, } from './BitkitPageFooter/BitkitPageFooter';
|
|
52
|
-
export { default as BitkitPageHeader, type BitkitPageHeaderProps } from './BitkitPageHeader/BitkitPageHeader';
|
|
53
|
-
export { default as BitkitPageSidebar, type BitkitPageSidebarBodyProps, type BitkitPageSidebarDividerProps, type BitkitPageSidebarFooterProps, type BitkitPageSidebarGroupHeadingProps, type BitkitPageSidebarItemProps, type BitkitPageSidebarProjectProps, type BitkitPageSidebarProps, type BitkitPageSidebarTitleProps, } from './BitkitPageSidebar/BitkitPageSidebar';
|
|
54
52
|
export { default as BitkitPagination, type BitkitPaginationLabels, type BitkitPaginationProps, } from './BitkitPagination/BitkitPagination';
|
|
55
53
|
export { default as BitkitPaginationLoadMore, type BitkitPaginationLoadMoreProps, } from './BitkitPaginationLoadMore/BitkitPaginationLoadMore';
|
|
56
54
|
export { default as BitkitPopover, type BitkitPopoverProps } from './BitkitPopover/BitkitPopover';
|
|
@@ -67,6 +65,7 @@ export { default as BitkitSelectableTag, type BitkitSelectableTagItemProps, type
|
|
|
67
65
|
export { default as BitkitSelectMenu, type BitkitSelectMenuProps } from './BitkitSelectMenu/BitkitSelectMenu';
|
|
68
66
|
export { default as BitkitSelectMenuAction, type BitkitSelectMenuActionProps, } from './BitkitSelectMenu/BitkitSelectMenuAction';
|
|
69
67
|
export { default as BitkitSettingsCard, type BitkitSettingsCardContentProps, type BitkitSettingsCardProps, type BitkitSettingsCardStatusProps, } from './BitkitSettingsCard/BitkitSettingsCard';
|
|
68
|
+
export { default as BitkitSidebar, type BitkitSidebarFooterProps, type BitkitSidebarGroupHeadingProps, type BitkitSidebarItemProps, type BitkitSidebarProjectProps, type BitkitSidebarProps, type BitkitSidebarTitleProps, } from './BitkitSidebar/BitkitSidebar';
|
|
70
69
|
export { default as BitkitSkeletonGroup, type BitkitSkeletonGroupProps, } from './BitkitSkeletonGroup/BitkitSkeletonGroup';
|
|
71
70
|
export { default as BitkitSpinner, type BitkitSpinnerProps } from './BitkitSpinner/BitkitSpinner';
|
|
72
71
|
export { default as BitkitSplitButton, type BitkitSplitButtonProps } from './BitkitSplitButton/BitkitSplitButton';
|
package/dist/main.js
CHANGED
|
@@ -347,8 +347,6 @@ import BitkitNumberInput from "./components/BitkitNumberInput/BitkitNumberInput.
|
|
|
347
347
|
import BitkitOverflowContent from "./components/BitkitOverflowContent/BitkitOverflowContent.js";
|
|
348
348
|
import BitkitOverflowTooltip from "./components/BitkitOverflowTooltip/BitkitOverflowTooltip.js";
|
|
349
349
|
import BitkitPageFooter_default from "./components/BitkitPageFooter/BitkitPageFooter.js";
|
|
350
|
-
import BitkitPageHeader from "./components/BitkitPageHeader/BitkitPageHeader.js";
|
|
351
|
-
import BitkitPageSidebar_default from "./components/BitkitPageSidebar/BitkitPageSidebar.js";
|
|
352
350
|
import BitkitPagination from "./components/BitkitPagination/BitkitPagination.js";
|
|
353
351
|
import BitkitPaginationLoadMore from "./components/BitkitPaginationLoadMore/BitkitPaginationLoadMore.js";
|
|
354
352
|
import BitkitPopover from "./components/BitkitPopover/BitkitPopover.js";
|
|
@@ -364,6 +362,7 @@ import BitkitSegmentedControl_default from "./components/BitkitSegmentedControl/
|
|
|
364
362
|
import BitkitSelect_default from "./components/BitkitSelect/BitkitSelect.js";
|
|
365
363
|
import BitkitSelectableTag_default from "./components/BitkitSelectableTag/BitkitSelectableTag.js";
|
|
366
364
|
import BitkitSettingsCard_default from "./components/BitkitSettingsCard/BitkitSettingsCard.js";
|
|
365
|
+
import BitkitSidebar_default from "./components/BitkitSidebar/BitkitSidebar.js";
|
|
367
366
|
import BitkitSkeletonGroup from "./components/BitkitSkeletonGroup/BitkitSkeletonGroup.js";
|
|
368
367
|
import BitkitSpinner from "./components/BitkitSpinner/BitkitSpinner.js";
|
|
369
368
|
import BitkitSplitButton_default from "./components/BitkitSplitButton/BitkitSplitButton.js";
|
|
@@ -382,4 +381,4 @@ import BitkitTreeView, { createTreeCollection } from "./components/BitkitTreeVie
|
|
|
382
381
|
import useResponsive, { ResponsiveProvider } from "./hooks/useResponsive.js";
|
|
383
382
|
import bitkitTheme from "./theme/index.js";
|
|
384
383
|
import Provider from "./providers/BitkitProvider.js";
|
|
385
|
-
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter,
|
|
384
|
+
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSidebar_default as BitkitSidebar, BitkitSkeletonGroup, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitStepsDialog_default as BitkitStepsDialog, BitkitSwitch, BitkitTable, BitkitTableCard, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitTooltip, BitkitTour, BitkitTreeView, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopilot, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCursor, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKiroColor, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMcp, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTabPlus, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTerminalFilled, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUpload, IconValidateShield, IconVideo, IconVsCode, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWindsurf, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, useBitkitTour, useResponsive, useStepsDialog };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupHeading.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/GroupHeading.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst groupHeadingRecipe = defineSlotRecipe({\n className: 'group-heading',\n slots: ['root', 'titleBlock', 'icon', 'label', 'separator'],\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '16',\n overflow: 'clip',\n paddingBlockEnd: '4',\n paddingBlockStart: '8',\n paddingInlineEnd: '8',\n },\n titleBlock: {\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n gap: '4',\n },\n icon: {\n color: 'icon/tertiary',\n flexShrink: 0,\n },\n label: {\n color: 'text/tertiary',\n flexShrink: 0,\n textStyle: 'heading/h6',\n },\n separator: {\n
|
|
1
|
+
{"version":3,"file":"GroupHeading.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/GroupHeading.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst groupHeadingRecipe = defineSlotRecipe({\n className: 'group-heading',\n slots: ['root', 'titleBlock', 'icon', 'label', 'separator'],\n base: {\n root: {\n alignItems: 'center',\n display: 'flex',\n gap: '16',\n overflow: 'clip',\n paddingBlockEnd: '4',\n paddingBlockStart: '8',\n paddingInlineEnd: '8',\n },\n titleBlock: {\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n gap: '4',\n },\n icon: {\n color: 'icon/tertiary',\n flexShrink: 0,\n },\n label: {\n color: 'text/tertiary',\n flexShrink: 0,\n textStyle: 'heading/h6',\n },\n separator: {\n flex: 1,\n },\n },\n});\n\nexport default groupHeadingRecipe;\n"],"mappings":";;AAEA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAc;EAAQ;EAAS;CAAW;CAC1D,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,KAAK;GACL,UAAU;GACV,iBAAiB;GACjB,mBAAmB;GACnB,kBAAkB;EACpB;EACA,YAAY;GACV,YAAY;GACZ,SAAS;GACT,YAAY;GACZ,KAAK;EACP;EACA,MAAM;GACJ,OAAO;GACP,YAAY;EACd;EACA,OAAO;GACL,OAAO;GACP,YAAY;GACZ,WAAW;EACb;EACA,WAAW,EACT,MAAM,EACR;CACF;AACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const selectSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "checkbox" | "list" | "avatar" | "emptyState" | "root" | "item" | "itemContent" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "itemGroup" | "itemGroupLabel" | "itemText" | "valueText" | "action" | "clearTrigger" | "control" | "actionContainer" | "searchInputGroup" | "searchInput" | "searchClear" | "itemList" | "itemLoading" | "itemLoadingLabel" | "itemLabel" | "itemHelperText" | "indicatorGroup" | "checkmark" | "itemIcon" | "valueIcon", {
|
|
1
|
+
export declare const selectSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "label" | "checkbox" | "list" | "avatar" | "emptyState" | "root" | "item" | "itemContent" | "itemIndicator" | "trigger" | "positioner" | "indicator" | "itemGroup" | "itemGroupLabel" | "itemText" | "valueText" | "action" | "clearTrigger" | "control" | "actionContainer" | "searchInputGroup" | "searchInput" | "searchClear" | "itemList" | "itemLoading" | "itemLoadingLabel" | "itemLabel" | "itemHelperText" | "indicatorGroup" | "checkmark" | "itemBadge" | "itemIcon" | "valueIcon", {
|
|
2
2
|
hasStatusIcon: {
|
|
3
3
|
true: {
|
|
4
4
|
trigger: {
|
|
@@ -16,6 +16,7 @@ var selectSlotRecipe = defineSlotRecipe({
|
|
|
16
16
|
"checkmark",
|
|
17
17
|
"itemList",
|
|
18
18
|
"itemContent",
|
|
19
|
+
"itemBadge",
|
|
19
20
|
"itemIcon",
|
|
20
21
|
"valueIcon",
|
|
21
22
|
"avatar",
|
|
@@ -119,6 +120,10 @@ var selectSlotRecipe = defineSlotRecipe({
|
|
|
119
120
|
flex: "1 0 0",
|
|
120
121
|
minWidth: 0
|
|
121
122
|
},
|
|
123
|
+
itemBadge: {
|
|
124
|
+
display: "inline-flex",
|
|
125
|
+
flexShrink: 0
|
|
126
|
+
},
|
|
122
127
|
itemLoading: { flexShrink: 0 },
|
|
123
128
|
itemLoadingLabel: {
|
|
124
129
|
color: "text/secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Select.recipe.ts"],"sourcesContent":["import { selectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport { rem } from '../themeUtils';\n\nexport const selectSlotRecipe = defineSlotRecipe({\n className: 'select',\n slots: [\n ...selectAnatomy.keys(),\n 'searchInputGroup',\n 'searchInput',\n 'searchClear',\n 'actionContainer',\n 'action',\n 'checkbox',\n 'checkmark',\n 'itemList',\n 'itemContent',\n 'itemIcon',\n 'valueIcon',\n 'avatar',\n 'itemLabel',\n 'itemHelperText',\n 'itemLoading',\n 'itemLoadingLabel',\n 'emptyState',\n ],\n base: {\n trigger: {\n display: 'flex',\n alignItems: 'center',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'bg.muted',\n color: 'input/text/inputValue',\n gap: '8',\n justifyContent: 'space-between',\n // 15px + the 1px border = the spec's 16px, measured from the trigger's outer edge.\n // The indicator group below is offset the same way on the end side.\n paddingInlineStart: rem(15),\n paddingInlineEnd: '48',\n paddingBlock: rem(11),\n borderRadius: '4',\n userSelect: 'none',\n textAlign: 'start',\n focusVisibleRing: 'inside',\n width: '100%',\n _open: {\n borderColor: 'border/focus',\n },\n _placeholderShown: {\n color: 'text/secondary',\n },\n _disabled: {\n color: 'text/disabled',\n background: 'background/disabled',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetEnd: 0,\n top: 0,\n bottom: 0,\n paddingInlineStart: '16',\n paddingInlineEnd: rem(15),\n pointerEvents: 'none',\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n ...base,\n content: {\n ...base.content,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n // Zag's popper sets `--reference-width` (the trigger width) on the positioner, so the\n // menu is never narrower than the Select input — but can grow wider for long items.\n minWidth: 'var(--reference-width)',\n maxWidth: rem(800),\n focusVisibleRing: 'none',\n },\n item: {\n ...base.item,\n _active: {\n background: 'background/active',\n },\n _selected: {\n background: 'background/selected',\n _highlighted: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n cursor: 'not-allowed',\n color: 'text/disabled',\n _highlighted: {\n background: 'transparent',\n },\n },\n },\n control: {\n position: 'relative',\n width: '100%',\n },\n valueText: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n flex: '1 1 0',\n minWidth: 0,\n overflow: 'hidden',\n },\n itemList: {\n flex: '1 1 auto',\n minHeight: 0,\n overflowY: 'auto',\n paddingBlock: '8',\n },\n itemContent: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 0 0',\n minWidth: 0,\n },\n itemLoading: {\n flexShrink: 0,\n },\n itemLoadingLabel: {\n color: 'text/secondary',\n flex: '1 0 0',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n emptyState: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n paddingInline: '16',\n },\n itemIcon: {\n color: 'icon/secondary',\n '[data-state=\"checked\"] &': {\n color: 'icon/interactive',\n },\n },\n // The selected value's icon in the trigger. Mirrors the `indicator` (chevron) state colors —\n // the trigger exposes `data-disabled` / `data-readonly`, so the icon reacts via ancestors.\n valueIcon: {\n color: 'icon/secondary',\n '[data-disabled] &': { color: 'icon/disabled' },\n '[data-readonly] &': { color: 'icon/on-disabled' },\n },\n avatar: {\n flexShrink: 0,\n '[data-disabled] &': { opacity: 0.5 },\n },\n itemLabel: {\n color: 'text/body',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n itemHelperText: {\n color: 'text/helper',\n textStyle: 'body/sm/regular',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n checkbox: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n borderWidth: '1',\n borderColor: 'border/regular',\n borderRadius: '4',\n background: 'background/primary',\n boxShadow: 'inset/field',\n color: 'icon/on-color',\n '[data-state=checked] &': {\n background: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection',\n boxShadow: 'none',\n },\n '[data-disabled] &': {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n },\n },\n checkmark: {\n opacity: 0,\n color: 'icon/on-color',\n '[data-state=checked] &': {\n opacity: 1,\n },\n },\n searchInputGroup: {\n borderBottom: '1px solid',\n borderColor: 'border/minimal',\n background: 'background/primary',\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineStart: '16',\n paddingInlineEnd: '12',\n overflow: 'hidden',\n flexShrink: 0,\n _hover: {\n background: 'background/secondary',\n },\n _focusWithin: {\n background: 'background/primary',\n },\n },\n searchInput: {\n flex: '1 0 0',\n minWidth: 0,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'input/text/inputValue',\n paddingInline: 0,\n paddingBlock: 0,\n _placeholder: {\n color: 'input/text/placeholder',\n },\n },\n searchClear: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '4',\n color: 'icon/primary',\n cursor: 'pointer',\n flexShrink: 0,\n _hover: {\n background: 'background/hover',\n },\n },\n actionContainer: {\n borderTop: '1px solid',\n borderColor: 'border/minimal',\n paddingBlock: '8',\n flexShrink: 0,\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineEnd: '24',\n paddingInlineStart: '16',\n color: 'text/primary',\n width: '100%',\n cursor: 'pointer',\n textAlign: 'start',\n _icon: {\n color: 'icon/secondary',\n },\n _hover: {\n background: 'button/secondary/bg-hover',\n _active: {\n background: 'button/secondary/bg-active',\n },\n },\n _active: {\n background: 'button/secondary/bg-active',\n },\n _focusVisible: {\n outlineOffset: '-3px',\n },\n },\n },\n\n variants: {\n hasStatusIcon: {\n true: {\n trigger: {\n paddingInlineEnd: '96',\n },\n },\n false: {},\n },\n size: {\n lg: {\n ...variants.size.lg,\n trigger: {\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n checkbox: {\n width: '24',\n height: '24',\n },\n item: {\n ...variants.size.lg.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '48',\n paddingInlineEnd: '24',\n paddingBlock: '12',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 48px item + 16px paddingBlock\n maxHeight: rem(280),\n },\n itemLabel: {\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/lg/regular',\n },\n emptyState: {\n paddingBlock: '12',\n },\n action: {\n minHeight: '48',\n paddingBlock: '12',\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n searchInputGroup: {\n height: rem(56),\n paddingBlock: '16',\n },\n searchInput: {\n textStyle: 'body/lg/regular',\n },\n searchClear: {\n padding: '8',\n },\n },\n md: {\n ...variants.size.md,\n checkbox: {\n width: '20',\n height: '20',\n },\n item: {\n ...variants.size.md.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '4',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '40',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 40px item (checkbox/avatar row) + 16px paddingBlock\n maxHeight: rem(236),\n },\n itemLabel: {\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/md/regular',\n },\n emptyState: {\n paddingBlock: '8',\n },\n action: {\n minHeight: '40',\n paddingBlock: '8',\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n trigger: {\n textStyle: 'body/md/regular',\n paddingBlock: rem(9),\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n searchInputGroup: {\n height: '48',\n paddingBlock: '12',\n },\n searchInput: {\n textStyle: 'body/md/regular',\n },\n searchClear: {\n padding: '4',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n"],"mappings":";;;;;AAMA,IAAa,mBAAmB,iBAAiB;CAC/C,WAAW;CACX,OAAO;EACL,GAAG,cAAc,KAAK;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,YAAY;GACZ,OAAO;GACP,KAAK;GACL,gBAAgB;GAGhB,oBAAoB,IAAI,EAAE;GAC1B,kBAAkB;GAClB,cAAc,IAAI,EAAE;GACpB,cAAc;GACd,YAAY;GACZ,WAAW;GACX,kBAAkB;GAClB,OAAO;GACP,OAAO,EACL,aAAa,eACf;GACA,mBAAmB,EACjB,OAAO,iBACT;GACA,WAAW;IACT,OAAO;IACP,YAAY;GACd;GACA,UAAU,EACR,aAAa,eACf;GACA,WAAW,EACT,YAAY,sBACd;EACF;EACA,gBAAgB;GACd,SAAS;GACT,YAAY;GACZ,KAAK;GACL,UAAU;GACV,UAAU;GACV,KAAK;GACL,QAAQ;GACR,oBAAoB;GACpB,kBAAkB,IAAI,EAAE;GACxB,eAAe;EACjB;EACA,WAAW;GACT,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,OAAO;GACP,WAAW,EACT,OAAO,gBACT;GACA,WAAW,EACT,OAAO,mBACT;EACF;EACA,GAAG;EACH,SAAS;GACP,GAAG,KAAK;GACR,UAAU;GACV,SAAS;GACT,eAAe;GAGf,UAAU;GACV,UAAU,IAAI,GAAG;GACjB,kBAAkB;EACpB;EACA,MAAM;GACJ,GAAG,KAAK;GACR,SAAS,EACP,YAAY,oBACd;GACA,WAAW;IACT,YAAY;IACZ,cAAc,EACZ,YAAY,4BACd;GACF;GACA,WAAW;IACT,QAAQ;IACR,OAAO;IACP,cAAc,EACZ,YAAY,cACd;GACF;EACF;EACA,SAAS;GACP,UAAU;GACV,OAAO;EACT;EACA,WAAW;GACT,SAAS;GACT,YAAY;GACZ,KAAK;GACL,MAAM;GACN,UAAU;GACV,UAAU;EACZ;EACA,UAAU;GACR,MAAM;GACN,WAAW;GACX,WAAW;GACX,cAAc;EAChB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E;KACd,cAAc;IAChB;IACA,aAAa,EACX,WAAW,kBACb;IACA,aAAa,EACX,SAAS,IACX;GACF;GACA,IAAI;IACF,GAAG,SAAS,KAAK;IACjB,UAAU;KACR,OAAO;KACP,QAAQ;IACV;IACA,MAAM;KACJ,GAAG,SAAS,KAAK,GAAG;KACpB,iCAA+B;MAC7B,oBAAoB;MACpB,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;KACA,mCAAiC;MAC/B,WAAW;MACX,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;IACF;IACA,UAAU,EAER,WAAW,IAAI,GAAG,EACpB;IACA,WAAW;KACT,WAAW;KACX,YAAY;IACd;IACA,kBAAkB,EAChB,WAAW,kBACb;IACA,YAAY,EACV,cAAc,IAChB;IACA,QAAQ;KACN,WAAW;KACX,cAAc;KACd,WAAW;KACX,YAAY;IACd;IACA,SAAS;KACP,WAAW;KACX,cAAc,IAAI,CAAC;KACnB,iCAA+B;MAAE,cAAc,IAAI,CAAC;MAAG,oBAAoB,IAAI,EAAE;KAAE;IACrF;IACA,kBAAkB;KAChB,QAAQ;KACR,cAAc;IAChB;IACA,aAAa,EACX,WAAW,kBACb;IACA,aAAa,EACX,SAAS,IACX;GACF;EACF;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Select.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Select.recipe.ts"],"sourcesContent":["import { selectAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { base, variants } from '../common/ComboboxAndSelect.common';\nimport { rem } from '../themeUtils';\n\nexport const selectSlotRecipe = defineSlotRecipe({\n className: 'select',\n slots: [\n ...selectAnatomy.keys(),\n 'searchInputGroup',\n 'searchInput',\n 'searchClear',\n 'actionContainer',\n 'action',\n 'checkbox',\n 'checkmark',\n 'itemList',\n 'itemContent',\n 'itemBadge',\n 'itemIcon',\n 'valueIcon',\n 'avatar',\n 'itemLabel',\n 'itemHelperText',\n 'itemLoading',\n 'itemLoadingLabel',\n 'emptyState',\n ],\n base: {\n trigger: {\n display: 'flex',\n alignItems: 'center',\n borderWidth: '1',\n borderColor: 'border/strong',\n background: 'bg.muted',\n color: 'input/text/inputValue',\n gap: '8',\n justifyContent: 'space-between',\n // 15px + the 1px border = the spec's 16px, measured from the trigger's outer edge.\n // The indicator group below is offset the same way on the end side.\n paddingInlineStart: rem(15),\n paddingInlineEnd: '48',\n paddingBlock: rem(11),\n borderRadius: '4',\n userSelect: 'none',\n textAlign: 'start',\n focusVisibleRing: 'inside',\n width: '100%',\n _open: {\n borderColor: 'border/focus',\n },\n _placeholderShown: {\n color: 'text/secondary',\n },\n _disabled: {\n color: 'text/disabled',\n background: 'background/disabled',\n },\n _invalid: {\n borderColor: 'border/error',\n },\n _readOnly: {\n background: 'background/disabled',\n },\n },\n indicatorGroup: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n position: 'absolute',\n insetEnd: 0,\n top: 0,\n bottom: 0,\n paddingInlineStart: '16',\n paddingInlineEnd: rem(15),\n pointerEvents: 'none',\n },\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'icon/secondary',\n _disabled: {\n color: 'icon/disabled',\n },\n _readOnly: {\n color: 'icon/on-disabled',\n },\n },\n ...base,\n content: {\n ...base.content,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n // Zag's popper sets `--reference-width` (the trigger width) on the positioner, so the\n // menu is never narrower than the Select input — but can grow wider for long items.\n minWidth: 'var(--reference-width)',\n maxWidth: rem(800),\n focusVisibleRing: 'none',\n },\n item: {\n ...base.item,\n _active: {\n background: 'background/active',\n },\n _selected: {\n background: 'background/selected',\n _highlighted: {\n background: 'background/selected-hover',\n },\n },\n _disabled: {\n cursor: 'not-allowed',\n color: 'text/disabled',\n _highlighted: {\n background: 'transparent',\n },\n },\n },\n control: {\n position: 'relative',\n width: '100%',\n },\n valueText: {\n display: 'flex',\n alignItems: 'center',\n gap: '8',\n flex: '1 1 0',\n minWidth: 0,\n overflow: 'hidden',\n },\n itemList: {\n flex: '1 1 auto',\n minHeight: 0,\n overflowY: 'auto',\n paddingBlock: '8',\n },\n itemContent: {\n display: 'flex',\n flexDirection: 'column',\n flex: '1 0 0',\n minWidth: 0,\n },\n itemBadge: {\n display: 'inline-flex',\n flexShrink: 0,\n },\n itemLoading: {\n flexShrink: 0,\n },\n itemLoadingLabel: {\n color: 'text/secondary',\n flex: '1 0 0',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n emptyState: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n paddingInline: '16',\n },\n itemIcon: {\n color: 'icon/secondary',\n '[data-state=\"checked\"] &': {\n color: 'icon/interactive',\n },\n },\n // The selected value's icon in the trigger. Mirrors the `indicator` (chevron) state colors —\n // the trigger exposes `data-disabled` / `data-readonly`, so the icon reacts via ancestors.\n valueIcon: {\n color: 'icon/secondary',\n '[data-disabled] &': { color: 'icon/disabled' },\n '[data-readonly] &': { color: 'icon/on-disabled' },\n },\n avatar: {\n flexShrink: 0,\n '[data-disabled] &': { opacity: 0.5 },\n },\n itemLabel: {\n color: 'text/body',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n itemHelperText: {\n color: 'text/helper',\n textStyle: 'body/sm/regular',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n minWidth: 0,\n '[data-disabled] &': {\n color: 'text/disabled',\n },\n },\n checkbox: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n borderWidth: '1',\n borderColor: 'border/regular',\n borderRadius: '4',\n background: 'background/primary',\n boxShadow: 'inset/field',\n color: 'icon/on-color',\n '[data-state=checked] &': {\n background: 'input/checkbox/selection',\n borderColor: 'input/checkbox/selection',\n boxShadow: 'none',\n },\n '[data-disabled] &': {\n background: 'background/disabled',\n borderColor: 'border/disabled',\n },\n },\n checkmark: {\n opacity: 0,\n color: 'icon/on-color',\n '[data-state=checked] &': {\n opacity: 1,\n },\n },\n searchInputGroup: {\n borderBottom: '1px solid',\n borderColor: 'border/minimal',\n background: 'background/primary',\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineStart: '16',\n paddingInlineEnd: '12',\n overflow: 'hidden',\n flexShrink: 0,\n _hover: {\n background: 'background/secondary',\n },\n _focusWithin: {\n background: 'background/primary',\n },\n },\n searchInput: {\n flex: '1 0 0',\n minWidth: 0,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'input/text/inputValue',\n paddingInline: 0,\n paddingBlock: 0,\n _placeholder: {\n color: 'input/text/placeholder',\n },\n },\n searchClear: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '4',\n color: 'icon/primary',\n cursor: 'pointer',\n flexShrink: 0,\n _hover: {\n background: 'background/hover',\n },\n },\n actionContainer: {\n borderTop: '1px solid',\n borderColor: 'border/minimal',\n paddingBlock: '8',\n flexShrink: 0,\n },\n action: {\n display: 'flex',\n alignItems: 'center',\n gap: '12',\n paddingInlineEnd: '24',\n paddingInlineStart: '16',\n color: 'text/primary',\n width: '100%',\n cursor: 'pointer',\n textAlign: 'start',\n _icon: {\n color: 'icon/secondary',\n },\n _hover: {\n background: 'button/secondary/bg-hover',\n _active: {\n background: 'button/secondary/bg-active',\n },\n },\n _active: {\n background: 'button/secondary/bg-active',\n },\n _focusVisible: {\n outlineOffset: '-3px',\n },\n },\n },\n\n variants: {\n hasStatusIcon: {\n true: {\n trigger: {\n paddingInlineEnd: '96',\n },\n },\n false: {},\n },\n size: {\n lg: {\n ...variants.size.lg,\n trigger: {\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n checkbox: {\n width: '24',\n height: '24',\n },\n item: {\n ...variants.size.lg.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '48',\n paddingInlineEnd: '24',\n paddingBlock: '12',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 48px item + 16px paddingBlock\n maxHeight: rem(280),\n },\n itemLabel: {\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/lg/regular',\n },\n emptyState: {\n paddingBlock: '12',\n },\n action: {\n minHeight: '48',\n paddingBlock: '12',\n textStyle: 'body/lg/regular',\n lineHeight: 'normal',\n },\n searchInputGroup: {\n height: rem(56),\n paddingBlock: '16',\n },\n searchInput: {\n textStyle: 'body/lg/regular',\n },\n searchClear: {\n padding: '8',\n },\n },\n md: {\n ...variants.size.md,\n checkbox: {\n width: '20',\n height: '20',\n },\n item: {\n ...variants.size.md.item,\n '&:has([data-slot=\"avatar\"])': {\n paddingInlineStart: '12',\n paddingInlineEnd: '24',\n paddingBlock: '4',\n gap: '8',\n },\n '&:has([data-slot=\"checkbox\"])': {\n minHeight: '40',\n paddingInlineEnd: '24',\n paddingBlock: '8',\n gap: '12',\n },\n },\n itemList: {\n // 5.5 × 40px item (checkbox/avatar row) + 16px paddingBlock\n maxHeight: rem(236),\n },\n itemLabel: {\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n itemLoadingLabel: {\n textStyle: 'body/md/regular',\n },\n emptyState: {\n paddingBlock: '8',\n },\n action: {\n minHeight: '40',\n paddingBlock: '8',\n textStyle: 'body/md/regular',\n lineHeight: 'normal',\n },\n trigger: {\n textStyle: 'body/md/regular',\n paddingBlock: rem(9),\n '&:has([data-slot=\"avatar\"])': { paddingBlock: rem(7), paddingInlineStart: rem(11) },\n },\n searchInputGroup: {\n height: '48',\n paddingBlock: '12',\n },\n searchInput: {\n textStyle: 'body/md/regular',\n },\n searchClear: {\n padding: '4',\n },\n },\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n"],"mappings":";;;;;AAMA,IAAa,mBAAmB,iBAAiB;CAC/C,WAAW;CACX,OAAO;EACL,GAAG,cAAc,KAAK;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,SAAS;GACP,SAAS;GACT,YAAY;GACZ,aAAa;GACb,aAAa;GACb,YAAY;GACZ,OAAO;GACP,KAAK;GACL,gBAAgB;GAGhB,oBAAoB,IAAI,EAAE;GAC1B,kBAAkB;GAClB,cAAc,IAAI,EAAE;GACpB,cAAc;GACd,YAAY;GACZ,WAAW;GACX,kBAAkB;GAClB,OAAO;GACP,OAAO,EACL,aAAa,eACf;GACA,mBAAmB,EACjB,OAAO,iBACT;GACA,WAAW;IACT,OAAO;IACP,YAAY;GACd;GACA,UAAU,EACR,aAAa,eACf;GACA,WAAW,EACT,YAAY,sBACd;EACF;EACA,gBAAgB;GACd,SAAS;GACT,YAAY;GACZ,KAAK;GACL,UAAU;GACV,UAAU;GACV,KAAK;GACL,QAAQ;GACR,oBAAoB;GACpB,kBAAkB,IAAI,EAAE;GACxB,eAAe;EACjB;EACA,WAAW;GACT,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,OAAO;GACP,WAAW,EACT,OAAO,gBACT;GACA,WAAW,EACT,OAAO,mBACT;EACF;EACA,GAAG;EACH,SAAS;GACP,GAAG,KAAK;GACR,UAAU;GACV,SAAS;GACT,eAAe;GAGf,UAAU;GACV,UAAU,IAAI,GAAG;GACjB,kBAAkB;EACpB;EACA,MAAM;GACJ,GAAG,KAAK;GACR,SAAS,EACP,YAAY,oBACd;GACA,WAAW;IACT,YAAY;IACZ,cAAc,EACZ,YAAY,4BACd;GACF;GACA,WAAW;IACT,QAAQ;IACR,OAAO;I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MACd,KAAK;KACP;IACF;IACA,UAAU,EAER,WAAW,IAAI,GAAG,EACpB;IACA,WAAW;KACT,WAAW;KACX,YAAY;IACd;IACA,kBAAkB,EAChB,WAAW,kBACb;IACA,YAAY,EACV,cAAc,KAChB;IACA,QAAQ;KACN,WAAW;KACX,cAAc;KACd,WAAW;KACX,YAAY;IACd;IACA,kBAAkB;KAChB,QAAQ,IAAI,EAAE;KACd,cAAc;IAChB;IACA,aAAa,EACX,WAAW,kBACb;IACA,aAAa,EACX,SAAS,IACX;GACF;GACA,IAAI;IACF,GAAG,SAAS,KAAK;IACjB,UAAU;KACR,OAAO;KACP,QAAQ;IACV;IACA,MAAM;KACJ,GAAG,SAAS,KAAK,GAAG;KACpB,iCAA+B;MAC7B,oBAAoB;MACpB,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;KACA,mCAAiC;MAC/B,WAAW;MACX,kBAAkB;MAClB,cAAc;MACd,KAAK;KACP;IACF;IACA,UAAU,EAER,WAAW,IAAI,GAAG,EACpB;IACA,WAAW;KACT,WAAW;KACX,YAAY;IACd;IACA,kBAAkB,EAChB,WAAW,kBACb;IACA,YAAY,EACV,cAAc,IAChB;IACA,QAAQ;KACN,WAAW;KACX,cAAc;KACd,WAAW;KACX,YAAY;IACd;IACA,SAAS;KACP,WAAW;KACX,cAAc,IAAI,CAAC;KACnB,iCAA+B;MAAE,cAAc,IAAI,CAAC;MAAG,oBAAoB,IAAI,EAAE;KAAE;IACrF;IACA,kBAAkB;KAChB,QAAQ;KACR,cAAc;IAChB;IACA,aAAa,EACX,WAAW,kBACb;IACA,aAAa,EACX,SAAS,IACX;GACF;EACF;CACF;CACA,iBAAiB,EACf,MAAM,KACR;AACF,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const sidebarSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"footer" | "title" | "root" | "item" | "suffixIcon" | "itemLabel" | "itemIcon" | "divider" | "project" | "projectLabel" | "projectValue" | "selectionMarker" | "titleWithBack", {
|
|
2
|
+
selected: {
|
|
3
|
+
true: {
|
|
4
|
+
item: {
|
|
5
|
+
background: "background/selected";
|
|
6
|
+
_hover: {
|
|
7
|
+
background: "background/selected-hover";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
itemIcon: {
|
|
11
|
+
color: "icon/interactive";
|
|
12
|
+
};
|
|
13
|
+
itemLabel: {
|
|
14
|
+
textStyle: "body/lg/semibold";
|
|
15
|
+
};
|
|
16
|
+
selectionMarker: {
|
|
17
|
+
display: "block";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export default sidebarSlotRecipe;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
+
//#region lib/theme/slot-recipes/Sidebar.recipe.ts
|
|
4
|
+
var sidebarSlotRecipe = defineSlotRecipe({
|
|
5
|
+
className: "sidebar",
|
|
6
|
+
slots: [
|
|
7
|
+
"divider",
|
|
8
|
+
"suffixIcon",
|
|
9
|
+
"footer",
|
|
10
|
+
"item",
|
|
11
|
+
"itemIcon",
|
|
12
|
+
"itemLabel",
|
|
13
|
+
"project",
|
|
14
|
+
"projectLabel",
|
|
15
|
+
"projectValue",
|
|
16
|
+
"root",
|
|
17
|
+
"selectionMarker",
|
|
18
|
+
"title",
|
|
19
|
+
"titleWithBack"
|
|
20
|
+
],
|
|
21
|
+
base: {
|
|
22
|
+
root: {
|
|
23
|
+
background: "background/primary",
|
|
24
|
+
borderInlineEnd: "1px solid",
|
|
25
|
+
borderColor: "border/regular",
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
width: rem(256),
|
|
29
|
+
height: "100dvh"
|
|
30
|
+
},
|
|
31
|
+
item: {
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
display: "flex",
|
|
35
|
+
gap: "16",
|
|
36
|
+
overflow: "clip",
|
|
37
|
+
paddingBlock: "12",
|
|
38
|
+
paddingInlineEnd: "24",
|
|
39
|
+
paddingInlineStart: "32",
|
|
40
|
+
position: "relative",
|
|
41
|
+
width: "full",
|
|
42
|
+
_hover: { background: "background/hover" }
|
|
43
|
+
},
|
|
44
|
+
itemIcon: {
|
|
45
|
+
color: "icon/secondary",
|
|
46
|
+
flexShrink: 0
|
|
47
|
+
},
|
|
48
|
+
itemLabel: {
|
|
49
|
+
color: "text/primary",
|
|
50
|
+
flex: 1,
|
|
51
|
+
minWidth: 0,
|
|
52
|
+
overflow: "hidden",
|
|
53
|
+
textAlign: "start",
|
|
54
|
+
textOverflow: "ellipsis",
|
|
55
|
+
textStyle: "body/lg/regular",
|
|
56
|
+
whiteSpace: "nowrap"
|
|
57
|
+
},
|
|
58
|
+
suffixIcon: {
|
|
59
|
+
color: "icon/tertiary",
|
|
60
|
+
display: "none",
|
|
61
|
+
flexShrink: 0,
|
|
62
|
+
_groupHover: { display: "block" }
|
|
63
|
+
},
|
|
64
|
+
selectionMarker: {
|
|
65
|
+
background: "border/selected",
|
|
66
|
+
borderStartEndRadius: "2",
|
|
67
|
+
borderEndEndRadius: "2",
|
|
68
|
+
display: "none",
|
|
69
|
+
height: "full",
|
|
70
|
+
insetBlockStart: 0,
|
|
71
|
+
insetInlineEnd: 0,
|
|
72
|
+
position: "absolute",
|
|
73
|
+
width: "2"
|
|
74
|
+
},
|
|
75
|
+
footer: {
|
|
76
|
+
borderBlockStart: "1px solid",
|
|
77
|
+
borderColor: "border/regular",
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
marginBlockStart: "auto",
|
|
81
|
+
paddingBlock: "12"
|
|
82
|
+
},
|
|
83
|
+
project: {
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexDirection: "column",
|
|
86
|
+
gap: "4",
|
|
87
|
+
justifyContent: "center",
|
|
88
|
+
overflow: "clip",
|
|
89
|
+
paddingBlockEnd: "12",
|
|
90
|
+
paddingBlockStart: "8",
|
|
91
|
+
paddingInlineEnd: "24",
|
|
92
|
+
paddingInlineStart: "32",
|
|
93
|
+
whiteSpace: "nowrap"
|
|
94
|
+
},
|
|
95
|
+
projectLabel: {
|
|
96
|
+
color: "text/tertiary",
|
|
97
|
+
textStyle: "heading/h6"
|
|
98
|
+
},
|
|
99
|
+
projectValue: {
|
|
100
|
+
color: "text/body",
|
|
101
|
+
textStyle: "body/lg/semibold"
|
|
102
|
+
},
|
|
103
|
+
title: {
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
color: "text/primary",
|
|
106
|
+
display: "flex",
|
|
107
|
+
gap: "12",
|
|
108
|
+
paddingBlock: "16",
|
|
109
|
+
paddingInlineEnd: "8",
|
|
110
|
+
paddingInlineStart: "32",
|
|
111
|
+
textStyle: "heading/h3"
|
|
112
|
+
},
|
|
113
|
+
titleWithBack: {
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
color: "text/primary",
|
|
116
|
+
display: "flex",
|
|
117
|
+
gap: "12",
|
|
118
|
+
paddingBlockEnd: "16",
|
|
119
|
+
paddingBlockStart: "24",
|
|
120
|
+
paddingInlineEnd: "8",
|
|
121
|
+
paddingInlineStart: "24",
|
|
122
|
+
textStyle: "heading/h3"
|
|
123
|
+
},
|
|
124
|
+
divider: {
|
|
125
|
+
marginInline: "32",
|
|
126
|
+
marginBlock: "24",
|
|
127
|
+
width: "auto"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
variants: { selected: { true: {
|
|
131
|
+
item: {
|
|
132
|
+
background: "background/selected",
|
|
133
|
+
_hover: { background: "background/selected-hover" }
|
|
134
|
+
},
|
|
135
|
+
itemIcon: { color: "icon/interactive" },
|
|
136
|
+
itemLabel: { textStyle: "body/lg/semibold" },
|
|
137
|
+
selectionMarker: { display: "block" }
|
|
138
|
+
} } }
|
|
139
|
+
});
|
|
140
|
+
//#endregion
|
|
141
|
+
export { sidebarSlotRecipe as default };
|
|
142
|
+
|
|
143
|
+
//# sourceMappingURL=Sidebar.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sidebar.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Sidebar.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\nconst sidebarSlotRecipe = defineSlotRecipe({\n className: 'sidebar',\n slots: [\n 'divider',\n 'suffixIcon',\n 'footer',\n 'item',\n 'itemIcon',\n 'itemLabel',\n 'project',\n 'projectLabel',\n 'projectValue',\n 'root',\n 'selectionMarker',\n 'title',\n 'titleWithBack',\n ],\n base: {\n root: {\n background: 'background/primary',\n borderInlineEnd: '1px solid',\n borderColor: 'border/regular',\n display: 'flex',\n flexDirection: 'column',\n width: rem(256),\n height: '100dvh',\n },\n item: {\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n gap: '16',\n overflow: 'clip',\n paddingBlock: '12',\n paddingInlineEnd: '24',\n paddingInlineStart: '32',\n position: 'relative',\n width: 'full',\n _hover: {\n background: 'background/hover',\n },\n },\n itemIcon: {\n color: 'icon/secondary',\n flexShrink: 0,\n },\n itemLabel: {\n color: 'text/primary',\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n textAlign: 'start',\n textOverflow: 'ellipsis',\n textStyle: 'body/lg/regular',\n whiteSpace: 'nowrap',\n },\n suffixIcon: {\n color: 'icon/tertiary',\n display: 'none',\n flexShrink: 0,\n _groupHover: {\n display: 'block',\n },\n },\n selectionMarker: {\n background: 'border/selected',\n borderStartEndRadius: '2',\n borderEndEndRadius: '2',\n display: 'none',\n height: 'full',\n insetBlockStart: 0,\n insetInlineEnd: 0,\n position: 'absolute',\n width: '2',\n },\n footer: {\n borderBlockStart: '1px solid',\n borderColor: 'border/regular',\n display: 'flex',\n flexDirection: 'column',\n marginBlockStart: 'auto',\n paddingBlock: '12',\n },\n project: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n justifyContent: 'center',\n overflow: 'clip',\n paddingBlockEnd: '12',\n paddingBlockStart: '8',\n paddingInlineEnd: '24',\n paddingInlineStart: '32',\n whiteSpace: 'nowrap',\n },\n projectLabel: {\n color: 'text/tertiary',\n textStyle: 'heading/h6',\n },\n projectValue: {\n color: 'text/body',\n textStyle: 'body/lg/semibold',\n },\n title: {\n alignItems: 'center',\n color: 'text/primary',\n display: 'flex',\n gap: '12',\n paddingBlock: '16',\n paddingInlineEnd: '8',\n paddingInlineStart: '32',\n textStyle: 'heading/h3',\n },\n titleWithBack: {\n alignItems: 'center',\n color: 'text/primary',\n display: 'flex',\n gap: '12',\n paddingBlockEnd: '16',\n paddingBlockStart: '24',\n paddingInlineEnd: '8',\n paddingInlineStart: '24',\n textStyle: 'heading/h3',\n },\n divider: {\n marginInline: '32',\n marginBlock: '24',\n width: 'auto',\n },\n },\n variants: {\n selected: {\n true: {\n item: {\n background: 'background/selected',\n _hover: {\n background: 'background/selected-hover',\n },\n },\n itemIcon: {\n color: 'icon/interactive',\n },\n itemLabel: {\n textStyle: 'body/lg/semibold',\n },\n selectionMarker: {\n display: 'block',\n },\n },\n },\n },\n});\n\nexport default sidebarSlotRecipe;\n"],"mappings":";;;AAIA,IAAM,oBAAoB,iBAAiB;CACzC,WAAW;CACX,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,iBAAiB;GACjB,aAAa;GACb,SAAS;GACT,eAAe;GACf,OAAO,IAAI,GAAG;GACd,QAAQ;EACV;EACA,MAAM;GACJ,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,KAAK;GACL,UAAU;GACV,cAAc;GACd,kBAAkB;GAClB,oBAAoB;GACpB,UAAU;GACV,OAAO;GACP,QAAQ,EACN,YAAY,mBACd;EACF;EACA,UAAU;GACR,OAAO;GACP,YAAY;EACd;EACA,WAAW;GACT,OAAO;GACP,MAAM;GACN,UAAU;GACV,UAAU;GACV,WAAW;GACX,cAAc;GACd,WAAW;GACX,YAAY;EACd;EACA,YAAY;GACV,OAAO;GACP,SAAS;GACT,YAAY;GACZ,aAAa,EACX,SAAS,QACX;EACF;EACA,iBAAiB;GACf,YAAY;GACZ,sBAAsB;GACtB,oBAAoB;GACpB,SAAS;GACT,QAAQ;GACR,iBAAiB;GACjB,gBAAgB;GAChB,UAAU;GACV,OAAO;EACT;EACA,QAAQ;GACN,kBAAkB;GAClB,aAAa;GACb,SAAS;GACT,eAAe;GACf,kBAAkB;GAClB,cAAc;EAChB;EACA,SAAS;GACP,SAAS;GACT,eAAe;GACf,KAAK;GACL,gBAAgB;GAChB,UAAU;GACV,iBAAiB;GACjB,mBAAmB;GACnB,kBAAkB;GAClB,oBAAoB;GACpB,YAAY;EACd;EACA,cAAc;GACZ,OAAO;GACP,WAAW;EACb;EACA,cAAc;GACZ,OAAO;GACP,WAAW;EACb;EACA,OAAO;GACL,YAAY;GACZ,OAAO;GACP,SAAS;GACT,KAAK;GACL,cAAc;GACd,kBAAkB;GAClB,oBAAoB;GACpB,WAAW;EACb;EACA,eAAe;GACb,YAAY;GACZ,OAAO;GACP,SAAS;GACT,KAAK;GACL,iBAAiB;GACjB,mBAAmB;GACnB,kBAAkB;GAClB,oBAAoB;GACpB,WAAW;EACb;EACA,SAAS;GACP,cAAc;GACd,aAAa;GACb,OAAO;EACT;CACF;CACA,UAAU,EACR,UAAU,EACR,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,QAAQ,EACN,YAAY,4BACd;EACF;EACA,UAAU,EACR,OAAO,mBACT;EACA,WAAW,EACT,WAAW,mBACb;EACA,iBAAiB,EACf,SAAS,QACX;CACF,EACF,EACF;AACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const tourSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "media" | "header" | "title" | "badge" | "arrow" | "arrowTip" | "positioner" | "closeTrigger" | "description" | "control" | "backdrop" | "actions" | "
|
|
1
|
+
declare const tourSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "media" | "header" | "title" | "badge" | "arrow" | "arrowTip" | "positioner" | "closeTrigger" | "description" | "control" | "backdrop" | "actions" | "titleGroup" | "actionTrigger" | "progressText" | "spotlight" | "titleRow", import('@chakra-ui/react').SlotRecipeVariantRecord<"content" | "media" | "header" | "title" | "badge" | "arrow" | "arrowTip" | "positioner" | "closeTrigger" | "description" | "control" | "backdrop" | "actions" | "titleGroup" | "actionTrigger" | "progressText" | "spotlight" | "titleRow">>;
|
|
2
2
|
export default tourSlotRecipe;
|