colibri-ui 0.8.1 → 0.8.3
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/{src/components/Accordion/Accordion.module.scss → Accordion/Accordion.module.css} +7 -9
- package/Accordion/index.d.ts +9 -0
- package/Accordion/index.js +67 -0
- package/Accordion/package.json +6 -0
- package/{src/components/Avatar/Avatar.module.scss → Avatar/Avatar.module.css} +3 -4
- package/Avatar/assets/org-circle.svg.js +64 -0
- package/Avatar/assets/user-circle.svg.js +43 -0
- package/Avatar/constants.d.ts +7 -0
- package/Avatar/constants.js +10 -0
- package/Avatar/index.d.ts +4 -0
- package/Avatar/index.js +49 -0
- package/Avatar/index.props.d.ts +15 -0
- package/Avatar/index.props.js +7 -0
- package/Avatar/package.json +6 -0
- package/{src/components/Badge/Badge.module.scss → Badge/Badge.module.css} +13 -16
- package/{src/components/Badge/Control/Control.module.scss → Badge/Control/Control.module.css} +1 -1
- package/Badge/Control/index.d.ts +3 -0
- package/Badge/Control/index.js +23 -0
- package/{src/components/Badge/Control/index.props.ts → Badge/Control/index.props.d.ts} +1 -1
- package/Badge/index.d.ts +4 -0
- package/Badge/index.js +48 -0
- package/Badge/index.props.d.ts +11 -0
- package/Badge/package.json +6 -0
- package/Button/Button.module.css +225 -0
- package/Button/index.d.ts +4 -0
- package/Button/index.js +56 -0
- package/Button/index.props.d.ts +14 -0
- package/Button/package.json +6 -0
- package/Calendar/components/ContinueButton/index.d.ts +10 -0
- package/Calendar/components/ContinueButton/index.js +45 -0
- package/Calendar/components/ContinueButton/index.module.css +4 -0
- package/Calendar/components/Month/Month.d.ts +17 -0
- package/Calendar/components/Month/Month.js +144 -0
- package/{src/components/Calendar/components/Month/index.module.scss → Calendar/components/Month/index.module.css} +48 -62
- package/Calendar/components/Presets/index.d.ts +19 -0
- package/Calendar/components/Presets/index.js +68 -0
- package/{src/components/Calendar/components/Presets/index.module.scss → Calendar/components/Presets/index.module.css} +11 -14
- package/Calendar/index.d.ts +4 -0
- package/Calendar/index.js +222 -0
- package/{src/components/Calendar/index.module.scss → Calendar/index.module.css} +37 -51
- package/Calendar/index.props.d.ts +21 -0
- package/Calendar/package.json +6 -0
- package/Calendar/utils/getMonthWeeks.d.ts +20 -0
- package/Calendar/utils/getMonthWeeks.js +81 -0
- package/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +4 -0
- package/Calendar/utils/getNumberOfMonthsBetweenDates.js +21 -0
- package/Calendar/utils/getPresets.d.ts +10 -0
- package/Calendar/utils/getStartMonth.d.ts +6 -0
- package/Calendar/utils/getStartMonth.js +15 -0
- package/Checkbox/Checkbox.module.css +89 -0
- package/Checkbox/index.d.ts +4 -0
- package/Checkbox/index.js +59 -0
- package/Checkbox/index.props.d.ts +17 -0
- package/Checkbox/package.json +6 -0
- package/Chip/Chip.module.css +83 -0
- package/Chip/index.d.ts +4 -0
- package/Chip/index.js +56 -0
- package/Chip/index.props.d.ts +10 -0
- package/Chip/package.json +6 -0
- package/ClickOutside/index.d.ts +5 -0
- package/ClickOutside/index.js +36 -0
- package/ClickOutside/package.json +6 -0
- package/{src/components/Counter/Counter.module.scss → Counter/Counter.module.css} +7 -9
- package/Counter/index.d.ts +4 -0
- package/Counter/index.js +71 -0
- package/Counter/index.props.d.ts +9 -0
- package/Counter/package.json +6 -0
- package/{src/components/Datepicker/Datepicker.module.scss → Datepicker/Datepicker.module.css} +1 -1
- package/Datepicker/components/DatePicker/index.d.ts +4 -0
- package/Datepicker/components/DatePicker/index.js +74 -0
- package/{src/components/Datepicker/components/DatePicker/index.module.scss → Datepicker/components/DatePicker/index.module.css} +0 -2
- package/Datepicker/components/DatePicker/index.props.d.ts +5 -0
- package/Datepicker/components/TimePicker/Label/index.d.ts +8 -0
- package/Datepicker/components/TimePicker/Label/index.js +27 -0
- package/Datepicker/components/TimePicker/helpers.d.ts +12 -0
- package/Datepicker/components/TimePicker/helpers.js +41 -0
- package/Datepicker/components/TimePicker/index.d.ts +4 -0
- package/Datepicker/components/TimePicker/index.js +67 -0
- package/{src/components/Datepicker/components/TimePicker/index.module.scss → Datepicker/components/TimePicker/index.module.css} +1 -1
- package/Datepicker/components/TimePicker/index.props.d.ts +8 -0
- package/Datepicker/index.d.ts +4 -0
- package/Datepicker/index.js +35 -0
- package/Datepicker/index.props.d.ts +7 -0
- package/Datepicker/package.json +6 -0
- package/{src/components/DotsLoader/DotsLoader.module.scss → DotsLoader/DotsLoader.module.css} +12 -19
- package/DotsLoader/index.d.ts +5 -0
- package/DotsLoader/index.js +55 -0
- package/DotsLoader/package.json +6 -0
- package/{src/components/Dropdown/Dropdown.module.scss → Dropdown/Dropdown.module.css} +1 -1
- package/Dropdown/index.d.ts +4 -0
- package/Dropdown/index.js +165 -0
- package/Dropdown/index.props.d.ts +20 -0
- package/Dropdown/package.json +6 -0
- package/{src/components/Grid/Grid.module.scss → Grid/Grid.module.css} +1 -2
- package/{src/components/Grid/Item/Grid-Item.module.scss → Grid/Item/Grid-Item.module.css} +2 -2
- package/Grid/Item/index.d.ts +4 -0
- package/Grid/Item/index.js +28 -0
- package/{src/components/Grid/Item/index.props.ts → Grid/Item/index.props.d.ts} +3 -4
- package/Grid/index.d.ts +4 -0
- package/Grid/index.js +34 -0
- package/Grid/index.props.d.ts +6 -0
- package/Grid/package.json +6 -0
- package/Icons/ArrowNext.d.ts +4 -0
- package/Icons/ArrowNext.js +36 -0
- package/Icons/Cart.d.ts +4 -0
- package/Icons/Cart.js +34 -0
- package/Icons/Check.d.ts +4 -0
- package/Icons/Check.js +42 -0
- package/Icons/Chevron.d.ts +4 -0
- package/Icons/Chevron.js +37 -0
- package/Icons/Close.d.ts +4 -0
- package/Icons/Close.js +35 -0
- package/Icons/CrossFill.d.ts +4 -0
- package/Icons/CrossFill.js +33 -0
- package/Icons/Edit.d.ts +4 -0
- package/Icons/Edit.js +35 -0
- package/Icons/Exit.d.ts +4 -0
- package/Icons/Exit.js +36 -0
- package/Icons/EyeClosed.d.ts +4 -0
- package/Icons/EyeClosed.js +34 -0
- package/Icons/EyeOpen.d.ts +4 -0
- package/Icons/EyeOpen.js +41 -0
- package/Icons/Help.d.ts +4 -0
- package/Icons/Help.js +34 -0
- package/Icons/Info.d.ts +4 -0
- package/Icons/Info.js +35 -0
- package/Icons/Minus.d.ts +4 -0
- package/Icons/Minus.js +35 -0
- package/Icons/More.d.ts +4 -0
- package/Icons/More.js +44 -0
- package/Icons/Plus.d.ts +4 -0
- package/Icons/Plus.js +34 -0
- package/Icons/Setting.d.ts +4 -0
- package/Icons/Setting.js +43 -0
- package/Icons/Trash.d.ts +4 -0
- package/Icons/Trash.js +37 -0
- package/Icons/User.d.ts +4 -0
- package/Icons/User.js +42 -0
- package/Icons/index.js +39 -0
- package/{src/components/Icons/index.props.ts → Icons/index.props.d.ts} +4 -5
- package/Icons/package.json +6 -0
- package/Image/Image.module.css +14 -0
- package/Image/index.d.ts +4 -0
- package/Image/index.js +72 -0
- package/Image/index.props.d.ts +10 -0
- package/Image/package.json +6 -0
- package/Input/index.d.ts +4 -0
- package/Input/index.js +55 -0
- package/Input/index.props.d.ts +16 -0
- package/Input/package.json +6 -0
- package/InputRadio/InputRadio.module.css +95 -0
- package/InputRadio/index.d.ts +23 -0
- package/InputRadio/index.js +80 -0
- package/InputRadio/package.json +6 -0
- package/{src/components/Menu/Menu.module.scss → Menu/Menu.module.css} +1 -1
- package/Menu/components/MenuItem/MenuItem.module.css +35 -0
- package/Menu/components/MenuItem/index.d.ts +5 -0
- package/Menu/components/MenuItem/index.js +43 -0
- package/Menu/components/MenuItem/index.props.d.ts +10 -0
- package/Menu/index.d.ts +4 -0
- package/Menu/index.js +48 -0
- package/Menu/index.props.d.ts +11 -0
- package/Menu/package.json +6 -0
- package/{src/components/Modal/Modal.module.scss → Modal/Modal.module.css} +12 -14
- package/{src/components/Modal/components/Close/Close.module.scss → Modal/components/Close/Close.module.css} +1 -1
- package/Modal/components/Close/index.d.ts +5 -0
- package/Modal/components/Close/index.js +29 -0
- package/{src/components/Modal/components/Content/Content.module.scss → Modal/components/Content/Content.module.css} +1 -1
- package/Modal/components/Content/index.d.ts +3 -0
- package/Modal/components/Content/index.js +23 -0
- package/{src/components/Modal/components/Title/Title.module.scss → Modal/components/Title/Title.module.css} +1 -1
- package/Modal/components/Title/index.d.ts +3 -0
- package/Modal/components/Title/index.js +29 -0
- package/Modal/index.d.ts +4 -0
- package/Modal/index.js +71 -0
- package/Modal/index.props.d.ts +5 -0
- package/Modal/package.json +6 -0
- package/MultiSelect/components/MenuOverlay/index.d.ts +19 -0
- package/MultiSelect/components/MenuOverlay/index.js +103 -0
- package/{src/components/MultiSelect/components/MenuOverlay/index.module.scss → MultiSelect/components/MenuOverlay/index.module.css} +1 -1
- package/MultiSelect/components/MenuOverlayItem/index.d.ts +13 -0
- package/MultiSelect/components/MenuOverlayItem/index.js +28 -0
- package/MultiSelect/index.d.ts +4 -0
- package/MultiSelect/index.js +169 -0
- package/{src/components/MultiSelect/index.module.scss → MultiSelect/index.module.css} +6 -9
- package/MultiSelect/index.props.d.ts +32 -0
- package/MultiSelect/package.json +6 -0
- package/MultiSelect/utils/index.d.ts +1 -0
- package/MultiSelect/utils/index.js +7 -0
- package/Portal/index.d.ts +5 -0
- package/Portal/index.js +24 -0
- package/Portal/package.json +6 -0
- package/RadioGroup/Radio.d.ts +19 -0
- package/RadioGroup/Radio.js +45 -0
- package/RadioGroup/RadioGroup.module.css +31 -0
- package/RadioGroup/index.d.ts +26 -0
- package/RadioGroup/index.js +65 -0
- package/RadioGroup/package.json +6 -0
- package/Select/components/MenuOverlay/index.d.ts +11 -0
- package/Select/components/MenuOverlay/index.js +65 -0
- package/{src/components/Select/components/MenuOverlay/index.module.scss → Select/components/MenuOverlay/index.module.css} +1 -1
- package/Select/components/MenuOverlayItem/index.d.ts +14 -0
- package/Select/components/MenuOverlayItem/index.js +47 -0
- package/Select/index.d.ts +4 -0
- package/Select/index.js +108 -0
- package/{src/components/Select/index.module.scss → Select/index.module.css} +11 -15
- package/Select/index.props.d.ts +28 -0
- package/Select/package.json +6 -0
- package/{src/components/Separator/Separator.module.scss → Separator/Separator.module.css} +1 -1
- package/Separator/index.d.ts +6 -0
- package/Separator/index.js +22 -0
- package/Separator/package.json +6 -0
- package/Skeleton/Skeleton.module.css +33 -0
- package/Skeleton/index.d.ts +4 -0
- package/Skeleton/index.js +41 -0
- package/Skeleton/index.props.d.ts +11 -0
- package/Skeleton/package.json +6 -0
- package/Status/index.d.ts +5 -0
- package/Status/index.js +28 -0
- package/Status/index.module.css +45 -0
- package/Status/index.props.d.ts +12 -0
- package/Status/package.json +6 -0
- package/{src/components/Switch/Switch.module.scss → Switch/Switch.module.css} +15 -21
- package/Switch/index.d.ts +4 -0
- package/Switch/index.js +40 -0
- package/Switch/index.props.d.ts +6 -0
- package/Switch/package.json +6 -0
- package/TabsMenu/Tab/Tab.d.ts +4 -0
- package/TabsMenu/Tab/Tab.js +39 -0
- package/TabsMenu/Tab/Tab.module.css +66 -0
- package/TabsMenu/Tab/Tab.props.d.ts +14 -0
- package/{src/components/TabsMenu/TabsMenu.module.scss → TabsMenu/TabsMenu.module.css} +1 -1
- package/TabsMenu/index.d.ts +4 -0
- package/TabsMenu/index.js +93 -0
- package/TabsMenu/index.props.d.ts +11 -0
- package/TabsMenu/package.json +6 -0
- package/TabsPanes/Pane/Pane.d.ts +3 -0
- package/TabsPanes/Pane/Pane.js +22 -0
- package/TabsPanes/Pane/index.props.d.ts +7 -0
- package/TabsPanes/index.d.ts +4 -0
- package/TabsPanes/index.js +35 -0
- package/{src/components/TabsPanes/index.props.ts → TabsPanes/index.props.d.ts} +4 -5
- package/TabsPanes/package.json +6 -0
- package/{src/components/TextArea/TextArea.module.scss → TextArea/TextArea.module.css} +3 -4
- package/TextArea/index.d.ts +4 -0
- package/TextArea/index.js +62 -0
- package/TextArea/index.props.d.ts +13 -0
- package/TextArea/package.json +6 -0
- package/Theme/breakpoints.d.ts +18 -0
- package/Theme/breakpoints.js +38 -0
- package/Theme/colors/common.d.ts +39 -0
- package/Theme/colors/common.js +34 -0
- package/Theme/colors/index.d.ts +64 -0
- package/Theme/colors/index.js +12 -0
- package/Theme/colors/theme_buenos_aires.d.ts +69 -0
- package/Theme/colors/theme_buenos_aires.js +53 -0
- package/Theme/colors/theme_default.d.ts +47 -0
- package/Theme/colors/theme_default.js +40 -0
- package/Theme/global.css +50 -0
- package/Theme/index.d.ts +296 -0
- package/Theme/index.js +11 -0
- package/Theme/package.json +6 -0
- package/Theme/themes/buenos_aires.d.ts +152 -0
- package/Theme/themes/buenos_aires.js +159 -0
- package/Theme/themes/default.d.ts +144 -0
- package/Theme/themes/default.js +151 -0
- package/TimeSelect/Label/index.d.ts +8 -0
- package/TimeSelect/Label/index.js +27 -0
- package/TimeSelect/helpers.d.ts +9 -0
- package/TimeSelect/helpers.js +41 -0
- package/TimeSelect/index.d.ts +11 -0
- package/TimeSelect/index.js +53 -0
- package/TimeSelect/index.props.d.ts +4 -0
- package/TimeSelect/package.json +6 -0
- package/Tooltip/Tooltip.module.css +122 -0
- package/Tooltip/index.d.ts +4 -0
- package/Tooltip/index.js +116 -0
- package/Tooltip/index.props.d.ts +11 -0
- package/Tooltip/package.json +6 -0
- package/Typography/Typography.module.css +64 -0
- package/Typography/index.d.ts +4 -0
- package/Typography/index.js +34 -0
- package/Typography/index.props.d.ts +13 -0
- package/Typography/package.json +6 -0
- package/{src/components/base/BaseInput/BaseInput.module.scss → base/BaseInput/BaseInput.module.css} +3 -4
- package/base/BaseInput/index.d.ts +4 -0
- package/base/BaseInput/index.js +31 -0
- package/base/BaseInput/index.props.d.ts +5 -0
- package/base/FormField/FormField.module.css +11 -0
- package/base/FormField/index.d.ts +4 -0
- package/base/FormField/index.js +37 -0
- package/base/FormField/index.props.d.ts +10 -0
- package/base/InputRoot/InputRoot.module.css +76 -0
- package/base/InputRoot/index.d.ts +4 -0
- package/base/InputRoot/index.js +41 -0
- package/base/InputRoot/index.props.d.ts +15 -0
- package/esm/Accordion/Accordion.module.css +51 -0
- package/esm/Accordion/index.d.ts +9 -0
- package/esm/Accordion/index.js +57 -0
- package/esm/Avatar/Avatar.module.css +15 -0
- package/esm/Avatar/assets/org-circle.svg.js +39 -0
- package/esm/Avatar/assets/user-circle.svg.js +18 -0
- package/esm/Avatar/constants.d.ts +7 -0
- package/esm/Avatar/constants.js +10 -0
- package/esm/Avatar/index.d.ts +4 -0
- package/esm/Avatar/index.js +39 -0
- package/esm/Avatar/index.props.d.ts +15 -0
- package/esm/Avatar/index.props.js +7 -0
- package/esm/Badge/Badge.module.css +30 -0
- package/esm/Badge/Control/Control.module.css +6 -0
- package/esm/Badge/Control/index.d.ts +3 -0
- package/esm/Badge/Control/index.js +15 -0
- package/esm/Badge/Control/index.props.d.ts +3 -0
- package/esm/Badge/index.d.ts +4 -0
- package/esm/Badge/index.js +38 -0
- package/esm/Badge/index.props.d.ts +11 -0
- package/esm/Button/Button.module.css +225 -0
- package/esm/Button/index.d.ts +4 -0
- package/esm/Button/index.js +46 -0
- package/esm/Button/index.props.d.ts +14 -0
- package/esm/Calendar/components/ContinueButton/index.d.ts +10 -0
- package/esm/Calendar/components/ContinueButton/index.js +37 -0
- package/esm/Calendar/components/ContinueButton/index.module.css +4 -0
- package/esm/Calendar/components/Month/Month.d.ts +17 -0
- package/esm/Calendar/components/Month/Month.js +118 -0
- package/esm/Calendar/components/Month/index.module.css +143 -0
- package/esm/Calendar/components/Presets/index.d.ts +19 -0
- package/esm/Calendar/components/Presets/index.js +42 -0
- package/esm/Calendar/components/Presets/index.module.css +28 -0
- package/esm/Calendar/index.d.ts +4 -0
- package/esm/Calendar/index.js +212 -0
- package/esm/Calendar/index.module.css +92 -0
- package/esm/Calendar/index.props.d.ts +21 -0
- package/esm/Calendar/utils/getMonthWeeks.d.ts +20 -0
- package/esm/Calendar/utils/getMonthWeeks.js +79 -0
- package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +4 -0
- package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.js +19 -0
- package/esm/Calendar/utils/getPresets.d.ts +10 -0
- package/esm/Calendar/utils/getStartMonth.d.ts +6 -0
- package/esm/Calendar/utils/getStartMonth.js +13 -0
- package/esm/Checkbox/Checkbox.module.css +89 -0
- package/esm/Checkbox/index.d.ts +4 -0
- package/esm/Checkbox/index.js +49 -0
- package/esm/Checkbox/index.props.d.ts +17 -0
- package/esm/Chip/Chip.module.css +83 -0
- package/esm/Chip/index.d.ts +4 -0
- package/esm/Chip/index.js +46 -0
- package/esm/Chip/index.props.d.ts +10 -0
- package/esm/ClickOutside/index.d.ts +5 -0
- package/esm/ClickOutside/index.js +27 -0
- package/esm/Counter/Counter.module.css +34 -0
- package/esm/Counter/index.d.ts +4 -0
- package/esm/Counter/index.js +61 -0
- package/esm/Counter/index.props.d.ts +9 -0
- package/esm/Datepicker/Datepicker.module.css +4 -0
- package/esm/Datepicker/components/DatePicker/index.d.ts +4 -0
- package/esm/Datepicker/components/DatePicker/index.js +64 -0
- package/esm/Datepicker/components/DatePicker/index.module.css +56 -0
- package/esm/Datepicker/components/DatePicker/index.props.d.ts +5 -0
- package/esm/Datepicker/components/TimePicker/Label/index.d.ts +8 -0
- package/esm/Datepicker/components/TimePicker/Label/index.js +19 -0
- package/esm/Datepicker/components/TimePicker/helpers.d.ts +12 -0
- package/esm/Datepicker/components/TimePicker/helpers.js +35 -0
- package/esm/Datepicker/components/TimePicker/index.d.ts +4 -0
- package/esm/Datepicker/components/TimePicker/index.js +57 -0
- package/esm/Datepicker/components/TimePicker/index.module.css +58 -0
- package/esm/Datepicker/components/TimePicker/index.props.d.ts +8 -0
- package/esm/Datepicker/index.d.ts +4 -0
- package/esm/Datepicker/index.js +25 -0
- package/esm/Datepicker/index.props.d.ts +7 -0
- package/esm/DotsLoader/DotsLoader.module.css +39 -0
- package/esm/DotsLoader/index.d.ts +5 -0
- package/esm/DotsLoader/index.js +45 -0
- package/esm/Dropdown/Dropdown.module.css +14 -0
- package/esm/Dropdown/index.d.ts +4 -0
- package/esm/Dropdown/index.js +155 -0
- package/esm/Dropdown/index.props.d.ts +20 -0
- package/esm/Grid/Grid.module.css +15 -0
- package/esm/Grid/Item/Grid-Item.module.css +9 -0
- package/esm/Grid/Item/index.d.ts +4 -0
- package/esm/Grid/Item/index.js +18 -0
- package/esm/Grid/Item/index.props.d.ts +6 -0
- package/esm/Grid/index.d.ts +4 -0
- package/esm/Grid/index.js +24 -0
- package/esm/Grid/index.props.d.ts +6 -0
- package/esm/Icons/ArrowNext.d.ts +4 -0
- package/esm/Icons/ArrowNext.js +28 -0
- package/esm/Icons/Cart.d.ts +4 -0
- package/esm/Icons/Cart.js +26 -0
- package/esm/Icons/Check.d.ts +4 -0
- package/esm/Icons/Check.js +34 -0
- package/esm/Icons/Chevron.d.ts +4 -0
- package/esm/Icons/Chevron.js +29 -0
- package/esm/Icons/Close.d.ts +4 -0
- package/esm/Icons/Close.js +27 -0
- package/esm/Icons/CrossFill.d.ts +4 -0
- package/esm/Icons/CrossFill.js +25 -0
- package/esm/Icons/Edit.d.ts +4 -0
- package/esm/Icons/Edit.js +27 -0
- package/esm/Icons/Exit.d.ts +4 -0
- package/esm/Icons/Exit.js +28 -0
- package/esm/Icons/EyeClosed.d.ts +4 -0
- package/esm/Icons/EyeClosed.js +26 -0
- package/esm/Icons/EyeOpen.d.ts +4 -0
- package/esm/Icons/EyeOpen.js +33 -0
- package/esm/Icons/Help.d.ts +4 -0
- package/esm/Icons/Help.js +26 -0
- package/esm/Icons/Info.d.ts +4 -0
- package/esm/Icons/Info.js +27 -0
- package/esm/Icons/Minus.d.ts +4 -0
- package/esm/Icons/Minus.js +27 -0
- package/esm/Icons/More.d.ts +4 -0
- package/esm/Icons/More.js +36 -0
- package/esm/Icons/Plus.d.ts +4 -0
- package/esm/Icons/Plus.js +26 -0
- package/esm/Icons/Setting.d.ts +4 -0
- package/esm/Icons/Setting.js +35 -0
- package/esm/Icons/Trash.d.ts +4 -0
- package/esm/Icons/Trash.js +29 -0
- package/esm/Icons/User.d.ts +4 -0
- package/esm/Icons/User.js +34 -0
- package/esm/Icons/index.d.ts +17 -0
- package/esm/Icons/index.js +17 -0
- package/esm/Icons/index.props.d.ts +7 -0
- package/esm/Image/Image.module.css +14 -0
- package/esm/Image/index.d.ts +4 -0
- package/esm/Image/index.js +62 -0
- package/esm/Image/index.props.d.ts +10 -0
- package/esm/Input/index.d.ts +4 -0
- package/esm/Input/index.js +46 -0
- package/esm/Input/index.props.d.ts +16 -0
- package/esm/InputRadio/InputRadio.module.css +95 -0
- package/esm/InputRadio/index.d.ts +23 -0
- package/esm/InputRadio/index.js +70 -0
- package/esm/Menu/Menu.module.css +8 -0
- package/esm/Menu/components/MenuItem/MenuItem.module.css +35 -0
- package/esm/Menu/components/MenuItem/index.d.ts +5 -0
- package/esm/Menu/components/MenuItem/index.js +33 -0
- package/esm/Menu/components/MenuItem/index.props.d.ts +10 -0
- package/esm/Menu/index.d.ts +4 -0
- package/esm/Menu/index.js +38 -0
- package/esm/Menu/index.props.d.ts +11 -0
- package/esm/Modal/Modal.module.css +51 -0
- package/esm/Modal/components/Close/Close.module.css +4 -0
- package/esm/Modal/components/Close/index.d.ts +5 -0
- package/esm/Modal/components/Close/index.js +19 -0
- package/esm/Modal/components/Content/Content.module.css +6 -0
- package/esm/Modal/components/Content/index.d.ts +3 -0
- package/esm/Modal/components/Content/index.js +13 -0
- package/esm/Modal/components/Title/Title.module.css +9 -0
- package/esm/Modal/components/Title/index.d.ts +3 -0
- package/esm/Modal/components/Title/index.js +19 -0
- package/esm/Modal/index.d.ts +4 -0
- package/esm/Modal/index.js +61 -0
- package/esm/Modal/index.props.d.ts +5 -0
- package/esm/MultiSelect/components/MenuOverlay/index.d.ts +19 -0
- package/esm/MultiSelect/components/MenuOverlay/index.js +93 -0
- package/esm/MultiSelect/components/MenuOverlay/index.module.css +9 -0
- package/esm/MultiSelect/components/MenuOverlayItem/index.d.ts +13 -0
- package/esm/MultiSelect/components/MenuOverlayItem/index.js +20 -0
- package/esm/MultiSelect/index.d.ts +4 -0
- package/esm/MultiSelect/index.js +159 -0
- package/esm/MultiSelect/index.module.css +49 -0
- package/esm/MultiSelect/index.props.d.ts +32 -0
- package/esm/MultiSelect/utils/index.d.ts +1 -0
- package/esm/MultiSelect/utils/index.js +5 -0
- package/esm/Portal/index.d.ts +5 -0
- package/esm/Portal/index.js +16 -0
- package/esm/RadioGroup/Radio.d.ts +19 -0
- package/esm/RadioGroup/Radio.js +37 -0
- package/esm/RadioGroup/RadioGroup.module.css +31 -0
- package/esm/RadioGroup/index.d.ts +26 -0
- package/esm/RadioGroup/index.js +55 -0
- package/esm/Select/components/MenuOverlay/index.d.ts +11 -0
- package/esm/Select/components/MenuOverlay/index.js +55 -0
- package/esm/Select/components/MenuOverlay/index.module.css +4 -0
- package/esm/Select/components/MenuOverlayItem/index.d.ts +14 -0
- package/esm/Select/components/MenuOverlayItem/index.js +39 -0
- package/esm/Select/index.d.ts +4 -0
- package/esm/Select/index.js +98 -0
- package/esm/Select/index.module.css +37 -0
- package/esm/Select/index.props.d.ts +28 -0
- package/esm/Separator/Separator.module.css +5 -0
- package/esm/Separator/index.d.ts +6 -0
- package/esm/Separator/index.js +12 -0
- package/esm/Skeleton/Skeleton.module.css +33 -0
- package/esm/Skeleton/index.d.ts +4 -0
- package/esm/Skeleton/index.js +32 -0
- package/esm/Skeleton/index.props.d.ts +11 -0
- package/esm/Status/index.d.ts +5 -0
- package/esm/Status/index.js +18 -0
- package/esm/Status/index.module.css +45 -0
- package/esm/Status/index.props.d.ts +12 -0
- package/esm/Switch/Switch.module.css +56 -0
- package/esm/Switch/index.d.ts +4 -0
- package/esm/Switch/index.js +30 -0
- package/esm/Switch/index.props.d.ts +6 -0
- package/esm/TabsMenu/Tab/Tab.d.ts +4 -0
- package/esm/TabsMenu/Tab/Tab.js +29 -0
- package/esm/TabsMenu/Tab/Tab.module.css +66 -0
- package/esm/TabsMenu/Tab/Tab.props.d.ts +14 -0
- package/esm/TabsMenu/TabsMenu.module.css +8 -0
- package/esm/TabsMenu/index.d.ts +4 -0
- package/esm/TabsMenu/index.js +83 -0
- package/esm/TabsMenu/index.props.d.ts +11 -0
- package/esm/TabsPanes/Pane/Pane.d.ts +3 -0
- package/esm/TabsPanes/Pane/Pane.js +15 -0
- package/esm/TabsPanes/Pane/index.props.d.ts +7 -0
- package/esm/TabsPanes/index.d.ts +4 -0
- package/esm/TabsPanes/index.js +26 -0
- package/esm/TabsPanes/index.props.d.ts +8 -0
- package/esm/TextArea/TextArea.module.css +16 -0
- package/esm/TextArea/index.d.ts +4 -0
- package/esm/TextArea/index.js +51 -0
- package/esm/TextArea/index.props.d.ts +13 -0
- package/esm/Theme/breakpoints.d.ts +18 -0
- package/esm/Theme/breakpoints.js +34 -0
- package/esm/Theme/colors/common.d.ts +39 -0
- package/esm/Theme/colors/common.js +26 -0
- package/esm/Theme/colors/index.d.ts +64 -0
- package/esm/Theme/colors/index.js +8 -0
- package/esm/Theme/colors/theme_buenos_aires.d.ts +69 -0
- package/{src/components/Theme/colors/theme_buenos_aires.ts → esm/Theme/colors/theme_buenos_aires.js} +14 -23
- package/esm/Theme/colors/theme_default.d.ts +47 -0
- package/{src/components/Theme/colors/theme_default.ts → esm/Theme/colors/theme_default.js} +12 -19
- package/esm/Theme/global.css +50 -0
- package/esm/Theme/index.d.ts +296 -0
- package/esm/Theme/index.js +9 -0
- package/esm/Theme/themes/buenos_aires.d.ts +152 -0
- package/{src/components/Theme/themes/buenos_aires.ts → esm/Theme/themes/buenos_aires.js} +5 -18
- package/esm/Theme/themes/default.d.ts +144 -0
- package/{src/components/Theme/themes/default.ts → esm/Theme/themes/default.js} +5 -17
- package/esm/TimeSelect/Label/index.d.ts +8 -0
- package/esm/TimeSelect/Label/index.js +19 -0
- package/esm/TimeSelect/helpers.d.ts +9 -0
- package/esm/TimeSelect/helpers.js +35 -0
- package/esm/TimeSelect/index.d.ts +11 -0
- package/esm/TimeSelect/index.js +45 -0
- package/esm/TimeSelect/index.props.d.ts +4 -0
- package/esm/Tooltip/Tooltip.module.css +122 -0
- package/esm/Tooltip/index.d.ts +4 -0
- package/esm/Tooltip/index.js +106 -0
- package/esm/Tooltip/index.props.d.ts +11 -0
- package/esm/Typography/Typography.module.css +64 -0
- package/esm/Typography/index.d.ts +4 -0
- package/esm/Typography/index.js +24 -0
- package/esm/Typography/index.props.d.ts +13 -0
- package/esm/base/BaseInput/BaseInput.module.css +13 -0
- package/esm/base/BaseInput/index.d.ts +4 -0
- package/esm/base/BaseInput/index.js +21 -0
- package/esm/base/BaseInput/index.props.d.ts +5 -0
- package/esm/base/FormField/FormField.module.css +11 -0
- package/esm/base/FormField/index.d.ts +4 -0
- package/esm/base/FormField/index.js +27 -0
- package/esm/base/FormField/index.props.d.ts +10 -0
- package/esm/base/InputRoot/InputRoot.module.css +76 -0
- package/esm/base/InputRoot/index.d.ts +4 -0
- package/esm/base/InputRoot/index.js +31 -0
- package/esm/base/InputRoot/index.props.d.ts +15 -0
- package/esm/helpers/date/index.d.ts +12 -0
- package/esm/helpers/date/index.js +73 -0
- package/esm/helpers/generateUniqID.d.ts +2 -0
- package/esm/helpers/on.d.ts +1 -0
- package/esm/helpers/on.js +10 -0
- package/esm/hooks/useMediaSizes/index.d.ts +5 -0
- package/esm/hooks/useMediaSizes/index.js +36 -0
- package/esm/hooks/useOnClickOutside/index.d.ts +3 -0
- package/esm/hooks/useOnClickOutside/index.js +28 -0
- package/esm/hooks/useScrollLock/index.d.ts +2 -0
- package/esm/hooks/useScrollLock/index.js +22 -0
- package/esm/hooks/useTrapFocus/index.d.ts +3 -0
- package/esm/hooks/useTrapFocus/index.js +30 -0
- package/esm/index.js +54 -0
- package/esm/lib/keyboard.d.ts +4 -0
- package/esm/lib/keyboard.js +25 -0
- package/esm/libs/numbers/leadingZeros.d.ts +4 -0
- package/{src/components/libs/numbers/leadingZeros.ts → esm/libs/numbers/leadingZeros.js} +4 -4
- package/esm/libs/requestIdleCallback/index.d.ts +5 -0
- package/{src/components/libs/requestIdleCallback/index.ts → esm/libs/requestIdleCallback/index.js} +3 -5
- package/esm/theme_ba_variables.css +151 -0
- package/esm/theme_default_variables.css +143 -0
- package/helpers/date/index.d.ts +12 -0
- package/helpers/date/index.js +84 -0
- package/helpers/generateUniqID.d.ts +2 -0
- package/helpers/on.d.ts +1 -0
- package/helpers/on.js +12 -0
- package/hooks/useMediaSizes/index.d.ts +5 -0
- package/hooks/useMediaSizes/index.js +40 -0
- package/hooks/useOnClickOutside/index.d.ts +3 -0
- package/hooks/useOnClickOutside/index.js +32 -0
- package/hooks/useScrollLock/index.d.ts +2 -0
- package/hooks/useScrollLock/index.js +26 -0
- package/hooks/useTrapFocus/index.d.ts +3 -0
- package/hooks/useTrapFocus/index.js +34 -0
- package/index.d.ts +37 -0
- package/index.js +113 -0
- package/lib/keyboard.d.ts +4 -0
- package/lib/keyboard.js +28 -0
- package/libs/numbers/leadingZeros.d.ts +4 -0
- package/libs/numbers/leadingZeros.js +14 -0
- package/libs/requestIdleCallback/index.d.ts +5 -0
- package/libs/requestIdleCallback/index.js +13 -0
- package/package.json +4 -86
- package/theme_ba_variables.css +151 -0
- package/theme_default_variables.css +143 -0
- package/.babelrc +0 -7
- package/.config/jest/__mocks__/noop.js +0 -1
- package/.config/jest/jest.config.ts +0 -207
- package/.config/jest/jest.setup.ts +0 -4
- package/.prettierignore +0 -5
- package/.prettierrc +0 -8
- package/.storybook/AddonThemesSwitcher/constants.ts +0 -7
- package/.storybook/AddonThemesSwitcher/index.ts +0 -45
- package/.storybook/AddonThemesSwitcher/register.tsx +0 -79
- package/.storybook/main.ts +0 -18
- package/.storybook/manager.tsx +0 -1
- package/.storybook/preview-head.html +0 -19
- package/.storybook/preview.tsx +0 -14
- package/.stylelintrc.json +0 -17
- package/@types/image.d.ts +0 -5
- package/@types/typings.d.ts +0 -2
- package/eslint.config.mjs +0 -83
- package/rollup.config.js +0 -81
- package/scripts/buildSass.js +0 -23
- package/scripts/copyFiles.js +0 -32
- package/scripts/postbuild.js +0 -52
- package/scripts/transformCSS.js +0 -35
- package/scripts/updateImports.js +0 -16
- package/scripts/variables.ts +0 -29
- package/src/components/Accordion/Accordion.stories.tsx +0 -47
- package/src/components/Accordion/index.tsx +0 -71
- package/src/components/Avatar/assets/org-circle.svg +0 -1
- package/src/components/Avatar/assets/user-circle.svg +0 -1
- package/src/components/Avatar/constants.ts +0 -7
- package/src/components/Avatar/index.props.ts +0 -17
- package/src/components/Avatar/index.stories.tsx +0 -36
- package/src/components/Avatar/index.tsx +0 -49
- package/src/components/Badge/Control/index.tsx +0 -16
- package/src/components/Badge/__tests__/Badge.test.tsx +0 -27
- package/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +0 -28
- package/src/components/Badge/index.props.ts +0 -12
- package/src/components/Badge/index.stories.tsx +0 -68
- package/src/components/Badge/index.tsx +0 -60
- package/src/components/Button/Button.module.scss +0 -265
- package/src/components/Button/index.props.ts +0 -23
- package/src/components/Button/index.stories.tsx +0 -109
- package/src/components/Button/index.tsx +0 -50
- package/src/components/Calendar/components/ContinueButton/index.module.scss +0 -6
- package/src/components/Calendar/components/ContinueButton/index.tsx +0 -45
- package/src/components/Calendar/components/Month/Month.tsx +0 -172
- package/src/components/Calendar/components/Presets/index.tsx +0 -48
- package/src/components/Calendar/index.props.ts +0 -34
- package/src/components/Calendar/index.stories.tsx +0 -45
- package/src/components/Calendar/index.tsx +0 -251
- package/src/components/Calendar/utils/__tests__/getNumberOfMonthsBetweenDates.test.ts +0 -27
- package/src/components/Calendar/utils/getMonthWeeks.ts +0 -135
- package/src/components/Calendar/utils/getNumberOfMonthsBetweenDates.ts +0 -28
- package/src/components/Calendar/utils/getPresets.ts +0 -114
- package/src/components/Calendar/utils/getStartMonth.ts +0 -19
- package/src/components/Checkbox/Checkbox.module.scss +0 -106
- package/src/components/Checkbox/index.props.ts +0 -18
- package/src/components/Checkbox/index.stories.tsx +0 -76
- package/src/components/Checkbox/index.tsx +0 -61
- package/src/components/Chip/Chip.module.scss +0 -93
- package/src/components/Chip/index.props.ts +0 -10
- package/src/components/Chip/index.stories.tsx +0 -97
- package/src/components/Chip/index.tsx +0 -52
- package/src/components/ClickOutside/index.tsx +0 -36
- package/src/components/Counter/index.props.ts +0 -9
- package/src/components/Counter/index.stories.tsx +0 -40
- package/src/components/Counter/index.tsx +0 -67
- package/src/components/Datepicker/components/DatePicker/index.props.ts +0 -5
- package/src/components/Datepicker/components/DatePicker/index.tsx +0 -75
- package/src/components/Datepicker/components/TimePicker/Label/index.tsx +0 -20
- package/src/components/Datepicker/components/TimePicker/helpers.ts +0 -42
- package/src/components/Datepicker/components/TimePicker/index.props.ts +0 -8
- package/src/components/Datepicker/components/TimePicker/index.tsx +0 -60
- package/src/components/Datepicker/index.props.ts +0 -7
- package/src/components/Datepicker/index.stories.tsx +0 -29
- package/src/components/Datepicker/index.tsx +0 -23
- package/src/components/DotsLoader/index.stories.tsx +0 -26
- package/src/components/DotsLoader/index.tsx +0 -29
- package/src/components/Dropdown/__tests__/Dropdown.test.tsx +0 -75
- package/src/components/Dropdown/index.props.ts +0 -27
- package/src/components/Dropdown/index.stories.tsx +0 -40
- package/src/components/Dropdown/index.tsx +0 -210
- package/src/components/Grid/Item/index.tsx +0 -21
- package/src/components/Grid/index.props.ts +0 -6
- package/src/components/Grid/index.stories.tsx +0 -56
- package/src/components/Grid/index.tsx +0 -26
- package/src/components/Icons/ArrowNext.tsx +0 -27
- package/src/components/Icons/Cart.tsx +0 -23
- package/src/components/Icons/Check.tsx +0 -32
- package/src/components/Icons/Chevron.tsx +0 -27
- package/src/components/Icons/Close.tsx +0 -21
- package/src/components/Icons/CrossFill.tsx +0 -22
- package/src/components/Icons/Edit.tsx +0 -25
- package/src/components/Icons/Exit.tsx +0 -26
- package/src/components/Icons/EyeClosed.tsx +0 -22
- package/src/components/Icons/EyeOpen.tsx +0 -30
- package/src/components/Icons/Help.tsx +0 -20
- package/src/components/Icons/Info.tsx +0 -25
- package/src/components/Icons/Minus.tsx +0 -26
- package/src/components/Icons/More.tsx +0 -24
- package/src/components/Icons/Plus.tsx +0 -25
- package/src/components/Icons/Setting.tsx +0 -28
- package/src/components/Icons/Trash.tsx +0 -27
- package/src/components/Icons/User.tsx +0 -33
- package/src/components/Icons/index.stories.tsx +0 -71
- package/src/components/Image/Image.module.scss +0 -16
- package/src/components/Image/index.props.ts +0 -14
- package/src/components/Image/index.stories.tsx +0 -23
- package/src/components/Image/index.tsx +0 -67
- package/src/components/Input/index.props.ts +0 -25
- package/src/components/Input/index.stories.tsx +0 -70
- package/src/components/Input/index.tsx +0 -49
- package/src/components/InputRadio/InputRadio.module.scss +0 -117
- package/src/components/InputRadio/index.tsx +0 -108
- package/src/components/Menu/__tests__/Menu.test.tsx +0 -46
- package/src/components/Menu/components/MenuItem/MenuItem.module.scss +0 -44
- package/src/components/Menu/components/MenuItem/index.props.ts +0 -11
- package/src/components/Menu/components/MenuItem/index.tsx +0 -41
- package/src/components/Menu/index.props.ts +0 -13
- package/src/components/Menu/index.stories.tsx +0 -36
- package/src/components/Menu/index.tsx +0 -49
- package/src/components/Modal/components/Close/index.tsx +0 -12
- package/src/components/Modal/components/Content/index.tsx +0 -10
- package/src/components/Modal/components/Title/index.tsx +0 -15
- package/src/components/Modal/index.props.ts +0 -5
- package/src/components/Modal/index.stories.tsx +0 -32
- package/src/components/Modal/index.tsx +0 -76
- package/src/components/MultiSelect/components/MenuOverlay/index.tsx +0 -120
- package/src/components/MultiSelect/components/MenuOverlayItem/index.tsx +0 -28
- package/src/components/MultiSelect/index.props.ts +0 -37
- package/src/components/MultiSelect/index.stories.tsx +0 -62
- package/src/components/MultiSelect/index.tsx +0 -171
- package/src/components/MultiSelect/utils/index.ts +0 -6
- package/src/components/Portal/index.tsx +0 -18
- package/src/components/RadioGroup/Radio.tsx +0 -56
- package/src/components/RadioGroup/RadioGroup.module.scss +0 -37
- package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -101
- package/src/components/RadioGroup/index.tsx +0 -92
- package/src/components/Select/__tests__/Select.test.tsx +0 -37
- package/src/components/Select/components/MenuOverlay/index.tsx +0 -66
- package/src/components/Select/components/MenuOverlayItem/index.tsx +0 -53
- package/src/components/Select/index.props.ts +0 -32
- package/src/components/Select/index.stories.tsx +0 -52
- package/src/components/Select/index.tsx +0 -106
- package/src/components/Separator/Separator.stories.tsx +0 -12
- package/src/components/Separator/index.tsx +0 -14
- package/src/components/Skeleton/Skeleton.module.scss +0 -39
- package/src/components/Skeleton/index.props.ts +0 -12
- package/src/components/Skeleton/index.stories.tsx +0 -45
- package/src/components/Skeleton/index.tsx +0 -24
- package/src/components/Status/index.module.scss +0 -54
- package/src/components/Status/index.props.ts +0 -14
- package/src/components/Status/index.stories.tsx +0 -42
- package/src/components/Status/index.tsx +0 -22
- package/src/components/Switch/index.props.ts +0 -8
- package/src/components/Switch/index.stories.tsx +0 -27
- package/src/components/Switch/index.tsx +0 -40
- package/src/components/TabsMenu/Tab/Tab.module.scss +0 -78
- package/src/components/TabsMenu/Tab/Tab.props.ts +0 -20
- package/src/components/TabsMenu/Tab/Tab.tsx +0 -40
- package/src/components/TabsMenu/index.props.ts +0 -13
- package/src/components/TabsMenu/index.stories.tsx +0 -40
- package/src/components/TabsMenu/index.tsx +0 -110
- package/src/components/TabsPanes/Pane/Pane.tsx +0 -14
- package/src/components/TabsPanes/Pane/index.props.ts +0 -8
- package/src/components/TabsPanes/__tests__/TabsPanes.test.tsx +0 -39
- package/src/components/TabsPanes/__tests__/__snapshots__/TabsPanes.test.tsx.snap +0 -189
- package/src/components/TabsPanes/index.stories.tsx +0 -29
- package/src/components/TabsPanes/index.tsx +0 -37
- package/src/components/TextArea/index.props.ts +0 -23
- package/src/components/TextArea/index.stories.tsx +0 -33
- package/src/components/TextArea/index.tsx +0 -56
- package/src/components/Theme/breakpoints.ts +0 -52
- package/src/components/Theme/colors/common.ts +0 -31
- package/src/components/Theme/colors/index.ts +0 -9
- package/src/components/Theme/global.scss +0 -59
- package/src/components/Theme/index.stories.tsx +0 -70
- package/src/components/Theme/index.tsx +0 -7
- package/src/components/TimeSelect/Label/index.tsx +0 -20
- package/src/components/TimeSelect/helpers.ts +0 -37
- package/src/components/TimeSelect/index.props.ts +0 -4
- package/src/components/TimeSelect/index.stories.tsx +0 -64
- package/src/components/TimeSelect/index.tsx +0 -66
- package/src/components/Tooltip/Tooltip.module.scss +0 -148
- package/src/components/Tooltip/__tests__/Tooltip.test.tsx +0 -55
- package/src/components/Tooltip/index.props.ts +0 -27
- package/src/components/Tooltip/index.stories.tsx +0 -50
- package/src/components/Tooltip/index.tsx +0 -151
- package/src/components/Typography/Typography.module.scss +0 -83
- package/src/components/Typography/index.props.ts +0 -37
- package/src/components/Typography/index.stories.tsx +0 -70
- package/src/components/Typography/index.tsx +0 -35
- package/src/components/base/BaseInput/index.props.ts +0 -7
- package/src/components/base/BaseInput/index.tsx +0 -21
- package/src/components/base/FormField/FormField.module.scss +0 -12
- package/src/components/base/FormField/index.props.ts +0 -11
- package/src/components/base/FormField/index.tsx +0 -36
- package/src/components/base/InputRoot/InputRoot.module.scss +0 -93
- package/src/components/base/InputRoot/index.props.ts +0 -18
- package/src/components/base/InputRoot/index.tsx +0 -39
- package/src/components/helpers/__tests__/generateUniqID.test.ts +0 -7
- package/src/components/helpers/date/index.ts +0 -76
- package/src/components/helpers/generateUniqID.ts +0 -6
- package/src/components/helpers/on.ts +0 -13
- package/src/components/hooks/useMediaSizes/index.ts +0 -50
- package/src/components/hooks/useOnClickOutside/index.ts +0 -39
- package/src/components/hooks/useScrollLock/index.ts +0 -26
- package/src/components/hooks/useTrapFocus/index.ts +0 -49
- package/src/components/lib/keyboard.ts +0 -46
- package/src/components/libs/numbers/__tests__/leadingZeros.test.ts +0 -10
- package/tsconfig.json +0 -49
- /package/{src/components/Icons/index.tsx → Icons/index.d.ts} +0 -0
- /package/{src/components/index.ts → esm/index.d.ts} +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
|
|
3
|
-
export interface BaseImageContainerProps {
|
|
4
|
-
fallbackSrc?: string;
|
|
5
|
-
ariaLabel?: string;
|
|
6
|
-
sources?: React.SourceHTMLAttributes<HTMLSourceElement>[];
|
|
7
|
-
"data-testid"?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ImageProps
|
|
11
|
-
extends BaseImageContainerProps,
|
|
12
|
-
React.ImgHTMLAttributes<HTMLImageElement> {
|
|
13
|
-
ref?: React.Ref<HTMLImageElement>;
|
|
14
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import Image from ".";
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Image> = {
|
|
5
|
-
title: "UI/Image",
|
|
6
|
-
parameters: {},
|
|
7
|
-
component: Image,
|
|
8
|
-
} satisfies Meta<typeof Image>;
|
|
9
|
-
|
|
10
|
-
export default meta;
|
|
11
|
-
|
|
12
|
-
type Story = StoryObj<typeof Image>;
|
|
13
|
-
|
|
14
|
-
const IMG =
|
|
15
|
-
"https://images.unsplash.com/photo-1714329454117-b12e6729c1e1?q=80&w=1991&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D";
|
|
16
|
-
|
|
17
|
-
export const Default: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
src: IMG,
|
|
20
|
-
width: 400,
|
|
21
|
-
height: 300,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useState } from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import styles from "./Image.module.scss";
|
|
4
|
-
import type { ImageProps } from "./index.props";
|
|
5
|
-
|
|
6
|
-
const emptyImage =
|
|
7
|
-
"data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
|
|
8
|
-
|
|
9
|
-
const Image = ({
|
|
10
|
-
className,
|
|
11
|
-
loading = "lazy",
|
|
12
|
-
src,
|
|
13
|
-
fallbackSrc,
|
|
14
|
-
onClick,
|
|
15
|
-
srcSet,
|
|
16
|
-
sizes,
|
|
17
|
-
ariaLabel,
|
|
18
|
-
sources = [],
|
|
19
|
-
alt = src,
|
|
20
|
-
width,
|
|
21
|
-
height,
|
|
22
|
-
ref,
|
|
23
|
-
...props
|
|
24
|
-
}: ImageProps) => {
|
|
25
|
-
const [isFailed, setFailed] = useState(false);
|
|
26
|
-
const imageSrc = src || emptyImage;
|
|
27
|
-
const imageSrcSet = srcSet;
|
|
28
|
-
const sizeAttrs: Pick<ImageProps, "width" | "height"> = {};
|
|
29
|
-
|
|
30
|
-
if (width !== undefined) {
|
|
31
|
-
sizeAttrs.width = width;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (height !== undefined) {
|
|
35
|
-
sizeAttrs.height = height;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const handleError = useCallback(() => {
|
|
39
|
-
setFailed(true);
|
|
40
|
-
}, []);
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<picture ref={ref} className={classNames(styles.root)}>
|
|
44
|
-
{!!sources.length &&
|
|
45
|
-
sources.map((source, index) => (
|
|
46
|
-
<source key={`item-${index}`} {...source} />
|
|
47
|
-
))}
|
|
48
|
-
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
|
|
49
|
-
<img
|
|
50
|
-
alt={alt}
|
|
51
|
-
style={sizeAttrs}
|
|
52
|
-
className={classNames(className)}
|
|
53
|
-
loading={loading}
|
|
54
|
-
aria-hidden={ariaLabel ? "false" : "true"}
|
|
55
|
-
aria-label={ariaLabel}
|
|
56
|
-
onClick={onClick}
|
|
57
|
-
onError={handleError}
|
|
58
|
-
src={isFailed && fallbackSrc ? fallbackSrc : imageSrc}
|
|
59
|
-
srcSet={imageSrcSet}
|
|
60
|
-
sizes={sizes}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
</picture>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default Image;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ChangeEvent,
|
|
3
|
-
ForwardedRef,
|
|
4
|
-
InputHTMLAttributes,
|
|
5
|
-
ReactNode,
|
|
6
|
-
Ref,
|
|
7
|
-
} from "react";
|
|
8
|
-
import type { FormFieldProps } from "../base/FormField/index.props";
|
|
9
|
-
import type { Size, Variant } from "../base/InputRoot/index.props";
|
|
10
|
-
|
|
11
|
-
export interface InputProps
|
|
12
|
-
extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "size">,
|
|
13
|
-
Omit<FormFieldProps, "children"> {
|
|
14
|
-
endIcon?: ReactNode;
|
|
15
|
-
hasError?: boolean;
|
|
16
|
-
hint?: ReactNode;
|
|
17
|
-
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
18
|
-
label?: ReactNode;
|
|
19
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
20
|
-
ref?: Ref<HTMLInputElement>;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
size?: Size;
|
|
23
|
-
startIcon?: ReactNode;
|
|
24
|
-
variant?: Variant;
|
|
25
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { fn } from "@storybook/test";
|
|
3
|
-
import Chevron from "../Icons/Chevron";
|
|
4
|
-
import Input from ".";
|
|
5
|
-
|
|
6
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof Input> = {
|
|
9
|
-
title: "UI/Input",
|
|
10
|
-
parameters: {
|
|
11
|
-
},
|
|
12
|
-
argTypes: {
|
|
13
|
-
size: {
|
|
14
|
-
control: { type: "select" },
|
|
15
|
-
options: ["s", "m", "l"],
|
|
16
|
-
},
|
|
17
|
-
variant: {
|
|
18
|
-
control: { type: "select" },
|
|
19
|
-
options: ["primary"],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
args: {
|
|
23
|
-
onChange: fn(),
|
|
24
|
-
hasError: false,
|
|
25
|
-
disabled: false,
|
|
26
|
-
label: "Label",
|
|
27
|
-
variant: "primary",
|
|
28
|
-
hint: "hint",
|
|
29
|
-
},
|
|
30
|
-
component: Input,
|
|
31
|
-
} satisfies Meta<typeof Input>;
|
|
32
|
-
|
|
33
|
-
export default meta;
|
|
34
|
-
|
|
35
|
-
type Story = StoryObj<typeof Input>;
|
|
36
|
-
|
|
37
|
-
const PLACEHOLDER = "Name";
|
|
38
|
-
|
|
39
|
-
export const Default: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
placeholder: PLACEHOLDER,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const Required: Story = {
|
|
46
|
-
args: {
|
|
47
|
-
placeholder: PLACEHOLDER,
|
|
48
|
-
required: true,
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const TypePassword: Story = {
|
|
53
|
-
args: {
|
|
54
|
-
placeholder: PLACEHOLDER,
|
|
55
|
-
type: 'password',
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const Error: Story = {
|
|
60
|
-
args: {
|
|
61
|
-
placeholder: PLACEHOLDER,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const WithIcon: Story = {
|
|
66
|
-
args: {
|
|
67
|
-
placeholder: PLACEHOLDER,
|
|
68
|
-
endIcon: <Chevron />,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import FormField from "../base/FormField";
|
|
4
|
-
import InputRoot from "../base/InputRoot";
|
|
5
|
-
import BaseInput from "../base/BaseInput";
|
|
6
|
-
import type { InputProps } from "./index.props";
|
|
7
|
-
|
|
8
|
-
const Input = ({
|
|
9
|
-
className,
|
|
10
|
-
startIcon,
|
|
11
|
-
endIcon,
|
|
12
|
-
label,
|
|
13
|
-
hint,
|
|
14
|
-
hasError,
|
|
15
|
-
required,
|
|
16
|
-
onChange,
|
|
17
|
-
inputRef,
|
|
18
|
-
disabled,
|
|
19
|
-
variant = "primary",
|
|
20
|
-
size = "m",
|
|
21
|
-
ref,
|
|
22
|
-
...props
|
|
23
|
-
}: InputProps) => (
|
|
24
|
-
<FormField
|
|
25
|
-
className={classNames(className)}
|
|
26
|
-
label={label}
|
|
27
|
-
required={required}
|
|
28
|
-
hint={hint}
|
|
29
|
-
hasError={hasError}
|
|
30
|
-
>
|
|
31
|
-
<InputRoot
|
|
32
|
-
ref={ref}
|
|
33
|
-
startIcon={startIcon}
|
|
34
|
-
endIcon={endIcon}
|
|
35
|
-
variant={variant}
|
|
36
|
-
size={size}
|
|
37
|
-
disabled={!!disabled}
|
|
38
|
-
hasError={hasError}
|
|
39
|
-
>
|
|
40
|
-
<BaseInput
|
|
41
|
-
ref={inputRef}
|
|
42
|
-
onChange={onChange}
|
|
43
|
-
{...{ type: "text", ...props }}
|
|
44
|
-
/>
|
|
45
|
-
</InputRoot>
|
|
46
|
-
</FormField>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export default Input;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
.label {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
vertical-align: baseline;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.text {
|
|
7
|
-
flex: 1 1 auto;
|
|
8
|
-
line-height: 18px;
|
|
9
|
-
margin-inline-start: 8px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.icon {
|
|
13
|
-
background-color: var(--palette-white);
|
|
14
|
-
block-size: 16px;
|
|
15
|
-
border: solid 1px var(--palette-bg-3);
|
|
16
|
-
border-radius: 100%;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
display: block;
|
|
19
|
-
flex-shrink: 0;
|
|
20
|
-
inline-size: 16px;
|
|
21
|
-
margin-block-start: 1px;
|
|
22
|
-
position: relative;
|
|
23
|
-
transition:
|
|
24
|
-
border-color 0.16s ease,
|
|
25
|
-
box-shadow 0.16s ease;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.container {
|
|
29
|
-
align-items: flex-start;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
display: flex;
|
|
32
|
-
padding: 3px 0;
|
|
33
|
-
|
|
34
|
-
&_disabled {
|
|
35
|
-
cursor: inherit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&_error {
|
|
39
|
-
& .text {
|
|
40
|
-
color: var(--palette-alert);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
& .icon {
|
|
44
|
-
border-color: var(--palette-alert);
|
|
45
|
-
box-shadow: 0 0 0 2px var(--palette-tretiary-2);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.input {
|
|
51
|
-
block-size: 1px;
|
|
52
|
-
border: 0;
|
|
53
|
-
clip: rect(0 0 0 0);
|
|
54
|
-
inline-size: 1px;
|
|
55
|
-
margin: -1px;
|
|
56
|
-
overflow: hidden;
|
|
57
|
-
padding: 0;
|
|
58
|
-
position: absolute;
|
|
59
|
-
|
|
60
|
-
&_checked + .icon {
|
|
61
|
-
background-color: var(--palette-black);
|
|
62
|
-
border: 4px solid var(--input-radio-bg-checked);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&_disabled + .icon {
|
|
66
|
-
border-radius: 50%;
|
|
67
|
-
|
|
68
|
-
&::after {
|
|
69
|
-
background-color: rgb(246 246 246 / 80%);
|
|
70
|
-
border-radius: 50%;
|
|
71
|
-
content: "";
|
|
72
|
-
display: block;
|
|
73
|
-
inset: 0;
|
|
74
|
-
margin: -1px;
|
|
75
|
-
position: absolute;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:not(&_disabled, &_error) {
|
|
80
|
-
&:hover + .icon {
|
|
81
|
-
border-color: var(--input-radio-bg-hovered);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&:focus + .icon {
|
|
85
|
-
box-shadow: 0 0 0 2px var(--input-radio-box-shadow-focused);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:active + .icon {
|
|
89
|
-
background-color: var(--input-radio-bg-focused);
|
|
90
|
-
border-color: var(--input-radio-border-color-focused);
|
|
91
|
-
box-shadow: 0 0 0 2px var(--input-radio-box-shadow-focused);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&:not(&_disabled, &_error) &_checked {
|
|
96
|
-
&:hover + .icon {
|
|
97
|
-
border-color: var(--input-radio-bg-hovered);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&:active + .icon {
|
|
101
|
-
background-color: var(--palette-black);
|
|
102
|
-
border: 4px solid var(--input-radio-bg-checked);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&_checked:disabled + .icon {
|
|
107
|
-
&::after {
|
|
108
|
-
margin: -4px;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.note {
|
|
114
|
-
color: var(--palette-bg-5);
|
|
115
|
-
margin-block-start: 4px;
|
|
116
|
-
padding-inline-start: 24px;
|
|
117
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import React, { memo } from "react";
|
|
2
|
-
|
|
3
|
-
import classNames from "classnames/bind";
|
|
4
|
-
import Typography from "../Typography";
|
|
5
|
-
import styles from "./InputRadio.module.scss";
|
|
6
|
-
import type {
|
|
7
|
-
FC,
|
|
8
|
-
CSSProperties,
|
|
9
|
-
PropsWithChildren,
|
|
10
|
-
FocusEvent,
|
|
11
|
-
ChangeEvent,
|
|
12
|
-
} from "react";
|
|
13
|
-
|
|
14
|
-
const clx = classNames.bind(styles);
|
|
15
|
-
|
|
16
|
-
type InputRadioProps = {
|
|
17
|
-
checked?: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
containerClassName?: string;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
error?: string;
|
|
22
|
-
id?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
note?: string;
|
|
25
|
-
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
26
|
-
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
27
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
28
|
-
onClick?: (event: React.MouseEvent<HTMLLabelElement, MouseEvent>) => void;
|
|
29
|
-
onMouseEnter?: (
|
|
30
|
-
event: React.MouseEvent<HTMLLabelElement, MouseEvent>,
|
|
31
|
-
) => void;
|
|
32
|
-
style?: CSSProperties;
|
|
33
|
-
text?: string;
|
|
34
|
-
value: string | number;
|
|
35
|
-
testid?: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const InputRadio: FC<PropsWithChildren<InputRadioProps>> = memo(
|
|
39
|
-
({
|
|
40
|
-
checked,
|
|
41
|
-
children,
|
|
42
|
-
className,
|
|
43
|
-
containerClassName,
|
|
44
|
-
disabled,
|
|
45
|
-
error,
|
|
46
|
-
id,
|
|
47
|
-
name,
|
|
48
|
-
note,
|
|
49
|
-
onBlur,
|
|
50
|
-
onFocus,
|
|
51
|
-
onChange,
|
|
52
|
-
onClick,
|
|
53
|
-
onMouseEnter,
|
|
54
|
-
style,
|
|
55
|
-
text,
|
|
56
|
-
value,
|
|
57
|
-
testid,
|
|
58
|
-
...rest
|
|
59
|
-
}) => (
|
|
60
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
61
|
-
<label
|
|
62
|
-
className={clx(styles.label, className)}
|
|
63
|
-
htmlFor={id}
|
|
64
|
-
style={style}
|
|
65
|
-
onClick={onClick}
|
|
66
|
-
onMouseEnter={onMouseEnter}
|
|
67
|
-
data-testid={testid}
|
|
68
|
-
>
|
|
69
|
-
<div
|
|
70
|
-
className={clx(
|
|
71
|
-
styles.container,
|
|
72
|
-
{ container_disabled: !!disabled, container_error: !!error },
|
|
73
|
-
containerClassName,
|
|
74
|
-
)}
|
|
75
|
-
>
|
|
76
|
-
<input
|
|
77
|
-
type="radio"
|
|
78
|
-
id={id}
|
|
79
|
-
value={value}
|
|
80
|
-
name={name}
|
|
81
|
-
className={clx(styles.input, {
|
|
82
|
-
input_error: !!error,
|
|
83
|
-
input_checked: !!checked,
|
|
84
|
-
input_disabled: !!disabled,
|
|
85
|
-
})}
|
|
86
|
-
checked={checked}
|
|
87
|
-
disabled={disabled}
|
|
88
|
-
onChange={onChange}
|
|
89
|
-
onFocus={onFocus}
|
|
90
|
-
onBlur={onBlur}
|
|
91
|
-
{...rest}
|
|
92
|
-
/>
|
|
93
|
-
<span className={clx(styles.icon)} />
|
|
94
|
-
<span className={clx(styles.text)}>
|
|
95
|
-
{!children && text}
|
|
96
|
-
{!text && children}
|
|
97
|
-
</span>
|
|
98
|
-
</div>
|
|
99
|
-
{!!note && (
|
|
100
|
-
<Typography tag="p" size="s" className={clx(styles.note)}>
|
|
101
|
-
{note}
|
|
102
|
-
</Typography>
|
|
103
|
-
)}
|
|
104
|
-
</label>
|
|
105
|
-
),
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
export default InputRadio;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import MenuItem from '../components/MenuItem';
|
|
4
|
-
import Menu from '..';
|
|
5
|
-
|
|
6
|
-
describe('<Menu />', () => {
|
|
7
|
-
it('renders', () => {
|
|
8
|
-
render(
|
|
9
|
-
<Menu>
|
|
10
|
-
<MenuItem key="1">Test 1</MenuItem>
|
|
11
|
-
<MenuItem key="2">Test 2</MenuItem>
|
|
12
|
-
<MenuItem key="3">Test 3</MenuItem>
|
|
13
|
-
</Menu>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
const menuItems = screen.getAllByTestId('menuitem');
|
|
17
|
-
expect(menuItems.length).toBe(3);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('has the correct items value', () => {
|
|
21
|
-
render(
|
|
22
|
-
<Menu>
|
|
23
|
-
<MenuItem key="1">Test 1</MenuItem>
|
|
24
|
-
<MenuItem key="2">Test 2</MenuItem>
|
|
25
|
-
<MenuItem key="3">Test 3</MenuItem>
|
|
26
|
-
</Menu>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
expect(screen.getByText('Test 1')).toBeInTheDocument();
|
|
30
|
-
expect(screen.getByText('Test 2')).toBeInTheDocument();
|
|
31
|
-
expect(screen.getByText('Test 3')).toBeInTheDocument();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('has the correct selected item background', () => {
|
|
35
|
-
render(
|
|
36
|
-
<Menu selected={["2"]}>
|
|
37
|
-
<MenuItem key="1">Test 1</MenuItem>
|
|
38
|
-
<MenuItem key="2">Test 2</MenuItem>
|
|
39
|
-
<MenuItem key="3">Test 3</MenuItem>
|
|
40
|
-
</Menu>
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const selectedItem = screen.getByText('Test 2').closest('li');
|
|
44
|
-
expect(selectedItem).toHaveStyle('background-color: var(--palette-primary-1, rgb(232, 240, 254))');
|
|
45
|
-
});
|
|
46
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
.item {
|
|
2
|
-
align-items: center;
|
|
3
|
-
cursor: pointer;
|
|
4
|
-
display: flex;
|
|
5
|
-
font-size: 1em;
|
|
6
|
-
font-style: normal;
|
|
7
|
-
font-weight: 400;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
line-height: 1.5;
|
|
10
|
-
list-style: none;
|
|
11
|
-
padding: 8px 6px;
|
|
12
|
-
|
|
13
|
-
&_disabled {
|
|
14
|
-
background-color: var(--palette-white);
|
|
15
|
-
color: var(--palette-bg-2);
|
|
16
|
-
cursor: not-allowed;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&_variant {
|
|
21
|
-
&_primary {
|
|
22
|
-
background-color: var(--palette-white);
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
background-color: var(--palette-bg-2);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:active {
|
|
29
|
-
background-color: var(--palette-bg-2);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:focus,
|
|
33
|
-
&:focus-within {
|
|
34
|
-
background-color: var(--palette-bg-2);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
& > * {
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MouseEvent } from "react";
|
|
2
|
-
import type { MenuVariant } from "../../index.props";
|
|
3
|
-
|
|
4
|
-
export interface MenuItemProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
isSelected?: boolean;
|
|
7
|
-
onClick?: (e: MouseEvent) => void;
|
|
8
|
-
variant?: MenuVariant;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
ref?: React.Ref<HTMLLIElement>;
|
|
11
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import classNames from "classnames/bind";
|
|
3
|
-
import styles from "./MenuItem.module.scss";
|
|
4
|
-
import type { PropsWithChildren } from "react";
|
|
5
|
-
import type { MenuItemProps } from "./index.props";
|
|
6
|
-
|
|
7
|
-
const clx = classNames.bind(styles);
|
|
8
|
-
|
|
9
|
-
const MenuItem = ({
|
|
10
|
-
className,
|
|
11
|
-
isSelected,
|
|
12
|
-
variant = "primary",
|
|
13
|
-
disabled,
|
|
14
|
-
onClick,
|
|
15
|
-
children,
|
|
16
|
-
ref,
|
|
17
|
-
}: PropsWithChildren<MenuItemProps>) => (
|
|
18
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
19
|
-
<li
|
|
20
|
-
ref={ref}
|
|
21
|
-
style={{
|
|
22
|
-
backgroundColor: isSelected
|
|
23
|
-
? "var(--palette-bg-2, rgb(232, 240, 254))"
|
|
24
|
-
: "",
|
|
25
|
-
}}
|
|
26
|
-
data-testid="menuitem"
|
|
27
|
-
className={clx(
|
|
28
|
-
"item",
|
|
29
|
-
{
|
|
30
|
-
item_disabled: !!disabled,
|
|
31
|
-
[`item_variant_${variant}`]: !!variant,
|
|
32
|
-
},
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
onClick={onClick}
|
|
36
|
-
>
|
|
37
|
-
{children}
|
|
38
|
-
</li>
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export default MenuItem;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ReactElement, MouseEvent } from "react";
|
|
2
|
-
import type { MenuItemProps } from "./components/MenuItem/index.props";
|
|
3
|
-
|
|
4
|
-
export type MenuVariant = "primary";
|
|
5
|
-
|
|
6
|
-
export type Props = {
|
|
7
|
-
selected?: string[];
|
|
8
|
-
variant?: MenuVariant;
|
|
9
|
-
className?: string;
|
|
10
|
-
onClick?: (key: string, e: MouseEvent) => void;
|
|
11
|
-
children?: ReactElement<MenuItemProps> | ReactElement<MenuItemProps>[];
|
|
12
|
-
ref?: React.Ref<HTMLUListElement>;
|
|
13
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import Menu from ".";
|
|
3
|
-
import type { Meta } from "@storybook/react";
|
|
4
|
-
import MenuItem from "./components/MenuItem";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof Menu> = {
|
|
7
|
-
title: "UI/Menu",
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered",
|
|
10
|
-
},
|
|
11
|
-
argTypes: {},
|
|
12
|
-
component: Menu,
|
|
13
|
-
} satisfies Meta<typeof Menu>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
|
|
17
|
-
const Template = (args) => {
|
|
18
|
-
const [selected, setSelected] = useState<string[]>(['2', '4']);
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Menu {...args} selected={selected} onClick={(k) => setSelected([k])}>
|
|
22
|
-
<MenuItem key="1">Menu item 1</MenuItem>
|
|
23
|
-
<MenuItem key="2">Menu item 2</MenuItem>
|
|
24
|
-
<MenuItem disabled key="3">
|
|
25
|
-
Menu item 3
|
|
26
|
-
</MenuItem>
|
|
27
|
-
<MenuItem key="4">Menu item 4</MenuItem>
|
|
28
|
-
<MenuItem key="5">Menu item 5</MenuItem>
|
|
29
|
-
<MenuItem key="6">Menu item 6</MenuItem>
|
|
30
|
-
</Menu>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const Default = Template.bind({});
|
|
35
|
-
|
|
36
|
-
Default.args = {};
|