@salutejs/plasma-new-hope 0.340.0-canary.2316.19100752819.0 → 0.340.0-canary.2316.19170245062.0
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/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -4
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/DateTimePicker/DateTimePicker.css +6 -6
- package/cjs/components/DateTimePicker/DateTimePicker.js +22 -121
- package/cjs/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/cjs/components/DateTimePicker/hooks/useDateTimePicker.js +125 -11
- package/cjs/components/DateTimePicker/hooks/useDateTimePicker.js.map +1 -1
- package/cjs/components/DateTimePicker/hooks/useKeyboardNavigation.js +0 -9
- package/cjs/components/DateTimePicker/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.css +6 -6
- package/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +1 -1
- package/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js.map +1 -1
- package/cjs/components/DateTimePicker/ui/DateShortcut/{DateShortcutList.styles_ubu846.css → DateShortcutList.styles_pdofx1.css} +1 -1
- package/cjs/components/Tabs/tokens.js +1 -0
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/index.css +6 -6
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +21 -4
- package/emotion/cjs/components/DateTimePicker/DateTimePicker.js +16 -126
- package/emotion/cjs/components/DateTimePicker/hooks/useDateTimePicker.js +163 -3
- package/emotion/cjs/components/DateTimePicker/hooks/useKeyboardNavigation.js +1 -6
- package/emotion/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +12 -12
- package/emotion/cjs/components/Tabs/tokens.js +1 -0
- package/emotion/cjs/examples/components/ChipGroup/ChipGroup.config.js +35 -0
- package/emotion/cjs/examples/components/Tabs/horizontal/HorizontalTabItem.config.js +16 -16
- package/emotion/cjs/examples/components/Tabs/vertical/VerticalTabItem.config.js +7 -7
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +21 -4
- package/emotion/es/components/DateTimePicker/DateTimePicker.js +17 -127
- package/emotion/es/components/DateTimePicker/hooks/useDateTimePicker.js +163 -3
- package/emotion/es/components/DateTimePicker/hooks/useKeyboardNavigation.js +1 -6
- package/emotion/es/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +12 -12
- package/emotion/es/components/Tabs/tokens.js +1 -0
- package/emotion/es/examples/components/ChipGroup/ChipGroup.config.js +25 -0
- package/emotion/es/examples/components/Tabs/horizontal/HorizontalTabItem.config.js +16 -16
- package/emotion/es/examples/components/Tabs/vertical/VerticalTabItem.config.js +7 -7
- package/es/components/DatePicker/RangeDate/RangeDate.js +24 -4
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/DateTimePicker/DateTimePicker.css +6 -6
- package/es/components/DateTimePicker/DateTimePicker.js +23 -122
- package/es/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/es/components/DateTimePicker/hooks/useDateTimePicker.js +126 -12
- package/es/components/DateTimePicker/hooks/useDateTimePicker.js.map +1 -1
- package/es/components/DateTimePicker/hooks/useKeyboardNavigation.js +0 -9
- package/es/components/DateTimePicker/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/DateTimePicker/ui/DateShortcut/DateShortcutList.css +6 -6
- package/es/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +1 -1
- package/es/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js.map +1 -1
- package/es/components/DateTimePicker/ui/DateShortcut/{DateShortcutList.styles_ubu846.css → DateShortcutList.styles_pdofx1.css} +1 -1
- package/es/components/Tabs/tokens.js +1 -0
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/index.css +6 -6
- package/package.json +3 -3
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +21 -4
- package/styled-components/cjs/components/DateTimePicker/DateTimePicker.js +16 -126
- package/styled-components/cjs/components/DateTimePicker/hooks/useDateTimePicker.js +163 -3
- package/styled-components/cjs/components/DateTimePicker/hooks/useKeyboardNavigation.js +1 -6
- package/styled-components/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +7 -7
- package/styled-components/cjs/components/Tabs/tokens.js +1 -0
- package/styled-components/cjs/examples/components/ChipGroup/ChipGroup.config.js +141 -0
- package/styled-components/cjs/examples/components/Tabs/horizontal/HorizontalTabItem.config.js +4 -4
- package/styled-components/cjs/examples/components/Tabs/vertical/VerticalTabItem.config.js +4 -4
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +21 -4
- package/styled-components/es/components/DateTimePicker/DateTimePicker.js +17 -127
- package/styled-components/es/components/DateTimePicker/hooks/useDateTimePicker.js +163 -3
- package/styled-components/es/components/DateTimePicker/hooks/useKeyboardNavigation.js +1 -6
- package/styled-components/es/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js +7 -7
- package/styled-components/es/components/Tabs/tokens.js +1 -0
- package/styled-components/es/examples/components/ChipGroup/ChipGroup.config.js +131 -0
- package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
- package/styled-components/es/examples/components/Tabs/horizontal/HorizontalTabItem.config.js +4 -4
- package/styled-components/es/examples/components/Tabs/vertical/VerticalTabItem.config.js +4 -4
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/types/components/DateTimePicker/DateTimePicker.types.d.ts +7 -8
- package/types/components/DateTimePicker/DateTimePicker.types.d.ts.map +1 -1
- package/types/components/DateTimePicker/hooks/useDateTimePicker.d.ts +11 -3
- package/types/components/DateTimePicker/hooks/useDateTimePicker.d.ts.map +1 -1
- package/types/components/DateTimePicker/hooks/useKeyboardNavigation.d.ts +2 -2
- package/types/components/DateTimePicker/hooks/useKeyboardNavigation.d.ts.map +1 -1
- package/types/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +1 -0
- package/types/components/Tabs/tokens.d.ts.map +1 -1
- package/types/examples/components/ChipGroup/ChipGroup.config.d.ts.map +1 -0
- package/types/examples/components/ChipGroup/ChipGroup.d.ts.map +1 -0
- package/types/examples/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/emotion/cjs/examples/components/ChipGroup /ChipGroup.config.js +0 -214
- package/emotion/es/examples/components/ChipGroup /ChipGroup.config.js +0 -204
- package/styled-components/cjs/examples/components/ChipGroup /ChipGroup.config.js +0 -214
- package/styled-components/es/examples/components/ChipGroup /ChipGroup.config.js +0 -204
- package/types/examples/components/ChipGroup /ChipGroup.config.d.ts.map +0 -1
- package/types/examples/components/ChipGroup /ChipGroup.d.ts.map +0 -1
- /package/emotion/cjs/examples/components/{ChipGroup → ChipGroup}/ChipGroup.js +0 -0
- /package/emotion/es/examples/components/{ChipGroup → ChipGroup}/ChipGroup.js +0 -0
- /package/styled-components/cjs/examples/components/{ChipGroup → ChipGroup}/ChipGroup.js +0 -0
- /package/styled-components/es/examples/components/{ChipGroup → ChipGroup}/ChipGroup.js +0 -0
- /package/types/examples/components/{ChipGroup → ChipGroup}/ChipGroup.config.d.ts +0 -0
- /package/types/examples/components/{ChipGroup → ChipGroup}/ChipGroup.d.ts +0 -0
package/styled-components/cjs/components/DateTimePicker/ui/DateShortcut/DateShortcutList.styles.js
CHANGED
|
@@ -42,7 +42,7 @@ var mergedCellConfig = (0, _engines.mergeConfig)(_Cell.cellConfig);
|
|
|
42
42
|
var Cell = (0, _engines.component)(mergedCellConfig);
|
|
43
43
|
var ShortcutsWrapper = _styledcomponents.default.div.withConfig({
|
|
44
44
|
displayName: "DateShortcutList.styles__ShortcutsWrapper",
|
|
45
|
-
componentId: "sc-
|
|
45
|
+
componentId: "sc-235f7cb0-0"
|
|
46
46
|
})([
|
|
47
47
|
"order:",
|
|
48
48
|
";display:flex;flex-direction:",
|
|
@@ -65,17 +65,17 @@ var ShortcutsWrapper = _styledcomponents.default.div.withConfig({
|
|
|
65
65
|
});
|
|
66
66
|
var ShortcutList = _styledcomponents.default.ul.withConfig({
|
|
67
67
|
displayName: "DateShortcutList.styles__ShortcutList",
|
|
68
|
-
componentId: "sc-
|
|
68
|
+
componentId: "sc-235f7cb0-1"
|
|
69
69
|
})([
|
|
70
70
|
"width:",
|
|
71
|
-
";margin:0;padding:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;::-webkit-scrollbar{display:none;}"
|
|
71
|
+
";list-style:none;margin:0;padding:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;::-webkit-scrollbar{display:none;}"
|
|
72
72
|
], function(param) {
|
|
73
73
|
var width = param.width;
|
|
74
74
|
return width || 'fit-content';
|
|
75
75
|
});
|
|
76
76
|
var ShortcutItem = _styledcomponents.default.li.withConfig({
|
|
77
77
|
displayName: "DateShortcutList.styles__ShortcutItem",
|
|
78
|
-
componentId: "sc-
|
|
78
|
+
componentId: "sc-235f7cb0-2"
|
|
79
79
|
})([
|
|
80
80
|
"padding:var(",
|
|
81
81
|
");border-radius:var(",
|
|
@@ -95,7 +95,7 @@ var ShortcutItem = _styledcomponents.default.li.withConfig({
|
|
|
95
95
|
}));
|
|
96
96
|
var StyledCell = (0, _styledcomponents.default)(Cell).withConfig({
|
|
97
97
|
displayName: "DateShortcutList.styles__StyledCell",
|
|
98
|
-
componentId: "sc-
|
|
98
|
+
componentId: "sc-235f7cb0-3"
|
|
99
99
|
})([
|
|
100
100
|
"",
|
|
101
101
|
":var(",
|
|
@@ -113,13 +113,13 @@ var StyledCell = (0, _styledcomponents.default)(Cell).withConfig({
|
|
|
113
113
|
], _Cell.cellTokens.cellTitleColor, _DateTimePickertokens.tokens.shortcutColor, _Cell.cellTokens.cellPadding, _DateTimePickertokens.tokens.shortcutPadding, _Cell.cellTokens.cellPaddingContent, _DateTimePickertokens.tokens.shortcutPaddingContent, _Cell.cellTokens.cellPaddingLeftContent, _DateTimePickertokens.tokens.shortcutPaddingLeftContent, _Cell.cellTokens.cellPaddingRightContent, _DateTimePickertokens.tokens.shortcutPaddingRightContent, _Cell.cellTokens.cellGap, _DateTimePickertokens.tokens.shortcutGap);
|
|
114
114
|
var ShortcutTitleWrapper = _styledcomponents.default.div.withConfig({
|
|
115
115
|
displayName: "DateShortcutList.styles__ShortcutTitleWrapper",
|
|
116
|
-
componentId: "sc-
|
|
116
|
+
componentId: "sc-235f7cb0-4"
|
|
117
117
|
})([
|
|
118
118
|
"display:grid;"
|
|
119
119
|
]);
|
|
120
120
|
var ShortcutTitle = _styledcomponents.default.span.withConfig({
|
|
121
121
|
displayName: "DateShortcutList.styles__ShortcutTitle",
|
|
122
|
-
componentId: "sc-
|
|
122
|
+
componentId: "sc-235f7cb0-5"
|
|
123
123
|
})([
|
|
124
124
|
"font-family:var(",
|
|
125
125
|
");font-size:var(",
|
|
@@ -98,6 +98,7 @@ var tokens = {
|
|
|
98
98
|
fontSize: '--plasma-tab-item-font-size',
|
|
99
99
|
fontStyle: '--plasma-tab-item-font-style',
|
|
100
100
|
fontWeight: '--plasma-tab-item-font-weight',
|
|
101
|
+
fontWeightSelected: '--plasma-tab-item-font-weight-selected',
|
|
101
102
|
letterSpacing: '--plasma-tab-item-letter-spacing',
|
|
102
103
|
lineHeight: '--plasma-tab-item-lineheight',
|
|
103
104
|
valueFontFamily: '--plasma-tab-item-value-font-family',
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "config", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return config;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _styledcomponents = require("styled-components");
|
|
12
|
+
var _ChipGroup = require("../../../components/ChipGroup");
|
|
13
|
+
var config = {
|
|
14
|
+
defaults: {
|
|
15
|
+
view: 'default',
|
|
16
|
+
size: 'm'
|
|
17
|
+
},
|
|
18
|
+
variations: {
|
|
19
|
+
view: {
|
|
20
|
+
default: (0, _styledcomponents.css)([
|
|
21
|
+
"",
|
|
22
|
+
":var(--inverse-text-primary);",
|
|
23
|
+
":var(--surface-solid-default);",
|
|
24
|
+
":var(--inverse-text-primary);",
|
|
25
|
+
":var(--surface-solid-default-hover);",
|
|
26
|
+
":var(--inverse-text-primary);",
|
|
27
|
+
":var(--surface-solid-default-active);"
|
|
28
|
+
], _ChipGroup.chipGroupTokens.chipColor, _ChipGroup.chipGroupTokens.chipBackground, _ChipGroup.chipGroupTokens.chipColorHover, _ChipGroup.chipGroupTokens.chipBackgroundHover, _ChipGroup.chipGroupTokens.chipColorActive, _ChipGroup.chipGroupTokens.chipBackgroundActive),
|
|
29
|
+
secondary: (0, _styledcomponents.css)([
|
|
30
|
+
"",
|
|
31
|
+
":var(--text-primary);",
|
|
32
|
+
":var(--surface-transparent-secondary);",
|
|
33
|
+
":var(--text-primary);",
|
|
34
|
+
":var(--surface-transparent-secondary-hover);",
|
|
35
|
+
":var(--text-primary);",
|
|
36
|
+
":var(--surface-transparent-secondary-active);"
|
|
37
|
+
], _ChipGroup.chipGroupTokens.chipColor, _ChipGroup.chipGroupTokens.chipBackground, _ChipGroup.chipGroupTokens.chipColorHover, _ChipGroup.chipGroupTokens.chipBackgroundHover, _ChipGroup.chipGroupTokens.chipColorActive, _ChipGroup.chipGroupTokens.chipBackgroundActive),
|
|
38
|
+
accent: (0, _styledcomponents.css)([
|
|
39
|
+
"",
|
|
40
|
+
":var(--on-dark-text-primary);",
|
|
41
|
+
":var(--surface-accent);",
|
|
42
|
+
":var(--on-dark-text-primary);",
|
|
43
|
+
":var(--surface-accent-hover);",
|
|
44
|
+
":var(--on-dark-text-primary);",
|
|
45
|
+
":var(--surface-accent-active);"
|
|
46
|
+
], _ChipGroup.chipGroupTokens.chipColor, _ChipGroup.chipGroupTokens.chipBackground, _ChipGroup.chipGroupTokens.chipColorHover, _ChipGroup.chipGroupTokens.chipBackgroundHover, _ChipGroup.chipGroupTokens.chipColorActive, _ChipGroup.chipGroupTokens.chipBackgroundActive)
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
l: (0, _styledcomponents.css)([
|
|
50
|
+
"",
|
|
51
|
+
":0.75rem;",
|
|
52
|
+
":auto;",
|
|
53
|
+
":3rem;",
|
|
54
|
+
":0 1rem;",
|
|
55
|
+
":var(--plasma-typo-body-l-font-family);",
|
|
56
|
+
":var(--plasma-typo-body-l-font-size);",
|
|
57
|
+
":var(--plasma-typo-body-l-font-style);",
|
|
58
|
+
":var(--plasma-typo-body-l-font-weight);",
|
|
59
|
+
":var(--plasma-typo-body-l-letter-spacing);",
|
|
60
|
+
":var(--plasma-typo-body-l-line-height);",
|
|
61
|
+
":-0.125rem;",
|
|
62
|
+
":0.5rem;",
|
|
63
|
+
":0.5rem;",
|
|
64
|
+
":-0.125rem;",
|
|
65
|
+
":0.625rem;",
|
|
66
|
+
":-0.25rem;",
|
|
67
|
+
":1.5rem;"
|
|
68
|
+
], _ChipGroup.chipGroupTokens.chipBorderRadius, _ChipGroup.chipGroupTokens.chipWidth, _ChipGroup.chipGroupTokens.chipHeight, _ChipGroup.chipGroupTokens.chipPadding, _ChipGroup.chipGroupTokens.chipFontFamily, _ChipGroup.chipGroupTokens.chipFontSize, _ChipGroup.chipGroupTokens.chipFontStyle, _ChipGroup.chipGroupTokens.chipFontWeight, _ChipGroup.chipGroupTokens.chipLetterSpacing, _ChipGroup.chipGroupTokens.chipLineHeight, _ChipGroup.chipGroupTokens.chipLeftContentMarginLeft, _ChipGroup.chipGroupTokens.chipLeftContentMarginRight, _ChipGroup.chipGroupTokens.chipRightContentMarginLeft, _ChipGroup.chipGroupTokens.chipRightContentMarginRight, _ChipGroup.chipGroupTokens.chipClearContentMarginLeft, _ChipGroup.chipGroupTokens.chipClearContentMarginRight, _ChipGroup.chipGroupTokens.chipCloseIconSize),
|
|
69
|
+
m: (0, _styledcomponents.css)([
|
|
70
|
+
"",
|
|
71
|
+
":0.625rem;",
|
|
72
|
+
":auto;",
|
|
73
|
+
":2.5rem;",
|
|
74
|
+
":0 0.875rem;",
|
|
75
|
+
":var(--plasma-typo-body-m-font-family);",
|
|
76
|
+
":var(--plasma-typo-body-m-font-size);",
|
|
77
|
+
":var(--plasma-typo-body-m-font-style);",
|
|
78
|
+
":var(--plasma-typo-body-m-font-weight);",
|
|
79
|
+
":var(--plasma-typo-body-m-letter-spacing);",
|
|
80
|
+
":var(--plasma-typo-body-m-line-height);",
|
|
81
|
+
":-0.125rem;",
|
|
82
|
+
":0.375rem;",
|
|
83
|
+
":0.375rem;",
|
|
84
|
+
":-0.125rem;",
|
|
85
|
+
":0.5rem;",
|
|
86
|
+
":-0.25rem;",
|
|
87
|
+
":1rem;"
|
|
88
|
+
], _ChipGroup.chipGroupTokens.chipBorderRadius, _ChipGroup.chipGroupTokens.chipWidth, _ChipGroup.chipGroupTokens.chipHeight, _ChipGroup.chipGroupTokens.chipPadding, _ChipGroup.chipGroupTokens.chipFontFamily, _ChipGroup.chipGroupTokens.chipFontSize, _ChipGroup.chipGroupTokens.chipFontStyle, _ChipGroup.chipGroupTokens.chipFontWeight, _ChipGroup.chipGroupTokens.chipLetterSpacing, _ChipGroup.chipGroupTokens.chipLineHeight, _ChipGroup.chipGroupTokens.chipLeftContentMarginLeft, _ChipGroup.chipGroupTokens.chipLeftContentMarginRight, _ChipGroup.chipGroupTokens.chipRightContentMarginLeft, _ChipGroup.chipGroupTokens.chipRightContentMarginRight, _ChipGroup.chipGroupTokens.chipClearContentMarginLeft, _ChipGroup.chipGroupTokens.chipClearContentMarginRight, _ChipGroup.chipGroupTokens.chipCloseIconSize),
|
|
89
|
+
s: (0, _styledcomponents.css)([
|
|
90
|
+
"",
|
|
91
|
+
":0.5rem;",
|
|
92
|
+
":auto;",
|
|
93
|
+
":2rem;",
|
|
94
|
+
":0 0.875rem;",
|
|
95
|
+
":var(--plasma-typo-body-s-font-family);",
|
|
96
|
+
":var(--plasma-typo-body-s-font-size);",
|
|
97
|
+
":var(--plasma-typo-body-s-font-style);",
|
|
98
|
+
":var(--plasma-typo-body-s-font-weight);",
|
|
99
|
+
":var(--plasma-typo-body-s-letter-spacing);",
|
|
100
|
+
":var(--plasma-typo-body-s-line-height);",
|
|
101
|
+
":-0.125rem;",
|
|
102
|
+
":0.25rem;",
|
|
103
|
+
":0.25rem;",
|
|
104
|
+
":-0.125rem;",
|
|
105
|
+
":0.375rem;",
|
|
106
|
+
":-0.25rem;",
|
|
107
|
+
":1rem;"
|
|
108
|
+
], _ChipGroup.chipGroupTokens.chipBorderRadius, _ChipGroup.chipGroupTokens.chipWidth, _ChipGroup.chipGroupTokens.chipHeight, _ChipGroup.chipGroupTokens.chipPadding, _ChipGroup.chipGroupTokens.chipFontFamily, _ChipGroup.chipGroupTokens.chipFontSize, _ChipGroup.chipGroupTokens.chipFontStyle, _ChipGroup.chipGroupTokens.chipFontWeight, _ChipGroup.chipGroupTokens.chipLetterSpacing, _ChipGroup.chipGroupTokens.chipLineHeight, _ChipGroup.chipGroupTokens.chipLeftContentMarginLeft, _ChipGroup.chipGroupTokens.chipLeftContentMarginRight, _ChipGroup.chipGroupTokens.chipRightContentMarginLeft, _ChipGroup.chipGroupTokens.chipRightContentMarginRight, _ChipGroup.chipGroupTokens.chipClearContentMarginLeft, _ChipGroup.chipGroupTokens.chipClearContentMarginRight, _ChipGroup.chipGroupTokens.chipCloseIconSize),
|
|
109
|
+
xs: (0, _styledcomponents.css)([
|
|
110
|
+
"",
|
|
111
|
+
":0.375rem;",
|
|
112
|
+
":auto;",
|
|
113
|
+
":1.5rem;",
|
|
114
|
+
":0 0.625rem;",
|
|
115
|
+
":var(--plasma-typo-body-xs-font-family);",
|
|
116
|
+
":var(--plasma-typo-body-xs-font-size);",
|
|
117
|
+
":var(--plasma-typo-body-xs-font-style);",
|
|
118
|
+
":var(--plasma-typo-body-xs-font-weight);",
|
|
119
|
+
":var(--plasma-typo-body-xs-letter-spacing);",
|
|
120
|
+
":var(--plasma-typo-body-xs-line-height);",
|
|
121
|
+
":-0.125rem;",
|
|
122
|
+
":0.25rem;",
|
|
123
|
+
":0.25rem;",
|
|
124
|
+
":-0.125rem;",
|
|
125
|
+
":0.25rem;",
|
|
126
|
+
":-0.25rem;",
|
|
127
|
+
":1rem;"
|
|
128
|
+
], _ChipGroup.chipGroupTokens.chipBorderRadius, _ChipGroup.chipGroupTokens.chipWidth, _ChipGroup.chipGroupTokens.chipHeight, _ChipGroup.chipGroupTokens.chipPadding, _ChipGroup.chipGroupTokens.chipFontFamily, _ChipGroup.chipGroupTokens.chipFontSize, _ChipGroup.chipGroupTokens.chipFontStyle, _ChipGroup.chipGroupTokens.chipFontWeight, _ChipGroup.chipGroupTokens.chipLetterSpacing, _ChipGroup.chipGroupTokens.chipLineHeight, _ChipGroup.chipGroupTokens.chipLeftContentMarginLeft, _ChipGroup.chipGroupTokens.chipLeftContentMarginRight, _ChipGroup.chipGroupTokens.chipRightContentMarginLeft, _ChipGroup.chipGroupTokens.chipRightContentMarginRight, _ChipGroup.chipGroupTokens.chipClearContentMarginLeft, _ChipGroup.chipGroupTokens.chipClearContentMarginRight, _ChipGroup.chipGroupTokens.chipCloseIconSize)
|
|
129
|
+
},
|
|
130
|
+
gap: {
|
|
131
|
+
dense: (0, _styledcomponents.css)([
|
|
132
|
+
"",
|
|
133
|
+
":0.125rem;"
|
|
134
|
+
], _ChipGroup.chipGroupTokens.chipGroupItemsGap),
|
|
135
|
+
wide: (0, _styledcomponents.css)([
|
|
136
|
+
"",
|
|
137
|
+
":0.5rem;"
|
|
138
|
+
], _ChipGroup.chipGroupTokens.chipGroupItemsGap)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
package/styled-components/cjs/examples/components/Tabs/horizontal/HorizontalTabItem.config.js
CHANGED
|
@@ -126,7 +126,7 @@ var config = {
|
|
|
126
126
|
":var(--plasma-typo-body-xs-font-family);",
|
|
127
127
|
":var(--plasma-typo-body-xs-font-size);",
|
|
128
128
|
":var(--plasma-typo-body-xs-font-style);",
|
|
129
|
-
":var(--plasma-typo-body-xs-font-weight);",
|
|
129
|
+
":var(--plasma-typo-body-xs-bold-font-weight);",
|
|
130
130
|
":var(--plasma-typo-body-xs-letter-spacing);",
|
|
131
131
|
":var(--plasma-typo-body-xs-line-height);",
|
|
132
132
|
":0;"
|
|
@@ -144,7 +144,7 @@ var config = {
|
|
|
144
144
|
":var(--plasma-typo-body-s-font-family);",
|
|
145
145
|
":var(--plasma-typo-body-s-font-size);",
|
|
146
146
|
":var(--plasma-typo-body-s-font-style);",
|
|
147
|
-
":var(--plasma-typo-body-s-font-weight);",
|
|
147
|
+
":var(--plasma-typo-body-s-bold-font-weight);",
|
|
148
148
|
":var(--plasma-typo-body-s-letter-spacing);",
|
|
149
149
|
":var(--plasma-typo-body-s-line-height);",
|
|
150
150
|
":0.125rem;"
|
|
@@ -162,7 +162,7 @@ var config = {
|
|
|
162
162
|
":var(--plasma-typo-body-m-font-family);",
|
|
163
163
|
":var(--plasma-typo-body-m-font-size);",
|
|
164
164
|
":var(--plasma-typo-body-m-font-style);",
|
|
165
|
-
":var(--plasma-typo-body-m-font-weight);",
|
|
165
|
+
":var(--plasma-typo-body-m-bold-font-weight);",
|
|
166
166
|
":var(--plasma-typo-body-m-letter-spacing);",
|
|
167
167
|
":var(--plasma-typo-body-m-line-height);",
|
|
168
168
|
":0.25rem;"
|
|
@@ -180,7 +180,7 @@ var config = {
|
|
|
180
180
|
":var(--plasma-typo-body-l-font-family);",
|
|
181
181
|
":var(--plasma-typo-body-l-font-size);",
|
|
182
182
|
":var(--plasma-typo-body-l-font-style);",
|
|
183
|
-
":var(--plasma-typo-body-l-font-weight);",
|
|
183
|
+
":var(--plasma-typo-body-l-bold-font-weight);",
|
|
184
184
|
":var(--plasma-typo-body-l-letter-spacing);",
|
|
185
185
|
":var(--plasma-typo-body-l-line-height);",
|
|
186
186
|
":0.125rem;"
|
|
@@ -59,7 +59,7 @@ var config = {
|
|
|
59
59
|
":var(--plasma-typo-body-xs-font-family);",
|
|
60
60
|
":var(--plasma-typo-body-xs-font-size);",
|
|
61
61
|
":var(--plasma-typo-body-xs-font-style);",
|
|
62
|
-
":var(--plasma-typo-body-xs-font-weight);",
|
|
62
|
+
":var(--plasma-typo-body-xs-bold-font-weight);",
|
|
63
63
|
":var(--plasma-typo-body-xs-letter-spacing);",
|
|
64
64
|
":var(--plasma-typo-body-xs-line-height);",
|
|
65
65
|
":0;"
|
|
@@ -78,7 +78,7 @@ var config = {
|
|
|
78
78
|
":var(--plasma-typo-body-s-font-family);",
|
|
79
79
|
":var(--plasma-typo-body-s-font-size);",
|
|
80
80
|
":var(--plasma-typo-body-s-font-style);",
|
|
81
|
-
":var(--plasma-typo-body-s-font-weight);",
|
|
81
|
+
":var(--plasma-typo-body-s-bold-font-weight);",
|
|
82
82
|
":var(--plasma-typo-body-s-letter-spacing);",
|
|
83
83
|
":var(--plasma-typo-body-s-line-height);",
|
|
84
84
|
":0.25rem;"
|
|
@@ -97,7 +97,7 @@ var config = {
|
|
|
97
97
|
":var(--plasma-typo-body-m-font-family);",
|
|
98
98
|
":var(--plasma-typo-body-m-font-size);",
|
|
99
99
|
":var(--plasma-typo-body-m-font-style);",
|
|
100
|
-
":var(--plasma-typo-body-m-font-weight);",
|
|
100
|
+
":var(--plasma-typo-body-m-bold-font-weight);",
|
|
101
101
|
":var(--plasma-typo-body-m-letter-spacing);",
|
|
102
102
|
":var(--plasma-typo-body-m-line-height);",
|
|
103
103
|
":0.125rem;"
|
|
@@ -116,7 +116,7 @@ var config = {
|
|
|
116
116
|
":var(--plasma-typo-body-l-font-family);",
|
|
117
117
|
":var(--plasma-typo-body-l-font-size);",
|
|
118
118
|
":var(--plasma-typo-body-l-font-style);",
|
|
119
|
-
":var(--plasma-typo-body-l-font-weight);",
|
|
119
|
+
":var(--plasma-typo-body-l-bold-font-weight);",
|
|
120
120
|
":var(--plasma-typo-body-l-letter-spacing);",
|
|
121
121
|
":var(--plasma-typo-body-l-line-height);",
|
|
122
122
|
":0.125rem;"
|
|
@@ -126,6 +126,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
126
126
|
import React, { createRef, forwardRef, useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
127
127
|
import cls from "classnames";
|
|
128
128
|
import { noop } from "../../../utils";
|
|
129
|
+
import { customDayjs } from "../../../utils/datejs";
|
|
129
130
|
import { getDateFormatDelimiter } from "../utils/dateHelper";
|
|
130
131
|
import { useDatePicker } from "../hooks/useDatePicker";
|
|
131
132
|
import { classes } from "../DatePicker.tokens";
|
|
@@ -422,18 +423,34 @@ export var datePickerRangeRoot = function(Root) {
|
|
|
422
423
|
prevValue,
|
|
423
424
|
chosenDate
|
|
424
425
|
]), 2), first = _getSortedValues[0], second = _getSortedValues[1];
|
|
425
|
-
|
|
426
|
-
|
|
426
|
+
/**
|
|
427
|
+
* NOTE: проверяем совпадает ли новая дата с предыдущей
|
|
428
|
+
* Если нет, то вызываем handle{First,Second}CalendarPick
|
|
429
|
+
*/ customDayjs.locale(lang);
|
|
430
|
+
var firstFormatted = first ? customDayjs(first).format(format) : '';
|
|
431
|
+
var secondFormatted = second ? customDayjs(second).format(format) : '';
|
|
432
|
+
if (firstFormatted !== inputFirstValue) {
|
|
433
|
+
handleFirstCalendarPick(first, dateInfo);
|
|
434
|
+
}
|
|
435
|
+
if (secondFormatted !== inputSecondValue) {
|
|
436
|
+
handleSecondCalendarPick(second, dateInfo);
|
|
437
|
+
}
|
|
427
438
|
if (!firstValueError && !secondValueError && closeAfterDateSelect) {
|
|
428
439
|
handleToggle(false);
|
|
429
440
|
}
|
|
430
441
|
};
|
|
431
442
|
var handleChangeCalendarValue = function(param, dateInfo) {
|
|
432
443
|
var _$_param = _sliced_to_array(param, 2), firstDate = _$_param[0], secondDate = _$_param[1];
|
|
433
|
-
|
|
444
|
+
/**
|
|
445
|
+
* NOTE: проверяем совпадает ли новая дата с предыдущей
|
|
446
|
+
* Если нет, то вызываем handle{First,Second}CalendarPick
|
|
447
|
+
*/ customDayjs.locale(lang);
|
|
448
|
+
var firstFormatted = firstDate ? customDayjs(firstDate).format(format) : '';
|
|
449
|
+
var secondFormatted = secondDate ? customDayjs(secondDate).format(format) : '';
|
|
450
|
+
if (firstFormatted !== inputFirstValue) {
|
|
434
451
|
handleFirstCalendarPick(firstDate, dateInfo);
|
|
435
452
|
}
|
|
436
|
-
if (
|
|
453
|
+
if (secondFormatted !== inputSecondValue) {
|
|
437
454
|
handleSecondCalendarPick(secondDate, dateInfo);
|
|
438
455
|
}
|
|
439
456
|
if (firstDate && secondDate && !firstValueError && !secondValueError && closeAfterDateSelect) {
|
|
@@ -99,11 +99,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
99
99
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
100
100
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
101
101
|
}
|
|
102
|
-
import React, { forwardRef, useEffect, useLayoutEffect,
|
|
102
|
+
import React, { forwardRef, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
103
103
|
import cls from "classnames";
|
|
104
|
-
import { customDayjs } from "../../utils/datejs";
|
|
105
104
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
106
|
-
import { getDateFormatDelimiter } from "../DatePicker/utils/dateHelper";
|
|
107
105
|
import { base, CalendarContainerOverlay, LeftHelper } from "./DateTimePicker.styles";
|
|
108
106
|
import { base as sizeCSS } from "./variations/_size/base";
|
|
109
107
|
import { base as viewCSS } from "./variations/_view/base";
|
|
@@ -113,7 +111,6 @@ import { base as readOnlyCSS } from "./variations/_readonly/base";
|
|
|
113
111
|
import { CalendarGrid, DateShortcutList, Input, Popover, StyledSeparator, TimeGrid } from "./ui";
|
|
114
112
|
import { classes } from "./DateTimePicker.tokens";
|
|
115
113
|
import { useDateTimePicker } from "./hooks/useDateTimePicker";
|
|
116
|
-
import { getFormattedDateTime } from "./utils";
|
|
117
114
|
import { useKeyNavigation } from "./hooks/useKeyboardNavigation";
|
|
118
115
|
export var dateTimePickerRoot = function(Root) {
|
|
119
116
|
return /*#__PURE__*/ forwardRef(function(_param, ref) {
|
|
@@ -194,58 +191,9 @@ export var dateTimePickerRoot = function(Root) {
|
|
|
194
191
|
var inputInnerRef = useForkRef(inputRef, ref);
|
|
195
192
|
var calendarOverlayRef = useRef(null);
|
|
196
193
|
var _useState = _sliced_to_array(useState(opened), 2), isInnerOpen = _useState[0], setIsInnerOpen = _useState[1];
|
|
197
|
-
var dateFormatDelimiter = useMemo(function() {
|
|
198
|
-
return getDateFormatDelimiter(dateFormat);
|
|
199
|
-
}, [
|
|
200
|
-
dateFormat
|
|
201
|
-
]);
|
|
202
|
-
var timeFormatDelimiter = useMemo(function() {
|
|
203
|
-
return getDateFormatDelimiter(timeFormat);
|
|
204
|
-
}, [
|
|
205
|
-
timeFormat
|
|
206
|
-
]);
|
|
207
|
-
var timeColumnsCount = (timeFormat === null || timeFormat === void 0 ? void 0 : timeFormat.split(timeFormatDelimiter).length) || 2;
|
|
208
|
-
var fullFormat = dateFormat + dateTimeSeparator + timeFormat;
|
|
209
|
-
var _useState1 = _sliced_to_array(useState(defaultDate || ''), 2), innerDate = _useState1[0], setInnerDate = _useState1[1];
|
|
210
|
-
var dateValue = outerValue !== null && outerValue !== void 0 ? outerValue : innerDate;
|
|
211
|
-
var initialValues = getFormattedDateTime({
|
|
212
|
-
value: dateValue,
|
|
213
|
-
lang: lang,
|
|
214
|
-
format: fullFormat,
|
|
215
|
-
includeEdgeDates: includeEdgeDates,
|
|
216
|
-
min: min,
|
|
217
|
-
max: max,
|
|
218
|
-
dateFormat: dateFormat,
|
|
219
|
-
timeFormat: timeFormat
|
|
220
|
-
});
|
|
221
|
-
var _useState2 = _sliced_to_array(useState({
|
|
222
|
-
input: initialValues.formattedDate,
|
|
223
|
-
calendar: initialValues.dateValue,
|
|
224
|
-
time: initialValues.timeValue
|
|
225
|
-
}), 2), correctDates = _useState2[0], setCorrectDates = _useState2[1];
|
|
226
|
-
var calendarGridValue = initialValues.dateValue;
|
|
227
|
-
var timeGridValue = initialValues.timeValue;
|
|
228
|
-
customDayjs.locale(lang);
|
|
229
|
-
var timeVisibleValue = timeGridValue ? customDayjs(timeGridValue).format(timeFormat) : '';
|
|
230
|
-
var inputValue = initialValues.formattedDate;
|
|
231
|
-
var isDateEqualEdge = function(dateEdge) {
|
|
232
|
-
if (!dateEdge) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
var normalizedEdgeDate = customDayjs(dateEdge);
|
|
236
|
-
normalizedEdgeDate.set('hours', 0);
|
|
237
|
-
normalizedEdgeDate.set('minutes', 0);
|
|
238
|
-
normalizedEdgeDate.set('seconds', 0);
|
|
239
|
-
var normalizedCurrentDate = customDayjs(correctDates.calendar);
|
|
240
|
-
normalizedCurrentDate.set('hours', 0);
|
|
241
|
-
normalizedCurrentDate.set('minutes', 0);
|
|
242
|
-
normalizedCurrentDate.set('seconds', 0);
|
|
243
|
-
if (normalizedCurrentDate.isSame(normalizedEdgeDate)) {
|
|
244
|
-
return true;
|
|
245
|
-
}
|
|
246
|
-
return false;
|
|
247
|
-
};
|
|
248
194
|
var _useDateTimePicker = useDateTimePicker({
|
|
195
|
+
inputRef: inputRef,
|
|
196
|
+
outerValue: outerValue,
|
|
249
197
|
valueError: valueError,
|
|
250
198
|
valueSuccess: valueSuccess,
|
|
251
199
|
type: type,
|
|
@@ -253,74 +201,17 @@ export var dateTimePickerRoot = function(Root) {
|
|
|
253
201
|
disabled: disabled,
|
|
254
202
|
readOnly: readOnly,
|
|
255
203
|
maskWithFormat: maskWithFormat,
|
|
256
|
-
|
|
204
|
+
dateTimeSeparator: dateTimeSeparator,
|
|
257
205
|
dateFormat: dateFormat,
|
|
258
206
|
timeFormat: timeFormat,
|
|
259
|
-
currentValue: inputValue,
|
|
260
|
-
delimiters: [
|
|
261
|
-
dateFormatDelimiter,
|
|
262
|
-
timeFormatDelimiter,
|
|
263
|
-
dateTimeSeparator
|
|
264
|
-
],
|
|
265
|
-
inputRef: inputRef,
|
|
266
|
-
correctDates: correctDates,
|
|
267
207
|
max: max,
|
|
268
208
|
min: min,
|
|
269
209
|
includeEdgeDates: includeEdgeDates,
|
|
270
210
|
dateOnTimeSelectOnly: dateOnTimeSelectOnly,
|
|
271
|
-
setCorrectDates: setCorrectDates,
|
|
272
|
-
setInnerDate: setInnerDate,
|
|
273
211
|
onChangeValue: onChangeValue,
|
|
274
|
-
onCommitDate: onCommitDate
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
if (!preserveInvalidOnBlur) {
|
|
278
|
-
customDayjs.locale(lang);
|
|
279
|
-
var originalDate = correctDates.calendar;
|
|
280
|
-
if (!originalDate) {
|
|
281
|
-
if (onChangeValue) {
|
|
282
|
-
onChangeValue(event, correctDates.input, {
|
|
283
|
-
originalDate: undefined,
|
|
284
|
-
isoDate: ''
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
if (onCommitDate) {
|
|
288
|
-
onCommitDate(correctDates.input, {
|
|
289
|
-
quarterInfo: undefined,
|
|
290
|
-
originalDate: undefined,
|
|
291
|
-
isoDate: ''
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
if (correctDates.time) {
|
|
297
|
-
originalDate.setHours(correctDates.time.getHours(), correctDates.time.getMinutes(), correctDates.time.getSeconds());
|
|
298
|
-
}
|
|
299
|
-
setInnerDate(originalDate);
|
|
300
|
-
if (!timeGridValue) {
|
|
301
|
-
if (correctDates.calendar) {
|
|
302
|
-
setInnerDate(correctDates.calendar);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
if (onChangeValue) {
|
|
306
|
-
onChangeValue(event, correctDates.input, {
|
|
307
|
-
originalDate: originalDate,
|
|
308
|
-
isoDate: originalDate.toISOString()
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
if (onCommitDate) {
|
|
312
|
-
var quarterInfo = getQuarterInfo(originalDate);
|
|
313
|
-
onCommitDate(correctDates.input, {
|
|
314
|
-
quarterInfo: quarterInfo,
|
|
315
|
-
originalDate: originalDate,
|
|
316
|
-
isoDate: originalDate.toISOString()
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
if (onBlur) {
|
|
321
|
-
onBlur(event);
|
|
322
|
-
}
|
|
323
|
-
};
|
|
212
|
+
onCommitDate: onCommitDate,
|
|
213
|
+
onBlur: onBlur
|
|
214
|
+
}), format = _useDateTimePicker.format, dateVisibleValue = _useDateTimePicker.dateVisibleValue, calendarGridValue = _useDateTimePicker.calendarGridValue, inputValue = _useDateTimePicker.inputValue, timeVisibleValue = _useDateTimePicker.timeVisibleValue, timeColumnsCount = _useDateTimePicker.timeColumnsCount, errorClass = _useDateTimePicker.errorClass, successClass = _useDateTimePicker.successClass, handleChangeValue = _useDateTimePicker.handleChangeValue, handleSearch = _useDateTimePicker.handleSearch, handleBlur = _useDateTimePicker.handleBlur, handleCalendarPick = _useDateTimePicker.handleCalendarPick, handleTimePick = _useDateTimePicker.handleTimePick, updateExternalDate = _useDateTimePicker.updateExternalDate, isDateEqualEdge = _useDateTimePicker.isDateEqualEdge;
|
|
324
215
|
var handleCalendarOverlayClick = function(event) {
|
|
325
216
|
if (disabled || readOnly) {
|
|
326
217
|
return;
|
|
@@ -346,30 +237,29 @@ export var dateTimePickerRoot = function(Root) {
|
|
|
346
237
|
};
|
|
347
238
|
var onKeyDown = useKeyNavigation({
|
|
348
239
|
opened: isInnerOpen,
|
|
349
|
-
format: fullFormat,
|
|
350
|
-
maskWithFormat: maskWithFormat,
|
|
351
|
-
delimiters: [
|
|
352
|
-
dateFormatDelimiter,
|
|
353
|
-
timeFormatDelimiter,
|
|
354
|
-
dateTimeSeparator
|
|
355
|
-
],
|
|
356
240
|
closeOnEsc: closeOnEsc,
|
|
357
241
|
onToggle: handleToggle
|
|
358
242
|
}).onKeyDown;
|
|
359
243
|
useEffect(function() {
|
|
244
|
+
if (disabled || readOnly) {
|
|
245
|
+
setIsInnerOpen(false);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
360
248
|
setIsInnerOpen(function(prevOpen) {
|
|
361
249
|
return prevOpen !== opened && opened;
|
|
362
250
|
});
|
|
363
251
|
}, [
|
|
364
|
-
opened
|
|
252
|
+
opened,
|
|
253
|
+
disabled,
|
|
254
|
+
readOnly
|
|
365
255
|
]);
|
|
366
256
|
useLayoutEffect(function() {
|
|
367
|
-
if (!
|
|
257
|
+
if (!dateVisibleValue) {
|
|
368
258
|
updateExternalDate(defaultDate);
|
|
369
259
|
}
|
|
370
260
|
}, [
|
|
371
261
|
defaultDate,
|
|
372
|
-
|
|
262
|
+
format,
|
|
373
263
|
lang
|
|
374
264
|
]);
|
|
375
265
|
return /*#__PURE__*/ React.createElement(Root, {
|
|
@@ -470,7 +360,7 @@ export var dateTimePickerRoot = function(Root) {
|
|
|
470
360
|
}, isDateEqualEdge(max) && {
|
|
471
361
|
max: max
|
|
472
362
|
})))), leftHelper && /*#__PURE__*/ React.createElement(LeftHelper, {
|
|
473
|
-
className: cls(
|
|
363
|
+
className: cls(errorClass, successClass)
|
|
474
364
|
}, leftHelper));
|
|
475
365
|
});
|
|
476
366
|
};
|