@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
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
+
import { Stack } from '@chakra-ui/react';
|
|
4
|
+
|
|
5
|
+
import { T } from '../../guidelines/_components/Lang';
|
|
6
|
+
import { TokenTable } from '../../guidelines/_components/TokenTable';
|
|
7
|
+
import { FieldRow } from '../Form';
|
|
3
8
|
import { FileItem } from './FileItem';
|
|
4
9
|
|
|
5
10
|
const meta = {
|
|
@@ -53,3 +58,69 @@ export const Deleting: Story = {
|
|
|
53
58
|
isDeleting: true,
|
|
54
59
|
},
|
|
55
60
|
};
|
|
61
|
+
|
|
62
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
63
|
+
// Pulled into `FileItem.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
64
|
+
|
|
65
|
+
export const DoErrorInText: Story = {
|
|
66
|
+
tags: ['!dev'],
|
|
67
|
+
parameters: { layout: 'padded' },
|
|
68
|
+
name: 'Usage / Do: repeat the error in text',
|
|
69
|
+
render: () => (
|
|
70
|
+
<Stack maxW="480px">
|
|
71
|
+
<FieldRow error="members.xlsx: 파일이 5MB를 넘습니다. 나눠서 올려 주세요.">
|
|
72
|
+
<FileItem
|
|
73
|
+
fileName="members.xlsx"
|
|
74
|
+
error="파일이 5MB를 넘습니다."
|
|
75
|
+
onFileDelete={() => {}}
|
|
76
|
+
/>
|
|
77
|
+
</FieldRow>
|
|
78
|
+
</Stack>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const DontErrorInTooltipOnly: Story = {
|
|
83
|
+
tags: ['!dev'],
|
|
84
|
+
parameters: { layout: 'padded' },
|
|
85
|
+
name: "Usage / Don't: the reason only in a tooltip",
|
|
86
|
+
render: () => (
|
|
87
|
+
<Stack maxW="480px">
|
|
88
|
+
<FileItem
|
|
89
|
+
fileName="members.xlsx"
|
|
90
|
+
error="파일이 5MB를 넘습니다."
|
|
91
|
+
onFileDelete={() => {}}
|
|
92
|
+
/>
|
|
93
|
+
</Stack>
|
|
94
|
+
),
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** Tokens `FileItem.tsx` reads. */
|
|
98
|
+
export const UsageTokens: Story = {
|
|
99
|
+
tags: ['!dev'],
|
|
100
|
+
parameters: { layout: 'padded' },
|
|
101
|
+
name: 'Usage / Tokens',
|
|
102
|
+
render: () => (
|
|
103
|
+
<TokenTable
|
|
104
|
+
rows={[
|
|
105
|
+
{ token: 'border.subtle', use: <T en="Row border" ko="행 테두리" /> },
|
|
106
|
+
{
|
|
107
|
+
token: 'fg.muted',
|
|
108
|
+
use: <T en="File icon, action icons" ko="파일 아이콘, 동작 아이콘" />,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
token: 'fg.subtle',
|
|
112
|
+
use: <T en="Cancel-upload icon" ko="업로드 취소 아이콘" />,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
token: 'danger.fg',
|
|
116
|
+
use: (
|
|
117
|
+
<T
|
|
118
|
+
en="Error: left bar, icon, file name"
|
|
119
|
+
ko="오류: 왼쪽 막대, 아이콘, 파일 이름"
|
|
120
|
+
/>
|
|
121
|
+
),
|
|
122
|
+
},
|
|
123
|
+
]}
|
|
124
|
+
/>
|
|
125
|
+
),
|
|
126
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as FileItemStories from './FileItem.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={FileItemStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# FileItem
|
|
13
|
+
|
|
14
|
+
One row for one file: its name, upload progress or size, and download and
|
|
15
|
+
delete buttons.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- A single attached or uploaded file in a form: the CSV just picked, a
|
|
20
|
+
template being uploaded, a verification document.
|
|
21
|
+
|
|
22
|
+
## When not to use
|
|
23
|
+
|
|
24
|
+
- Several files → `FileList`, which renders FileItem rows and a "see more".
|
|
25
|
+
- A file inside a chat message → the chat attachment components.
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
</En>
|
|
30
|
+
|
|
31
|
+
<Ko>
|
|
32
|
+
|
|
33
|
+
# FileItem
|
|
34
|
+
|
|
35
|
+
파일 하나를 보여 주는 한 줄입니다. 파일 이름, 업로드 진행률이나 크기, 내려받기와 삭제
|
|
36
|
+
버튼이 있습니다.
|
|
37
|
+
|
|
38
|
+
## 언제 쓰나요
|
|
39
|
+
|
|
40
|
+
- 폼에 붙인 파일 하나: 방금 고른 CSV, 올리는 중인 템플릿, 증빙 서류.
|
|
41
|
+
|
|
42
|
+
## 언제 쓰지 않나요
|
|
43
|
+
|
|
44
|
+
- 파일이 여러 개라면 `FileList`를 씁니다. FileItem 행과 "더 보기"를 그려 줍니다.
|
|
45
|
+
- 채팅 메시지 안의 파일은 채팅 첨부 컴포넌트를 씁니다.
|
|
46
|
+
|
|
47
|
+
## 속성
|
|
48
|
+
|
|
49
|
+
</Ko>
|
|
50
|
+
|
|
51
|
+
<ArgTypes
|
|
52
|
+
of={FileItemStories}
|
|
53
|
+
include={[
|
|
54
|
+
'fileName',
|
|
55
|
+
'progress',
|
|
56
|
+
'fileSize',
|
|
57
|
+
'error',
|
|
58
|
+
'onFileDownload',
|
|
59
|
+
'onFileDelete',
|
|
60
|
+
'isDownloading',
|
|
61
|
+
'isDeleting',
|
|
62
|
+
]}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<En>
|
|
66
|
+
|
|
67
|
+
- `progress` from 0 to 99 shows a percentage, a bar, a spinner and a cancel
|
|
68
|
+
button that calls `onFileDelete`. At 100, or with no `progress`, the row
|
|
69
|
+
shows the size and the actions.
|
|
70
|
+
- The download and delete buttons appear only when you pass their handlers.
|
|
71
|
+
`isDownloading` / `isDeleting` swap them for a spinner.
|
|
72
|
+
- `error` turns the name, icon and left edge `danger.fg` and puts the message
|
|
73
|
+
in a tooltip on an alert icon. It hides the download button.
|
|
74
|
+
|
|
75
|
+
## Do / Don't
|
|
76
|
+
|
|
77
|
+
</En>
|
|
78
|
+
|
|
79
|
+
<Ko>
|
|
80
|
+
|
|
81
|
+
- `progress`가 0~99이면 백분율, 진행 막대, 스피너, `onFileDelete`를 부르는 취소 버튼을
|
|
82
|
+
보여 줍니다. 100이거나 `progress`가 없으면 크기와 동작 버튼을 보여 줍니다.
|
|
83
|
+
- 내려받기와 삭제 버튼은 처리 함수를 넘겼을 때만 나타납니다. `isDownloading`·
|
|
84
|
+
`isDeleting`이면 버튼 대신 스피너가 보입니다.
|
|
85
|
+
- `error`를 주면 이름, 아이콘, 왼쪽 가장자리가 `danger.fg`로 바뀌고, 문구는 경고
|
|
86
|
+
아이콘의 툴팁에 들어갑니다. 내려받기 버튼은 숨겨집니다.
|
|
87
|
+
|
|
88
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
89
|
+
|
|
90
|
+
</Ko>
|
|
91
|
+
|
|
92
|
+
<Canvas of={FileItemStories.DoErrorInText} />
|
|
93
|
+
<Verdict
|
|
94
|
+
kind="do"
|
|
95
|
+
en="Repeat the reason in text under the row, with the file name, so it can be read without hovering."
|
|
96
|
+
ko="실패 이유를 파일 이름과 함께 행 아래에 글자로 한 번 더 보여 줍니다. 마우스를 올리지 않아도 읽을 수 있습니다."
|
|
97
|
+
/>
|
|
98
|
+
|
|
99
|
+
<Canvas of={FileItemStories.DontErrorInTooltipOnly} />
|
|
100
|
+
<Verdict
|
|
101
|
+
kind="dont"
|
|
102
|
+
en="Leave the reason only in the tooltip. The icon is not focusable, so keyboard and screen reader users never reach it."
|
|
103
|
+
ko="실패 이유를 툴팁에만 두지 마세요. 아이콘이 초점을 받지 않아서 키보드와 화면 낭독기 사용자는 끝내 읽지 못합니다."
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<En>
|
|
107
|
+
|
|
108
|
+
## Content
|
|
109
|
+
|
|
110
|
+
- Show the real file name; let it truncate rather than rewriting it.
|
|
111
|
+
- Error text says what failed and what to do (파일이 5MB를 넘습니다. 나눠서
|
|
112
|
+
올려 주세요.).
|
|
113
|
+
|
|
114
|
+
## Accessibility
|
|
115
|
+
|
|
116
|
+
What FileItem does for you:
|
|
117
|
+
|
|
118
|
+
- Download and delete are `IconButton`s with translated names and tooltips.
|
|
119
|
+
|
|
120
|
+
Known gaps, and what to do:
|
|
121
|
+
|
|
122
|
+
- **The error is in a hover tooltip on a non-focusable icon** (WCAG 1.4.1,
|
|
123
|
+
3.3.1). Repeat it in text, as above.
|
|
124
|
+
- **The cancel-upload button is named in English** ("remove uploading file
|
|
125
|
+
button") on every screen, Korean included.
|
|
126
|
+
- Progress is shown as a percentage and a bar; a screen reader is not told
|
|
127
|
+
when the upload finishes. Announce completion with a toast (WCAG 4.1.3).
|
|
128
|
+
|
|
129
|
+
## Tokens
|
|
130
|
+
|
|
131
|
+
</En>
|
|
132
|
+
|
|
133
|
+
<Ko>
|
|
134
|
+
|
|
135
|
+
## 문구
|
|
136
|
+
|
|
137
|
+
- 실제 파일 이름을 그대로 보여 줍니다. 길면 고쳐 쓰지 말고 말줄임표로 자릅니다.
|
|
138
|
+
- 오류 문구는 무엇이 실패했고 어떻게 하면 되는지 씁니다(파일이 5MB를 넘습니다. 나눠서
|
|
139
|
+
올려 주세요.).
|
|
140
|
+
|
|
141
|
+
## 접근성
|
|
142
|
+
|
|
143
|
+
FileItem이 알아서 하는 일
|
|
144
|
+
|
|
145
|
+
- 내려받기와 삭제는 번역된 이름과 툴팁이 있는 `IconButton`입니다.
|
|
146
|
+
|
|
147
|
+
알려진 한계와 대처
|
|
148
|
+
|
|
149
|
+
- **오류 문구가 초점을 받지 않는 아이콘의 툴팁에만 있습니다**(WCAG 1.4.1, 3.3.1). 위처럼
|
|
150
|
+
글자로 한 번 더 보여 줍니다.
|
|
151
|
+
- **업로드 취소 버튼 이름이 영어입니다**("remove uploading file button"). 한국어 화면에서도
|
|
152
|
+
영어로 읽힙니다.
|
|
153
|
+
- 진행 상황은 백분율과 막대로만 보이고, 업로드가 끝났다는 사실은 화면 낭독기에 알리지
|
|
154
|
+
않습니다. 끝나면 토스트로 알립니다(WCAG 4.1.3).
|
|
155
|
+
|
|
156
|
+
## 토큰
|
|
157
|
+
|
|
158
|
+
</Ko>
|
|
159
|
+
|
|
160
|
+
<Canvas of={FileItemStories.UsageTokens} sourceState="none" />
|
|
161
|
+
|
|
162
|
+
<En>
|
|
163
|
+
|
|
164
|
+
## Related
|
|
165
|
+
|
|
166
|
+
- **FileList**: several FileItem rows.
|
|
167
|
+
- **FileInput**: picking the file.
|
|
168
|
+
- **ProgressBar** / **Tooltip**: the parts it uses.
|
|
169
|
+
|
|
170
|
+
</En>
|
|
171
|
+
|
|
172
|
+
<Ko>
|
|
173
|
+
|
|
174
|
+
## 관련 컴포넌트
|
|
175
|
+
|
|
176
|
+
- **FileList**: FileItem 여러 줄.
|
|
177
|
+
- **FileInput**: 파일 고르기.
|
|
178
|
+
- **ProgressBar** / **Tooltip**: 안에서 쓰는 부품.
|
|
179
|
+
|
|
180
|
+
</Ko>
|
|
@@ -53,3 +53,28 @@ export const Default: Story = {
|
|
|
53
53
|
return <FileList {...args} files={files} onFileDelete={handleFileDelete} />;
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
|
+
|
|
57
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
58
|
+
// Pulled into `FileList.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
59
|
+
|
|
60
|
+
export const DoDownloadAndDelete: Story = {
|
|
61
|
+
tags: ['!dev'],
|
|
62
|
+
parameters: { layout: 'padded' },
|
|
63
|
+
name: 'Usage / Do: download where there is a URL',
|
|
64
|
+
render: () => (
|
|
65
|
+
<FileList
|
|
66
|
+
files={[
|
|
67
|
+
{
|
|
68
|
+
id: 1,
|
|
69
|
+
name: '2026년 3분기 이용 보고서.pdf',
|
|
70
|
+
size: 482_133,
|
|
71
|
+
fileUrl: '#',
|
|
72
|
+
},
|
|
73
|
+
{ id: 2, name: '서비스 이용약관.docx', size: 91_204, fileUrl: '#' },
|
|
74
|
+
{ id: 3, name: '업로드 중인 파일.pptx', progress: 40 },
|
|
75
|
+
]}
|
|
76
|
+
onFileDownload={() => {}}
|
|
77
|
+
onFileDelete={async () => {}}
|
|
78
|
+
/>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as FileListStories from './FileList.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={FileListStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# FileList
|
|
13
|
+
|
|
14
|
+
A bordered list of `FileItem` rows that shows the first few files and reveals
|
|
15
|
+
more on request.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- The files attached to something: a chatbot's knowledge files, a project's
|
|
20
|
+
uploads, a policy's documents.
|
|
21
|
+
|
|
22
|
+
## When not to use
|
|
23
|
+
|
|
24
|
+
- One file → `FileItem`.
|
|
25
|
+
- Hundreds of files the user searches, sorts or selects → `Table`.
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
</En>
|
|
30
|
+
|
|
31
|
+
<Ko>
|
|
32
|
+
|
|
33
|
+
# FileList
|
|
34
|
+
|
|
35
|
+
`FileItem` 행을 테두리 안에 모아, 처음 몇 개만 보여 주고 요청하면 더 펼치는
|
|
36
|
+
목록입니다.
|
|
37
|
+
|
|
38
|
+
## 언제 쓰나요
|
|
39
|
+
|
|
40
|
+
- 어떤 대상에 붙은 파일들: 챗봇의 지식 파일, 프로젝트에 올린 파일, 정책 문서.
|
|
41
|
+
|
|
42
|
+
## 언제 쓰지 않나요
|
|
43
|
+
|
|
44
|
+
- 파일이 하나라면 `FileItem`을 씁니다.
|
|
45
|
+
- 검색, 정렬, 선택이 필요한 수백 개의 파일은 `Table`을 씁니다.
|
|
46
|
+
|
|
47
|
+
## 속성
|
|
48
|
+
|
|
49
|
+
</Ko>
|
|
50
|
+
|
|
51
|
+
<ArgTypes
|
|
52
|
+
of={FileListStories}
|
|
53
|
+
include={[
|
|
54
|
+
'files',
|
|
55
|
+
'visibleCount',
|
|
56
|
+
'onFileDownload',
|
|
57
|
+
'onFileDelete',
|
|
58
|
+
'stagger',
|
|
59
|
+
]}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<En>
|
|
63
|
+
|
|
64
|
+
- Shows `visibleCount` rows (default 3); the "see more" button adds three at
|
|
65
|
+
a time. With no files it renders nothing.
|
|
66
|
+
- A row gets a download button only when the file has a `fileUrl` and you pass
|
|
67
|
+
`onFileDownload`.
|
|
68
|
+
- `onFileDelete` may return a promise; the row shows a spinner until it
|
|
69
|
+
settles, and a second click on the same row is ignored meanwhile.
|
|
70
|
+
|
|
71
|
+
## Do / Don't
|
|
72
|
+
|
|
73
|
+
</En>
|
|
74
|
+
|
|
75
|
+
<Ko>
|
|
76
|
+
|
|
77
|
+
- `visibleCount`개 행(기본 3개)을 보여 주고, "더 보기" 버튼을 누를 때마다 세 개씩
|
|
78
|
+
늘립니다. 파일이 없으면 아무것도 그리지 않습니다.
|
|
79
|
+
- 내려받기 버튼은 파일에 `fileUrl`이 있고 `onFileDownload`를 넘겼을 때만 생깁니다.
|
|
80
|
+
- `onFileDelete`는 프로미스를 돌려줘도 됩니다. 끝날 때까지 그 행에 스피너가 보이고, 그
|
|
81
|
+
사이 같은 행을 다시 눌러도 무시합니다.
|
|
82
|
+
|
|
83
|
+
## 이렇게 하세요 / 이렇게 하지 마세요
|
|
84
|
+
|
|
85
|
+
</Ko>
|
|
86
|
+
|
|
87
|
+
<Canvas of={FileListStories.DoDownloadAndDelete} />
|
|
88
|
+
<Verdict
|
|
89
|
+
kind="do"
|
|
90
|
+
en="Pass fileUrl for files that can be downloaded and let uploads in progress show their own bar."
|
|
91
|
+
ko="내려받을 수 있는 파일에는 fileUrl을 넘기고, 올리는 중인 파일은 진행 막대가 보이게 둡니다."
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
<En>
|
|
95
|
+
|
|
96
|
+
## Content
|
|
97
|
+
|
|
98
|
+
- When the list is empty, say so outside it (no files yet, and how to add
|
|
99
|
+
one); FileList renders nothing.
|
|
100
|
+
- Put a heading or label above it that says whose files these are.
|
|
101
|
+
|
|
102
|
+
## Accessibility
|
|
103
|
+
|
|
104
|
+
What FileList does for you:
|
|
105
|
+
|
|
106
|
+
- Renders a real list (`<ul>` / `<li>`), so a screen reader announces the
|
|
107
|
+
number of files (WCAG 1.3.1).
|
|
108
|
+
|
|
109
|
+
Known gaps, and what to do:
|
|
110
|
+
|
|
111
|
+
- **The "see more" button has no focus ring.** Its styles are reset with
|
|
112
|
+
`all: unset`, which removes the outline (WCAG 2.4.7).
|
|
113
|
+
- Its count shows the initial `visibleCount`, not the number of rows on
|
|
114
|
+
screen, after the first click.
|
|
115
|
+
- Rows inherit the `FileItem` gaps (errors in tooltips, English cancel
|
|
116
|
+
label).
|
|
117
|
+
|
|
118
|
+
## Tokens
|
|
119
|
+
|
|
120
|
+
The frame and row dividers are `border.subtle`; the "see more" text and
|
|
121
|
+
chevron are `fg.subtle`. Row colours are listed on the FileItem page.
|
|
122
|
+
|
|
123
|
+
## Related
|
|
124
|
+
|
|
125
|
+
- **FileItem**: one row.
|
|
126
|
+
- **FileInput**: adding files.
|
|
127
|
+
- **Table**: large file sets.
|
|
128
|
+
|
|
129
|
+
</En>
|
|
130
|
+
|
|
131
|
+
<Ko>
|
|
132
|
+
|
|
133
|
+
## 문구
|
|
134
|
+
|
|
135
|
+
- 목록이 비면 FileList는 아무것도 그리지 않으므로, 목록 밖에서 아직 파일이 없다는 것과
|
|
136
|
+
추가하는 방법을 알려 줍니다.
|
|
137
|
+
- 위에 누구의 파일인지 알려 주는 제목이나 라벨을 둡니다.
|
|
138
|
+
|
|
139
|
+
## 접근성
|
|
140
|
+
|
|
141
|
+
FileList가 알아서 하는 일
|
|
142
|
+
|
|
143
|
+
- 실제 목록(`<ul>`·`<li>`)으로 그리므로 화면 낭독기가 파일 개수를 알려 줍니다(WCAG
|
|
144
|
+
1.3.1).
|
|
145
|
+
|
|
146
|
+
알려진 한계와 대처
|
|
147
|
+
|
|
148
|
+
- **"더 보기" 버튼에 초점 표시가 없습니다.** 스타일을 `all: unset`으로 지워서 윤곽선이
|
|
149
|
+
사라집니다(WCAG 2.4.7).
|
|
150
|
+
- 한 번 누른 뒤에도 버튼의 숫자는 화면에 보이는 행 수가 아니라 처음 `visibleCount`를
|
|
151
|
+
보여 줍니다.
|
|
152
|
+
- 각 행은 `FileItem`의 한계(툴팁 속 오류, 영어 취소 버튼 이름)를 그대로 가집니다.
|
|
153
|
+
|
|
154
|
+
## 토큰
|
|
155
|
+
|
|
156
|
+
테두리와 행 구분선은 `border.subtle`, "더 보기" 글자와 화살표는 `fg.subtle`입니다. 행의
|
|
157
|
+
색은 FileItem 페이지에 있습니다.
|
|
158
|
+
|
|
159
|
+
## 관련 컴포넌트
|
|
160
|
+
|
|
161
|
+
- **FileItem**: 한 줄.
|
|
162
|
+
- **FileInput**: 파일 추가.
|
|
163
|
+
- **Table**: 많은 파일.
|
|
164
|
+
|
|
165
|
+
</Ko>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
|
|
4
|
+
import * as FlyToStories from './FlyTo.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={FlyToStories} name="Usage" />
|
|
7
|
+
|
|
8
|
+
<LangToggle />
|
|
9
|
+
|
|
10
|
+
<En>
|
|
11
|
+
|
|
12
|
+
# FlyTo
|
|
13
|
+
|
|
14
|
+
Sends a ghost of an element arcing from one rect to another, to say "this went
|
|
15
|
+
there": a reward chip into a balance, a file into a folder.
|
|
16
|
+
|
|
17
|
+
</En>
|
|
18
|
+
|
|
19
|
+
<Ko>
|
|
20
|
+
|
|
21
|
+
# FlyTo
|
|
22
|
+
|
|
23
|
+
요소의 복제본을 한 위치에서 다른 위치로 포물선을 그리며 날려 보내, "이것이 저기로
|
|
24
|
+
갔다"를 보여 줍니다. 보상 칩이 잔액으로, 파일이 폴더로 들어가는 장면에 씁니다.
|
|
25
|
+
|
|
26
|
+
</Ko>
|
|
27
|
+
|
|
28
|
+
<Canvas of={FlyToStories.Default} />
|
|
29
|
+
|
|
30
|
+
<En>
|
|
31
|
+
|
|
32
|
+
## When to use
|
|
33
|
+
|
|
34
|
+
- A reward the reader just earned travels to the balance or counter it adds
|
|
35
|
+
to, and the balance updates when it lands (`onDone`).
|
|
36
|
+
- An item moves to a place that is visible on screen, and seeing it go there
|
|
37
|
+
explains where it went.
|
|
38
|
+
|
|
39
|
+
## When not to use
|
|
40
|
+
|
|
41
|
+
- The target is not on screen, or there is no meaningful source → skip the
|
|
42
|
+
flight and `Pulse` the value that changed.
|
|
43
|
+
- Only a number changed → `CountUp`, optionally inside a `Pulse`.
|
|
44
|
+
- Something new appears in place → `Appear`.
|
|
45
|
+
|
|
46
|
+
## Reduced motion and accessibility
|
|
47
|
+
|
|
48
|
+
- With `prefers-reduced-motion: reduce` nothing flies: FlyTo renders nothing and
|
|
49
|
+
calls `onDone` right after mounting, so whatever the flight was sequencing
|
|
50
|
+
still happens.
|
|
51
|
+
- The ghost is decoration. It renders into a portal at the end of the page, so
|
|
52
|
+
a screen reader can reach a copy of its text there. Pass `aria-hidden` when
|
|
53
|
+
the ghost holds text.
|
|
54
|
+
- The meaning lives in the state change, not the flight. Update the target
|
|
55
|
+
value in `onDone`, and if the reader must hear it, announce it yourself
|
|
56
|
+
(WCAG 4.1.3).
|
|
57
|
+
- The ghost ignores the pointer (`pointer-events: none`), so it never blocks
|
|
58
|
+
a click.
|
|
59
|
+
|
|
60
|
+
## Props
|
|
61
|
+
|
|
62
|
+
`from` and `to` are viewport rects, usually from `getBoundingClientRect()`.
|
|
63
|
+
The caller mounts FlyTo to start a flight and unmounts it in `onDone`.
|
|
64
|
+
|
|
65
|
+
</En>
|
|
66
|
+
|
|
67
|
+
<Ko>
|
|
68
|
+
|
|
69
|
+
## 언제 쓰나요
|
|
70
|
+
|
|
71
|
+
- 사용자가 방금 받은 보상이 그것이 더해질 잔액이나 카운터로 날아가고, 도착하는 순간
|
|
72
|
+
잔액이 바뀔 때(`onDone`).
|
|
73
|
+
- 항목이 화면에 보이는 다른 자리로 옮겨 가고, 날아가는 모습이 어디로 갔는지를 설명해 줄 때.
|
|
74
|
+
|
|
75
|
+
## 언제 쓰지 않나요
|
|
76
|
+
|
|
77
|
+
- 목적지가 화면에 없거나 출발점이 뚜렷하지 않다면 날리지 말고, 바뀐 값에 `Pulse`를
|
|
78
|
+
씁니다.
|
|
79
|
+
- 숫자만 바뀌었다면 `CountUp`을 쓰고, 필요하면 `Pulse`로 감쌉니다.
|
|
80
|
+
- 새 요소가 제자리에 나타난다면 `Appear`를 씁니다.
|
|
81
|
+
|
|
82
|
+
## 동작 줄이기와 접근성
|
|
83
|
+
|
|
84
|
+
- `prefers-reduced-motion: reduce`에서는 아무것도 날지 않습니다. FlyTo는 아무것도
|
|
85
|
+
그리지 않고 마운트 직후 `onDone`을 부르므로, 비행 뒤에 이어지던 일은 그대로 진행됩니다.
|
|
86
|
+
- 복제본은 장식입니다. 페이지 끝의 포털에 그려지므로 화면 낭독기가 거기서 그 글자를 한
|
|
87
|
+
번 더 만날 수 있습니다. 복제본에 글자가 있다면 `aria-hidden`을 넘깁니다.
|
|
88
|
+
- 뜻은 비행이 아니라 상태 변화에 있습니다. `onDone`에서 목적지 값을 바꾸고, 사용자가
|
|
89
|
+
들어야 하는 변화라면 직접 알립니다(WCAG 4.1.3).
|
|
90
|
+
- 복제본은 포인터를 받지 않으므로(`pointer-events: none`) 클릭을 막지 않습니다.
|
|
91
|
+
|
|
92
|
+
## 속성
|
|
93
|
+
|
|
94
|
+
`from`과 `to`는 뷰포트 기준 사각형이며 보통 `getBoundingClientRect()`에서 얻습니다.
|
|
95
|
+
비행을 시작하려면 FlyTo를 마운트하고, `onDone`에서 언마운트합니다.
|
|
96
|
+
|
|
97
|
+
</Ko>
|
|
98
|
+
|
|
99
|
+
<ArgTypes of={FlyToStories} include={['from', 'to', 'lift', 'onDone']} />
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { Box, Dialog } from '@chakra-ui/react';
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
|
|
5
|
+
import { Button } from '../Button';
|
|
6
|
+
import { Input } from '../Input';
|
|
7
|
+
import { SelectField } from '../Select';
|
|
8
|
+
import { Switch } from '../Switch';
|
|
9
|
+
import { Textarea } from '../Textarea';
|
|
10
|
+
import { Subtext } from '../Typography';
|
|
11
|
+
import {
|
|
12
|
+
FieldRow,
|
|
13
|
+
FormFooter,
|
|
14
|
+
FormModalFooter,
|
|
15
|
+
FormScrollArea,
|
|
16
|
+
FormSection,
|
|
17
|
+
} from '.';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The Form building blocks together: `FormSection` groups, `FieldRow` fields,
|
|
21
|
+
* a `FormFooter` pinned under a `FormScrollArea`. Each part has its own story
|
|
22
|
+
* set below this one.
|
|
23
|
+
*/
|
|
24
|
+
const meta = {
|
|
25
|
+
title: 'Components/Form',
|
|
26
|
+
parameters: { layout: 'padded' },
|
|
27
|
+
} satisfies Meta;
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj;
|
|
32
|
+
|
|
33
|
+
const MODELS = [
|
|
34
|
+
{ label: 'GPT-5', value: 'gpt-5' },
|
|
35
|
+
{ label: 'Claude Sonnet', value: 'claude-sonnet' },
|
|
36
|
+
{ label: 'Gemini Flash', value: 'gemini-flash' },
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const SettingsPanel = ({ withErrors = false }: { withErrors?: boolean }) => {
|
|
40
|
+
const [name, setName] = useState(withErrors ? '' : '사내 규정 도우미');
|
|
41
|
+
return (
|
|
42
|
+
<Box
|
|
43
|
+
h="460px"
|
|
44
|
+
w="400px"
|
|
45
|
+
borderWidth="1px"
|
|
46
|
+
borderColor="border.subtle"
|
|
47
|
+
borderRadius="12px"
|
|
48
|
+
overflow="hidden"
|
|
49
|
+
>
|
|
50
|
+
<FormScrollArea>
|
|
51
|
+
<Box p={4} flex={1}>
|
|
52
|
+
<FormSection title="기본 정보" gap={4}>
|
|
53
|
+
<FieldRow
|
|
54
|
+
label="챗봇 이름"
|
|
55
|
+
required
|
|
56
|
+
error={
|
|
57
|
+
withErrors && !name ? '챗봇 이름을 입력해 주세요.' : undefined
|
|
58
|
+
}
|
|
59
|
+
>
|
|
60
|
+
<Input value={name} onChange={(e) => setName(e.target.value)} />
|
|
61
|
+
</FieldRow>
|
|
62
|
+
<FieldRow label="설명" helperText="목록에서 이름 아래에 보입니다.">
|
|
63
|
+
<Textarea rows={3} />
|
|
64
|
+
</FieldRow>
|
|
65
|
+
</FormSection>
|
|
66
|
+
<FormSection title="동작" divider mt={6} gap={4}>
|
|
67
|
+
<FieldRow label="기본 모델">
|
|
68
|
+
<SelectField
|
|
69
|
+
ariaLabel="기본 모델"
|
|
70
|
+
options={MODELS}
|
|
71
|
+
defaultValue="gpt-5"
|
|
72
|
+
/>
|
|
73
|
+
</FieldRow>
|
|
74
|
+
<Switch display="flex" justifyContent="space-between" w="100%">
|
|
75
|
+
<Switch.Label>웹 검색 사용</Switch.Label>
|
|
76
|
+
<Switch.Control />
|
|
77
|
+
</Switch>
|
|
78
|
+
</FormSection>
|
|
79
|
+
</Box>
|
|
80
|
+
<FormFooter
|
|
81
|
+
meta={<Subtext color="fg.muted">오후 2:14에 저장됨</Subtext>}
|
|
82
|
+
action={<Button variant="primary">저장</Button>}
|
|
83
|
+
/>
|
|
84
|
+
</FormScrollArea>
|
|
85
|
+
</Box>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** A settings panel: two sections, a pinned footer with meta and action. */
|
|
90
|
+
export const Basic: Story = {
|
|
91
|
+
render: () => <SettingsPanel />,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// ───────────────────────── Usage-page specimens ─────────────────────────
|
|
95
|
+
// Pulled into `Form.usage.mdx` with <Canvas of={…} />. Hidden (`!dev`).
|
|
96
|
+
|
|
97
|
+
export const DoErrorsAtTheField: Story = {
|
|
98
|
+
tags: ['!dev'],
|
|
99
|
+
name: 'Usage / Do: errors at the field',
|
|
100
|
+
render: () => <SettingsPanel withErrors />,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const DoModalFooter: Story = {
|
|
104
|
+
tags: ['!dev'],
|
|
105
|
+
name: 'Usage / Do: FormModalFooter in a modal form',
|
|
106
|
+
render: () => (
|
|
107
|
+
// `ModalFooter` reads the dialog's style context; a closed root provides it
|
|
108
|
+
// without opening anything.
|
|
109
|
+
<Dialog.Root>
|
|
110
|
+
<Box
|
|
111
|
+
w="480px"
|
|
112
|
+
bg="bg.surface"
|
|
113
|
+
borderWidth="1px"
|
|
114
|
+
borderColor="border.subtle"
|
|
115
|
+
borderRadius="12px"
|
|
116
|
+
>
|
|
117
|
+
<FormModalFooter
|
|
118
|
+
onDelete={() => {}}
|
|
119
|
+
deleteLabel="그룹 삭제"
|
|
120
|
+
onCancel={() => {}}
|
|
121
|
+
cancelLabel="취소"
|
|
122
|
+
submitLabel="저장"
|
|
123
|
+
onSubmit={() => {}}
|
|
124
|
+
/>
|
|
125
|
+
</Box>
|
|
126
|
+
</Dialog.Root>
|
|
127
|
+
),
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const DontHandRolledFooter: Story = {
|
|
131
|
+
tags: ['!dev'],
|
|
132
|
+
name: "Usage / Don't: a hand-rolled footer",
|
|
133
|
+
render: () => (
|
|
134
|
+
<Box
|
|
135
|
+
w="480px"
|
|
136
|
+
p={4}
|
|
137
|
+
display="flex"
|
|
138
|
+
gap={2}
|
|
139
|
+
bg="bg.surface"
|
|
140
|
+
borderWidth="1px"
|
|
141
|
+
borderColor="border.subtle"
|
|
142
|
+
borderRadius="12px"
|
|
143
|
+
>
|
|
144
|
+
<Button variant="primary">저장</Button>
|
|
145
|
+
<Button variant="danger">그룹 삭제</Button>
|
|
146
|
+
<Button variant="subtle">취소</Button>
|
|
147
|
+
</Box>
|
|
148
|
+
),
|
|
149
|
+
};
|