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,64 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
color: inherit;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.size_xs {
|
|
6
|
+
font-size: 0.75rem;
|
|
7
|
+
line-height: 1.3;
|
|
8
|
+
}
|
|
9
|
+
.size_s {
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
line-height: 1.4;
|
|
12
|
+
}
|
|
13
|
+
.size_m {
|
|
14
|
+
font-size: 1rem;
|
|
15
|
+
line-height: 1.5;
|
|
16
|
+
}
|
|
17
|
+
.size_l {
|
|
18
|
+
font-size: 1.25rem;
|
|
19
|
+
line-height: 1.5;
|
|
20
|
+
}
|
|
21
|
+
.size_h1 {
|
|
22
|
+
font-size: 3rem;
|
|
23
|
+
line-height: 1.2;
|
|
24
|
+
}
|
|
25
|
+
.size_h2 {
|
|
26
|
+
font-size: 2.25rem;
|
|
27
|
+
line-height: 1.3;
|
|
28
|
+
}
|
|
29
|
+
.size_h3 {
|
|
30
|
+
font-size: 1.75rem;
|
|
31
|
+
line-height: 1.4;
|
|
32
|
+
}
|
|
33
|
+
.size_h4 {
|
|
34
|
+
font-size: 1.5rem;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
}
|
|
37
|
+
.size_h5 {
|
|
38
|
+
font-size: 1.25rem;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
}
|
|
41
|
+
.size_h6 {
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.font-weight_normal {
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
}
|
|
49
|
+
.font-weight_medium {
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
}
|
|
52
|
+
.font-weight_bold {
|
|
53
|
+
font-weight: 700;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.variant_alert {
|
|
57
|
+
color: var(--typography-alert);
|
|
58
|
+
}
|
|
59
|
+
.variant_success {
|
|
60
|
+
color: var(--typography-success);
|
|
61
|
+
}
|
|
62
|
+
.variant_secondary {
|
|
63
|
+
color: var(--typography-secondary);
|
|
64
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import classNames from 'classnames/bind';
|
|
4
|
+
import styles from './Typography.module.css';
|
|
5
|
+
|
|
6
|
+
var clx = classNames.bind(styles);
|
|
7
|
+
var Typography = function Typography(_a) {
|
|
8
|
+
var _b;
|
|
9
|
+
var _c = _a.tag,
|
|
10
|
+
Component = _c === void 0 ? "span" : _c,
|
|
11
|
+
children = _a.children,
|
|
12
|
+
variant = _a.variant,
|
|
13
|
+
size = _a.size,
|
|
14
|
+
style = _a.style,
|
|
15
|
+
fontWeight = _a.fontWeight,
|
|
16
|
+
className = _a.className,
|
|
17
|
+
props = __rest(_a, ["tag", "children", "variant", "size", "style", "fontWeight", "className"]);
|
|
18
|
+
return /*#__PURE__*/React__default.createElement(Component, __assign({}, props, {
|
|
19
|
+
style: __assign({}, style),
|
|
20
|
+
className: clx((_b = {}, _b["size_".concat(size)] = Boolean(size), _b["font-weight_".concat(fontWeight)] = Boolean(fontWeight), _b["variant_".concat(variant)] = Boolean(variant), _b), className)
|
|
21
|
+
}), children);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Typography as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export type TypographyVariant = "alert" | "success" | "secondary";
|
|
3
|
+
export type TypographyFontWeight = "normal" | "medium" | "bold";
|
|
4
|
+
export type TypographySize = "xs" | "s" | "m" | "l" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
|
+
export type TypographyTag = "span" | "label" | "legend" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "s";
|
|
6
|
+
export type TypographyProps = {
|
|
7
|
+
className?: string;
|
|
8
|
+
tag?: TypographyTag;
|
|
9
|
+
variant?: TypographyVariant;
|
|
10
|
+
size?: TypographySize;
|
|
11
|
+
fontWeight?: TypographyFontWeight;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styles from './BaseInput.module.css';
|
|
5
|
+
|
|
6
|
+
var BaseInput = function BaseInput(_a) {
|
|
7
|
+
var className = _a.className,
|
|
8
|
+
onChange = _a.onChange,
|
|
9
|
+
ref = _a.ref,
|
|
10
|
+
props = __rest(_a, ["className", "onChange", "ref"]);
|
|
11
|
+
var onChangeHandler = function onChangeHandler(e) {
|
|
12
|
+
if (onChange) onChange(e, e.target.value);
|
|
13
|
+
};
|
|
14
|
+
return /*#__PURE__*/React__default.createElement("input", __assign({
|
|
15
|
+
className: classNames(styles["base-input"], className),
|
|
16
|
+
onChange: onChangeHandler,
|
|
17
|
+
ref: ref
|
|
18
|
+
}, props));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { BaseInput as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import Typography from '../../Typography/index.js';
|
|
4
|
+
import styles from './FormField.module.css';
|
|
5
|
+
|
|
6
|
+
var FormField = function FormField(_a) {
|
|
7
|
+
var _b;
|
|
8
|
+
var label = _a.label,
|
|
9
|
+
hint = _a.hint,
|
|
10
|
+
children = _a.children,
|
|
11
|
+
hasError = _a.hasError,
|
|
12
|
+
required = _a.required,
|
|
13
|
+
className = _a.className,
|
|
14
|
+
ref = _a.ref;
|
|
15
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
16
|
+
className: classNames(styles.container, className),
|
|
17
|
+
ref: ref
|
|
18
|
+
}, label && (/*#__PURE__*/React__default.createElement(Typography, {
|
|
19
|
+
className: classNames(styles.label, (_b = {}, _b[styles.label_required] = required, _b)),
|
|
20
|
+
tag: "label"
|
|
21
|
+
}, label)), children, hint && (/*#__PURE__*/React__default.createElement(Typography, {
|
|
22
|
+
variant: hasError ? "alert" : "secondary",
|
|
23
|
+
tag: "span"
|
|
24
|
+
}, hint)));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { FormField as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { PropsWithChildren } from "react";
|
|
3
|
+
export type FormFieldProps = PropsWithChildren<{
|
|
4
|
+
className?: string;
|
|
5
|
+
hasError?: boolean;
|
|
6
|
+
hint?: ReactNode;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.base-icon {
|
|
2
|
+
align-items: center;
|
|
3
|
+
color: inherit;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
font-size: 16px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.base-disable-wrapper {
|
|
9
|
+
cursor: not-allowed;
|
|
10
|
+
height: 100%;
|
|
11
|
+
left: 0;
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.root {
|
|
18
|
+
align-items: center;
|
|
19
|
+
background-color: var(--palette-white);
|
|
20
|
+
border-radius: 0.375rem;
|
|
21
|
+
border-style: solid;
|
|
22
|
+
border-width: 1px;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
color: var(--palette-black);
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
padding: 5px 10px;
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.variant_primary {
|
|
33
|
+
border-color: var(--input-primary-border-color);
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
transition: box-shadow 0.2s ease-in, box-shadow 0.1s ease-out;
|
|
36
|
+
}
|
|
37
|
+
.variant_primary:hover {
|
|
38
|
+
border-color: var(--palette-primary-3);
|
|
39
|
+
box-shadow: 0 0 0 2px var(--palette-primary-2);
|
|
40
|
+
}
|
|
41
|
+
.variant_primary:active {
|
|
42
|
+
border-color: var(--palette-primary-4);
|
|
43
|
+
}
|
|
44
|
+
.variant_primary:focus, .variant_primary:focus-within {
|
|
45
|
+
border-color: var(--palette-primary-4);
|
|
46
|
+
}
|
|
47
|
+
.variant_primary_disabled {
|
|
48
|
+
background-color: var(--palette-bg-1);
|
|
49
|
+
border-color: var(--palette-bg-3);
|
|
50
|
+
color: var(--palette-bg-3);
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
.variant_primary_error {
|
|
55
|
+
background-color: var(--input-primary-bg-error);
|
|
56
|
+
border-color: var(--input-primary-border-color-error);
|
|
57
|
+
}
|
|
58
|
+
.variant_primary_error:hover {
|
|
59
|
+
background-color: var(--palette-white);
|
|
60
|
+
border-color: var(--input-primary-border-color-error);
|
|
61
|
+
box-shadow: 0 0 0 2px var(--input-primary-box-shadow-color-error);
|
|
62
|
+
}
|
|
63
|
+
.variant_primary_error:focus, .variant_primary_error:focus-within {
|
|
64
|
+
background-color: var(--palette-white);
|
|
65
|
+
border-color: var(--input-primary-border-color-error);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.size_s {
|
|
69
|
+
height: 32px;
|
|
70
|
+
}
|
|
71
|
+
.size_m {
|
|
72
|
+
height: 36px;
|
|
73
|
+
}
|
|
74
|
+
.size_l {
|
|
75
|
+
height: 42px;
|
|
76
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import styles from './InputRoot.module.css';
|
|
4
|
+
|
|
5
|
+
var InputRoot = function InputRoot(_a) {
|
|
6
|
+
var _b;
|
|
7
|
+
var className = _a.className,
|
|
8
|
+
startIcon = _a.startIcon,
|
|
9
|
+
endIcon = _a.endIcon,
|
|
10
|
+
children = _a.children,
|
|
11
|
+
_c = _a.variant,
|
|
12
|
+
variant = _c === void 0 ? "primary" : _c,
|
|
13
|
+
disabled = _a.disabled,
|
|
14
|
+
hasError = _a.hasError,
|
|
15
|
+
style = _a.style,
|
|
16
|
+
size = _a.size,
|
|
17
|
+
ref = _a.ref;
|
|
18
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
19
|
+
ref: ref,
|
|
20
|
+
style: style,
|
|
21
|
+
className: classNames(styles.root, styles["variant_".concat(variant)], size && styles["size_".concat(size)], (_b = {}, _b[styles["variant_".concat(variant, "_disabled")]] = disabled, _b[styles["variant_".concat(variant, "_error")]] = hasError, _b), className)
|
|
22
|
+
}, startIcon && /*#__PURE__*/React__default.createElement("div", {
|
|
23
|
+
className: styles["base-icon"]
|
|
24
|
+
}, startIcon), children, endIcon && /*#__PURE__*/React__default.createElement("div", {
|
|
25
|
+
className: styles["base-icon"]
|
|
26
|
+
}, endIcon), disabled && /*#__PURE__*/React__default.createElement("div", {
|
|
27
|
+
className: styles["base-disable-wrapper"]
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { InputRoot as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import type { PropsWithChildren } from "react";
|
|
3
|
+
export type Size = "s" | "m" | "l";
|
|
4
|
+
export type Variant = "primary";
|
|
5
|
+
export type InputProps = PropsWithChildren<{
|
|
6
|
+
variant?: Variant;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
hasError?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
startIcon?: ReactNode;
|
|
11
|
+
endIcon?: ReactNode;
|
|
12
|
+
size?: Size;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type DateFormat = string | Date;
|
|
2
|
+
export declare const parse: (dateInput: DateFormat) => Date;
|
|
3
|
+
export declare const getUpperMonthName: (date: DateFormat) => string;
|
|
4
|
+
export declare const getShortWeekDayNameByIndex: (index: number) => string;
|
|
5
|
+
export declare const shiftDate: (date: Date, days: number) => Date;
|
|
6
|
+
export declare const isSameMonthAndYear: (date: Date, otherDate: Date) => boolean;
|
|
7
|
+
export declare const toISODate: (date: Date) => string;
|
|
8
|
+
export declare const toDMYDate: (dateISO: string) => string;
|
|
9
|
+
export declare const getPeriodDates: (startDate: DateFormat, period?: number) => string;
|
|
10
|
+
export declare const clearTime: (date: Date) => Date;
|
|
11
|
+
export declare const getDaysDiff: (dateStart: Date, dateEnd: Date) => number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { parseISO, isValid, format, startOfWeek, addDays } from 'date-fns';
|
|
2
|
+
import { enGB } from 'date-fns/locale';
|
|
3
|
+
|
|
4
|
+
// Helper to parse date strings with fallback
|
|
5
|
+
var parse = function parse(dateInput) {
|
|
6
|
+
if (!dateInput) {
|
|
7
|
+
return new Date();
|
|
8
|
+
}
|
|
9
|
+
var date = typeof dateInput === "string" ? parseISO(dateInput) : dateInput;
|
|
10
|
+
return isValid(date) ? date : new Date(dateInput);
|
|
11
|
+
};
|
|
12
|
+
// Get full month name with the first letter capitalized
|
|
13
|
+
var getUpperMonthName = function getUpperMonthName(date) {
|
|
14
|
+
var parsedDate = parse(date);
|
|
15
|
+
return format(parsedDate, "LLLL", {
|
|
16
|
+
locale: enGB
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
// Get short weekday name by index (e.g., Mo, Tu, etc.)
|
|
20
|
+
var getShortWeekDayNameByIndex = function getShortWeekDayNameByIndex(index) {
|
|
21
|
+
var firstDayOfWeek = startOfWeek(new Date());
|
|
22
|
+
return format(addDays(firstDayOfWeek, index), "EEEEEE", {
|
|
23
|
+
locale: enGB
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
// Get formatted date string with month and day
|
|
27
|
+
var getDateMonth = function getDateMonth(date) {
|
|
28
|
+
var parsedDate = parse(date);
|
|
29
|
+
return format(parsedDate, "MMMM d", {
|
|
30
|
+
locale: enGB
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
// Shift the date by a number of days
|
|
34
|
+
var shiftDate = function shiftDate(date, days) {
|
|
35
|
+
return addDays(date, days);
|
|
36
|
+
};
|
|
37
|
+
// Check if two dates are in the same month and year
|
|
38
|
+
var isSameMonthAndYear = function isSameMonthAndYear(date, otherDate) {
|
|
39
|
+
return date.getFullYear() === otherDate.getFullYear() && date.getMonth() === otherDate.getMonth();
|
|
40
|
+
};
|
|
41
|
+
// Convert date to ISO format (YYYY-MM-DD)
|
|
42
|
+
var toISODate = function toISODate(date) {
|
|
43
|
+
return format(date, "yyyy-MM-dd");
|
|
44
|
+
};
|
|
45
|
+
// Convert date to DMY format (dd.MM.yyyy)
|
|
46
|
+
var toDMYDate = function toDMYDate(dateISO) {
|
|
47
|
+
return dateISO ? format(new Date(dateISO), "dd.MM.yyyy") : "";
|
|
48
|
+
};
|
|
49
|
+
// Get the period dates as a formatted string
|
|
50
|
+
var getPeriodDates = function getPeriodDates(startDate, period) {
|
|
51
|
+
if (period === void 0) {
|
|
52
|
+
period = 1;
|
|
53
|
+
}
|
|
54
|
+
var start = parse(startDate);
|
|
55
|
+
if (period === 1) {
|
|
56
|
+
return getDateMonth(start);
|
|
57
|
+
}
|
|
58
|
+
var end = shiftDate(start, period - 1);
|
|
59
|
+
var startDateFormat = isSameMonthAndYear(start, end) ? format(start, "d") : getDateMonth(start);
|
|
60
|
+
return "".concat(startDateFormat, " \u2013 ").concat(getDateMonth(end));
|
|
61
|
+
};
|
|
62
|
+
// Clear time from a date
|
|
63
|
+
var clearTime = function clearTime(date) {
|
|
64
|
+
return new Date(date.setHours(0, 0, 0, 0));
|
|
65
|
+
};
|
|
66
|
+
// Get the difference in days between two dates
|
|
67
|
+
var getDaysDiff = function getDaysDiff(dateStart, dateEnd) {
|
|
68
|
+
var start = clearTime(dateStart).getTime();
|
|
69
|
+
var end = clearTime(dateEnd).getTime();
|
|
70
|
+
return Math.round((end - start) / (1000 * 60 * 60 * 24)); // Convert milliseconds to days
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { clearTime, getDaysDiff, getPeriodDates, getShortWeekDayNameByIndex, getUpperMonthName, isSameMonthAndYear, parse, shiftDate, toDMYDate, toISODate };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const on: <K extends keyof HTMLElementEventMap>(element: HTMLElement | null | undefined, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions) => () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var on = function on(element, type,
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
listener, options) {
|
|
4
|
+
element === null || element === void 0 ? void 0 : element.addEventListener(type, listener, options);
|
|
5
|
+
return function () {
|
|
6
|
+
element === null || element === void 0 ? void 0 : element.removeEventListener(type, listener, options);
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { on };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BreakpointsTheme } from "../../Theme/breakpoints";
|
|
2
|
+
export type QueryInputFunction = (breakpoints: BreakpointsTheme) => string;
|
|
3
|
+
type QueryInput = QueryInputFunction | string;
|
|
4
|
+
declare const useMediaSizes: (queryInput: QueryInput) => boolean;
|
|
5
|
+
export default useMediaSizes;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import Breakpoints from '../../Theme/breakpoints.js';
|
|
3
|
+
|
|
4
|
+
var supportMatchMedia = typeof window !== "undefined" && typeof window.matchMedia !== "undefined";
|
|
5
|
+
var useMediaSizes = function useMediaSizes(queryInput) {
|
|
6
|
+
var query = typeof queryInput === "function" ? queryInput(Breakpoints) : queryInput;
|
|
7
|
+
query = query.replace(/^@media( ?)/m, "");
|
|
8
|
+
var matchMedia = supportMatchMedia ? window.matchMedia : null;
|
|
9
|
+
var _a = useState(function () {
|
|
10
|
+
if (matchMedia) {
|
|
11
|
+
return matchMedia(query).matches;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
}),
|
|
15
|
+
match = _a[0],
|
|
16
|
+
setMatch = _a[1];
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
if (!matchMedia) return undefined;
|
|
19
|
+
var active = true;
|
|
20
|
+
var queryList = matchMedia(query);
|
|
21
|
+
var updateMatch = function updateMatch() {
|
|
22
|
+
if (active) {
|
|
23
|
+
setMatch(queryList.matches);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
updateMatch();
|
|
27
|
+
queryList.addEventListener("change", updateMatch);
|
|
28
|
+
return function () {
|
|
29
|
+
active = false;
|
|
30
|
+
queryList.removeEventListener("change", updateMatch);
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return match;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { useMediaSizes as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var element = {
|
|
4
|
+
current: undefined
|
|
5
|
+
};
|
|
6
|
+
function useOnClickOutside(ref, handler) {
|
|
7
|
+
useEffect(function () {
|
|
8
|
+
var previous = element;
|
|
9
|
+
element = ref;
|
|
10
|
+
var listener = function listener(event) {
|
|
11
|
+
var _a;
|
|
12
|
+
if ((ref === null || ref === void 0 ? void 0 : ref.current) !== (element === null || element === void 0 ? void 0 : element.current)) return;
|
|
13
|
+
if ((_a = element.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
handler(event);
|
|
17
|
+
};
|
|
18
|
+
document.addEventListener("mousedown", listener, false);
|
|
19
|
+
document.addEventListener("touchstart", listener, false);
|
|
20
|
+
return function () {
|
|
21
|
+
document.removeEventListener("mousedown", listener, false);
|
|
22
|
+
document.removeEventListener("touchstart", listener, false);
|
|
23
|
+
element = previous;
|
|
24
|
+
};
|
|
25
|
+
}, [handler, ref]);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { useOnClickOutside as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var useScrollLock = function useScrollLock() {
|
|
4
|
+
useEffect(function () {
|
|
5
|
+
var body = document.querySelector("body");
|
|
6
|
+
if (!body) return undefined;
|
|
7
|
+
var _a = body.style,
|
|
8
|
+
overflow = _a.overflow,
|
|
9
|
+
width = _a.width;
|
|
10
|
+
var scrollBarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
11
|
+
body.style.overflow = "hidden";
|
|
12
|
+
if (scrollBarWidth > 0) {
|
|
13
|
+
body.style.width = "calc(100% - ".concat(scrollBarWidth, "px)");
|
|
14
|
+
}
|
|
15
|
+
return function () {
|
|
16
|
+
body.style.overflow = overflow;
|
|
17
|
+
body.style.width = width;
|
|
18
|
+
};
|
|
19
|
+
}, []);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { useScrollLock as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var getFocusableModalElements = function getFocusableModalElements(element) {
|
|
4
|
+
return element.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="password"], input[type="radio"], input[type="checkbox"], select');
|
|
5
|
+
};
|
|
6
|
+
function useTrapFocus(refObject) {
|
|
7
|
+
useEffect(function () {
|
|
8
|
+
var handler = function handler(event) {
|
|
9
|
+
if (!refObject.current || event.code !== "Tab") return;
|
|
10
|
+
var focusable = Array.from(getFocusableModalElements(refObject.current));
|
|
11
|
+
var firstElement = focusable[0];
|
|
12
|
+
var lastElement = focusable[focusable.length - 1];
|
|
13
|
+
if (!lastElement || !firstElement) return;
|
|
14
|
+
var focusOutside = document.activeElement ? !focusable.includes(document.activeElement) : true;
|
|
15
|
+
if (event.shiftKey && (document.activeElement === firstElement || focusOutside)) {
|
|
16
|
+
lastElement.focus();
|
|
17
|
+
event.preventDefault();
|
|
18
|
+
} else if (!event.shiftKey && (document.activeElement === lastElement || focusOutside)) {
|
|
19
|
+
firstElement.focus();
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
document.addEventListener("keydown", handler);
|
|
24
|
+
return function () {
|
|
25
|
+
document.removeEventListener("keydown", handler);
|
|
26
|
+
};
|
|
27
|
+
}, [refObject]);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { useTrapFocus as default };
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export { default as Accordion } from './Accordion/index.js';
|
|
2
|
+
export { default as Avatar } from './Avatar/index.js';
|
|
3
|
+
export { default as Badge } from './Badge/index.js';
|
|
4
|
+
export { default as Button } from './Button/index.js';
|
|
5
|
+
export { default as Calendar } from './Calendar/index.js';
|
|
6
|
+
export { default as Checkbox } from './Checkbox/index.js';
|
|
7
|
+
export { default as Chip } from './Chip/index.js';
|
|
8
|
+
export { default as Counter } from './Counter/index.js';
|
|
9
|
+
export { default as Datepicker } from './Datepicker/index.js';
|
|
10
|
+
export { default as DotsLoader } from './DotsLoader/index.js';
|
|
11
|
+
export { default as Dropdown } from './Dropdown/index.js';
|
|
12
|
+
export { default as Grid } from './Grid/index.js';
|
|
13
|
+
export { default as GridItem } from './Grid/Item/index.js';
|
|
14
|
+
export { default as Image } from './Image/index.js';
|
|
15
|
+
export { default as Input } from './Input/index.js';
|
|
16
|
+
export { default as Menu } from './Menu/index.js';
|
|
17
|
+
export { default as MenuItem } from './Menu/components/MenuItem/index.js';
|
|
18
|
+
export { default as Modal } from './Modal/index.js';
|
|
19
|
+
export { default as MultiSelect } from './MultiSelect/index.js';
|
|
20
|
+
export { default as Portal } from './Portal/index.js';
|
|
21
|
+
export { default as RadioGroup } from './RadioGroup/index.js';
|
|
22
|
+
export { default as Select } from './Select/index.js';
|
|
23
|
+
export { default as Separator } from './Separator/index.js';
|
|
24
|
+
export { SkeletonRect, SkeletonText } from './Skeleton/index.js';
|
|
25
|
+
export { default as Status } from './Status/index.js';
|
|
26
|
+
export { default as Switch } from './Switch/index.js';
|
|
27
|
+
export { default as TabsMenu } from './TabsMenu/index.js';
|
|
28
|
+
export { default as TabsPanes } from './TabsPanes/index.js';
|
|
29
|
+
export { default as TextArea } from './TextArea/index.js';
|
|
30
|
+
export { THEMES } from './Theme/index.js';
|
|
31
|
+
export { default as Tooltip } from './Tooltip/index.js';
|
|
32
|
+
export { default as TimeSelect } from './TimeSelect/index.js';
|
|
33
|
+
export { default as Typography } from './Typography/index.js';
|
|
34
|
+
export { default as useMediaSizes } from './hooks/useMediaSizes/index.js';
|
|
35
|
+
export { default as useOnClickOutside } from './hooks/useOnClickOutside/index.js';
|
|
36
|
+
export { default as useScrollLock } from './hooks/useScrollLock/index.js';
|
|
37
|
+
import './Icons/index.js';
|
|
38
|
+
export { default as ArrowNext } from './Icons/ArrowNext.js';
|
|
39
|
+
export { default as Cart } from './Icons/Cart.js';
|
|
40
|
+
export { default as Chevron } from './Icons/Chevron.js';
|
|
41
|
+
export { default as Close } from './Icons/Close.js';
|
|
42
|
+
export { default as CrossFill } from './Icons/CrossFill.js';
|
|
43
|
+
export { default as Edit } from './Icons/Edit.js';
|
|
44
|
+
export { default as Exit } from './Icons/Exit.js';
|
|
45
|
+
export { default as EyeOpen } from './Icons/EyeOpen.js';
|
|
46
|
+
export { default as EyeClosed } from './Icons/EyeClosed.js';
|
|
47
|
+
export { default as Help } from './Icons/Help.js';
|
|
48
|
+
export { default as Info } from './Icons/Info.js';
|
|
49
|
+
export { default as Minus } from './Icons/Minus.js';
|
|
50
|
+
export { default as More } from './Icons/More.js';
|
|
51
|
+
export { default as Plus } from './Icons/Plus.js';
|
|
52
|
+
export { default as Setting } from './Icons/Setting.js';
|
|
53
|
+
export { default as Trash } from './Icons/Trash.js';
|
|
54
|
+
export { default as User } from './Icons/User.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type Keys = Record<string, string> & Record<KeyboardKeys, string>;
|
|
2
|
+
export type KeyboardKeys = "BACKSPACE" | "TAB" | "ENTER" | "CAPS_LOCK" | "ESC" | "SPACE" | "PAGE_UP" | "PAGE_DOWN" | "END" | "HOME" | "LEFT" | "UP" | "RIGHT" | "DOWN" | "INSERT" | "DELETE" | string;
|
|
3
|
+
export declare const Keys: Keys;
|
|
4
|
+
export declare function isKey(eventKey: string, keys: Array<KeyboardKeys | string>): boolean;
|