colibri-ui 0.8.1 → 0.8.4
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} +4 -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 +50 -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 +16 -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 +40 -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,189 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`TabsPanes should display new JSX content when activePane changes (snapshot) 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class=""
|
|
7
|
-
role="menutabpanes"
|
|
8
|
-
>
|
|
9
|
-
<div
|
|
10
|
-
class=""
|
|
11
|
-
role="tabpanel"
|
|
12
|
-
>
|
|
13
|
-
<div>
|
|
14
|
-
Pane 3 Маркет
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
exports[`TabsPanes should display only the active pane content (snapshot) 1`] = `
|
|
22
|
-
{
|
|
23
|
-
"asFragment": [Function],
|
|
24
|
-
"baseElement": <body>
|
|
25
|
-
<div>
|
|
26
|
-
<div
|
|
27
|
-
class=""
|
|
28
|
-
role="menutabpanes"
|
|
29
|
-
>
|
|
30
|
-
<div
|
|
31
|
-
class=""
|
|
32
|
-
role="tabpanel"
|
|
33
|
-
>
|
|
34
|
-
Pane 1 Поиск
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</body>,
|
|
39
|
-
"container": <div>
|
|
40
|
-
<div
|
|
41
|
-
class=""
|
|
42
|
-
role="menutabpanes"
|
|
43
|
-
>
|
|
44
|
-
<div
|
|
45
|
-
class=""
|
|
46
|
-
role="tabpanel"
|
|
47
|
-
>
|
|
48
|
-
Pane 1 Поиск
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>,
|
|
52
|
-
"debug": [Function],
|
|
53
|
-
"findAllByAltText": [Function],
|
|
54
|
-
"findAllByDisplayValue": [Function],
|
|
55
|
-
"findAllByLabelText": [Function],
|
|
56
|
-
"findAllByPlaceholderText": [Function],
|
|
57
|
-
"findAllByRole": [Function],
|
|
58
|
-
"findAllByTestId": [Function],
|
|
59
|
-
"findAllByText": [Function],
|
|
60
|
-
"findAllByTitle": [Function],
|
|
61
|
-
"findByAltText": [Function],
|
|
62
|
-
"findByDisplayValue": [Function],
|
|
63
|
-
"findByLabelText": [Function],
|
|
64
|
-
"findByPlaceholderText": [Function],
|
|
65
|
-
"findByRole": [Function],
|
|
66
|
-
"findByTestId": [Function],
|
|
67
|
-
"findByText": [Function],
|
|
68
|
-
"findByTitle": [Function],
|
|
69
|
-
"getAllByAltText": [Function],
|
|
70
|
-
"getAllByDisplayValue": [Function],
|
|
71
|
-
"getAllByLabelText": [Function],
|
|
72
|
-
"getAllByPlaceholderText": [Function],
|
|
73
|
-
"getAllByRole": [Function],
|
|
74
|
-
"getAllByTestId": [Function],
|
|
75
|
-
"getAllByText": [Function],
|
|
76
|
-
"getAllByTitle": [Function],
|
|
77
|
-
"getByAltText": [Function],
|
|
78
|
-
"getByDisplayValue": [Function],
|
|
79
|
-
"getByLabelText": [Function],
|
|
80
|
-
"getByPlaceholderText": [Function],
|
|
81
|
-
"getByRole": [Function],
|
|
82
|
-
"getByTestId": [Function],
|
|
83
|
-
"getByText": [Function],
|
|
84
|
-
"getByTitle": [Function],
|
|
85
|
-
"queryAllByAltText": [Function],
|
|
86
|
-
"queryAllByDisplayValue": [Function],
|
|
87
|
-
"queryAllByLabelText": [Function],
|
|
88
|
-
"queryAllByPlaceholderText": [Function],
|
|
89
|
-
"queryAllByRole": [Function],
|
|
90
|
-
"queryAllByTestId": [Function],
|
|
91
|
-
"queryAllByText": [Function],
|
|
92
|
-
"queryAllByTitle": [Function],
|
|
93
|
-
"queryByAltText": [Function],
|
|
94
|
-
"queryByDisplayValue": [Function],
|
|
95
|
-
"queryByLabelText": [Function],
|
|
96
|
-
"queryByPlaceholderText": [Function],
|
|
97
|
-
"queryByRole": [Function],
|
|
98
|
-
"queryByTestId": [Function],
|
|
99
|
-
"queryByText": [Function],
|
|
100
|
-
"queryByTitle": [Function],
|
|
101
|
-
"rerender": [Function],
|
|
102
|
-
"unmount": [Function],
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
105
|
-
|
|
106
|
-
exports[`TabsPanes should return the complete component template (snapshot) 1`] = `
|
|
107
|
-
{
|
|
108
|
-
"asFragment": [Function],
|
|
109
|
-
"baseElement": <body>
|
|
110
|
-
<div>
|
|
111
|
-
<div
|
|
112
|
-
class="mix"
|
|
113
|
-
role="menutabpanes"
|
|
114
|
-
>
|
|
115
|
-
<div
|
|
116
|
-
class=""
|
|
117
|
-
role="tabpanel"
|
|
118
|
-
>
|
|
119
|
-
Pane 1 Поиск
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</body>,
|
|
124
|
-
"container": <div>
|
|
125
|
-
<div
|
|
126
|
-
class="mix"
|
|
127
|
-
role="menutabpanes"
|
|
128
|
-
>
|
|
129
|
-
<div
|
|
130
|
-
class=""
|
|
131
|
-
role="tabpanel"
|
|
132
|
-
>
|
|
133
|
-
Pane 1 Поиск
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>,
|
|
137
|
-
"debug": [Function],
|
|
138
|
-
"findAllByAltText": [Function],
|
|
139
|
-
"findAllByDisplayValue": [Function],
|
|
140
|
-
"findAllByLabelText": [Function],
|
|
141
|
-
"findAllByPlaceholderText": [Function],
|
|
142
|
-
"findAllByRole": [Function],
|
|
143
|
-
"findAllByTestId": [Function],
|
|
144
|
-
"findAllByText": [Function],
|
|
145
|
-
"findAllByTitle": [Function],
|
|
146
|
-
"findByAltText": [Function],
|
|
147
|
-
"findByDisplayValue": [Function],
|
|
148
|
-
"findByLabelText": [Function],
|
|
149
|
-
"findByPlaceholderText": [Function],
|
|
150
|
-
"findByRole": [Function],
|
|
151
|
-
"findByTestId": [Function],
|
|
152
|
-
"findByText": [Function],
|
|
153
|
-
"findByTitle": [Function],
|
|
154
|
-
"getAllByAltText": [Function],
|
|
155
|
-
"getAllByDisplayValue": [Function],
|
|
156
|
-
"getAllByLabelText": [Function],
|
|
157
|
-
"getAllByPlaceholderText": [Function],
|
|
158
|
-
"getAllByRole": [Function],
|
|
159
|
-
"getAllByTestId": [Function],
|
|
160
|
-
"getAllByText": [Function],
|
|
161
|
-
"getAllByTitle": [Function],
|
|
162
|
-
"getByAltText": [Function],
|
|
163
|
-
"getByDisplayValue": [Function],
|
|
164
|
-
"getByLabelText": [Function],
|
|
165
|
-
"getByPlaceholderText": [Function],
|
|
166
|
-
"getByRole": [Function],
|
|
167
|
-
"getByTestId": [Function],
|
|
168
|
-
"getByText": [Function],
|
|
169
|
-
"getByTitle": [Function],
|
|
170
|
-
"queryAllByAltText": [Function],
|
|
171
|
-
"queryAllByDisplayValue": [Function],
|
|
172
|
-
"queryAllByLabelText": [Function],
|
|
173
|
-
"queryAllByPlaceholderText": [Function],
|
|
174
|
-
"queryAllByRole": [Function],
|
|
175
|
-
"queryAllByTestId": [Function],
|
|
176
|
-
"queryAllByText": [Function],
|
|
177
|
-
"queryAllByTitle": [Function],
|
|
178
|
-
"queryByAltText": [Function],
|
|
179
|
-
"queryByDisplayValue": [Function],
|
|
180
|
-
"queryByLabelText": [Function],
|
|
181
|
-
"queryByPlaceholderText": [Function],
|
|
182
|
-
"queryByRole": [Function],
|
|
183
|
-
"queryByTestId": [Function],
|
|
184
|
-
"queryByText": [Function],
|
|
185
|
-
"queryByTitle": [Function],
|
|
186
|
-
"rerender": [Function],
|
|
187
|
-
"unmount": [Function],
|
|
188
|
-
}
|
|
189
|
-
`;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import TabsPanes from ".";
|
|
3
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof TabsPanes> = {
|
|
6
|
-
title: "UI/TabsPanes",
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: "centered",
|
|
9
|
-
},
|
|
10
|
-
argTypes: {
|
|
11
|
-
},
|
|
12
|
-
component: TabsPanes,
|
|
13
|
-
} satisfies Meta<typeof TabsPanes>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
|
|
17
|
-
type Story = StoryObj<typeof TabsPanes>;
|
|
18
|
-
|
|
19
|
-
export const Default = (args: Story) => {
|
|
20
|
-
return(
|
|
21
|
-
<TabsPanes
|
|
22
|
-
{...args}
|
|
23
|
-
activePane="2"
|
|
24
|
-
panes={[
|
|
25
|
-
{ id: '1', content: 'Pane 1 content' },
|
|
26
|
-
{ id: '2', content: 'Pane 2 content' },
|
|
27
|
-
]}
|
|
28
|
-
/>
|
|
29
|
-
)};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { TabsPanesPane } from "./Pane/Pane";
|
|
5
|
-
import type { TabsPanesProps } from "./index.props";
|
|
6
|
-
import type { FC } from "react";
|
|
7
|
-
import type { PaneProps } from "./Pane/index.props";
|
|
8
|
-
|
|
9
|
-
const TabsPanes: FC<TabsPanesProps> = ({
|
|
10
|
-
activePane,
|
|
11
|
-
className,
|
|
12
|
-
innerRef,
|
|
13
|
-
panes,
|
|
14
|
-
...props
|
|
15
|
-
}) => {
|
|
16
|
-
const currentPane = panes.reduce<PaneProps | null>((acc, pane) => {
|
|
17
|
-
if (acc !== null) {
|
|
18
|
-
return acc;
|
|
19
|
-
}
|
|
20
|
-
return pane.id === activePane ? pane : null;
|
|
21
|
-
}, null);
|
|
22
|
-
|
|
23
|
-
const { ...paneProps } = currentPane || {};
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<div
|
|
27
|
-
{...props}
|
|
28
|
-
ref={innerRef}
|
|
29
|
-
role="menutabpanes"
|
|
30
|
-
className={classNames(null, [className])}
|
|
31
|
-
>
|
|
32
|
-
{currentPane && <TabsPanesPane {...paneProps} />}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default TabsPanes;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ChangeEvent,
|
|
3
|
-
ForwardedRef,
|
|
4
|
-
ReactNode,
|
|
5
|
-
TextareaHTMLAttributes,
|
|
6
|
-
} from "react";
|
|
7
|
-
|
|
8
|
-
export interface ITextAreaProps
|
|
9
|
-
extends Omit<
|
|
10
|
-
TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
11
|
-
"onChange" | "style"
|
|
12
|
-
> {
|
|
13
|
-
minRows?: number;
|
|
14
|
-
maxRows?: number;
|
|
15
|
-
value?: string;
|
|
16
|
-
label?: ReactNode;
|
|
17
|
-
hint?: ReactNode;
|
|
18
|
-
hasError?: boolean;
|
|
19
|
-
required?: boolean;
|
|
20
|
-
onChange?: (value: string, e: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
21
|
-
inputRef?: ForwardedRef<HTMLTextAreaElement>;
|
|
22
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
23
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import TextArea from "./index";
|
|
3
|
-
import type { Meta } from "@storybook/react";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof TextArea> = {
|
|
7
|
-
title: "UI/TextArea",
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered",
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
},
|
|
13
|
-
args: {},
|
|
14
|
-
component: TextArea,
|
|
15
|
-
} satisfies Meta<typeof TextArea>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
|
|
19
|
-
const Template = (args) => {
|
|
20
|
-
const [value, setValue] = useState("");
|
|
21
|
-
|
|
22
|
-
return <TextArea {...args} value={value} onChange={(v) => setValue(v)} />;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Default = Template.bind({});
|
|
26
|
-
|
|
27
|
-
Default.args = {
|
|
28
|
-
required: true,
|
|
29
|
-
disabled: false,
|
|
30
|
-
placeholder: 'Type text',
|
|
31
|
-
label: 'Label',
|
|
32
|
-
hint: 'Hint'
|
|
33
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import TextareaAutosize from "react-textarea-autosize";
|
|
3
|
-
import classNames from "classnames/bind";
|
|
4
|
-
import FormField from "../base/FormField";
|
|
5
|
-
import InputRoot from "../base/InputRoot";
|
|
6
|
-
import styles from "./TextArea.module.scss";
|
|
7
|
-
import type { ITextAreaProps } from "./index.props";
|
|
8
|
-
import type { ChangeEvent } from "react";
|
|
9
|
-
|
|
10
|
-
const clx = classNames.bind(styles);
|
|
11
|
-
|
|
12
|
-
const TextArea = ({
|
|
13
|
-
className,
|
|
14
|
-
value = "",
|
|
15
|
-
minRows = 3,
|
|
16
|
-
maxRows = 6,
|
|
17
|
-
onChange,
|
|
18
|
-
label,
|
|
19
|
-
required,
|
|
20
|
-
hasError,
|
|
21
|
-
hint,
|
|
22
|
-
disabled,
|
|
23
|
-
inputRef,
|
|
24
|
-
ref,
|
|
25
|
-
...props
|
|
26
|
-
}: ITextAreaProps) => {
|
|
27
|
-
const onChangeHandler = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
|
28
|
-
if (onChange) onChange(event.target.value, event);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<FormField
|
|
33
|
-
ref={ref}
|
|
34
|
-
className={clx(null, className)}
|
|
35
|
-
required={required}
|
|
36
|
-
label={label}
|
|
37
|
-
hint={hint}
|
|
38
|
-
hasError={hasError}
|
|
39
|
-
>
|
|
40
|
-
<InputRoot disabled={!!disabled} hasError={hasError}>
|
|
41
|
-
<TextareaAutosize
|
|
42
|
-
ref={inputRef}
|
|
43
|
-
data-testid="textarea"
|
|
44
|
-
minRows={minRows}
|
|
45
|
-
maxRows={maxRows}
|
|
46
|
-
value={value}
|
|
47
|
-
className={clx(styles.textarea, className)}
|
|
48
|
-
onChange={onChangeHandler}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
</InputRoot>
|
|
52
|
-
</FormField>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export default TextArea;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export type Breakpoints = {
|
|
2
|
-
hd: number;
|
|
3
|
-
xl: number;
|
|
4
|
-
lg: number;
|
|
5
|
-
md: number;
|
|
6
|
-
sm: number;
|
|
7
|
-
xs: number;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type BreakpointName = keyof Breakpoints;
|
|
11
|
-
|
|
12
|
-
export type BreakpointsTheme = {
|
|
13
|
-
values: Breakpoints;
|
|
14
|
-
up: (breakpoint: BreakpointName, isMedial?: boolean) => string;
|
|
15
|
-
under: (breakpoint: BreakpointName, isMedial?: boolean) => string;
|
|
16
|
-
between: (
|
|
17
|
-
[from, to]: [BreakpointName, BreakpointName],
|
|
18
|
-
isMedial?: boolean,
|
|
19
|
-
) => string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type BreakpointMap<T = number> = Map<BreakpointName, T>;
|
|
23
|
-
|
|
24
|
-
const Breakpoints: BreakpointsTheme = {
|
|
25
|
-
values: {
|
|
26
|
-
hd: 2560,
|
|
27
|
-
xl: 1920,
|
|
28
|
-
lg: 1450,
|
|
29
|
-
md: 1075,
|
|
30
|
-
sm: 680,
|
|
31
|
-
xs: 320,
|
|
32
|
-
},
|
|
33
|
-
up(breakpoint, isMedia = true) {
|
|
34
|
-
return `${isMedia ? "@media " : ""}(min-width: ${
|
|
35
|
-
this.values[breakpoint]
|
|
36
|
-
}px)`;
|
|
37
|
-
},
|
|
38
|
-
under(breakpoint, isMedia = true) {
|
|
39
|
-
return `${isMedia ? "@media " : ""}(max-width: ${
|
|
40
|
-
this.values[breakpoint] - 1
|
|
41
|
-
}px)`;
|
|
42
|
-
},
|
|
43
|
-
between([min, max], isMedia = true) {
|
|
44
|
-
const from = this.values[min];
|
|
45
|
-
const to = this.values[max] - 1;
|
|
46
|
-
return `${
|
|
47
|
-
isMedia ? "@media " : ""
|
|
48
|
-
}(min-width: ${from}px) and (max-width: ${to}px)`;
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default Breakpoints;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export const Common = {
|
|
2
|
-
WHITE: "#FFF",
|
|
3
|
-
BLACK: "#000",
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
export const Backgrounds = {
|
|
7
|
-
BG_1: "#ECEEF2",
|
|
8
|
-
BG_2: "#E4E6EA",
|
|
9
|
-
BG_3: "#D6D9E0",
|
|
10
|
-
BG_4: "#C9CDD6",
|
|
11
|
-
BG_5: "#BCC1CC",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const Accents = {
|
|
15
|
-
ALERT: "#FF564E",
|
|
16
|
-
ALERT_HOVER: "#e72d24",
|
|
17
|
-
ALERT_ACTIVE: "#af2d26",
|
|
18
|
-
ALERT_LIGHT: "#ffeeed",
|
|
19
|
-
SUCCESS: "#4AC99B",
|
|
20
|
-
SUCCESS_HOVER: "#42b48b",
|
|
21
|
-
SUCCESS_ACTIVE: "#3ba07c",
|
|
22
|
-
SUCCESS_LIGHT: "#ecf9f5",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Color = {
|
|
26
|
-
...Common,
|
|
27
|
-
...Accents,
|
|
28
|
-
...Backgrounds,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default Color;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
[data-page="colibri-ui"] {
|
|
2
|
-
html {
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
html,
|
|
8
|
-
body {
|
|
9
|
-
font-family: Roboto, Arial, sans-serif;
|
|
10
|
-
font-style: normal;
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
input,
|
|
15
|
-
label,
|
|
16
|
-
textarea,
|
|
17
|
-
select,
|
|
18
|
-
button {
|
|
19
|
-
background: none;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
* {
|
|
23
|
-
border: none;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
margin: 0;
|
|
26
|
-
outline: none;
|
|
27
|
-
padding: 0;
|
|
28
|
-
text-decoration: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
*,
|
|
32
|
-
*::before,
|
|
33
|
-
*::after {
|
|
34
|
-
box-sizing: inherit;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
input,
|
|
38
|
-
textarea,
|
|
39
|
-
select,
|
|
40
|
-
button,
|
|
41
|
-
body {
|
|
42
|
-
margin: 0;
|
|
43
|
-
padding: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
h1,
|
|
47
|
-
h2,
|
|
48
|
-
h3,
|
|
49
|
-
h4,
|
|
50
|
-
h5,
|
|
51
|
-
h6 {
|
|
52
|
-
color: inherit;
|
|
53
|
-
margin: 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
img {
|
|
57
|
-
border: 0;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import chroma from 'chroma-js';
|
|
3
|
-
import ColorsDefault from './themes/default';
|
|
4
|
-
import ColorsBA from './themes/buenos_aires';
|
|
5
|
-
import Typography from '../Typography'
|
|
6
|
-
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "UI/Theme",
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
|
|
13
|
-
export const Themes = () => {
|
|
14
|
-
const style = `
|
|
15
|
-
#storybook-root {
|
|
16
|
-
flex: 1;
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
function isColorDark(color) {
|
|
22
|
-
const rgb = chroma(color).rgb();
|
|
23
|
-
const [r, g, b] = rgb.map(Number);
|
|
24
|
-
const brightness = (r * 0.299 + g * 0.587 + b * 0.114);
|
|
25
|
-
return brightness < 128;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function getTextColorForBackground(bgColor) {
|
|
29
|
-
return isColorDark(bgColor) ? 'white' : 'black';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<>
|
|
34
|
-
<style>{style}</style>
|
|
35
|
-
<div>
|
|
36
|
-
<div style={{ display: 'flex', gap: '16px', flexDirection: 'column' }}>
|
|
37
|
-
<div style={{ display: 'flex', gap: '16px' }}>
|
|
38
|
-
<div style={{ flex: 1 }}/>
|
|
39
|
-
<div style={{ flex: 1 }}>
|
|
40
|
-
<Typography tag="h5" size="h5">Theme Default</Typography>
|
|
41
|
-
</div>
|
|
42
|
-
<div style={{ flex: 1 }}>
|
|
43
|
-
<Typography tag="h5" size="h5">Theme BA</Typography>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
{Object.entries(ColorsDefault).map((item, index) => {
|
|
47
|
-
const backgroundColor = item[1];
|
|
48
|
-
const textColor = getTextColorForBackground(backgroundColor);
|
|
49
|
-
const backgroundBAColor = ColorsBA[item[0]];
|
|
50
|
-
const textBAColor = getTextColorForBackground(backgroundColor);
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<div style={{ display: 'flex', gap: '16px' }} key={index}>
|
|
54
|
-
<div style={{ flex: 1 }}>
|
|
55
|
-
{`--${item[0]}`}
|
|
56
|
-
</div>
|
|
57
|
-
<div style={{ backgroundColor, color: textColor, flex: 1 }}>
|
|
58
|
-
{item[1]}
|
|
59
|
-
</div>
|
|
60
|
-
<div style={{ backgroundColor: backgroundBAColor, color: textBAColor, flex: 1 }}>
|
|
61
|
-
{ColorsBA[item[0]]}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
)
|
|
65
|
-
})}
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from "react";
|
|
2
|
-
import type { FC } from "react";
|
|
3
|
-
|
|
4
|
-
type OptionLabelProps = {
|
|
5
|
-
time: string;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
onMouseEnter?: () => void;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const OptionLabel: FC<OptionLabelProps> = ({ time, onClick, onMouseEnter }) => {
|
|
11
|
-
const ref = useRef<null | HTMLLIElement>(null);
|
|
12
|
-
return (
|
|
13
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
14
|
-
<span onClick={onClick} onMouseEnter={onMouseEnter} ref={ref}>
|
|
15
|
-
{time}
|
|
16
|
-
</span>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default OptionLabel;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { addMinutes, format, isBefore, parse } from "date-fns";
|
|
2
|
-
import type { Timestamp } from "./index.props";
|
|
3
|
-
|
|
4
|
-
const day = new Date();
|
|
5
|
-
day.setHours(24, 0, 0, 0);
|
|
6
|
-
|
|
7
|
-
export const DEFAULT_TIME = { index: 24, time: "12:00" };
|
|
8
|
-
export const formatTime = (date: Date): string => format(date, "HH:mm");
|
|
9
|
-
|
|
10
|
-
export const generateSuggest = (interval: number = 15): Timestamp[] =>
|
|
11
|
-
new Array((24 * 60) / interval).fill(null).map((_, index) => {
|
|
12
|
-
const date = addMinutes(day, index * interval);
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
time: formatTime(date),
|
|
16
|
-
};
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const checkIsBeforeNow = (
|
|
20
|
-
time: string,
|
|
21
|
-
currentDate?: Date | null,
|
|
22
|
-
): boolean =>
|
|
23
|
-
currentDate ? isBefore(parse(time, "HH:mm", currentDate), new Date()) : false;
|
|
24
|
-
|
|
25
|
-
export const checkIsBeforeSelectedDate = (
|
|
26
|
-
time: string,
|
|
27
|
-
interval: number,
|
|
28
|
-
date?: Date | null,
|
|
29
|
-
): boolean => {
|
|
30
|
-
if (date) {
|
|
31
|
-
const selectedDate = new Date(date);
|
|
32
|
-
selectedDate.setMinutes(selectedDate.getMinutes() + interval);
|
|
33
|
-
return isBefore(parse(time, "HH:mm", date), selectedDate);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return false;
|
|
37
|
-
};
|