colibri-ui 0.8.66 → 0.8.68
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/Accordion/Accordion.module.css +8 -7
- package/Accordion/index.js +1 -1
- package/Avatar/Avatar.module.css +50 -33
- package/Avatar/index.js +74 -37
- package/Badge/Badge.module.css +7 -7
- package/Badge/index.js +3 -9
- package/Badge/index.props.d.ts +0 -2
- package/Button/Button.module.css +95 -135
- package/Calendar/Calendar.d.ts +43 -0
- package/Calendar/Calendar.js +511 -0
- package/Calendar/Calendar.module.css +322 -0
- package/Calendar/index.d.ts +2 -4
- package/Calendar/index.js +3 -376
- package/Card/Card.d.ts +25 -0
- package/Card/Card.js +70 -0
- package/Card/Card.module.css +90 -0
- package/Card/index.d.ts +2 -0
- package/Card/index.js +9 -0
- package/Card/package.json +6 -0
- package/Checkbox/Checkbox.module.css +38 -28
- package/Checkbox/index.js +1 -0
- package/Chip/Chip.module.css +34 -24
- package/CodeField/CodeField.d.ts +29 -0
- package/CodeField/CodeField.js +316 -0
- package/CodeField/CodeField.module.css +211 -0
- package/CodeField/index.d.ts +2 -0
- package/CodeField/index.js +13 -0
- package/CodeField/package.json +6 -0
- package/Counter/Counter.module.css +11 -10
- package/Datepicker/Datepicker.module.css +1 -1
- package/Datepicker/components/DatePicker/index.js +145 -30
- package/Datepicker/components/DatePicker/index.module.css +34 -45
- package/Datepicker/components/DatePicker/index.props.d.ts +12 -0
- package/Datepicker/index.d.ts +1 -1
- package/Datepicker/index.js +25 -8
- package/Datepicker/index.props.d.ts +15 -2
- package/DotsLoader/DotsLoader.module.css +5 -5
- package/DotsLoader/index.d.ts +1 -3
- package/DotsLoader/index.js +1 -14
- package/Drawer/Drawer.d.ts +43 -0
- package/Drawer/Drawer.js +227 -0
- package/Drawer/Drawer.module.css +280 -0
- package/Drawer/index.d.ts +2 -0
- package/Drawer/index.js +10 -0
- package/Drawer/package.json +6 -0
- package/Dropdown/Dropdown.module.css +6 -6
- package/Dropzone/Dropzone.d.ts +30 -0
- package/Dropzone/Dropzone.js +258 -0
- package/Dropzone/Dropzone.module.css +164 -0
- package/Dropzone/index.d.ts +2 -0
- package/Dropzone/index.js +7 -0
- package/Dropzone/package.json +6 -0
- package/Editable/Editable.d.ts +18 -0
- package/Editable/Editable.js +166 -0
- package/Editable/Editable.module.css +61 -0
- package/Editable/index.d.ts +2 -0
- package/Editable/index.js +10 -0
- package/Editable/package.json +6 -0
- package/Grid/Grid.module.css +2 -2
- package/Grid/Item/Grid-Item.module.css +3 -3
- package/Grid/index.js +9 -6
- package/Grid/index.props.d.ts +4 -3
- package/Icons/Check.js +1 -1
- package/InputRadio/InputRadio.module.css +37 -34
- package/Menu/Menu.module.css +2 -2
- package/Menu/components/MenuItem/MenuItem.module.css +8 -8
- package/Modal/Modal.module.css +11 -11
- package/Modal/components/Close/Close.module.css +1 -1
- package/Modal/components/Content/Content.module.css +1 -1
- package/MultiSelect/components/MenuOverlay/index.js +2 -4
- package/MultiSelect/components/MenuOverlay/index.module.css +3 -3
- package/MultiSelect/index.js +1 -0
- package/MultiSelect/index.module.css +5 -5
- package/Progress/Progress.d.ts +20 -0
- package/Progress/Progress.js +109 -0
- package/Progress/Progress.module.css +191 -0
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +7 -0
- package/Progress/package.json +6 -0
- package/README.md +91 -2
- package/RadioGroup/RadioGroup.module.css +4 -4
- package/Rating/Rating.d.ts +24 -0
- package/Rating/Rating.js +131 -0
- package/Rating/Rating.module.css +219 -0
- package/Rating/index.d.ts +2 -0
- package/Rating/index.js +10 -0
- package/Rating/package.json +6 -0
- package/Select/components/MenuOverlay/index.module.css +1 -1
- package/Select/index.js +1 -0
- package/Select/index.module.css +3 -3
- package/Separator/Separator.module.css +2 -2
- package/Skeleton/Skeleton.module.css +4 -4
- package/Skeleton/index.js +10 -6
- package/Skeleton/index.props.d.ts +2 -2
- package/Status/index.d.ts +1 -1
- package/Status/index.js +7 -1
- package/Status/index.module.css +37 -24
- package/Status/index.props.d.ts +3 -0
- package/Switch/Switch.module.css +41 -26
- package/Switch/index.js +1 -0
- package/TabsMenu/Tab/Tab.module.css +29 -26
- package/TabsMenu/TabsMenu.module.css +1 -1
- package/TextArea/TextArea.module.css +2 -2
- package/Theme/colors/index.d.ts +190 -38
- package/Theme/colors/theme_buenos_aires.d.ts +211 -31
- package/Theme/colors/theme_buenos_aires.js +139 -34
- package/Theme/colors/theme_jaipur.d.ts +251 -0
- package/Theme/colors/theme_jaipur.js +157 -0
- package/Theme/global.css +1 -1
- package/Theme/index.d.ts +973 -13
- package/Theme/index.js +2 -2
- package/Theme/themes/buenos_aires.d.ts +476 -0
- package/Theme/themes/buenos_aires.js +626 -150
- package/Theme/themes/jaipur.d.ts +628 -0
- package/Theme/themes/jaipur.js +635 -0
- package/Tooltip/Tooltip.module.css +8 -8
- package/Tooltip/index.js +4 -3
- package/Typography/Typography.module.css +151 -26
- package/Typography/index.props.d.ts +3 -3
- package/base/BaseInput/BaseInput.module.css +2 -2
- package/base/FormField/FormField.module.css +6 -2
- package/base/FormField/index.js +1 -0
- package/base/InputRoot/InputRoot.module.css +33 -26
- package/base/InputRoot/index.d.ts +1 -1
- package/base/InputRoot/index.js +3 -2
- package/base/InputRoot/index.props.d.ts +1 -0
- package/esm/Accordion/Accordion.module.css +8 -7
- package/esm/Accordion/index.js +9 -9
- package/esm/Avatar/Avatar.module.css +50 -33
- package/esm/Avatar/index.js +75 -38
- package/esm/Badge/Badge.module.css +7 -7
- package/esm/Badge/Control/index.js +2 -2
- package/esm/Badge/index.js +5 -11
- package/esm/Badge/index.props.d.ts +0 -2
- package/esm/Button/Button.module.css +95 -135
- package/esm/Button/index.js +6 -6
- package/esm/Calendar/Calendar.d.ts +43 -0
- package/esm/Calendar/Calendar.js +499 -0
- package/esm/Calendar/Calendar.module.css +322 -0
- package/esm/Calendar/index.d.ts +2 -4
- package/esm/Card/Card.d.ts +25 -0
- package/esm/Card/Card.js +61 -0
- package/esm/Card/Card.module.css +90 -0
- package/esm/Card/index.d.ts +2 -0
- package/esm/Checkbox/Checkbox.module.css +38 -28
- package/esm/Checkbox/index.js +8 -7
- package/esm/Chip/Chip.module.css +34 -24
- package/esm/Chip/index.js +6 -6
- package/esm/CodeField/CodeField.d.ts +29 -0
- package/esm/CodeField/CodeField.js +303 -0
- package/esm/CodeField/CodeField.module.css +211 -0
- package/esm/CodeField/index.d.ts +2 -0
- package/esm/Counter/Counter.module.css +11 -10
- package/esm/Counter/index.js +8 -8
- package/esm/Datepicker/Datepicker.module.css +1 -1
- package/esm/Datepicker/components/DatePicker/index.js +146 -31
- package/esm/Datepicker/components/DatePicker/index.module.css +34 -45
- package/esm/Datepicker/components/DatePicker/index.props.d.ts +12 -0
- package/esm/Datepicker/index.d.ts +1 -1
- package/esm/Datepicker/index.js +27 -10
- package/esm/Datepicker/index.props.d.ts +15 -2
- package/esm/DotsLoader/DotsLoader.module.css +5 -5
- package/esm/DotsLoader/index.d.ts +1 -3
- package/esm/DotsLoader/index.js +7 -20
- package/esm/Drawer/Drawer.d.ts +43 -0
- package/esm/Drawer/Drawer.js +216 -0
- package/esm/Drawer/Drawer.module.css +280 -0
- package/esm/Drawer/index.d.ts +2 -0
- package/esm/Dropdown/Dropdown.module.css +6 -6
- package/esm/Dropdown/index.js +6 -6
- package/esm/Dropzone/Dropzone.d.ts +30 -0
- package/esm/Dropzone/Dropzone.js +248 -0
- package/esm/Dropzone/Dropzone.module.css +164 -0
- package/esm/Dropzone/index.d.ts +2 -0
- package/esm/Editable/Editable.d.ts +18 -0
- package/esm/Editable/Editable.js +157 -0
- package/esm/Editable/Editable.module.css +61 -0
- package/esm/Editable/index.d.ts +2 -0
- package/esm/Grid/Grid.module.css +2 -2
- package/esm/Grid/Item/Grid-Item.module.css +3 -3
- package/esm/Grid/Item/index.js +2 -2
- package/esm/Grid/index.js +11 -8
- package/esm/Grid/index.props.d.ts +4 -3
- package/esm/Icons/ArrowNext.js +3 -3
- package/esm/Icons/Cart.js +3 -3
- package/esm/Icons/Check.js +7 -7
- package/esm/Icons/Chevron.js +3 -3
- package/esm/Icons/Close.js +3 -3
- package/esm/Icons/Cross.js +3 -3
- package/esm/Icons/CrossFill.js +3 -3
- package/esm/Icons/Edit.js +3 -3
- package/esm/Icons/Exit.js +3 -3
- package/esm/Icons/EyeClosed.js +3 -3
- package/esm/Icons/EyeOpen.js +4 -4
- package/esm/Icons/Help.js +3 -3
- package/esm/Icons/Info.js +3 -3
- package/esm/Icons/Minus.js +3 -3
- package/esm/Icons/More.js +5 -5
- package/esm/Icons/Plus.js +3 -3
- package/esm/Icons/Setting.js +5 -5
- package/esm/Icons/Shield.js +3 -3
- package/esm/Icons/Trash.js +3 -3
- package/esm/Icons/User.js +4 -4
- package/esm/Image/index.js +4 -4
- package/esm/Input/index.js +4 -4
- package/esm/InputRadio/InputRadio.module.css +37 -34
- package/esm/InputRadio/index.js +7 -7
- package/esm/Menu/Menu.module.css +2 -2
- package/esm/Menu/components/MenuItem/MenuItem.module.css +8 -8
- package/esm/Menu/components/MenuItem/index.js +2 -2
- package/esm/Menu/index.js +2 -2
- package/esm/Modal/Modal.module.css +11 -11
- package/esm/Modal/components/Close/Close.module.css +1 -1
- package/esm/Modal/components/Close/index.js +3 -3
- package/esm/Modal/components/Content/Content.module.css +1 -1
- package/esm/Modal/components/Content/index.js +2 -2
- package/esm/Modal/components/Title/index.js +3 -3
- package/esm/Modal/index.js +9 -9
- package/esm/MultiSelect/components/MenuOverlay/index.js +9 -11
- package/esm/MultiSelect/components/MenuOverlay/index.module.css +3 -3
- package/esm/MultiSelect/components/MenuOverlayItem/index.js +3 -3
- package/esm/MultiSelect/index.js +13 -12
- package/esm/MultiSelect/index.module.css +5 -5
- package/esm/Progress/Progress.d.ts +20 -0
- package/esm/Progress/Progress.js +102 -0
- package/esm/Progress/Progress.module.css +191 -0
- package/esm/Progress/index.d.ts +2 -0
- package/esm/RadioGroup/Radio.js +2 -2
- package/esm/RadioGroup/RadioGroup.module.css +4 -4
- package/esm/RadioGroup/index.js +3 -3
- package/esm/Rating/Rating.d.ts +24 -0
- package/esm/Rating/Rating.js +121 -0
- package/esm/Rating/Rating.module.css +219 -0
- package/esm/Rating/index.d.ts +2 -0
- package/esm/Select/components/MenuOverlay/index.js +4 -4
- package/esm/Select/components/MenuOverlay/index.module.css +1 -1
- package/esm/Select/components/MenuOverlayItem/index.js +3 -3
- package/esm/Select/index.js +11 -10
- package/esm/Select/index.module.css +3 -3
- package/esm/Separator/Separator.module.css +2 -2
- package/esm/Separator/index.js +2 -2
- package/esm/Skeleton/Skeleton.module.css +4 -4
- package/esm/Skeleton/index.js +13 -9
- package/esm/Skeleton/index.props.d.ts +2 -2
- package/esm/Status/index.d.ts +1 -1
- package/esm/Status/index.js +9 -3
- package/esm/Status/index.module.css +37 -24
- package/esm/Status/index.props.d.ts +3 -0
- package/esm/Switch/Switch.module.css +41 -26
- package/esm/Switch/index.js +9 -8
- package/esm/TabsMenu/Tab/Tab.js +2 -2
- package/esm/TabsMenu/Tab/Tab.module.css +29 -26
- package/esm/TabsMenu/TabsMenu.module.css +1 -1
- package/esm/TabsMenu/index.js +3 -3
- package/esm/TabsPanels/Panel/index.js +2 -2
- package/esm/TabsPanels/index.js +3 -3
- package/esm/TextArea/TextArea.module.css +2 -2
- package/esm/TextArea/index.js +4 -4
- package/esm/Theme/colors/index.d.ts +190 -38
- package/esm/Theme/colors/theme_buenos_aires.d.ts +211 -31
- package/esm/Theme/colors/theme_buenos_aires.js +132 -34
- package/esm/Theme/colors/theme_jaipur.d.ts +251 -0
- package/esm/Theme/colors/theme_jaipur.js +140 -0
- package/esm/Theme/global.css +1 -1
- package/esm/Theme/index.d.ts +973 -13
- package/esm/Theme/index.js +2 -2
- package/esm/Theme/themes/buenos_aires.d.ts +476 -0
- package/esm/Theme/themes/buenos_aires.js +618 -142
- package/esm/Theme/themes/jaipur.d.ts +628 -0
- package/esm/Theme/themes/jaipur.js +631 -0
- package/esm/TimeSelect/Label/index.js +2 -2
- package/esm/TimeSelect/index.js +3 -3
- package/esm/Tooltip/Tooltip.module.css +8 -8
- package/esm/Tooltip/index.js +8 -7
- package/esm/Typography/Typography.module.css +151 -26
- package/esm/Typography/index.js +2 -2
- package/esm/Typography/index.props.d.ts +3 -3
- package/esm/base/BaseInput/BaseInput.module.css +2 -2
- package/esm/base/BaseInput/index.js +2 -2
- package/esm/base/FormField/FormField.module.css +6 -2
- package/esm/base/FormField/index.js +5 -4
- package/esm/base/InputRoot/InputRoot.module.css +33 -26
- package/esm/base/InputRoot/index.d.ts +1 -1
- package/esm/base/InputRoot/index.js +8 -7
- package/esm/base/InputRoot/index.props.d.ts +1 -0
- package/esm/helpers/date/index.js +3 -53
- package/esm/hooks/useOnClickOutside/index.d.ts +1 -1
- package/esm/hooks/useOnClickOutside/index.js +2 -2
- package/esm/index.d.ts +13 -1
- package/esm/index.js +8 -2
- package/esm/theme_ba_variables.css +625 -149
- package/esm/theme_jaipur_variables.css +627 -0
- package/hooks/useOnClickOutside/index.d.ts +1 -1
- package/hooks/useOnClickOutside/index.js +2 -2
- package/index.d.ts +13 -1
- package/index.js +90 -65
- package/package.json +1 -1
- package/theme_ba_variables.css +625 -149
- package/theme_jaipur_variables.css +627 -0
- package/Avatar/assets/org-circle.svg.js +0 -64
- package/Avatar/assets/user-circle.svg.js +0 -43
- package/Calendar/components/ContinueButton/index.d.ts +0 -10
- package/Calendar/components/ContinueButton/index.js +0 -42
- package/Calendar/components/ContinueButton/index.module.css +0 -4
- package/Calendar/components/Month/Month.d.ts +0 -16
- package/Calendar/components/Month/Month.js +0 -203
- package/Calendar/components/Month/index.module.css +0 -143
- package/Calendar/components/Presets/index.d.ts +0 -19
- package/Calendar/components/Presets/index.js +0 -61
- package/Calendar/components/Presets/index.module.css +0 -28
- package/Calendar/index.module.css +0 -94
- package/Calendar/index.props.d.ts +0 -22
- package/Calendar/utils/getMonthWeeks.d.ts +0 -20
- package/Calendar/utils/getMonthWeeks.js +0 -81
- package/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +0 -4
- package/Calendar/utils/getNumberOfMonthsBetweenDates.js +0 -21
- package/Calendar/utils/getPresets.d.ts +0 -12
- package/Calendar/utils/getPresets.js +0 -99
- package/Calendar/utils/getStartMonth.d.ts +0 -6
- package/Calendar/utils/getStartMonth.js +0 -15
- package/Datepicker/components/TimePicker/Label/index.d.ts +0 -8
- package/Datepicker/components/TimePicker/Label/index.js +0 -27
- package/Datepicker/components/TimePicker/helpers.d.ts +0 -12
- package/Datepicker/components/TimePicker/helpers.js +0 -39
- package/Datepicker/components/TimePicker/index.d.ts +0 -4
- package/Datepicker/components/TimePicker/index.js +0 -69
- package/Datepicker/components/TimePicker/index.module.css +0 -58
- package/Datepicker/components/TimePicker/index.props.d.ts +0 -8
- package/Theme/colors/common.d.ts +0 -39
- package/Theme/colors/common.js +0 -32
- package/Theme/colors/index.js +0 -11
- package/Theme/colors/theme_default.d.ts +0 -47
- package/Theme/colors/theme_default.js +0 -38
- package/Theme/themes/default.d.ts +0 -144
- package/Theme/themes/default.js +0 -151
- package/esm/Avatar/assets/org-circle.svg.js +0 -5
- package/esm/Avatar/assets/user-circle.svg.js +0 -5
- package/esm/Calendar/components/ContinueButton/index.d.ts +0 -10
- package/esm/Calendar/components/ContinueButton/index.js +0 -35
- package/esm/Calendar/components/ContinueButton/index.module.css +0 -4
- package/esm/Calendar/components/Month/Month.d.ts +0 -16
- package/esm/Calendar/components/Month/Month.js +0 -175
- package/esm/Calendar/components/Month/index.module.css +0 -143
- package/esm/Calendar/components/Presets/index.d.ts +0 -19
- package/esm/Calendar/components/Presets/index.js +0 -36
- package/esm/Calendar/components/Presets/index.module.css +0 -28
- package/esm/Calendar/index.js +0 -371
- package/esm/Calendar/index.module.css +0 -94
- package/esm/Calendar/index.props.d.ts +0 -22
- package/esm/Calendar/utils/getMonthWeeks.d.ts +0 -20
- package/esm/Calendar/utils/getMonthWeeks.js +0 -79
- package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.d.ts +0 -4
- package/esm/Calendar/utils/getNumberOfMonthsBetweenDates.js +0 -19
- package/esm/Calendar/utils/getPresets.d.ts +0 -12
- package/esm/Calendar/utils/getPresets.js +0 -87
- package/esm/Calendar/utils/getStartMonth.d.ts +0 -6
- package/esm/Calendar/utils/getStartMonth.js +0 -13
- package/esm/Datepicker/components/TimePicker/Label/index.d.ts +0 -8
- package/esm/Datepicker/components/TimePicker/Label/index.js +0 -19
- package/esm/Datepicker/components/TimePicker/helpers.d.ts +0 -12
- package/esm/Datepicker/components/TimePicker/helpers.js +0 -18
- package/esm/Datepicker/components/TimePicker/index.d.ts +0 -4
- package/esm/Datepicker/components/TimePicker/index.js +0 -58
- package/esm/Datepicker/components/TimePicker/index.module.css +0 -58
- package/esm/Datepicker/components/TimePicker/index.props.d.ts +0 -8
- package/esm/Theme/colors/common.d.ts +0 -39
- package/esm/Theme/colors/common.js +0 -24
- package/esm/Theme/colors/index.js +0 -7
- package/esm/Theme/colors/theme_default.d.ts +0 -47
- package/esm/Theme/colors/theme_default.js +0 -29
- package/esm/Theme/themes/default.d.ts +0 -144
- package/esm/Theme/themes/default.js +0 -147
- package/esm/libs/numbers/leadingZeros.js +0 -12
- package/esm/libs/requestIdleCallback/index.js +0 -8
- package/esm/theme_default_variables.css +0 -143
- package/libs/numbers/leadingZeros.js +0 -14
- package/libs/requestIdleCallback/index.js +0 -10
- package/theme_default_variables.css +0 -143
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.root {
|
|
2
|
+
color: var(--component-accordion-text);
|
|
2
3
|
overflow: hidden;
|
|
3
|
-
padding:
|
|
4
|
+
padding: var(--space-3);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.content {
|
|
@@ -13,11 +14,11 @@
|
|
|
13
14
|
align-items: center;
|
|
14
15
|
background: none;
|
|
15
16
|
border: none;
|
|
16
|
-
color:
|
|
17
|
+
color: inherit;
|
|
17
18
|
cursor: pointer;
|
|
18
19
|
display: flex;
|
|
19
20
|
font: inherit;
|
|
20
|
-
gap:
|
|
21
|
+
gap: var(--space-2);
|
|
21
22
|
inline-size: 100%;
|
|
22
23
|
outline: none;
|
|
23
24
|
padding: 0;
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.header {
|
|
36
|
-
margin-block-end:
|
|
37
|
+
margin-block-end: var(--space-3);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.chevron {
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
.line {
|
|
47
|
-
background-color: var(--
|
|
48
|
-
block-size:
|
|
48
|
+
background-color: var(--component-accordion-line);
|
|
49
|
+
block-size: var(--border-width-hairline);
|
|
49
50
|
flex: 1;
|
|
50
|
-
margin-inline-start:
|
|
51
|
+
margin-inline-start: var(--space-2);
|
|
51
52
|
}
|
package/Accordion/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
36
36
|
};
|
|
37
37
|
React.useEffect(function () {
|
|
38
38
|
if (contentRef.current) {
|
|
39
|
-
contentRef.current.style.blockSize = isOpen ? "".concat(contentRef.current.scrollHeight, "px") : "
|
|
39
|
+
contentRef.current.style.blockSize = isOpen ? "".concat(contentRef.current.scrollHeight, "px") : "0";
|
|
40
40
|
}
|
|
41
41
|
}, [isOpen]);
|
|
42
42
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
package/Avatar/Avatar.module.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.avatar {
|
|
2
|
-
border-radius:
|
|
2
|
+
border-radius: var(--radius-full);
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
display: block;
|
|
5
5
|
height: 100%;
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.avatar-bordered {
|
|
13
|
-
background-color: var(--
|
|
14
|
-
border:
|
|
15
|
-
padding:
|
|
13
|
+
background-color: var(--component-avatar-border-bg);
|
|
14
|
+
border: var(--component-avatar-border-width) solid var(--component-avatar-border);
|
|
15
|
+
padding: var(--component-avatar-border-padding);
|
|
16
16
|
}
|
|
17
17
|
.avatar-bordered:hover {
|
|
18
|
-
border-color: var(--
|
|
18
|
+
border-color: var(--component-avatar-border-hover);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.size-s,
|
|
@@ -28,78 +28,95 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.size-s {
|
|
31
|
-
height:
|
|
32
|
-
width:
|
|
31
|
+
height: var(--component-avatar-size-s);
|
|
32
|
+
width: var(--component-avatar-size-s);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.size-m {
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
36
|
+
height: var(--component-avatar-size-m);
|
|
37
|
+
width: var(--component-avatar-size-m);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.size-l {
|
|
41
|
-
height:
|
|
42
|
-
width:
|
|
41
|
+
height: var(--component-avatar-size-l);
|
|
42
|
+
width: var(--component-avatar-size-l);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.size-xl {
|
|
46
|
-
height:
|
|
47
|
-
width:
|
|
46
|
+
height: var(--component-avatar-size-xl);
|
|
47
|
+
width: var(--component-avatar-size-xl);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.size-xxl {
|
|
51
|
-
height:
|
|
52
|
-
width:
|
|
51
|
+
height: var(--component-avatar-size-xxl);
|
|
52
|
+
width: var(--component-avatar-size-xxl);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.size-xxxl {
|
|
56
|
-
height:
|
|
57
|
-
width:
|
|
56
|
+
height: var(--component-avatar-size-xxxl);
|
|
57
|
+
width: var(--component-avatar-size-xxxl);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.text-s {
|
|
61
|
-
font-size:
|
|
61
|
+
font-size: var(--component-avatar-font-size-s);
|
|
62
62
|
font-weight: 500;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.text-m {
|
|
66
|
-
font-size:
|
|
66
|
+
font-size: var(--component-avatar-font-size-m);
|
|
67
67
|
font-weight: 500;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.text-l {
|
|
71
|
-
font-size:
|
|
71
|
+
font-size: var(--component-avatar-font-size-l);
|
|
72
72
|
font-weight: 400;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.text-xl {
|
|
76
|
-
font-size:
|
|
76
|
+
font-size: var(--component-avatar-font-size-xl);
|
|
77
77
|
font-weight: 400;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.text-xxl {
|
|
81
|
-
font-size:
|
|
81
|
+
font-size: var(--component-avatar-font-size-xxl);
|
|
82
82
|
font-weight: 400;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.text-xxxl {
|
|
86
|
-
font-size:
|
|
86
|
+
font-size: var(--component-avatar-font-size-xxxl);
|
|
87
87
|
font-weight: 400;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.avatar-initials {
|
|
91
91
|
align-items: center;
|
|
92
|
-
background-color: var(--
|
|
93
|
-
border-radius:
|
|
92
|
+
background-color: var(--component-avatar-initials-bg);
|
|
93
|
+
border-radius: var(--radius-full);
|
|
94
94
|
display: inline-flex;
|
|
95
95
|
justify-content: center;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.initials-text {
|
|
99
|
-
color:
|
|
99
|
+
color: var(--component-avatar-initials-text);
|
|
100
100
|
text-transform: uppercase;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
.avatar-stub {
|
|
104
|
+
align-items: center;
|
|
105
|
+
background-color: var(--component-avatar-initials-bg);
|
|
106
|
+
border-radius: var(--radius-full);
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
color: var(--component-avatar-initials-text);
|
|
109
|
+
display: inline-flex;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.avatar-stub-icon {
|
|
115
|
+
display: block;
|
|
116
|
+
height: 100%;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
|
|
103
120
|
.avatar-wrapper {
|
|
104
121
|
display: inline-block;
|
|
105
122
|
position: relative;
|
|
@@ -107,16 +124,16 @@
|
|
|
107
124
|
|
|
108
125
|
.avatar-loader::before {
|
|
109
126
|
animation: spin 1s linear infinite;
|
|
110
|
-
border:
|
|
111
|
-
border-radius:
|
|
112
|
-
border-top-color:
|
|
127
|
+
border: var(--component-avatar-loader-border-width) solid transparent;
|
|
128
|
+
border-radius: var(--radius-full);
|
|
129
|
+
border-top-color: var(--component-avatar-loader);
|
|
113
130
|
box-sizing: border-box;
|
|
114
131
|
content: "";
|
|
115
|
-
height: calc(100% +
|
|
116
|
-
left: -
|
|
132
|
+
height: calc(100% + var(--component-avatar-loader-size-offset));
|
|
133
|
+
left: calc(var(--component-avatar-loader-offset) * -1);
|
|
117
134
|
position: absolute;
|
|
118
|
-
top: -
|
|
119
|
-
width: calc(100% +
|
|
135
|
+
top: calc(var(--component-avatar-loader-offset) * -1);
|
|
136
|
+
width: calc(100% + var(--component-avatar-loader-size-offset));
|
|
120
137
|
}
|
|
121
138
|
|
|
122
139
|
@keyframes spin {
|
package/Avatar/index.js
CHANGED
|
@@ -7,8 +7,6 @@ var tslib = require('tslib');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var clsx = require('clsx');
|
|
9
9
|
var constants = require('./constants.js');
|
|
10
|
-
var userCircle = require('./assets/user-circle.svg.js');
|
|
11
|
-
var orgCircle = require('./assets/org-circle.svg.js');
|
|
12
10
|
var styles = require('./Avatar.module.css');
|
|
13
11
|
var index_props = require('./index.props.js');
|
|
14
12
|
|
|
@@ -19,11 +17,36 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
19
17
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
20
18
|
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
21
19
|
|
|
22
|
-
var getStubImage = function getStubImage(type) {
|
|
23
|
-
return type === index_props.AccountType.Organization ? orgCircle.default : userCircle.default;
|
|
24
|
-
};
|
|
25
20
|
var SIZE_CLASSES = _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, constants.AvatarSize.S, styles__default.default["size-s"]), constants.AvatarSize.M, styles__default.default["size-m"]), constants.AvatarSize.L, styles__default.default["size-l"]), constants.AvatarSize.XL, styles__default.default["size-xl"]), constants.AvatarSize.XXL, styles__default.default["size-xxl"]), constants.AvatarSize.XXXL, styles__default.default["size-xxxl"]);
|
|
26
21
|
var TEXT_CLASSES = _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, constants.AvatarSize.S, styles__default.default["text-s"]), constants.AvatarSize.M, styles__default.default["text-m"]), constants.AvatarSize.L, styles__default.default["text-l"]), constants.AvatarSize.XL, styles__default.default["text-xl"]), constants.AvatarSize.XXL, styles__default.default["text-xxl"]), constants.AvatarSize.XXXL, styles__default.default["text-xxxl"]);
|
|
22
|
+
var UserStubIcon = function UserStubIcon() {
|
|
23
|
+
return /*#__PURE__*/React__default.default.createElement("svg", {
|
|
24
|
+
className: styles__default.default["avatar-stub-icon"],
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
viewBox: "0 0 42 39",
|
|
27
|
+
fill: "none",
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}, /*#__PURE__*/React__default.default.createElement("path", {
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
fillRule: "evenodd",
|
|
32
|
+
d: "M33.6 37.997c-2.9-1.709-7-4.725-8.6-4.725h-3.802c-.9 0-2.8-.805-3-1.507-.199-.503-.199-1.408-.1-2.212 0-.1.303-.1.402 0 .8.905 1.099 1.508 1.9 1.508h1.8c.7 0 3.1-2.111 4.099-4.725.2-.603.4-1.608.5-2.713 0-.1.1-.202.1-.1.1.501.3 1.105.4 1.105.3.201.7-.603 1.2-1.709.5-1.006.5-1.608.7-2.413.3-1.105-.1-1.91-.4-1.91a.91.91 0 0 0-.7.302c-.1 0-.2 0-.2-.1 0-.704.1-1.81.9-2.413-1.1-1.005-.4-2.714-.4-2.714.4.2.4 0 .4 0l-.2-1.106c.6-.1 1.1-.603 1.1-.603s-1.6-.402-2.4-1.005c.7-.202 1.117-.957 1.117-.957S27 9.952 26 9.65c.9-.904.3-2.15.3-2.15s-1.6.441-4.7.441c-2.2-.1-3-.402-4.6 1.207-1.9 1.909-1.9 2.412-3.1 2.412 1 1.407.5 2.814.5 2.814l-.1 2.112.1.401s0 .1.1.302c0 .101 0 .303.1.402l.3 1.61s-.1.1-.2 0a1.42 1.42 0 0 0-1.2-.604c-.3 0-.8.805-.4 1.91.3.804.6 1.306.9 2.412s.9 1.91 1.2 1.71q.15-.153.3-.906c0-.1.1 0 .2.102.1 1.004.3 1.908.5 2.411.2.302.4.703.6 1.005-.2 1.709-.4 3.82-.8 5.428-2.6.704-6.6 1.91-10 2.714C2.2 31.967 0 26.74 0 21.11 0 9.45 9.4 0 21 0s21 9.45 21 21.11c0 6.936-3.3 13.066-8.4 16.887",
|
|
33
|
+
clipRule: "evenodd"
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
var OrgStubIcon = function OrgStubIcon() {
|
|
37
|
+
return /*#__PURE__*/React__default.default.createElement("svg", {
|
|
38
|
+
className: styles__default.default["avatar-stub-icon"],
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
viewBox: "0 0 42 42",
|
|
41
|
+
fill: "none",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
}, /*#__PURE__*/React__default.default.createElement("path", {
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
fillRule: "evenodd",
|
|
46
|
+
d: "M19.103 27.36V34H9V12.062L22.567 6v21.36h-3.464zm-6.64 0v1.733h3.176V27.36h-3.175zm0-6.638v1.732h6.64v-1.732h-6.64zm0-4.042v1.732h6.64V16.68h-6.64zM32.67 27.36h-6.062v1.733h6.062V34h-9.526V18.124h9.526v9.237z",
|
|
47
|
+
clipRule: "evenodd"
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
27
50
|
var Avatar = /*#__PURE__*/React.memo(function (props) {
|
|
28
51
|
var src = props.src,
|
|
29
52
|
_props$size = props.size,
|
|
@@ -40,40 +63,54 @@ var Avatar = /*#__PURE__*/React.memo(function (props) {
|
|
|
40
63
|
ariaLabel = props.ariaLabel,
|
|
41
64
|
ref = props.ref,
|
|
42
65
|
rest = tslib.__rest(props, ["src", "size", "className", "bordered", "alt", "accountType", "onClick", "initials", "loading", "ariaLabel", "ref"]);
|
|
43
|
-
var stubSrc = getStubImage(accountType);
|
|
44
|
-
// Приоритет: переданное изображение (src) > инициалы > дефолтное изображение
|
|
45
66
|
var hasInitials = initials && initials.trim().length > 0;
|
|
46
67
|
var hasCustomImage = Boolean(src);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
if (hasCustomImage) {
|
|
69
|
+
return (
|
|
70
|
+
/*#__PURE__*/
|
|
71
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
72
|
+
React__default.default.createElement("div", {
|
|
73
|
+
className: clsx__default.default(styles__default.default["avatar-wrapper"], _defineProperty__default.default({}, styles__default.default["avatar-loader"], Boolean(loading))),
|
|
74
|
+
onClick: onClick,
|
|
75
|
+
role: "button",
|
|
76
|
+
"aria-label": ariaLabel || "Avatar"
|
|
77
|
+
}, /*#__PURE__*/React__default.default.createElement("img", Object.assign({
|
|
78
|
+
ref: ref,
|
|
79
|
+
"data-testid": "avatar",
|
|
80
|
+
alt: alt,
|
|
81
|
+
src: src,
|
|
82
|
+
className: clsx__default.default(styles__default.default.avatar, _defineProperty__default.default({}, styles__default.default["avatar-bordered"], Boolean(bordered)), SIZE_CLASSES[size], className)
|
|
83
|
+
}, rest)))
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
if (hasInitials) {
|
|
87
|
+
return (
|
|
88
|
+
/*#__PURE__*/
|
|
89
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
90
|
+
React__default.default.createElement("span", Object.assign({
|
|
91
|
+
ref: ref,
|
|
92
|
+
"data-testid": "avatar",
|
|
93
|
+
role: "button",
|
|
94
|
+
"aria-label": ariaLabel || "Avatar",
|
|
95
|
+
onClick: onClick,
|
|
96
|
+
className: clsx__default.default(styles__default.default["avatar-initials"], _defineProperty__default.default(_defineProperty__default.default({}, styles__default.default["avatar-bordered"], Boolean(bordered)), styles__default.default["avatar-loader"], Boolean(loading)), SIZE_CLASSES[size], className)
|
|
97
|
+
}, rest), /*#__PURE__*/React__default.default.createElement("span", {
|
|
98
|
+
className: clsx__default.default(styles__default.default["initials-text"], TEXT_CLASSES[size])
|
|
99
|
+
}, initials.trim().slice(0, 2)))
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return (
|
|
103
|
+
/*#__PURE__*/
|
|
104
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
105
|
+
React__default.default.createElement("span", Object.assign({
|
|
106
|
+
ref: ref,
|
|
107
|
+
"data-testid": "avatar",
|
|
108
|
+
role: "button",
|
|
109
|
+
"aria-label": ariaLabel || "Avatar",
|
|
110
|
+
onClick: onClick,
|
|
111
|
+
className: clsx__default.default(styles__default.default["avatar-stub"], _defineProperty__default.default(_defineProperty__default.default({}, styles__default.default["avatar-bordered"], Boolean(bordered)), styles__default.default["avatar-loader"], Boolean(loading)), SIZE_CLASSES[size], className)
|
|
112
|
+
}, rest), accountType === index_props.AccountType.Organization ? (/*#__PURE__*/React__default.default.createElement(OrgStubIcon, null)) : (/*#__PURE__*/React__default.default.createElement(UserStubIcon, null)))
|
|
113
|
+
);
|
|
77
114
|
});
|
|
78
115
|
|
|
79
116
|
exports.default = Avatar;
|
package/Badge/Badge.module.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
align-items: center;
|
|
3
|
-
background-color: var(--
|
|
4
|
-
border-radius:
|
|
3
|
+
background-color: var(--component-badge-bg);
|
|
4
|
+
border-radius: var(--radius-full);
|
|
5
5
|
box-sizing: border-box;
|
|
6
|
-
color: var(--
|
|
6
|
+
color: var(--component-badge-text);
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-flow: row wrap;
|
|
9
|
-
font-size:
|
|
10
|
-
height:
|
|
11
|
-
min-width:
|
|
12
|
-
padding: 0
|
|
9
|
+
font-size: var(--font-size-text-xs);
|
|
10
|
+
height: var(--space-5);
|
|
11
|
+
min-width: var(--space-5);
|
|
12
|
+
padding: 0 var(--space-1);
|
|
13
13
|
place-content: center center;
|
|
14
14
|
position: absolute;
|
|
15
15
|
user-select: none;
|
package/Badge/index.js
CHANGED
|
@@ -17,10 +17,8 @@ var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
|
17
17
|
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
18
18
|
|
|
19
19
|
var Badge = function Badge(_a) {
|
|
20
|
-
var
|
|
21
|
-
children = _a.children,
|
|
20
|
+
var children = _a.children,
|
|
22
21
|
className = _a.className,
|
|
23
|
-
color = _a.color,
|
|
24
22
|
content = _a.content,
|
|
25
23
|
_a$direction = _a.direction,
|
|
26
24
|
direction = _a$direction === void 0 ? "right" : _a$direction,
|
|
@@ -29,7 +27,7 @@ var Badge = function Badge(_a) {
|
|
|
29
27
|
max = _a$max === void 0 ? 99 : _a$max,
|
|
30
28
|
_a$showZero = _a.showZero,
|
|
31
29
|
showZero = _a$showZero === void 0 ? false : _a$showZero,
|
|
32
|
-
props = tslib.__rest(_a, ["
|
|
30
|
+
props = tslib.__rest(_a, ["children", "className", "content", "direction", "invisible", "max", "showZero"]);
|
|
33
31
|
var invisible = invisibleProp;
|
|
34
32
|
if (invisibleProp == null && (content === 0 && !showZero || content == null)) {
|
|
35
33
|
invisible = true;
|
|
@@ -37,11 +35,7 @@ var Badge = function Badge(_a) {
|
|
|
37
35
|
var displayValue = content == null ? undefined : content > max ? "".concat(max, "+") : content;
|
|
38
36
|
return /*#__PURE__*/React__default.default.createElement(index.BadgeControl, Object.assign({}, props), children, displayValue !== undefined && (/*#__PURE__*/React__default.default.createElement("span", {
|
|
39
37
|
className: clsx__default.default(styles__default.default.root, _defineProperty__default.default(_defineProperty__default.default({}, styles__default.default["root_direction_".concat(direction)], Boolean(direction)), styles__default.default["root_invisible"], Boolean(invisible)), className),
|
|
40
|
-
"data-testid": "badge"
|
|
41
|
-
style: {
|
|
42
|
-
backgroundColor: background,
|
|
43
|
-
color: color
|
|
44
|
-
}
|
|
38
|
+
"data-testid": "badge"
|
|
45
39
|
}, displayValue)));
|
|
46
40
|
};
|
|
47
41
|
|
package/Badge/index.props.d.ts
CHANGED