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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.chip {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.inner {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
font: inherit;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
place-items: stretch flex-start;
|
|
12
|
+
transition-duration: 0.3s;
|
|
13
|
+
transition-property: background, box-shadow, transform;
|
|
14
|
+
transition-timing-function: ease;
|
|
15
|
+
}
|
|
16
|
+
.inner_active {
|
|
17
|
+
background: var(--palette-bg-1);
|
|
18
|
+
}
|
|
19
|
+
.inner_inactive {
|
|
20
|
+
background: var(--palette-white);
|
|
21
|
+
box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
|
|
22
|
+
}
|
|
23
|
+
.inner_inactive:hover {
|
|
24
|
+
box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
|
|
25
|
+
transform: translateY(-2px);
|
|
26
|
+
}
|
|
27
|
+
.inner_inactive:active {
|
|
28
|
+
background: rgba(0, 0, 0, 0.02);
|
|
29
|
+
box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
|
|
30
|
+
outline: 0;
|
|
31
|
+
transition-duration: 0.15s;
|
|
32
|
+
}
|
|
33
|
+
@media (hover: none) {
|
|
34
|
+
.inner_inactive:hover {
|
|
35
|
+
box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
|
|
36
|
+
transform: translateY(0);
|
|
37
|
+
}
|
|
38
|
+
.inner_inactive:active {
|
|
39
|
+
box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.inner[data-size=s] {
|
|
43
|
+
border-radius: 32px;
|
|
44
|
+
font-size: 0.875rem;
|
|
45
|
+
line-height: 2.2;
|
|
46
|
+
}
|
|
47
|
+
.inner[data-size=m] {
|
|
48
|
+
border-radius: 36px;
|
|
49
|
+
font-size: 1rem;
|
|
50
|
+
line-height: 2.3;
|
|
51
|
+
}
|
|
52
|
+
.inner[data-size=l] {
|
|
53
|
+
border-radius: 44px;
|
|
54
|
+
font-size: 1.15rem;
|
|
55
|
+
line-height: 2.4;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.content {
|
|
59
|
+
align-items: center;
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
max-width: 200px;
|
|
63
|
+
padding: 0 1rem;
|
|
64
|
+
user-select: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.content-inner {
|
|
68
|
+
display: block;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.icon-right {
|
|
74
|
+
align-items: center;
|
|
75
|
+
color: var(--palette-bg-5);
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
margin-left: -11px;
|
|
79
|
+
padding-right: 0.8rem;
|
|
80
|
+
}
|
|
81
|
+
.icon-right:hover {
|
|
82
|
+
color: var(--palette-black);
|
|
83
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import classNames from 'classnames/bind';
|
|
4
|
+
import styles from './Chip.module.css';
|
|
5
|
+
|
|
6
|
+
var clx = classNames.bind(styles);
|
|
7
|
+
var Chip = function Chip(_a) {
|
|
8
|
+
var children = _a.children,
|
|
9
|
+
iconEnd = _a.iconEnd,
|
|
10
|
+
isActive = _a.isActive,
|
|
11
|
+
onClick = _a.onClick,
|
|
12
|
+
onClickIcon = _a.onClickIcon,
|
|
13
|
+
_b = _a.size,
|
|
14
|
+
size = _b === void 0 ? "m" : _b,
|
|
15
|
+
_c = _a.testID,
|
|
16
|
+
testID = _c === void 0 ? "chip" : _c,
|
|
17
|
+
props = __rest(_a, ["children", "iconEnd", "isActive", "onClick", "onClickIcon", "size", "testID"]);
|
|
18
|
+
return /*#__PURE__*/React__default.createElement("span", __assign({
|
|
19
|
+
className: clx("chip"),
|
|
20
|
+
"data-testid": testID
|
|
21
|
+
}, props), /*#__PURE__*/React__default.createElement("span", {
|
|
22
|
+
className: clx("inner", {
|
|
23
|
+
inner_active: iconEnd || isActive,
|
|
24
|
+
inner_inactive: !iconEnd && !isActive
|
|
25
|
+
}),
|
|
26
|
+
"data-size": size
|
|
27
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
28
|
+
className: clx("content"),
|
|
29
|
+
"aria-pressed": isActive,
|
|
30
|
+
role: "button",
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
onClick: onClick
|
|
33
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
34
|
+
className: clx("content-inner")
|
|
35
|
+
}, children)), iconEnd && (
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
38
|
+
React__default.createElement("span", {
|
|
39
|
+
className: clx("icon-right"),
|
|
40
|
+
role: "button",
|
|
41
|
+
tabIndex: 0,
|
|
42
|
+
onClick: onClickIcon
|
|
43
|
+
}, iconEnd))));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { Chip as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
2
|
+
import React__default, { useRef, cloneElement } from 'react';
|
|
3
|
+
import useOnClickOutside from '../hooks/useOnClickOutside/index.js';
|
|
4
|
+
|
|
5
|
+
var ClickOutside = function ClickOutside(_a) {
|
|
6
|
+
var children = _a.children,
|
|
7
|
+
onClick = _a.onClick;
|
|
8
|
+
var childRef = useRef();
|
|
9
|
+
useOnClickOutside(childRef, onClick);
|
|
10
|
+
if (! /*#__PURE__*/React__default.isValidElement(children)) return null;
|
|
11
|
+
var combinedRef = function combinedRef(node) {
|
|
12
|
+
childRef.current = node;
|
|
13
|
+
if (/*#__PURE__*/React__default.isValidElement(children) && "ref" in children.props) {
|
|
14
|
+
var childRefProp = children.props.ref;
|
|
15
|
+
if (typeof childRefProp === "function") {
|
|
16
|
+
childRefProp(node);
|
|
17
|
+
} else if (childRefProp && _typeof(childRefProp) === "object") {
|
|
18
|
+
childRefProp.current = node;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/cloneElement(children, {
|
|
23
|
+
ref: combinedRef
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { ClickOutside as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
background-color: var(--palette-white);
|
|
3
|
+
border-radius: 4px;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
font-size: 16px;
|
|
7
|
+
max-block-size: 40px;
|
|
8
|
+
min-block-size: 40px;
|
|
9
|
+
min-inline-size: 96px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
.root_fullWidth {
|
|
14
|
+
inline-size: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.control {
|
|
18
|
+
align-items: center;
|
|
19
|
+
block-size: 38px;
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: 4px;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
}
|
|
24
|
+
.control_fullWidth {
|
|
25
|
+
inline-size: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.value {
|
|
29
|
+
font-size: 18px;
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
inline-size: 24px;
|
|
32
|
+
text-align: center;
|
|
33
|
+
user-select: none;
|
|
34
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React__default, { useRef } from 'react';
|
|
2
|
+
import classNames from 'classnames/bind';
|
|
3
|
+
import Button from '../Button/index.js';
|
|
4
|
+
import MinusIcon from '../Icons/Minus.js';
|
|
5
|
+
import PlusIcon from '../Icons/Plus.js';
|
|
6
|
+
import styles from './Counter.module.css';
|
|
7
|
+
|
|
8
|
+
var clx = classNames.bind(styles);
|
|
9
|
+
var Counter = function Counter(_a) {
|
|
10
|
+
var _b = _a.value,
|
|
11
|
+
value = _b === void 0 ? 1 : _b,
|
|
12
|
+
max = _a.max,
|
|
13
|
+
_c = _a.min,
|
|
14
|
+
min = _c === void 0 ? 0 : _c,
|
|
15
|
+
fullWidth = _a.fullWidth,
|
|
16
|
+
onChange = _a.onChange,
|
|
17
|
+
disabled = _a.disabled,
|
|
18
|
+
className = _a.className;
|
|
19
|
+
var lastNumValue = useRef(value);
|
|
20
|
+
var minusDisabled = disabled || value <= min;
|
|
21
|
+
var plusDisabled = disabled || value >= max;
|
|
22
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
23
|
+
className: clx(styles.root, {
|
|
24
|
+
root_fullWidth: fullWidth ? 1 : 0
|
|
25
|
+
}, className)
|
|
26
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
27
|
+
className: clx(styles.control, {
|
|
28
|
+
control_fullWidth: fullWidth ? 1 : 0
|
|
29
|
+
})
|
|
30
|
+
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
31
|
+
icon: /*#__PURE__*/React__default.createElement(MinusIcon, {
|
|
32
|
+
width: 16,
|
|
33
|
+
height: 16
|
|
34
|
+
}),
|
|
35
|
+
disabled: minusDisabled,
|
|
36
|
+
type: "button",
|
|
37
|
+
onClick: function onClick(e) {
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
onChange(value - 1);
|
|
40
|
+
lastNumValue.current = value - 1;
|
|
41
|
+
},
|
|
42
|
+
"aria-label": "decrease"
|
|
43
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
44
|
+
className: clx(styles.value)
|
|
45
|
+
}, value), /*#__PURE__*/React__default.createElement(Button, {
|
|
46
|
+
icon: /*#__PURE__*/React__default.createElement(PlusIcon, {
|
|
47
|
+
width: 16,
|
|
48
|
+
height: 16
|
|
49
|
+
}),
|
|
50
|
+
disabled: plusDisabled,
|
|
51
|
+
type: "button",
|
|
52
|
+
onClick: function onClick(e) {
|
|
53
|
+
e.stopPropagation();
|
|
54
|
+
onChange(value + 1);
|
|
55
|
+
lastNumValue.current = value + 1;
|
|
56
|
+
},
|
|
57
|
+
"aria-label": "increase"
|
|
58
|
+
})));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { Counter as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React__default, { useState } from 'react';
|
|
2
|
+
import classNames from 'classnames/bind';
|
|
3
|
+
import Dropdown from '../../../Dropdown/index.js';
|
|
4
|
+
import Calendar from '../../../Calendar/index.js';
|
|
5
|
+
import { toISODate, toDMYDate } from '../../../helpers/date/index.js';
|
|
6
|
+
import styles from './index.module.css';
|
|
7
|
+
|
|
8
|
+
var clx = classNames.bind(styles);
|
|
9
|
+
var CalendarIcon = function CalendarIcon() {
|
|
10
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
fill: "none",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
className: clx("calendar-icon"),
|
|
15
|
+
strokeWidth: 1.5,
|
|
16
|
+
stroke: "currentColor"
|
|
17
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
d: "M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
var DatePicker = function DatePicker(_a) {
|
|
24
|
+
var className = _a.className,
|
|
25
|
+
_b = _a.selectedDate,
|
|
26
|
+
selectedDate = _b === void 0 ? "" : _b,
|
|
27
|
+
onChangeDate = _a.onChangeDate;
|
|
28
|
+
var _c = useState(selectedDate),
|
|
29
|
+
date = _c[0],
|
|
30
|
+
setDate = _c[1];
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
32
|
+
var handleDateChange = function handleDateChange(_a) {
|
|
33
|
+
var date = _a.date;
|
|
34
|
+
setDate(date);
|
|
35
|
+
onChangeDate === null || onChangeDate === void 0 ? void 0 : onChangeDate(date);
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
38
|
+
placement: "bottom",
|
|
39
|
+
fontSize: 14,
|
|
40
|
+
trigger: ["click"],
|
|
41
|
+
overlay: /*#__PURE__*/React__default.createElement(Calendar, {
|
|
42
|
+
minWidth: 260,
|
|
43
|
+
className: clx("calendar", className),
|
|
44
|
+
today: toISODate(new Date()),
|
|
45
|
+
titleSize: "h5",
|
|
46
|
+
selectedDate: date,
|
|
47
|
+
onChange: handleDateChange
|
|
48
|
+
})
|
|
49
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50
|
+
className: clx("input-container", "input-date", className)
|
|
51
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
52
|
+
className: clx("input-field"),
|
|
53
|
+
tabIndex: 0,
|
|
54
|
+
"aria-expanded": "false",
|
|
55
|
+
"aria-haspopup": "true",
|
|
56
|
+
"aria-invalid": "false",
|
|
57
|
+
autoComplete: "off",
|
|
58
|
+
maxLength: 7,
|
|
59
|
+
readOnly: true,
|
|
60
|
+
value: toDMYDate(date)
|
|
61
|
+
}), /*#__PURE__*/React__default.createElement(CalendarIcon, null)));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { DatePicker as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
.input-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
height: 36px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
border: 1px solid var(--palette-bg-3);
|
|
8
|
+
border-top-right-radius: 0.375rem;
|
|
9
|
+
border-bottom-right-radius: 0.375rem;
|
|
10
|
+
border-left: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.input-field {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
padding: 4px;
|
|
17
|
+
text-align: center;
|
|
18
|
+
background: transparent;
|
|
19
|
+
border: none;
|
|
20
|
+
outline: none;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.input-date {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
flex: 3;
|
|
27
|
+
position: relative;
|
|
28
|
+
border-top: 1px solid var(--palette-bg-3);
|
|
29
|
+
border-right: 1px solid var(--palette-bg-3);
|
|
30
|
+
border-bottom: 1px solid var(--palette-bg-3);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.input-date:focus-within {
|
|
34
|
+
border-color: var(--palette-primary-3);
|
|
35
|
+
box-shadow: 0 0 0 2px var(--palette-primary-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.input-date:focus-within::before {
|
|
39
|
+
content: "";
|
|
40
|
+
position: absolute;
|
|
41
|
+
left: 0;
|
|
42
|
+
width: 1px;
|
|
43
|
+
height: 100%;
|
|
44
|
+
background-color: var(--palette-primary-3);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.calendar {
|
|
48
|
+
max-width: 250px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.calendar-icon {
|
|
52
|
+
width: 24px;
|
|
53
|
+
height: 24px;
|
|
54
|
+
margin-right: 10px;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React__default, { useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
var OptionLabel = function OptionLabel(_a) {
|
|
4
|
+
var time = _a.time,
|
|
5
|
+
onClick = _a.onClick,
|
|
6
|
+
onMouseEnter = _a.onMouseEnter;
|
|
7
|
+
var ref = useRef(null);
|
|
8
|
+
return (
|
|
9
|
+
/*#__PURE__*/
|
|
10
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
11
|
+
React__default.createElement("span", {
|
|
12
|
+
onClick: onClick,
|
|
13
|
+
onMouseEnter: onMouseEnter,
|
|
14
|
+
ref: ref
|
|
15
|
+
}, time)
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { OptionLabel as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Timestamp = {
|
|
2
|
+
time: string;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const DEFAULT_TIME: {
|
|
6
|
+
index: number;
|
|
7
|
+
time: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const formatTime: (date: Date) => string;
|
|
10
|
+
export declare const generateSuggest: (interval?: number) => Timestamp[];
|
|
11
|
+
export declare const checkIsBeforeNow: (time: string, currentDate?: Date | null) => boolean;
|
|
12
|
+
export declare const checkIsBeforeSelectedDate: (time: string, interval: number, date?: Date | null) => boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { format, addMinutes, isBefore, parse } from 'date-fns';
|
|
2
|
+
|
|
3
|
+
var day = new Date();
|
|
4
|
+
day.setHours(24, 0, 0, 0);
|
|
5
|
+
var DEFAULT_TIME = {
|
|
6
|
+
index: 24,
|
|
7
|
+
time: "12:00"
|
|
8
|
+
};
|
|
9
|
+
var formatTime = function formatTime(date) {
|
|
10
|
+
return format(date, "HH:mm");
|
|
11
|
+
};
|
|
12
|
+
var generateSuggest = function generateSuggest(interval) {
|
|
13
|
+
if (interval === void 0) {
|
|
14
|
+
interval = 15;
|
|
15
|
+
}
|
|
16
|
+
return new Array(24 * 60 / interval).fill(null).map(function (_, index) {
|
|
17
|
+
var date = addMinutes(day, index * interval);
|
|
18
|
+
return {
|
|
19
|
+
time: formatTime(date)
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
var checkIsBeforeNow = function checkIsBeforeNow(time, currentDate) {
|
|
24
|
+
return currentDate ? isBefore(parse(time, "HH:mm", currentDate), new Date()) : false;
|
|
25
|
+
};
|
|
26
|
+
var checkIsBeforeSelectedDate = function checkIsBeforeSelectedDate(time, interval, date) {
|
|
27
|
+
if (date) {
|
|
28
|
+
var selectedDate = new Date(date);
|
|
29
|
+
selectedDate.setMinutes(selectedDate.getMinutes() + interval);
|
|
30
|
+
return isBefore(parse(time, "HH:mm", date), selectedDate);
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { DEFAULT_TIME, checkIsBeforeNow, checkIsBeforeSelectedDate, formatTime, generateSuggest };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React__default, { useState, useMemo, memo } from 'react';
|
|
2
|
+
import classNames from 'classnames/bind';
|
|
3
|
+
import Select from '../../../Select/index.js';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
import { generateSuggest } from './helpers.js';
|
|
6
|
+
import OptionLabel from './Label/index.js';
|
|
7
|
+
|
|
8
|
+
var clx = classNames.bind(styles);
|
|
9
|
+
var TimePicker = function TimePicker(_a) {
|
|
10
|
+
var className = _a.className,
|
|
11
|
+
_b = _a.interval,
|
|
12
|
+
interval = _b === void 0 ? 30 : _b,
|
|
13
|
+
_c = _a.selectedTime,
|
|
14
|
+
selectedTime = _c === void 0 ? "" : _c,
|
|
15
|
+
onChangeTime = _a.onChangeTime;
|
|
16
|
+
var _d = useState(selectedTime),
|
|
17
|
+
time = _d[0],
|
|
18
|
+
setTime = _d[1];
|
|
19
|
+
var options = useMemo(function () {
|
|
20
|
+
return generateSuggest(interval).map(function (item) {
|
|
21
|
+
return {
|
|
22
|
+
value: item.time,
|
|
23
|
+
label: /*#__PURE__*/React__default.createElement(OptionLabel, {
|
|
24
|
+
time: item.time
|
|
25
|
+
}),
|
|
26
|
+
disabled: false
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}, [interval]);
|
|
30
|
+
var handleChange = function handleChange(value) {
|
|
31
|
+
setTime(value);
|
|
32
|
+
onChangeTime === null || onChangeTime === void 0 ? void 0 : onChangeTime(value);
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/React__default.createElement(Select, {
|
|
35
|
+
className: clx(className, styles.select),
|
|
36
|
+
options: options,
|
|
37
|
+
fontSize: 14,
|
|
38
|
+
customInputRoot: /*#__PURE__*/React__default.createElement("div", {
|
|
39
|
+
className: clx(styles["input-container"], styles["input-time"])
|
|
40
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
41
|
+
className: clx(styles["input-field"]),
|
|
42
|
+
tabIndex: 0,
|
|
43
|
+
"aria-expanded": "false",
|
|
44
|
+
"aria-haspopup": "true",
|
|
45
|
+
"aria-invalid": "false",
|
|
46
|
+
autoComplete: "off",
|
|
47
|
+
maxLength: 5,
|
|
48
|
+
readOnly: true,
|
|
49
|
+
value: time
|
|
50
|
+
})),
|
|
51
|
+
value: time,
|
|
52
|
+
onChange: handleChange
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var TimePickerInput = /*#__PURE__*/memo(TimePicker);
|
|
56
|
+
|
|
57
|
+
export { TimePickerInput as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.input-container {
|
|
2
|
+
align-items: center;
|
|
3
|
+
border-bottom: 1px solid var(--palette-bg-3);
|
|
4
|
+
border-bottom-left-radius: 0.375rem;
|
|
5
|
+
border-left: 1px solid var(--palette-bg-3);
|
|
6
|
+
border-top: 1px solid var(--palette-bg-3);
|
|
7
|
+
border-top-left-radius: 0.375rem;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: flex;
|
|
10
|
+
height: 36px;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.input-field {
|
|
15
|
+
background: transparent;
|
|
16
|
+
border: none;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
font-size: 1em;
|
|
19
|
+
height: 100%;
|
|
20
|
+
outline: none;
|
|
21
|
+
padding: 4px;
|
|
22
|
+
text-align: center;
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.input-time {
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.input-time::before {
|
|
31
|
+
background-color: var(--palette-bg-3);
|
|
32
|
+
content: "";
|
|
33
|
+
height: 100%;
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 0;
|
|
36
|
+
width: 1px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.input-time:focus-within {
|
|
40
|
+
border-bottom: 1px solid var(--palette-primary-3);
|
|
41
|
+
border-left: 1px solid var(--palette-primary-3);
|
|
42
|
+
border-top: 1px solid var(--palette-primary-3);
|
|
43
|
+
box-shadow: 0 0 0 2px var(--palette-primary-2);
|
|
44
|
+
z-index: 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.input-time:focus-within::before {
|
|
48
|
+
background-color: var(--palette-primary-3);
|
|
49
|
+
content: "";
|
|
50
|
+
height: 100%;
|
|
51
|
+
position: absolute;
|
|
52
|
+
right: 0;
|
|
53
|
+
width: 1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.select {
|
|
57
|
+
flex: 2;
|
|
58
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classNames from 'classnames/bind';
|
|
3
|
+
import styles from './Datepicker.module.css';
|
|
4
|
+
import TimePickerInput from './components/TimePicker/index.js';
|
|
5
|
+
import DatePicker from './components/DatePicker/index.js';
|
|
6
|
+
|
|
7
|
+
var clx = classNames.bind(styles);
|
|
8
|
+
var Datepicker = function Datepicker(_a) {
|
|
9
|
+
var className = _a.className,
|
|
10
|
+
selectedTime = _a.selectedTime,
|
|
11
|
+
selectedDate = _a.selectedDate,
|
|
12
|
+
onChangeDate = _a.onChangeDate,
|
|
13
|
+
onChangeTime = _a.onChangeTime;
|
|
14
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15
|
+
className: clx(styles.root, className)
|
|
16
|
+
}, /*#__PURE__*/React__default.createElement(TimePickerInput, {
|
|
17
|
+
selectedTime: selectedTime,
|
|
18
|
+
onChangeTime: onChangeTime
|
|
19
|
+
}), /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
20
|
+
selectedDate: selectedDate,
|
|
21
|
+
onChangeDate: onChangeDate
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { Datepicker as default };
|