@mindlogic-ai/logician-ui 5.0.0-alpha.3 → 5.0.0-alpha.30
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/MIGRATION-5.0.md +40 -1
- package/README.md +1 -0
- package/USAGE.md +20 -0
- package/dist/components/Avatar/Avatar.d.ts +68 -11
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +41 -5
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.mjs +40 -5
- package/dist/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Banner/Banner.types.d.ts +24 -1
- package/dist/components/Banner/Banner.types.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +31 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.mjs +31 -3
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/Button.types.d.ts +38 -1
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Card/Card.types.d.ts +12 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/Code/shikiAdapter.d.ts +3 -1
- package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
- package/dist/components/Code/shikiAdapter.js +29 -8
- package/dist/components/Code/shikiAdapter.js.map +1 -1
- package/dist/components/Code/shikiAdapter.mjs +29 -8
- package/dist/components/Code/shikiAdapter.mjs.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
- package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
- package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
- package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.js +8 -3
- package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
- package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
- package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
- package/dist/components/Confetti/Confetti.types.d.ts +5 -1
- package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
- package/dist/components/Confetti/confettiColors.d.ts +5 -5
- package/dist/components/Confetti/confettiColors.js +5 -5
- package/dist/components/Confetti/confettiColors.mjs +5 -5
- package/dist/components/DatePicker/DatePicker.types.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
- package/dist/components/DatePicker/RangeDatePicker.d.ts +2 -1
- package/dist/components/DatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/RangeDatePicker.js +4 -2
- package/dist/components/DatePicker/RangeDatePicker.js.map +1 -1
- package/dist/components/DatePicker/RangeDatePicker.mjs +4 -2
- package/dist/components/DatePicker/RangeDatePicker.mjs.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.d.ts +2 -1
- package/dist/components/DatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.js +4 -2
- package/dist/components/DatePicker/SingleDatePicker.js.map +1 -1
- package/dist/components/DatePicker/SingleDatePicker.mjs +4 -2
- package/dist/components/DatePicker/SingleDatePicker.mjs.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
- package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.d.ts.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.js +1 -1
- package/dist/components/ExpandableText/ExpandableText.js.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.mjs +1 -1
- package/dist/components/ExpandableText/ExpandableText.mjs.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
- package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
- package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
- package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +4 -0
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.mjs +4 -0
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
- package/dist/components/LineGraph/LineGraph.js +4 -5
- package/dist/components/LineGraph/LineGraph.js.map +1 -1
- package/dist/components/LineGraph/LineGraph.mjs +5 -6
- package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
- package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
- package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.d.ts +12 -8
- package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
- package/dist/components/LineGraph/seriesColors.js +8 -7
- package/dist/components/LineGraph/seriesColors.js.map +1 -1
- package/dist/components/LineGraph/seriesColors.mjs +8 -7
- package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
- package/dist/components/Masonry/Masonry.types.d.ts +8 -3
- package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.types.d.ts +8 -0
- package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
- package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
- package/dist/components/Modal/ModalCloseButton.js +1 -1
- package/dist/components/Modal/ModalCloseButton.mjs +1 -1
- package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.js +3 -2
- package/dist/components/MonthPicker/MonthPicker.js.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.mjs +3 -2
- package/dist/components/MonthPicker/MonthPicker.mjs.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.types.d.ts +7 -1
- package/dist/components/MonthPicker/MonthPicker.types.d.ts.map +1 -1
- package/dist/components/NavList/NavList.d.ts +35 -0
- package/dist/components/NavList/NavList.d.ts.map +1 -0
- package/dist/components/NavList/NavList.js +113 -0
- package/dist/components/NavList/NavList.js.map +1 -0
- package/dist/components/NavList/NavList.mjs +111 -0
- package/dist/components/NavList/NavList.mjs.map +1 -0
- package/dist/components/NavList/NavList.styles.d.ts +90 -0
- package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
- package/dist/components/NavList/NavList.styles.js +104 -0
- package/dist/components/NavList/NavList.styles.js.map +1 -0
- package/dist/components/NavList/NavList.styles.mjs +97 -0
- package/dist/components/NavList/NavList.styles.mjs.map +1 -0
- package/dist/components/NavList/NavList.translations.json.js +19 -0
- package/dist/components/NavList/NavList.translations.json.js.map +1 -0
- package/dist/components/NavList/NavList.translations.json.mjs +14 -0
- package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
- package/dist/components/NavList/NavList.types.d.ts +140 -0
- package/dist/components/NavList/NavList.types.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.d.ts +30 -0
- package/dist/components/NavList/NavListContext.d.ts.map +1 -0
- package/dist/components/NavList/NavListContext.js +16 -0
- package/dist/components/NavList/NavListContext.js.map +1 -0
- package/dist/components/NavList/NavListContext.mjs +13 -0
- package/dist/components/NavList/NavListContext.mjs.map +1 -0
- package/dist/components/NavList/NavListGroup.d.ts +31 -0
- package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
- package/dist/components/NavList/NavListGroup.js +115 -0
- package/dist/components/NavList/NavListGroup.js.map +1 -0
- package/dist/components/NavList/NavListGroup.mjs +113 -0
- package/dist/components/NavList/NavListGroup.mjs.map +1 -0
- package/dist/components/NavList/NavListItem.d.ts +16 -0
- package/dist/components/NavList/NavListItem.d.ts.map +1 -0
- package/dist/components/NavList/NavListItem.js +284 -0
- package/dist/components/NavList/NavListItem.js.map +1 -0
- package/dist/components/NavList/NavListItem.mjs +282 -0
- package/dist/components/NavList/NavListItem.mjs.map +1 -0
- package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
- package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
- package/dist/components/NavList/NavListSkeleton.js +33 -0
- package/dist/components/NavList/NavListSkeleton.js.map +1 -0
- package/dist/components/NavList/NavListSkeleton.mjs +31 -0
- package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
- package/dist/components/NavList/index.d.ts +7 -0
- package/dist/components/NavList/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +11 -10
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +11 -10
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/Pagination.mjs +11 -10
- package/dist/components/Pagination/Pagination.mjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
- package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
- package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
- package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +34 -33
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.mjs +35 -34
- package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts +24 -0
- package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.js +30 -0
- package/dist/components/SegmentedControl/SegmentedControl.styles.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.mjs +29 -1
- package/dist/components/SegmentedControl/SegmentedControl.styles.mjs.map +1 -1
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
- package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
- package/dist/components/Select/Combobox.d.ts +1 -1
- package/dist/components/Select/Combobox.d.ts.map +1 -1
- package/dist/components/Select/Combobox.js +9 -2
- package/dist/components/Select/Combobox.js.map +1 -1
- package/dist/components/Select/Combobox.mjs +10 -3
- package/dist/components/Select/Combobox.mjs.map +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +14 -2
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.mjs +15 -3
- package/dist/components/Select/Select.mjs.map +1 -1
- package/dist/components/Select/Select.styles.d.ts +97 -1
- package/dist/components/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/Select/Select.styles.js +83 -0
- package/dist/components/Select/Select.styles.js.map +1 -1
- package/dist/components/Select/Select.styles.mjs +82 -1
- package/dist/components/Select/Select.styles.mjs.map +1 -1
- package/dist/components/Switch/SwitchControl.d.ts.map +1 -1
- package/dist/components/Switch/SwitchControl.js +26 -11
- package/dist/components/Switch/SwitchControl.js.map +1 -1
- package/dist/components/Switch/SwitchControl.mjs +27 -12
- package/dist/components/Switch/SwitchControl.mjs.map +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
- package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +14 -2
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/Tag.mjs +15 -3
- package/dist/components/Tag/Tag.mjs.map +1 -1
- package/dist/components/Tag/Tag.styles.d.ts +20 -2
- package/dist/components/Tag/Tag.styles.d.ts.map +1 -1
- package/dist/components/Tag/Tag.styles.js +81 -0
- package/dist/components/Tag/Tag.styles.js.map +1 -1
- package/dist/components/Tag/Tag.styles.mjs +81 -1
- package/dist/components/Tag/Tag.styles.mjs.map +1 -1
- package/dist/components/Tag/Tag.types.d.ts +15 -2
- package/dist/components/Tag/Tag.types.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +4 -0
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.mjs +4 -0
- package/dist/components/Textarea/Textarea.mjs.map +1 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +5 -1
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.mjs +5 -1
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/Toast.styles.d.ts +13 -2
- package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/components/Toast/Toast.styles.js +19 -7
- package/dist/components/Toast/Toast.styles.js.map +1 -1
- package/dist/components/Toast/Toast.styles.mjs +19 -7
- package/dist/components/Toast/Toast.styles.mjs.map +1 -1
- package/dist/components/Typography/Caption.d.ts.map +1 -1
- package/dist/components/Typography/Caption.js +1 -1
- package/dist/components/Typography/Caption.js.map +1 -1
- package/dist/components/Typography/Caption.mjs +1 -1
- package/dist/components/Typography/Caption.mjs.map +1 -1
- package/dist/components/Typography/H1.d.ts.map +1 -1
- package/dist/components/Typography/H1.js +1 -1
- package/dist/components/Typography/H1.js.map +1 -1
- package/dist/components/Typography/H1.mjs +1 -1
- package/dist/components/Typography/H1.mjs.map +1 -1
- package/dist/components/Typography/H2.d.ts.map +1 -1
- package/dist/components/Typography/H2.js +1 -1
- package/dist/components/Typography/H2.js.map +1 -1
- package/dist/components/Typography/H2.mjs +1 -1
- package/dist/components/Typography/H2.mjs.map +1 -1
- package/dist/components/Typography/H3.d.ts.map +1 -1
- package/dist/components/Typography/H3.js +1 -1
- package/dist/components/Typography/H3.js.map +1 -1
- package/dist/components/Typography/H3.mjs +1 -1
- package/dist/components/Typography/H3.mjs.map +1 -1
- package/dist/components/Typography/H4.d.ts.map +1 -1
- package/dist/components/Typography/H4.js +1 -1
- package/dist/components/Typography/H4.js.map +1 -1
- package/dist/components/Typography/H4.mjs +1 -1
- package/dist/components/Typography/H4.mjs.map +1 -1
- package/dist/components/Typography/H5.d.ts.map +1 -1
- package/dist/components/Typography/H5.js +1 -1
- package/dist/components/Typography/H5.js.map +1 -1
- package/dist/components/Typography/H5.mjs +1 -1
- package/dist/components/Typography/H5.mjs.map +1 -1
- package/dist/components/Typography/Link.d.ts.map +1 -1
- package/dist/components/Typography/Link.js +1 -1
- package/dist/components/Typography/Link.js.map +1 -1
- package/dist/components/Typography/Link.mjs +1 -1
- package/dist/components/Typography/Link.mjs.map +1 -1
- package/dist/components/Typography/Overline.d.ts.map +1 -1
- package/dist/components/Typography/Overline.js +1 -1
- package/dist/components/Typography/Overline.js.map +1 -1
- package/dist/components/Typography/Overline.mjs +1 -1
- package/dist/components/Typography/Overline.mjs.map +1 -1
- package/dist/components/Typography/Subtext.d.ts.map +1 -1
- package/dist/components/Typography/Subtext.js +1 -1
- package/dist/components/Typography/Subtext.js.map +1 -1
- package/dist/components/Typography/Subtext.mjs +1 -1
- package/dist/components/Typography/Subtext.mjs.map +1 -1
- package/dist/components/Typography/Subtitle.d.ts.map +1 -1
- package/dist/components/Typography/Subtitle.js +1 -1
- package/dist/components/Typography/Subtitle.js.map +1 -1
- package/dist/components/Typography/Subtitle.mjs +1 -1
- package/dist/components/Typography/Subtitle.mjs.map +1 -1
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text.js +1 -1
- package/dist/components/Typography/Text.js.map +1 -1
- package/dist/components/Typography/Text.mjs +1 -1
- package/dist/components/Typography/Text.mjs.map +1 -1
- package/dist/hooks/useLanguage.d.ts +5 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -1
- package/dist/hooks/useLanguage.js +7 -3
- package/dist/hooks/useLanguage.js.map +1 -1
- package/dist/hooks/useLanguage.mjs +7 -4
- package/dist/hooks/useLanguage.mjs.map +1 -1
- package/dist/hooks/useTranslate.d.ts.map +1 -1
- package/dist/hooks/useTranslate.js +8 -5
- package/dist/hooks/useTranslate.js.map +1 -1
- package/dist/hooks/useTranslate.mjs +8 -5
- package/dist/hooks/useTranslate.mjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/colors.js +63 -19
- package/dist/theme/colors.js.map +1 -1
- package/dist/theme/colors.mjs +64 -20
- package/dist/theme/colors.mjs.map +1 -1
- package/dist/theme/controlSizes.d.ts +91 -0
- package/dist/theme/controlSizes.d.ts.map +1 -0
- package/dist/theme/controlSizes.js +143 -0
- package/dist/theme/controlSizes.js.map +1 -0
- package/dist/theme/controlSizes.mjs +135 -0
- package/dist/theme/controlSizes.mjs.map +1 -0
- package/dist/theme/global.d.ts.map +1 -1
- package/dist/theme/global.js +19 -1
- package/dist/theme/global.js.map +1 -1
- package/dist/theme/global.mjs +19 -1
- package/dist/theme/global.mjs.map +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +14 -43
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +14 -43
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/palette.generated.d.ts +295 -162
- package/dist/theme/palette.generated.d.ts.map +1 -1
- package/dist/theme/palette.generated.js +296 -162
- package/dist/theme/palette.generated.js.map +1 -1
- package/dist/theme/palette.generated.mjs +296 -163
- package/dist/theme/palette.generated.mjs.map +1 -1
- package/dist/theme/paletteSwatches.d.ts +20 -0
- package/dist/theme/paletteSwatches.d.ts.map +1 -1
- package/dist/theme/recipes/avatar.d.ts +30 -0
- package/dist/theme/recipes/avatar.d.ts.map +1 -0
- package/dist/theme/recipes/avatar.js +96 -0
- package/dist/theme/recipes/avatar.js.map +1 -0
- package/dist/theme/recipes/avatar.mjs +94 -0
- package/dist/theme/recipes/avatar.mjs.map +1 -0
- package/dist/theme/recipes/controls.d.ts +94 -0
- package/dist/theme/recipes/controls.d.ts.map +1 -0
- package/dist/theme/recipes/controls.js +154 -0
- package/dist/theme/recipes/controls.js.map +1 -0
- package/dist/theme/recipes/controls.mjs +144 -0
- package/dist/theme/recipes/controls.mjs.map +1 -0
- package/dist/translations/Defaults.translations.json.js +19 -1
- package/dist/translations/Defaults.translations.json.js.map +1 -1
- package/dist/translations/Defaults.translations.json.mjs +18 -2
- package/dist/translations/Defaults.translations.json.mjs.map +1 -1
- package/dist/utils/disabledControl.d.ts +8 -1
- package/dist/utils/disabledControl.d.ts.map +1 -1
- package/dist/utils/disabledControl.js +8 -1
- package/dist/utils/disabledControl.js.map +1 -1
- package/dist/utils/disabledControl.mjs +8 -1
- package/dist/utils/disabledControl.mjs.map +1 -1
- package/dist/utils/focusRing.d.ts +22 -0
- package/dist/utils/focusRing.d.ts.map +1 -1
- package/dist/utils/focusRing.js +22 -0
- package/dist/utils/focusRing.js.map +1 -1
- package/dist/utils/focusRing.mjs +21 -1
- package/dist/utils/focusRing.mjs.map +1 -1
- package/package.json +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +85 -0
- package/src/components/Accordion/Accordion.usage.mdx +200 -0
- package/src/components/Appear/Appear.usage.mdx +107 -0
- package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
- package/src/components/Avatar/Avatar.stories.tsx +199 -24
- package/src/components/Avatar/Avatar.tsx +118 -21
- package/src/components/Avatar/Avatar.usage.mdx +185 -0
- package/src/components/Avatar/index.tsx +8 -1
- package/src/components/Banner/Banner.stories.tsx +152 -2
- package/src/components/Banner/Banner.types.ts +30 -1
- package/src/components/Banner/Banner.usage.mdx +233 -0
- package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
- package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
- package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
- package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
- package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
- package/src/components/Button/Button.stories.tsx +332 -3
- package/src/components/Button/Button.tsx +46 -3
- package/src/components/Button/Button.types.ts +38 -1
- package/src/components/Button/Button.usage.mdx +358 -0
- package/src/components/Button/Button.variants.test.tsx +13 -1
- package/src/components/Card/Card.stories.tsx +106 -0
- package/src/components/Card/Card.types.ts +12 -0
- package/src/components/Card/Card.usage.mdx +216 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
- package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
- package/src/components/Chip/Chip.usage.mdx +78 -0
- package/src/components/Code/Code.stories.tsx +60 -0
- package/src/components/Code/Code.test.tsx +116 -0
- package/src/components/Code/Code.usage.mdx +187 -0
- package/src/components/Code/shikiAdapter.ts +38 -9
- package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
- package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
- package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
- package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
- package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
- package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
- package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
- package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
- package/src/components/Confetti/Confetti.types.ts +5 -1
- package/src/components/Confetti/Confetti.usage.mdx +111 -0
- package/src/components/Confetti/confettiColors.ts +5 -5
- package/src/components/Container/Container.stories.tsx +32 -0
- package/src/components/Container/Container.usage.mdx +130 -0
- package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
- package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
- package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
- package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
- package/src/components/CountUp/CountUp.usage.mdx +107 -0
- package/src/components/DatePicker/DatePicker.types.ts +12 -0
- package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
- package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
- package/src/components/DatePicker/RangeDatePicker.tsx +7 -1
- package/src/components/DatePicker/SingleDatePicker.tsx +7 -1
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
- package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
- package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
- package/src/components/ExpandableText/ExpandableText.tsx +0 -1
- package/src/components/ExpandableText/ExpandableText.usage.mdx +178 -0
- package/src/components/FileInput/FileInput.stories.tsx +38 -1
- package/src/components/FileInput/FileInput.usage.mdx +178 -0
- package/src/components/FileItem/FileItem.stories.tsx +71 -0
- package/src/components/FileItem/FileItem.usage.mdx +180 -0
- package/src/components/FileList/FileList.stories.tsx +25 -0
- package/src/components/FileList/FileList.usage.mdx +165 -0
- package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
- package/src/components/Form/Form.stories.tsx +149 -0
- package/src/components/Form/Form.usage.mdx +203 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
- package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
- package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
- package/src/components/FormControl/FormControl.stories.tsx +35 -0
- package/src/components/FormControl/FormControl.usage.mdx +128 -0
- package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
- package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
- package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
- package/src/components/Icon/Icon.stories.tsx +61 -1
- package/src/components/Icon/Icon.usage.mdx +158 -0
- package/src/components/IconButton/IconButton.stories.tsx +213 -5
- package/src/components/IconButton/IconButton.usage.mdx +275 -0
- package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
- package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
- package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
- package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
- package/src/components/Input/Input.stories.tsx +180 -0
- package/src/components/Input/Input.tsx +4 -0
- package/src/components/Input/Input.usage.mdx +278 -0
- package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
- package/src/components/LineGraph/LineGraph.tsx +4 -5
- package/src/components/LineGraph/LineGraph.types.ts +12 -2
- package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
- package/src/components/LineGraph/seriesColors.test.ts +10 -9
- package/src/components/LineGraph/seriesColors.ts +18 -16
- package/src/components/Loaders/Loaders.stories.tsx +93 -0
- package/src/components/Loaders/Loaders.usage.mdx +180 -0
- package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
- package/src/components/Markdown/Markdown.stories.tsx +53 -0
- package/src/components/Markdown/Markdown.usage.mdx +182 -0
- package/src/components/Masonry/Masonry.stories.tsx +63 -1
- package/src/components/Masonry/Masonry.types.ts +8 -3
- package/src/components/Masonry/Masonry.usage.mdx +142 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
- package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
- package/src/components/Menu/Menu.stories.tsx +146 -2
- package/src/components/Menu/Menu.usage.mdx +238 -0
- package/src/components/Menu/MenuItem.types.ts +8 -0
- package/src/components/Modal/Modal.stories.tsx +177 -1
- package/src/components/Modal/Modal.usage.mdx +262 -0
- package/src/components/Modal/ModalCloseButton.tsx +1 -1
- package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
- package/src/components/MonthPicker/MonthPicker.tsx +7 -1
- package/src/components/MonthPicker/MonthPicker.types.ts +8 -1
- package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
- package/src/components/NavList/NavList.stories.tsx +927 -0
- package/src/components/NavList/NavList.styles.ts +114 -0
- package/src/components/NavList/NavList.test.tsx +1306 -0
- package/src/components/NavList/NavList.translations.json +9 -0
- package/src/components/NavList/NavList.tsx +160 -0
- package/src/components/NavList/NavList.types.ts +155 -0
- package/src/components/NavList/NavList.usage.mdx +545 -0
- package/src/components/NavList/NavListContext.ts +25 -0
- package/src/components/NavList/NavListGroup.tsx +243 -0
- package/src/components/NavList/NavListItem.tsx +543 -0
- package/src/components/NavList/NavListSkeleton.tsx +57 -0
- package/src/components/NavList/index.ts +15 -0
- package/src/components/Pagination/Pagination.stories.tsx +90 -1
- package/src/components/Pagination/Pagination.tsx +11 -10
- package/src/components/Pagination/Pagination.usage.mdx +186 -0
- package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
- package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
- package/src/components/PinInput/PinInput.stories.tsx +91 -0
- package/src/components/PinInput/PinInput.usage.mdx +194 -0
- package/src/components/Popover/Popover.stories.tsx +104 -1
- package/src/components/Popover/Popover.usage.mdx +197 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
- package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
- package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
- package/src/components/Pulse/Pulse.usage.mdx +102 -0
- package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
- package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
- package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
- package/src/components/Radio/Radio.stories.tsx +119 -0
- package/src/components/Radio/Radio.usage.mdx +187 -0
- package/src/components/Reveal/Reveal.usage.mdx +105 -0
- package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
- package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
- package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
- package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
- package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
- package/src/components/SegmentedControl/SegmentedControl.styles.ts +38 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +43 -37
- package/src/components/SegmentedControl/SegmentedControl.usage.mdx +216 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
- package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
- package/src/components/Select/Combobox.tsx +28 -3
- package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
- package/src/components/Select/Select.stories.tsx +290 -1
- package/src/components/Select/Select.styles.ts +89 -0
- package/src/components/Select/Select.tsx +28 -2
- package/src/components/Select/Select.usage.mdx +341 -0
- package/src/components/Shake/Shake.usage.mdx +107 -0
- package/src/components/Slider/Slider.stories.tsx +116 -0
- package/src/components/Slider/Slider.usage.mdx +179 -0
- package/src/components/Spinner/Spinner.stories.tsx +64 -0
- package/src/components/Spinner/Spinner.usage.mdx +136 -0
- package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
- package/src/components/Switch/Switch.stories.tsx +139 -6
- package/src/components/Switch/Switch.usage.mdx +200 -0
- package/src/components/Switch/SwitchControl.tsx +32 -15
- package/src/components/Table/Table.stories.tsx +159 -1
- package/src/components/Table/Table.usage.mdx +235 -0
- package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
- package/src/components/Tabs/Tabs.stories.tsx +86 -0
- package/src/components/Tabs/Tabs.usage.mdx +263 -0
- package/src/components/Tag/Tag.stories.tsx +181 -4
- package/src/components/Tag/Tag.styles.ts +117 -2
- package/src/components/Tag/Tag.test.tsx +87 -1
- package/src/components/Tag/Tag.tsx +22 -1
- package/src/components/Tag/Tag.types.ts +16 -2
- package/src/components/Tag/Tag.usage.mdx +257 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/Textarea/Textarea.stories.tsx +113 -0
- package/src/components/Textarea/Textarea.tsx +4 -0
- package/src/components/Textarea/Textarea.usage.mdx +186 -0
- package/src/components/Toast/Toast.stories.tsx +185 -3
- package/src/components/Toast/Toast.styles.ts +19 -7
- package/src/components/Toast/Toast.tsx +8 -1
- package/src/components/Toast/Toast.usage.mdx +265 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
- package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
- package/src/components/Tree/Tree.stories.tsx +89 -0
- package/src/components/Tree/Tree.usage.mdx +207 -0
- package/src/components/Typography/Caption.tsx +0 -1
- package/src/components/Typography/H1.tsx +0 -1
- package/src/components/Typography/H2.tsx +0 -1
- package/src/components/Typography/H3.tsx +0 -1
- package/src/components/Typography/H4.tsx +0 -1
- package/src/components/Typography/H5.tsx +0 -1
- package/src/components/Typography/Link.tsx +0 -1
- package/src/components/Typography/Overline.tsx +0 -1
- package/src/components/Typography/Subtext.tsx +0 -1
- package/src/components/Typography/Subtitle.tsx +0 -1
- package/src/components/Typography/Text.tsx +0 -1
- package/src/components/Typography/Typography.stories.tsx +117 -0
- package/src/components/Typography/Typography.usage.mdx +257 -0
- package/src/components/Workflow/Workflow.usage.mdx +199 -0
- package/src/components/a11y.kwcag.test.tsx +78 -21
- package/src/components/claude.md +24 -1
- package/src/components/noRawScales.test.ts +5 -1
- package/src/foundations/BrandAssets.mdx +637 -0
- package/src/foundations/BrandAssets.stories.tsx +680 -0
- package/src/foundations/BrandColour.mdx +103 -4
- package/src/foundations/BrandColour.stories.tsx +135 -2
- package/src/hooks/useLanguage.ts +8 -3
- package/src/hooks/useTranslate.test.tsx +46 -0
- package/src/hooks/useTranslate.ts +7 -5
- package/src/index.ts +19 -1
- package/src/theme/BazePalette.stories.tsx +111 -1
- package/src/theme/ControlSizes.stories.tsx +586 -0
- package/src/theme/Palette.stories.tsx +2 -2
- package/src/theme/SemanticTokens.mdx +118 -19
- package/src/theme/claude.md +34 -9
- package/src/theme/colors.ts +82 -19
- package/src/theme/contrast.test.ts +67 -0
- package/src/theme/controlSizes.test.ts +153 -0
- package/src/theme/controlSizes.ts +162 -0
- package/src/theme/global.ts +20 -1
- package/src/theme/index.ts +23 -46
- package/src/theme/palette.generated.ts +296 -162
- package/src/theme/paletteSwatches.test.ts +1 -1
- package/src/theme/paletteSwatches.ts +35 -0
- package/src/theme/recipes/avatar.ts +92 -0
- package/src/theme/recipes/controls.ts +171 -0
- package/src/translations/Defaults.translations.json +14 -0
- package/src/utils/disabledControl.ts +8 -1
- package/src/utils/focusRing.ts +23 -0
|
@@ -13,4 +13,28 @@ import type { SystemStyleObject } from '@chakra-ui/react';
|
|
|
13
13
|
* moment to promote it.
|
|
14
14
|
*/
|
|
15
15
|
export declare const indicatorTravel: SystemStyleObject;
|
|
16
|
+
/**
|
|
17
|
+
* The root's padding in px (see `rootPadding` in SegmentedControl.tsx for
|
|
18
|
+
* why px), per size. Shared with the item-height calc so the two cannot
|
|
19
|
+
* disagree.
|
|
20
|
+
*
|
|
21
|
+
* 4px from `sm` up; 2px at `xs` / `2xs`. A fixed 4px left an `xs` item 20px
|
|
22
|
+
* tall (28 − 8) inside a 16px `ScaledContext`, shorter than its own 14px type's
|
|
23
|
+
* 21px line, and the label read squeezed against the indicator (FactChat
|
|
24
|
+
* coding-agent toolbar, 박상현 2026-11-10). At 2px the item is 24px.
|
|
25
|
+
*/
|
|
26
|
+
export declare const segmentRootPaddingPx: (size: unknown) => number;
|
|
27
|
+
/**
|
|
28
|
+
* Item height so that the OUTER height (item + 2 × root padding) equals the
|
|
29
|
+
* Button height for the same size — `controlSizes[size].height`, i.e. 28 /
|
|
30
|
+
* 31.5 / 35 / 38.5px for xs / sm / md / lg at the 14px root, and 36 / 40 / 44
|
|
31
|
+
* for sm / md / lg inside a 16px `ScaledContext`.
|
|
32
|
+
*
|
|
33
|
+
* A `calc()` on the height token rather than a smaller token: the root padding
|
|
34
|
+
* is a fixed px value while the sizes tokens are rem (em inside a
|
|
35
|
+
* ScaledContext), so no single token equals "Button height − padding" at every
|
|
36
|
+
* font size. The old one-token-smaller table (`6`/`7`/`8`/`9`) was written for
|
|
37
|
+
* a 16px rem and came out 1px taller than Button at the real 14px root.
|
|
38
|
+
*/
|
|
39
|
+
export declare const segmentItemHeight: (size: unknown) => string;
|
|
16
40
|
//# sourceMappingURL=SegmentedControl.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControl.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQ1D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,iBAM7B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,OAAO,KAAG,MACZ,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,OAAO,KAAG,MAKN,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var controlSizes = require('../../theme/controlSizes.js');
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* `travel`, but delivered through custom properties.
|
|
6
8
|
*
|
|
@@ -21,6 +23,34 @@ const indicatorTravel = {
|
|
|
21
23
|
'--transition-duration': 'var(--chakra-durations-motion-instant)',
|
|
22
24
|
},
|
|
23
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* The root's padding in px (see `rootPadding` in SegmentedControl.tsx for
|
|
28
|
+
* why px), per size. Shared with the item-height calc so the two cannot
|
|
29
|
+
* disagree.
|
|
30
|
+
*
|
|
31
|
+
* 4px from `sm` up; 2px at `xs` / `2xs`. A fixed 4px left an `xs` item 20px
|
|
32
|
+
* tall (28 − 8) inside a 16px `ScaledContext`, shorter than its own 14px type's
|
|
33
|
+
* 21px line, and the label read squeezed against the indicator (FactChat
|
|
34
|
+
* coding-agent toolbar, 박상현 2026-11-10). At 2px the item is 24px.
|
|
35
|
+
*/
|
|
36
|
+
const segmentRootPaddingPx = (size) => size === 'xs' || size === '2xs' ? 2 : 4;
|
|
37
|
+
/**
|
|
38
|
+
* Item height so that the OUTER height (item + 2 × root padding) equals the
|
|
39
|
+
* Button height for the same size — `controlSizes[size].height`, i.e. 28 /
|
|
40
|
+
* 31.5 / 35 / 38.5px for xs / sm / md / lg at the 14px root, and 36 / 40 / 44
|
|
41
|
+
* for sm / md / lg inside a 16px `ScaledContext`.
|
|
42
|
+
*
|
|
43
|
+
* A `calc()` on the height token rather than a smaller token: the root padding
|
|
44
|
+
* is a fixed px value while the sizes tokens are rem (em inside a
|
|
45
|
+
* ScaledContext), so no single token equals "Button height − padding" at every
|
|
46
|
+
* font size. The old one-token-smaller table (`6`/`7`/`8`/`9`) was written for
|
|
47
|
+
* a 16px rem and came out 1px taller than Button at the real 14px root.
|
|
48
|
+
*/
|
|
49
|
+
const segmentItemHeight = (size) => `calc(${controlSizes.controlHeightVar((typeof size === 'string' && size in controlSizes.controlSizes
|
|
50
|
+
? size
|
|
51
|
+
: 'md'))} - ${segmentRootPaddingPx(size) * 2}px)`;
|
|
24
52
|
|
|
25
53
|
exports.indicatorTravel = indicatorTravel;
|
|
54
|
+
exports.segmentItemHeight = segmentItemHeight;
|
|
55
|
+
exports.segmentRootPaddingPx = segmentRootPaddingPx;
|
|
26
56
|
//# sourceMappingURL=SegmentedControl.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.styles.js","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedControl.styles.js","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"sourcesContent":[null],"names":["controlHeightVar","controlSizes"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYG;AACI,MAAM,eAAe,GAAsB;AAChD,IAAA,uBAAuB,EAAE,qCAAqC;AAC9D,IAAA,8BAA8B,EAAE,kCAAkC;AAClE,IAAA,aAAa,EAAE;AACb,QAAA,uBAAuB,EAAE,wCAAwC;AAClE,KAAA;;AAGH;;;;;;;;;AASG;AACI,MAAM,oBAAoB,GAAG,CAAC,IAAa,KAChD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC,GAAG;AAExC;;;;;;;;;;;AAWG;MACU,iBAAiB,GAAG,CAAC,IAAa,KAC7C,CAAA,KAAA,EAAQA,6BAAgB,EACrB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,IAAIC;AACnC,MAAE;AACF,MAAE,IAAI,EACT,CAAA,GAAA,EAAM,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,GAAA;;;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { controlHeightVar, controlSizes } from '../../theme/controlSizes.mjs';
|
|
3
|
+
|
|
2
4
|
/**
|
|
3
5
|
* `travel`, but delivered through custom properties.
|
|
4
6
|
*
|
|
@@ -19,6 +21,32 @@ const indicatorTravel = {
|
|
|
19
21
|
'--transition-duration': 'var(--chakra-durations-motion-instant)',
|
|
20
22
|
},
|
|
21
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* The root's padding in px (see `rootPadding` in SegmentedControl.tsx for
|
|
26
|
+
* why px), per size. Shared with the item-height calc so the two cannot
|
|
27
|
+
* disagree.
|
|
28
|
+
*
|
|
29
|
+
* 4px from `sm` up; 2px at `xs` / `2xs`. A fixed 4px left an `xs` item 20px
|
|
30
|
+
* tall (28 − 8) inside a 16px `ScaledContext`, shorter than its own 14px type's
|
|
31
|
+
* 21px line, and the label read squeezed against the indicator (FactChat
|
|
32
|
+
* coding-agent toolbar, 박상현 2026-11-10). At 2px the item is 24px.
|
|
33
|
+
*/
|
|
34
|
+
const segmentRootPaddingPx = (size) => size === 'xs' || size === '2xs' ? 2 : 4;
|
|
35
|
+
/**
|
|
36
|
+
* Item height so that the OUTER height (item + 2 × root padding) equals the
|
|
37
|
+
* Button height for the same size — `controlSizes[size].height`, i.e. 28 /
|
|
38
|
+
* 31.5 / 35 / 38.5px for xs / sm / md / lg at the 14px root, and 36 / 40 / 44
|
|
39
|
+
* for sm / md / lg inside a 16px `ScaledContext`.
|
|
40
|
+
*
|
|
41
|
+
* A `calc()` on the height token rather than a smaller token: the root padding
|
|
42
|
+
* is a fixed px value while the sizes tokens are rem (em inside a
|
|
43
|
+
* ScaledContext), so no single token equals "Button height − padding" at every
|
|
44
|
+
* font size. The old one-token-smaller table (`6`/`7`/`8`/`9`) was written for
|
|
45
|
+
* a 16px rem and came out 1px taller than Button at the real 14px root.
|
|
46
|
+
*/
|
|
47
|
+
const segmentItemHeight = (size) => `calc(${controlHeightVar((typeof size === 'string' && size in controlSizes
|
|
48
|
+
? size
|
|
49
|
+
: 'md'))} - ${segmentRootPaddingPx(size) * 2}px)`;
|
|
22
50
|
|
|
23
|
-
export { indicatorTravel };
|
|
51
|
+
export { indicatorTravel, segmentItemHeight, segmentRootPaddingPx };
|
|
24
52
|
//# sourceMappingURL=SegmentedControl.styles.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.styles.mjs","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedControl.styles.mjs","sources":["../../../src/components/SegmentedControl/SegmentedControl.styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAQA;;;;;;;;;;;;AAYG;AACI,MAAM,eAAe,GAAsB;AAChD,IAAA,uBAAuB,EAAE,qCAAqC;AAC9D,IAAA,8BAA8B,EAAE,kCAAkC;AAClE,IAAA,aAAa,EAAE;AACb,QAAA,uBAAuB,EAAE,wCAAwC;AAClE,KAAA;;AAGH;;;;;;;;;AASG;AACI,MAAM,oBAAoB,GAAG,CAAC,IAAa,KAChD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG,CAAC,GAAG;AAExC;;;;;;;;;;;AAWG;MACU,iBAAiB,GAAG,CAAC,IAAa,KAC7C,CAAA,KAAA,EAAQ,gBAAgB,EACrB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,IAAI;AACnC,MAAE;AACF,MAAE,IAAI,EACT,CAAA,GAAA,EAAM,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,GAAA;;;;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BoxProps } from '@chakra-ui/react';
|
|
2
2
|
import { ProgressBarProps } from '../ProgressBar/ProgressBar.types';
|
|
3
3
|
export type SegmentedProgressBarProps = BoxProps & {
|
|
4
|
+
/** The whole; each segment's width is `value / max`. */
|
|
4
5
|
max: number;
|
|
5
6
|
};
|
|
6
7
|
export type ProgressSegmentProps = ProgressBarProps & {
|
|
8
|
+
/** This part's amount, in the same unit as the bar's `max`. */
|
|
7
9
|
value: number;
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=SegmentedProgressBar.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedProgressBar.types.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"SegmentedProgressBar.types.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Combobox as ChakraCombobox } from '@chakra-ui/react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Compound Combobox primitives — Chakra's `Combobox` namespace with the
|
|
4
4
|
* Logician design-system styling baked into the visual parts (`Input`,
|
|
5
|
-
* `Content`, `Item`). Use these directly for full compositional control;
|
|
5
|
+
* `Content`, `Item`, `ClearTrigger`). Use these directly for full compositional control;
|
|
6
6
|
* use `ComboboxField` for the common single-select case.
|
|
7
7
|
*/
|
|
8
8
|
export declare const Combobox: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Combobox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Combobox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAyE9D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;CAmBpB,CAAC"}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var react = require('@chakra-ui/react');
|
|
7
|
+
var useTranslate = require('../../hooks/useTranslate.js');
|
|
7
8
|
var formControls = require('../../theme/formControls.js');
|
|
8
9
|
var mergeCss = require('../../utils/mergeCss.js');
|
|
10
|
+
var index = require('../Icon/index.js');
|
|
9
11
|
var Select_styles = require('./Select.styles.js');
|
|
10
12
|
|
|
11
13
|
const Input = React.forwardRef(function ComboboxInput({ css, ...props }, ref) {
|
|
@@ -23,10 +25,15 @@ const Content = React.forwardRef(function ComboboxContent({ css, ...props }, ref
|
|
|
23
25
|
const Item = React.forwardRef(function ComboboxItem({ css, ...props }, ref) {
|
|
24
26
|
return (jsxRuntime.jsx(react.Combobox.Item, { ref: ref, ...props, css: mergeCss.mergeCss(Select_styles.itemStyles, css) }));
|
|
25
27
|
});
|
|
28
|
+
/** Same × as `Select.ClearTrigger`; see there. */
|
|
29
|
+
const ClearTrigger = React.forwardRef(function ComboboxClearTrigger({ css, children, ...props }, ref) {
|
|
30
|
+
const translate = useTranslate.useTranslate();
|
|
31
|
+
return (jsxRuntime.jsx(react.Combobox.ClearTrigger, { ref: ref, "aria-label": translate('clear_selection'), ...props, css: mergeCss.mergeCss(Select_styles.comboboxClearTriggerStyles, css), children: children ?? jsxRuntime.jsx(index.CloseIcon, { "aria-hidden": true }) }));
|
|
32
|
+
});
|
|
26
33
|
/**
|
|
27
34
|
* Compound Combobox primitives — Chakra's `Combobox` namespace with the
|
|
28
35
|
* Logician design-system styling baked into the visual parts (`Input`,
|
|
29
|
-
* `Content`, `Item`). Use these directly for full compositional control;
|
|
36
|
+
* `Content`, `Item`, `ClearTrigger`). Use these directly for full compositional control;
|
|
30
37
|
* use `ComboboxField` for the common single-select case.
|
|
31
38
|
*/
|
|
32
39
|
const Combobox = {
|
|
@@ -38,7 +45,7 @@ const Combobox = {
|
|
|
38
45
|
Input,
|
|
39
46
|
Trigger: react.Combobox.Trigger,
|
|
40
47
|
IndicatorGroup: react.Combobox.IndicatorGroup,
|
|
41
|
-
ClearTrigger
|
|
48
|
+
ClearTrigger,
|
|
42
49
|
Positioner: react.Combobox.Positioner,
|
|
43
50
|
Content,
|
|
44
51
|
Empty: react.Combobox.Empty,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","sources":["../../../src/components/Select/Combobox.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraCombobox","mergeCss","noZoomOnFocus","inputStyles","contentStyles","itemStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Combobox.js","sources":["../../../src/components/Select/Combobox.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraCombobox","mergeCss","noZoomOnFocus","inputStyles","contentStyles","itemStyles","useTranslate","comboboxClearTriggerStyles","CloseIcon"],"mappings":";;;;;;;;;;;;AAeA,MAAM,KAAK,GAAGA,gBAAU,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AAE,GAAG,CAAC,EAAA,QAAA,EAE7C,QAAQ,IAAIR,cAAA,CAACS,eAAS,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,CAAe,EAAA,CACV;AAElC,CAAC,CAAC;AAEF;;;;;AAKG;AACI,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAER,cAAc,CAAC,IAAI;IACzB,aAAa,EAAEA,cAAc,CAAC,aAAa;IAC3C,OAAO,EAAEA,cAAc,CAAC,OAAO;IAC/B,KAAK,EAAEA,cAAc,CAAC,KAAK;IAC3B,OAAO,EAAEA,cAAc,CAAC,OAAO;IAC/B,KAAK;IACL,OAAO,EAAEA,cAAc,CAAC,OAAO;IAC/B,cAAc,EAAEA,cAAc,CAAC,cAAc;IAC7C,YAAY;IACZ,UAAU,EAAEA,cAAc,CAAC,UAAU;IACrC,OAAO;IACP,KAAK,EAAEA,cAAc,CAAC,KAAK;IAC3B,SAAS,EAAEA,cAAc,CAAC,SAAS;IACnC,cAAc,EAAEA,cAAc,CAAC,cAAc;IAC7C,IAAI;IACJ,QAAQ,EAAEA,cAAc,CAAC,QAAQ;IACjC,aAAa,EAAEA,cAAc,CAAC,aAAa;IAC3C,WAAW,EAAEA,cAAc,CAAC,WAAW;;;;;"}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Combobox as Combobox$1 } from '@chakra-ui/react';
|
|
5
|
+
import { useTranslate } from '../../hooks/useTranslate.mjs';
|
|
5
6
|
import { noZoomOnFocus } from '../../theme/formControls.mjs';
|
|
6
7
|
import { mergeCss } from '../../utils/mergeCss.mjs';
|
|
7
|
-
import {
|
|
8
|
+
import { CloseIcon } from '../Icon/index.mjs';
|
|
9
|
+
import { inputStyles, contentStyles, itemStyles, comboboxClearTriggerStyles } from './Select.styles.mjs';
|
|
8
10
|
|
|
9
11
|
const Input = forwardRef(function ComboboxInput({ css, ...props }, ref) {
|
|
10
12
|
return (jsx(Combobox$1.Input, { ref: ref, ...props,
|
|
@@ -21,10 +23,15 @@ const Content = forwardRef(function ComboboxContent({ css, ...props }, ref) {
|
|
|
21
23
|
const Item = forwardRef(function ComboboxItem({ css, ...props }, ref) {
|
|
22
24
|
return (jsx(Combobox$1.Item, { ref: ref, ...props, css: mergeCss(itemStyles, css) }));
|
|
23
25
|
});
|
|
26
|
+
/** Same × as `Select.ClearTrigger`; see there. */
|
|
27
|
+
const ClearTrigger = forwardRef(function ComboboxClearTrigger({ css, children, ...props }, ref) {
|
|
28
|
+
const translate = useTranslate();
|
|
29
|
+
return (jsx(Combobox$1.ClearTrigger, { ref: ref, "aria-label": translate('clear_selection'), ...props, css: mergeCss(comboboxClearTriggerStyles, css), children: children ?? jsx(CloseIcon, { "aria-hidden": true }) }));
|
|
30
|
+
});
|
|
24
31
|
/**
|
|
25
32
|
* Compound Combobox primitives — Chakra's `Combobox` namespace with the
|
|
26
33
|
* Logician design-system styling baked into the visual parts (`Input`,
|
|
27
|
-
* `Content`, `Item`). Use these directly for full compositional control;
|
|
34
|
+
* `Content`, `Item`, `ClearTrigger`). Use these directly for full compositional control;
|
|
28
35
|
* use `ComboboxField` for the common single-select case.
|
|
29
36
|
*/
|
|
30
37
|
const Combobox = {
|
|
@@ -36,7 +43,7 @@ const Combobox = {
|
|
|
36
43
|
Input,
|
|
37
44
|
Trigger: Combobox$1.Trigger,
|
|
38
45
|
IndicatorGroup: Combobox$1.IndicatorGroup,
|
|
39
|
-
ClearTrigger
|
|
46
|
+
ClearTrigger,
|
|
40
47
|
Positioner: Combobox$1.Positioner,
|
|
41
48
|
Content,
|
|
42
49
|
Empty: Combobox$1.Empty,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.mjs","sources":["../../../src/components/Select/Combobox.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraCombobox"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Combobox.mjs","sources":["../../../src/components/Select/Combobox.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,EAAA,GAC9C,KAAK,EACT,GAAG,EAAE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,CAAC,EAAA,QAAA,EAE7C,QAAQ,IAAID,GAAA,CAAC,SAAS,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,CAAe,EAAA,CACV;AAElC,CAAC,CAAC;AAEF;;;;;AAKG;AACI,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAEC,UAAc,CAAC,IAAI;IACzB,aAAa,EAAEA,UAAc,CAAC,aAAa;IAC3C,OAAO,EAAEA,UAAc,CAAC,OAAO;IAC/B,KAAK,EAAEA,UAAc,CAAC,KAAK;IAC3B,OAAO,EAAEA,UAAc,CAAC,OAAO;IAC/B,KAAK;IACL,OAAO,EAAEA,UAAc,CAAC,OAAO;IAC/B,cAAc,EAAEA,UAAc,CAAC,cAAc;IAC7C,YAAY;IACZ,UAAU,EAAEA,UAAc,CAAC,UAAU;IACrC,OAAO;IACP,KAAK,EAAEA,UAAc,CAAC,KAAK;IAC3B,SAAS,EAAEA,UAAc,CAAC,SAAS;IACnC,cAAc,EAAEA,UAAc,CAAC,cAAc;IAC7C,IAAI;IACJ,QAAQ,EAAEA,UAAc,CAAC,QAAQ;IACjC,aAAa,EAAEA,UAAc,CAAC,aAAa;IAC3C,WAAW,EAAEA,UAAc,CAAC,WAAW;;;;;"}
|
|
@@ -6,7 +6,7 @@ export interface SelectTriggerProps extends ChakraSelect.TriggerProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* Compound Select primitives — Chakra's `Select` namespace with the Logician
|
|
8
8
|
* design-system styling baked into the visual parts (`Trigger`, `Content`,
|
|
9
|
-
* `Item`, `Indicator`). Use these directly for full compositional control
|
|
9
|
+
* `Item`, `Indicator`, `ClearTrigger`). Use these directly for full compositional control
|
|
10
10
|
* (multi-select, grouped options, custom layouts); use `SelectField` for the
|
|
11
11
|
* common single-select case.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAc1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,YAAY;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AA4ED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CAoBlB,CAAC"}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var react = require('@chakra-ui/react');
|
|
7
|
+
var useTranslate = require('../../hooks/useTranslate.js');
|
|
7
8
|
var mergeCss = require('../../utils/mergeCss.js');
|
|
9
|
+
var index = require('../Icon/index.js');
|
|
8
10
|
var Select_styles = require('./Select.styles.js');
|
|
9
11
|
|
|
10
12
|
const Trigger = React.forwardRef(function SelectTrigger({ css, variant = 'outline', ...props }, ref) {
|
|
@@ -22,10 +24,20 @@ const Item = React.forwardRef(function SelectItem({ css, ...props }, ref) {
|
|
|
22
24
|
const Indicator = React.forwardRef(function SelectIndicator({ css, ...props }, ref) {
|
|
23
25
|
return (jsxRuntime.jsx(react.Select.Indicator, { ref: ref, ...props, css: mergeCss.mergeCss(Select_styles.indicatorStyles, css) }));
|
|
24
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* The × that empties the selection. Draws `CloseIcon` when no children are
|
|
29
|
+
* passed, and names itself in the provider's language: Chakra's own name is
|
|
30
|
+
* the English "Clear value" in every locale. Pass `aria-label` to say what is
|
|
31
|
+
* being cleared ("조직 선택 지우기").
|
|
32
|
+
*/
|
|
33
|
+
const ClearTrigger = React.forwardRef(function SelectClearTrigger({ css, children, ...props }, ref) {
|
|
34
|
+
const translate = useTranslate.useTranslate();
|
|
35
|
+
return (jsxRuntime.jsx(react.Select.ClearTrigger, { ref: ref, "aria-label": translate('clear_selection'), ...props, css: mergeCss.mergeCss(Select_styles.selectClearTriggerStyles, css), children: children ?? jsxRuntime.jsx(index.CloseIcon, { "aria-hidden": true }) }));
|
|
36
|
+
});
|
|
25
37
|
/**
|
|
26
38
|
* Compound Select primitives — Chakra's `Select` namespace with the Logician
|
|
27
39
|
* design-system styling baked into the visual parts (`Trigger`, `Content`,
|
|
28
|
-
* `Item`, `Indicator`). Use these directly for full compositional control
|
|
40
|
+
* `Item`, `Indicator`, `ClearTrigger`). Use these directly for full compositional control
|
|
29
41
|
* (multi-select, grouped options, custom layouts); use `SelectField` for the
|
|
30
42
|
* common single-select case.
|
|
31
43
|
*/
|
|
@@ -39,7 +51,7 @@ const Select = {
|
|
|
39
51
|
ValueText: react.Select.ValueText,
|
|
40
52
|
IndicatorGroup: react.Select.IndicatorGroup,
|
|
41
53
|
Indicator,
|
|
42
|
-
ClearTrigger
|
|
54
|
+
ClearTrigger,
|
|
43
55
|
HiddenSelect: react.Select.HiddenSelect,
|
|
44
56
|
Positioner: react.Select.Positioner,
|
|
45
57
|
Content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraSelect","mergeCss","triggerStyles","ghostTriggerStyles","contentStyles","itemStyles","indicatorStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraSelect","mergeCss","triggerStyles","ghostTriggerStyles","contentStyles","itemStyles","indicatorStyles","useTranslate","selectClearTriggerStyles","CloseIcon"],"mappings":";;;;;;;;;;;A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ardRef } from 'react';
|
|
4
4
|
import { Select as Select$1 } from '@chakra-ui/react';
|
|
5
|
+
import { useTranslate } from '../../hooks/useTranslate.mjs';
|
|
5
6
|
import { mergeCss } from '../../utils/mergeCss.mjs';
|
|
6
|
-
import {
|
|
7
|
+
import { CloseIcon } from '../Icon/index.mjs';
|
|
8
|
+
import { ghostTriggerStyles, triggerStyles, contentStyles, itemStyles, indicatorStyles, selectClearTriggerStyles } from './Select.styles.mjs';
|
|
7
9
|
|
|
8
10
|
const Trigger = forwardRef(function SelectTrigger({ css, variant = 'outline', ...props }, ref) {
|
|
9
11
|
return (jsx(Select$1.Trigger, { ref: ref, ...props, css: mergeCss(triggerStyles, variant === 'ghost' && ghostTriggerStyles, css) }));
|
|
@@ -20,10 +22,20 @@ const Item = forwardRef(function SelectItem({ css, ...props }, ref) {
|
|
|
20
22
|
const Indicator = forwardRef(function SelectIndicator({ css, ...props }, ref) {
|
|
21
23
|
return (jsx(Select$1.Indicator, { ref: ref, ...props, css: mergeCss(indicatorStyles, css) }));
|
|
22
24
|
});
|
|
25
|
+
/**
|
|
26
|
+
* The × that empties the selection. Draws `CloseIcon` when no children are
|
|
27
|
+
* passed, and names itself in the provider's language: Chakra's own name is
|
|
28
|
+
* the English "Clear value" in every locale. Pass `aria-label` to say what is
|
|
29
|
+
* being cleared ("조직 선택 지우기").
|
|
30
|
+
*/
|
|
31
|
+
const ClearTrigger = forwardRef(function SelectClearTrigger({ css, children, ...props }, ref) {
|
|
32
|
+
const translate = useTranslate();
|
|
33
|
+
return (jsx(Select$1.ClearTrigger, { ref: ref, "aria-label": translate('clear_selection'), ...props, css: mergeCss(selectClearTriggerStyles, css), children: children ?? jsx(CloseIcon, { "aria-hidden": true }) }));
|
|
34
|
+
});
|
|
23
35
|
/**
|
|
24
36
|
* Compound Select primitives — Chakra's `Select` namespace with the Logician
|
|
25
37
|
* design-system styling baked into the visual parts (`Trigger`, `Content`,
|
|
26
|
-
* `Item`, `Indicator`). Use these directly for full compositional control
|
|
38
|
+
* `Item`, `Indicator`, `ClearTrigger`). Use these directly for full compositional control
|
|
27
39
|
* (multi-select, grouped options, custom layouts); use `SelectField` for the
|
|
28
40
|
* common single-select case.
|
|
29
41
|
*/
|
|
@@ -37,7 +49,7 @@ const Select = {
|
|
|
37
49
|
ValueText: Select$1.ValueText,
|
|
38
50
|
IndicatorGroup: Select$1.IndicatorGroup,
|
|
39
51
|
Indicator,
|
|
40
|
-
ClearTrigger
|
|
52
|
+
ClearTrigger,
|
|
41
53
|
HiddenSelect: Select$1.HiddenSelect,
|
|
42
54
|
Positioner: Select$1.Positioner,
|
|
43
55
|
Content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraSelect"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.mjs","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraSelect"],"mappings":";;;;;;;;;AAqBA,MAAM,OAAO,GAAG,UAAU,CACxB,SAAS,aAAa,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAA;AAChE,IAAA,QACEA,GAAA,CAACC,QAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EACT,GAAG,EAAE,QAAQ,CACX,aAAa,EACb,OAAO,KAAK,OAAO,IAAI,kBAAkB,EACzC,GAAG,CACJ,EAAA,CACD;AAEN,CAAC,CACF;AAED,MAAM,OAAO,GAAG,UAAU,CACxB,SAAS,aAAa,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAA;IAC3C,QACED,IAACC,QAAY,CAAC,OAAO,EAAA,EACnB,GAAG,EAAE,GAAG;;;AAGR,QAAA,cAAc,EAAC,mBAAmB,EAAA,GAC9B,KAAK,EACT,GAAG,EAAE,QAAQ,CAAC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AO,EAAEA,QAAY,CAAC,OAAO;IAC7B,KAAK,EAAEA,QAAY,CAAC,KAAK;IACzB,OAAO,EAAEA,QAAY,CAAC,OAAO;IAC7B,OAAO;IACP,SAAS,EAAEA,QAAY,CAAC,SAAS;IACjC,cAAc,EAAEA,QAAY,CAAC,cAAc;IAC3C,SAAS;IACT,YAAY;IACZ,YAAY,EAAEA,QAAY,CAAC,YAAY;IACvC,UAAU,EAAEA,QAAY,CAAC,UAAU;IACnC,OAAO;IACP,SAAS,EAAEA,QAAY,CAAC,SAAS;IACjC,cAAc,EAAEA,QAAY,CAAC,cAAc;IAC3C,IAAI;IACJ,QAAQ,EAAEA,QAAY,CAAC,QAAQ;IAC/B,aAAa,EAAEA,QAAY,CAAC,aAAa;IACzC,WAAW,EAAEA,QAAY,CAAC,WAAW;;;;;"}
|
|
@@ -14,6 +14,12 @@ export declare const triggerStyles: {
|
|
|
14
14
|
borderColor: string;
|
|
15
15
|
boxShadow: string;
|
|
16
16
|
};
|
|
17
|
+
'[data-part=control]:has([data-part=clear-trigger]:not([hidden])) > &': {
|
|
18
|
+
pe: string;
|
|
19
|
+
'& [data-part=value-text]': {
|
|
20
|
+
maxW: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
17
23
|
bg: string;
|
|
18
24
|
color: string;
|
|
19
25
|
borderColor: string;
|
|
@@ -65,10 +71,10 @@ export declare const ghostTriggerStyles: {
|
|
|
65
71
|
borderColor: string;
|
|
66
72
|
};
|
|
67
73
|
_disabled: {
|
|
74
|
+
color: string;
|
|
68
75
|
cursor: string;
|
|
69
76
|
fontWeight: string;
|
|
70
77
|
bg: "transparent";
|
|
71
|
-
color: "disabled.fg";
|
|
72
78
|
borderColor: "transparent";
|
|
73
79
|
opacity: 1;
|
|
74
80
|
boxShadow: "none";
|
|
@@ -76,6 +82,12 @@ export declare const ghostTriggerStyles: {
|
|
|
76
82
|
};
|
|
77
83
|
/** Combobox text input — the typeable control. */
|
|
78
84
|
export declare const inputStyles: {
|
|
85
|
+
'[data-part=control]:has([data-part=clear-trigger]:not([hidden])) > &': {
|
|
86
|
+
pe: string;
|
|
87
|
+
'& [data-part=value-text]': {
|
|
88
|
+
maxW: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
79
91
|
bg: string;
|
|
80
92
|
color: string;
|
|
81
93
|
borderColor: string;
|
|
@@ -147,4 +159,88 @@ export declare const itemStyles: {
|
|
|
147
159
|
export declare const indicatorStyles: {
|
|
148
160
|
color: string;
|
|
149
161
|
};
|
|
162
|
+
export declare const selectClearTriggerStyles: {
|
|
163
|
+
position: string;
|
|
164
|
+
display: string;
|
|
165
|
+
alignItems: string;
|
|
166
|
+
justifyContent: string;
|
|
167
|
+
boxSize: string;
|
|
168
|
+
me: string;
|
|
169
|
+
color: string;
|
|
170
|
+
cursor: string;
|
|
171
|
+
_hover: {
|
|
172
|
+
color: string;
|
|
173
|
+
};
|
|
174
|
+
_after: {
|
|
175
|
+
content: string;
|
|
176
|
+
position: string;
|
|
177
|
+
insetEnd: string;
|
|
178
|
+
top: string;
|
|
179
|
+
transform: string;
|
|
180
|
+
h: string;
|
|
181
|
+
borderEndWidth: string;
|
|
182
|
+
borderColor: string;
|
|
183
|
+
pointerEvents: string;
|
|
184
|
+
};
|
|
185
|
+
_hidden: {
|
|
186
|
+
display: string;
|
|
187
|
+
};
|
|
188
|
+
'& svg': {
|
|
189
|
+
width: string;
|
|
190
|
+
height: string;
|
|
191
|
+
};
|
|
192
|
+
'@media (pointer: coarse)': {
|
|
193
|
+
'&::before': {
|
|
194
|
+
content: string;
|
|
195
|
+
position: string;
|
|
196
|
+
insetEnd: number;
|
|
197
|
+
top: string;
|
|
198
|
+
transform: string;
|
|
199
|
+
width: string;
|
|
200
|
+
height: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
export declare const comboboxClearTriggerStyles: {
|
|
205
|
+
position: string;
|
|
206
|
+
display: string;
|
|
207
|
+
alignItems: string;
|
|
208
|
+
justifyContent: string;
|
|
209
|
+
boxSize: string;
|
|
210
|
+
me: string;
|
|
211
|
+
color: string;
|
|
212
|
+
cursor: string;
|
|
213
|
+
_hover: {
|
|
214
|
+
color: string;
|
|
215
|
+
};
|
|
216
|
+
_after: {
|
|
217
|
+
content: string;
|
|
218
|
+
position: string;
|
|
219
|
+
insetEnd: string;
|
|
220
|
+
top: string;
|
|
221
|
+
transform: string;
|
|
222
|
+
h: string;
|
|
223
|
+
borderEndWidth: string;
|
|
224
|
+
borderColor: string;
|
|
225
|
+
pointerEvents: string;
|
|
226
|
+
};
|
|
227
|
+
_hidden: {
|
|
228
|
+
display: string;
|
|
229
|
+
};
|
|
230
|
+
'& svg': {
|
|
231
|
+
width: string;
|
|
232
|
+
height: string;
|
|
233
|
+
};
|
|
234
|
+
'@media (pointer: coarse)': {
|
|
235
|
+
'&::before': {
|
|
236
|
+
content: string;
|
|
237
|
+
position: string;
|
|
238
|
+
insetEnd: number;
|
|
239
|
+
top: string;
|
|
240
|
+
transform: string;
|
|
241
|
+
width: string;
|
|
242
|
+
height: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
150
246
|
//# sourceMappingURL=Select.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgDH,8CAA8C;AAC9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQzB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAWtB,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,eAAe;;CAE3B,CAAC;AA2DF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEpC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEtC,CAAC"}
|
|
@@ -37,9 +37,26 @@ const fieldBase = {
|
|
|
37
37
|
fontWeight: 'semibold',
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Room for the × and its divider at the end of the value, while the × shows.
|
|
42
|
+
*
|
|
43
|
+
* The indicator group overlays the value. Chakra keeps the value off the
|
|
44
|
+
* chevron with `maxW: 80%` on a Select (too little in a narrow filter) and a
|
|
45
|
+
* 1.5× height padding on a Combobox, and neither counts the × with its
|
|
46
|
+
* divider. This reserves the whole group instead: padding on both sides, the
|
|
47
|
+
* × (`8`) with its `me` (`3`), the group `gap` (`1`) and the chevron (`1em`),
|
|
48
|
+
* so a long value ends in an ellipsis before the ×.
|
|
49
|
+
*/
|
|
50
|
+
const clearTriggerRoom = (paddingVar) => ({
|
|
51
|
+
'[data-part=control]:has([data-part=clear-trigger]:not([hidden])) > &': {
|
|
52
|
+
pe: `calc(var(${paddingVar}) * 2 + 4em)`,
|
|
53
|
+
'& [data-part=value-text]': { maxW: 'none' },
|
|
54
|
+
},
|
|
55
|
+
});
|
|
40
56
|
/** Select trigger — the clickable control. */
|
|
41
57
|
const triggerStyles = {
|
|
42
58
|
...fieldBase,
|
|
59
|
+
...clearTriggerRoom('--select-trigger-padding-x'),
|
|
43
60
|
cursor: 'pointer',
|
|
44
61
|
_open: {
|
|
45
62
|
borderColor: 'primary.main',
|
|
@@ -66,6 +83,11 @@ const ghostTriggerStyles = {
|
|
|
66
83
|
_hover: { borderColor: 'border.control' },
|
|
67
84
|
_disabled: {
|
|
68
85
|
...disabledControl.disabledText,
|
|
86
|
+
// A field, not a ghost button: the value text stays readable at
|
|
87
|
+
// `disabled.fg` (well apart from the resting `fg.default` already).
|
|
88
|
+
// `disabled.fgGhost` is for fill-less buttons whose resting glyph is
|
|
89
|
+
// `fg.icon`.
|
|
90
|
+
color: 'disabled.fg',
|
|
69
91
|
cursor: 'not-allowed',
|
|
70
92
|
fontWeight: 'semibold',
|
|
71
93
|
},
|
|
@@ -73,6 +95,7 @@ const ghostTriggerStyles = {
|
|
|
73
95
|
/** Combobox text input — the typeable control. */
|
|
74
96
|
const inputStyles = {
|
|
75
97
|
...fieldBase,
|
|
98
|
+
...clearTriggerRoom('--combobox-input-padding-x'),
|
|
76
99
|
};
|
|
77
100
|
/** Dropdown panel for both Select and Combobox. */
|
|
78
101
|
const contentStyles = {
|
|
@@ -109,12 +132,72 @@ const itemStyles = {
|
|
|
109
132
|
const indicatorStyles = {
|
|
110
133
|
color: 'fg.muted',
|
|
111
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Clear (×) button for both Select and Combobox.
|
|
137
|
+
*
|
|
138
|
+
* Chakra's recipe gives this part a colour and no size, and its default icon
|
|
139
|
+
* is `1em`, so a bare `ClearTrigger` drew a 21px × next to a 14px chevron. The
|
|
140
|
+
* × is the secondary action, so it is smaller (`3.5`, 12px at 14px text) and
|
|
141
|
+
* lighter (`fg.icon`) than the chevron, on an `8` box. `& svg` rather than
|
|
142
|
+
* `_icon` so the size also wins over an icon passed with its own `boxSize`.
|
|
143
|
+
*
|
|
144
|
+
* On a touch screen the hit area widens to 44px, toward the value only: the
|
|
145
|
+
* chevron sits to the right and has to keep opening the list. The height stays
|
|
146
|
+
* the control's own height (`heightVar`), so the area never reaches the field
|
|
147
|
+
* above or below. Every control height is over the 24px KWCAG minimum.
|
|
148
|
+
*/
|
|
149
|
+
const clearTriggerStyles = (heightVar) => ({
|
|
150
|
+
position: 'relative',
|
|
151
|
+
display: 'inline-flex',
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
justifyContent: 'center',
|
|
154
|
+
boxSize: '8',
|
|
155
|
+
// The divider sits `1` past the box. `3` leaves the same space between the
|
|
156
|
+
// divider and the chevron glyph as between the × glyph and the divider
|
|
157
|
+
// (about 13px at 14px text).
|
|
158
|
+
me: '3',
|
|
159
|
+
color: 'fg.icon',
|
|
160
|
+
cursor: 'pointer',
|
|
161
|
+
_hover: { color: 'fg.default' },
|
|
162
|
+
// The divider marks where opening starts: it sits in the `me` gap, takes no
|
|
163
|
+
// clicks, and everything right of it belongs to the chevron.
|
|
164
|
+
_after: {
|
|
165
|
+
content: '""',
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
insetEnd: '-1',
|
|
168
|
+
top: '50%',
|
|
169
|
+
transform: 'translateY(-50%)',
|
|
170
|
+
h: '4',
|
|
171
|
+
borderEndWidth: '1px',
|
|
172
|
+
borderColor: 'border.subtle',
|
|
173
|
+
pointerEvents: 'none',
|
|
174
|
+
},
|
|
175
|
+
// zag hides the × with the `hidden` attribute while nothing is selected,
|
|
176
|
+
// and the `display` above would otherwise override it.
|
|
177
|
+
_hidden: { display: 'none' },
|
|
178
|
+
'& svg': { width: '3.5', height: '3.5' },
|
|
179
|
+
'@media (pointer: coarse)': {
|
|
180
|
+
'&::before': {
|
|
181
|
+
content: '""',
|
|
182
|
+
position: 'absolute',
|
|
183
|
+
insetEnd: 0,
|
|
184
|
+
top: '50%',
|
|
185
|
+
transform: 'translateY(-50%)',
|
|
186
|
+
width: '44px',
|
|
187
|
+
height: `var(${heightVar})`,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
const selectClearTriggerStyles = clearTriggerStyles('--select-trigger-height');
|
|
192
|
+
const comboboxClearTriggerStyles = clearTriggerStyles('--combobox-input-height');
|
|
112
193
|
|
|
194
|
+
exports.comboboxClearTriggerStyles = comboboxClearTriggerStyles;
|
|
113
195
|
exports.contentStyles = contentStyles;
|
|
114
196
|
exports.ghostContentStyles = ghostContentStyles;
|
|
115
197
|
exports.ghostTriggerStyles = ghostTriggerStyles;
|
|
116
198
|
exports.indicatorStyles = indicatorStyles;
|
|
117
199
|
exports.inputStyles = inputStyles;
|
|
118
200
|
exports.itemStyles = itemStyles;
|
|
201
|
+
exports.selectClearTriggerStyles = selectClearTriggerStyles;
|
|
119
202
|
exports.triggerStyles = triggerStyles;
|
|
120
203
|
//# sourceMappingURL=Select.styles.js.map
|