@itcase/ui 1.8.19 → 1.8.21
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/dist/Avatar_cjs_CiQ14ufF.js +240 -0
- package/dist/Avatar_es_No9vSqji.js +236 -0
- package/dist/{Button_cjs_DjCsrrlr.js → Button_cjs_CnStmeGt.js} +12 -4
- package/dist/{Button_es_CHDT0-8K.js → Button_es_BV1bepl1.js} +12 -4
- package/dist/{ChipsGroup_cjs_CTpMiyQb.js → ChipsGroup_cjs_CL00pWKy.js} +2 -2
- package/dist/{ChipsGroup_es_CP_xm25C.js → ChipsGroup_es_Ciln2otW.js} +2 -2
- package/dist/{DatePicker_cjs_DPtOL1eW.js → DatePicker_cjs_DGgkpGbI.js} +4 -4
- package/dist/{DatePicker_es_DCuzMD0T.js → DatePicker_es_BIOyGm22.js} +4 -4
- package/dist/{DropdownItem_cjs_DW0UXopm.js → DropdownItem_cjs_DT-zspEr.js} +15 -15
- package/dist/{DropdownItem_es_vuNthDPa.js → DropdownItem_es_BJLFqVuH.js} +15 -15
- package/dist/{Group_cjs_B0oM0pjF.js → Group_cjs_Cwt0gWk4.js} +9 -2
- package/dist/{Group_es_B8pQHYsC.js → Group_es_CYW2Hquh.js} +9 -2
- package/dist/{Image_cjs_DuIBtUq5.js → Image_cjs_CCWqbNn4.js} +11 -3
- package/dist/{Image_es_CSzHhlA1.js → Image_es_DZUVp0FS.js} +11 -3
- package/dist/{Label_cjs_mw4pHZR1.js → Label_cjs_Cqcf6ffp.js} +2 -2
- package/dist/{Label_es_CiPEDFcR.js → Label_es_CeNdA70T.js} +2 -2
- package/dist/Link_cjs_BlXrJ15R.js +303 -0
- package/dist/Link_es_CyJn7NFb.js +298 -0
- package/dist/{Loader_cjs_DZbIy6Ko.js → Loader_cjs_3VRzFLI2.js} +14 -2
- package/dist/{Loader_es_SHdP0IkA.js → Loader_es_DEYowVdU.js} +14 -2
- package/dist/Text_cjs_DPhKj3wf.js +68 -0
- package/dist/{Text_es_D012qJ8s.js → Text_es_BRb3qqKM.js} +8 -3
- package/dist/{Tooltip_cjs_BKOjNMkt.js → Tooltip_cjs_Cq5kuaIK.js} +480 -17
- package/dist/{Tooltip_es_C7zstTA2.js → Tooltip_es_D0PSqI2c.js} +480 -17
- package/dist/cjs/components/Accordion.js +3 -3
- package/dist/cjs/components/Avatar.js +13 -236
- package/dist/cjs/components/AvatarStack.js +35 -0
- package/dist/cjs/components/Badge.js +3 -3
- package/dist/cjs/components/Breadcrumbs.js +3 -3
- package/dist/cjs/components/Button.js +5 -5
- package/dist/cjs/components/Cell.js +4 -4
- package/dist/cjs/components/Checkbox.js +1 -1
- package/dist/cjs/components/Chips.js +4 -4
- package/dist/cjs/components/Choice.js +6 -6
- package/dist/cjs/components/CookiesWarning.js +13 -6
- package/dist/cjs/components/DatePeriod.js +8 -8
- package/dist/cjs/components/DatePicker.js +7 -7
- package/dist/cjs/components/Drawer.js +26 -2
- package/dist/cjs/components/Dropdown.js +5 -2
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Icon.js +3 -3
- package/dist/cjs/components/Image.js +2 -2
- package/dist/cjs/components/InputPassword.js +226 -46
- package/dist/cjs/components/Label.js +4 -4
- package/dist/cjs/components/Link.js +1 -1
- package/dist/cjs/components/List.js +1 -1
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/Logo.js +1 -1
- package/dist/cjs/components/MenuItem.js +2 -2
- package/dist/cjs/components/Modal.js +4 -4
- package/dist/cjs/components/ModalSheetBottom.js +7 -0
- package/dist/cjs/components/Notification.js +1 -1
- package/dist/cjs/components/Pagination.js +11 -9
- package/dist/cjs/components/Panel.js +2 -2
- package/dist/cjs/components/Radio.js +1 -1
- package/dist/cjs/components/Response.js +227 -183
- package/dist/cjs/components/Search.js +126 -13
- package/dist/cjs/components/Segmented.js +1 -1
- package/dist/cjs/components/Select.js +4 -4
- package/dist/cjs/components/Swiper.js +3 -3
- package/dist/cjs/components/Switch.js +238 -3
- package/dist/cjs/components/Tab.js +3 -3
- package/dist/cjs/components/Text.js +1 -1
- package/dist/cjs/components/Tile.js +240 -5
- package/dist/cjs/components/Title.js +3 -3
- package/dist/cjs/components/Tooltip.js +3 -3
- package/dist/components/Accordion.js +3 -3
- package/dist/components/Avatar.js +10 -237
- package/dist/components/AvatarStack.js +33 -0
- package/dist/components/Badge.js +3 -3
- package/dist/components/Breadcrumbs.js +3 -3
- package/dist/components/Button.js +5 -5
- package/dist/components/Cell.js +4 -4
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Chips.js +4 -4
- package/dist/components/Choice.js +6 -6
- package/dist/components/CookiesWarning.js +13 -7
- package/dist/components/DatePeriod.js +8 -8
- package/dist/components/DatePicker.js +7 -7
- package/dist/components/Drawer.js +26 -2
- package/dist/components/Dropdown.js +5 -2
- package/dist/components/Group.js +1 -1
- package/dist/components/Icon.js +3 -3
- package/dist/components/Image.js +2 -2
- package/dist/components/InputPassword.js +226 -45
- package/dist/components/Label.js +4 -4
- package/dist/components/Link.js +1 -1
- package/dist/components/List.js +1 -1
- package/dist/components/Loader.js +2 -2
- package/dist/components/Logo.js +1 -1
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalSheetBottom.js +7 -1
- package/dist/components/Notification.js +1 -1
- package/dist/components/Pagination.js +11 -9
- package/dist/components/Panel.js +2 -2
- package/dist/components/Radio.js +1 -1
- package/dist/components/Response.js +227 -183
- package/dist/components/Search.js +126 -13
- package/dist/components/Segmented.js +1 -1
- package/dist/components/Select.js +4 -4
- package/dist/components/Swiper.js +3 -3
- package/dist/components/Switch.js +238 -3
- package/dist/components/Tab.js +3 -3
- package/dist/components/Text.js +1 -1
- package/dist/components/Tile.js +240 -5
- package/dist/components/Title.js +3 -3
- package/dist/components/Tooltip.js +3 -3
- package/dist/css/components/AvatarStack/AvatarStack.css +67 -0
- package/dist/css/components/Icon/Icon.css +128 -4
- package/dist/css/components/Text/Text.css +0 -9
- package/dist/css/styles/border-color/border-color_hover.css +6 -8
- package/dist/css/styles/fill/fill_active.css +19 -9
- package/dist/css/styles/fill/fill_active_hover.css +19 -0
- package/dist/css/styles/fill/fill_hover.css +19 -0
- package/dist/css/styles/text-color/text-color_active.css +17 -0
- package/dist/css/styles/text-color/text-color_active_hover.css +40 -0
- package/dist/stories/index.stories.js +49 -0
- package/dist/stories/useDevicePropsGenerator.mdx +76 -102
- package/dist/stories/useMediaQueries.mdx +32 -7
- package/dist/stories/useStyles.mdx +50 -2
- package/dist/types/components/AvatarStack/AvatarStack.d.ts +3 -0
- package/dist/types/components/AvatarStack/AvatarStack.interface.d.ts +9 -0
- package/dist/types/components/AvatarStack/index.d.ts +2 -0
- package/dist/types/components/Button/appearance/buttonDanger.d.ts +8 -0
- package/dist/types/components/CookiesWarning/CookiesWarning.appearance.d.ts +5 -0
- package/dist/types/components/CookiesWarning/index.d.ts +2 -1
- package/dist/types/components/Drawer/appearance/drawerSurface.d.ts +25 -0
- package/dist/types/components/Dropdown/appearance/dropdownAccent.d.ts +0 -6
- package/dist/types/components/Dropdown/appearance/dropdownSurface.d.ts +5 -0
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +2 -3
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +4 -11
- package/dist/types/components/InputPassword/appearance/inputPasswordAccent.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordDanger.d.ts +7 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +11 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordInfo.d.ts +21 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordPrimary.d.ts +8 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +20 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSecondary.d.ts +8 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +59 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +16 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +11 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordSurface.d.ts +25 -0
- package/dist/types/components/InputPassword/appearance/inputPasswordWarning.d.ts +11 -0
- package/dist/types/components/InputPassword/index.d.ts +1 -1
- package/dist/types/components/Link/appearance/linkAccent.d.ts +20 -0
- package/dist/types/components/Link/appearance/linkDanger.d.ts +7 -0
- package/dist/types/components/Link/appearance/linkDisabled.d.ts +20 -0
- package/dist/types/components/Link/appearance/linkError.d.ts +11 -0
- package/dist/types/components/Link/appearance/linkInfo.d.ts +21 -0
- package/dist/types/components/Link/appearance/linkPrimary.d.ts +8 -0
- package/dist/types/components/Link/appearance/linkRequire.d.ts +20 -0
- package/dist/types/components/Link/appearance/linkSecondary.d.ts +8 -0
- package/dist/types/components/Link/appearance/linkSize.d.ts +59 -0
- package/dist/types/components/Link/appearance/linkStyle.d.ts +16 -0
- package/dist/types/components/Link/appearance/linkSuccess.d.ts +11 -0
- package/dist/types/components/Link/appearance/linkSurface.d.ts +25 -0
- package/dist/types/components/Link/appearance/linkWarning.d.ts +11 -0
- package/dist/types/components/Loader/Loader.appearance.d.ts +3 -2
- package/dist/types/components/Loader/Loader.interface.d.ts +16 -17
- package/dist/types/components/Loader/appearance/loaderSize.d.ts +12 -0
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.appearance.d.ts +5 -0
- package/dist/types/components/ModalSheetBottom/index.d.ts +1 -0
- package/dist/types/components/Pagination/appearance/paginationSize.d.ts +8 -0
- package/dist/types/components/Pagination/appearance/paginationSurface.d.ts +2 -0
- package/dist/types/components/Response/Response.appearance.d.ts +2 -2
- package/dist/types/components/Response/appearance/responseAccent.d.ts +20 -0
- package/dist/types/components/Response/appearance/responseDanger.d.ts +7 -0
- package/dist/types/components/Response/appearance/responseDisabled.d.ts +20 -0
- package/dist/types/components/Response/appearance/responseError.d.ts +11 -0
- package/dist/types/components/Response/appearance/responseInfo.d.ts +21 -0
- package/dist/types/components/Response/appearance/responsePrimary.d.ts +8 -0
- package/dist/types/components/Response/appearance/responseRequire.d.ts +20 -0
- package/dist/types/components/Response/appearance/responseSecondary.d.ts +8 -0
- package/dist/types/components/Response/appearance/responseSize.d.ts +59 -0
- package/dist/types/components/Response/appearance/responseStyle.d.ts +16 -0
- package/dist/types/components/Response/appearance/responseSuccess.d.ts +11 -0
- package/dist/types/components/Response/appearance/responseSurface.d.ts +25 -0
- package/dist/types/components/Response/appearance/responseWarning.d.ts +11 -0
- package/dist/types/components/Search/appearance/searchDefault.d.ts +24 -0
- package/dist/types/components/Search/appearance/searchDisabled.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchError.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchRequire.d.ts +20 -0
- package/dist/types/components/Search/appearance/searchSize.d.ts +18 -8
- package/dist/types/components/Search/appearance/searchSuccess.d.ts +20 -0
- package/dist/types/components/Switch/Switch.appearance.d.ts +1 -1
- package/dist/types/components/Switch/appearance/switchAccent.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchDanger.d.ts +7 -0
- package/dist/types/components/Switch/appearance/switchDisabled.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchError.d.ts +11 -0
- package/dist/types/components/Switch/appearance/switchInfo.d.ts +21 -0
- package/dist/types/components/Switch/appearance/switchPrimary.d.ts +8 -0
- package/dist/types/components/Switch/appearance/switchRequire.d.ts +20 -0
- package/dist/types/components/Switch/appearance/switchSecondary.d.ts +8 -0
- package/dist/types/components/Switch/appearance/switchSize.d.ts +59 -0
- package/dist/types/components/Switch/appearance/switchStyle.d.ts +16 -0
- package/dist/types/components/Switch/appearance/switchSuccess.d.ts +11 -0
- package/dist/types/components/Switch/appearance/switchSurface.d.ts +25 -0
- package/dist/types/components/Switch/appearance/switchWarning.d.ts +11 -0
- package/dist/types/components/Tile/appearance/tileAccent.d.ts +20 -0
- package/dist/types/components/Tile/appearance/tileDanger.d.ts +7 -0
- package/dist/types/components/Tile/appearance/tileDisabled.d.ts +20 -0
- package/dist/types/components/Tile/appearance/tileError.d.ts +11 -0
- package/dist/types/components/Tile/appearance/tileInfo.d.ts +21 -0
- package/dist/types/components/Tile/appearance/tilePrimary.d.ts +8 -0
- package/dist/types/components/Tile/appearance/tileRequire.d.ts +20 -0
- package/dist/types/components/Tile/appearance/tileSecondary.d.ts +8 -0
- package/dist/types/components/Tile/appearance/tileSize.d.ts +59 -0
- package/dist/types/components/Tile/appearance/tileStyle.d.ts +16 -0
- package/dist/types/components/Tile/appearance/tileSuccess.d.ts +11 -0
- package/dist/types/components/Tile/appearance/tileSurface.d.ts +25 -0
- package/dist/types/components/Tile/appearance/tileWarning.d.ts +11 -0
- package/dist/types/components/Title/Title.appearance.d.ts +2 -2
- package/dist/types/components/Title/Title.interface.d.ts +3 -3
- package/dist/types/components/Title/appearance/titleAccent.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleDanger.d.ts +7 -0
- package/dist/types/components/Title/appearance/titleDisabled.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleError.d.ts +11 -0
- package/dist/types/components/Title/appearance/titleInfo.d.ts +21 -0
- package/dist/types/components/Title/appearance/titlePrimary.d.ts +8 -0
- package/dist/types/components/Title/appearance/titleRequire.d.ts +20 -0
- package/dist/types/components/Title/appearance/titleSecondary.d.ts +8 -0
- package/dist/types/components/Title/appearance/titleSize.d.ts +59 -0
- package/dist/types/components/Title/appearance/titleStyle.d.ts +16 -0
- package/dist/types/components/Title/appearance/titleSuccess.d.ts +11 -0
- package/dist/types/components/Title/appearance/titleSurface.d.ts +25 -0
- package/dist/types/components/Title/appearance/titleWarning.d.ts +11 -0
- package/dist/types/components/Tooltip/Tooltip.appearance.d.ts +1 -1
- package/dist/types/components/Tooltip/appearance/tooltipAccent.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipDanger.d.ts +7 -0
- package/dist/types/components/Tooltip/appearance/tooltipDisabled.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipError.d.ts +11 -0
- package/dist/types/components/Tooltip/appearance/tooltipInfo.d.ts +21 -0
- package/dist/types/components/Tooltip/appearance/tooltipPrimary.d.ts +8 -0
- package/dist/types/components/Tooltip/appearance/tooltipRequire.d.ts +20 -0
- package/dist/types/components/Tooltip/appearance/tooltipSecondary.d.ts +8 -0
- package/dist/types/components/Tooltip/appearance/tooltipSize.d.ts +59 -0
- package/dist/types/components/Tooltip/appearance/tooltipStyle.d.ts +16 -0
- package/dist/types/components/Tooltip/appearance/tooltipSuccess.d.ts +11 -0
- package/dist/types/components/Tooltip/appearance/tooltipSurface.d.ts +25 -0
- package/dist/types/components/Tooltip/appearance/tooltipWarning.d.ts +11 -0
- package/package.json +7 -7
- package/dist/Link_cjs_yht44xJv.js +0 -68
- package/dist/Link_es_DkW06IM-.js +0 -63
- package/dist/Text_cjs_iL1l_7V1.js +0 -63
- package/dist/stories/Pagination.mdx +0 -11
- package/dist/stories/Tile.mdx +0 -11
|
@@ -117,15 +117,139 @@
|
|
|
117
117
|
stone, pebble, cocoa, coastal-gray, white, black, alto, athens-gray,
|
|
118
118
|
sonic-silver {
|
|
119
119
|
&_$(palette) {
|
|
120
|
+
&:hover {
|
|
121
|
+
& svg {
|
|
122
|
+
stroke: none;
|
|
123
|
+
fill: var(--color-$(type)-fill-$(color));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
120
126
|
&-item {
|
|
127
|
+
&:hover {
|
|
128
|
+
& svg {
|
|
129
|
+
stroke: none;
|
|
130
|
+
fill: var(--color-$(type)-item-$(color));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.icon_fill {
|
|
138
|
+
&_active {
|
|
139
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, surface,
|
|
140
|
+
error, success, warning, info, danger, gradient, disabled, hover, inverse {
|
|
141
|
+
&_$(type) {
|
|
142
|
+
&-item {
|
|
143
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary,
|
|
144
|
+
senary, accent, disabled, hover, inverse {
|
|
145
|
+
&-$(color) {
|
|
146
|
+
& svg {
|
|
147
|
+
stroke: none;
|
|
148
|
+
fill: var(--color-$(type)-item-$(color));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary,
|
|
154
|
+
senary, accent, disabled, hover, inverse {
|
|
155
|
+
&-$(color) {
|
|
156
|
+
& svg {
|
|
157
|
+
stroke: none;
|
|
158
|
+
fill: var(--color-$(type)-fill-$(color));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
165
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum, orange,
|
|
166
|
+
clementine, apricot, papaya, kumquat, light-orange, peach, flamingo,
|
|
167
|
+
rose-gold, pink-sand, vintage-rose, grapefruit, cream, mellow-yellow,
|
|
168
|
+
canary-yellow, pollen, flash-light, lemon-cream, flash, dark-green, green,
|
|
169
|
+
spearmint, mint, beryl, sea-foam, turquoise, blue, light-blue, cerulian,
|
|
170
|
+
surf-blue, pacific-green, blue-cobalt, dark-teal, blue-horizon,
|
|
171
|
+
denim-blue, linen-blue, deep-navy, midnight-blue, purple, ultra-violet,
|
|
172
|
+
lilac, ocean-blue, delft-blue, indigo, lavender-gray, lavender, mist-blue,
|
|
173
|
+
storm-gray, cactus, pine-green, cyprus-green, northern-blue, azure,
|
|
174
|
+
alaskan-blue, khaki, dark-olive, soft-white, antique-white, yellow-gold,
|
|
175
|
+
gold, camel, walnut, stone, pebble, cocoa, coastal-gray, white, black,
|
|
176
|
+
alto, athens-gray, sonic-silver {
|
|
177
|
+
&_$(palette) {
|
|
178
|
+
&-item {
|
|
179
|
+
& svg {
|
|
180
|
+
stroke: none;
|
|
181
|
+
fill: var(--color-palette-$(palette));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
121
184
|
& svg {
|
|
122
185
|
stroke: none;
|
|
123
|
-
fill: var(--color
|
|
186
|
+
fill: var(--color-palette-$(palette));
|
|
124
187
|
}
|
|
125
188
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
.icon_fill {
|
|
193
|
+
&_active {
|
|
194
|
+
&_hover {
|
|
195
|
+
@each $type in accent, primary, secondary, tertiary, quaternary, surface,
|
|
196
|
+
error, success, warning, info, danger, gradient, disabled, hover, inverse {
|
|
197
|
+
&_$(type) {
|
|
198
|
+
&-item {
|
|
199
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary,
|
|
200
|
+
senary, accent, disabled, hover, inverse {
|
|
201
|
+
&-$(color) {
|
|
202
|
+
&:hover {
|
|
203
|
+
& svg {
|
|
204
|
+
stroke: none;
|
|
205
|
+
fill: var(--color-$(type)-item-$(color));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary,
|
|
212
|
+
senary, accent, disabled, hover, inverse {
|
|
213
|
+
&-$(color) {
|
|
214
|
+
&:hover {
|
|
215
|
+
& svg {
|
|
216
|
+
stroke: none;
|
|
217
|
+
fill: var(--color-$(type)-fill-$(color));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
225
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum, orange,
|
|
226
|
+
clementine, apricot, papaya, kumquat, light-orange, peach, flamingo,
|
|
227
|
+
rose-gold, pink-sand, vintage-rose, grapefruit, cream, mellow-yellow,
|
|
228
|
+
canary-yellow, pollen, flash-light, lemon-cream, flash, dark-green, green,
|
|
229
|
+
spearmint, mint, beryl, sea-foam, turquoise, blue, light-blue, cerulian,
|
|
230
|
+
surf-blue, pacific-green, blue-cobalt, dark-teal, blue-horizon,
|
|
231
|
+
denim-blue, linen-blue, deep-navy, midnight-blue, purple, ultra-violet,
|
|
232
|
+
lilac, ocean-blue, delft-blue, indigo, lavender-gray, lavender, mist-blue,
|
|
233
|
+
storm-gray, cactus, pine-green, cyprus-green, northern-blue, azure,
|
|
234
|
+
alaskan-blue, khaki, dark-olive, soft-white, antique-white, yellow-gold,
|
|
235
|
+
gold, camel, walnut, stone, pebble, cocoa, coastal-gray, white, black,
|
|
236
|
+
alto, athens-gray, sonic-silver {
|
|
237
|
+
&_$(palette) {
|
|
238
|
+
&:hover {
|
|
239
|
+
& svg {
|
|
240
|
+
stroke: none;
|
|
241
|
+
fill: var(--color-palette-$(palette));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
&-item {
|
|
245
|
+
&:hover {
|
|
246
|
+
& svg {
|
|
247
|
+
stroke: none;
|
|
248
|
+
fill: var(--color-palette-$(palette));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
129
253
|
}
|
|
130
254
|
}
|
|
131
255
|
}
|
|
@@ -5,17 +5,15 @@
|
|
|
5
5
|
@each $color in primary, secondary, tertiary, quaternary, accent,
|
|
6
6
|
disabled, hover, inverse {
|
|
7
7
|
&_$(type) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
&-border {
|
|
9
|
+
&-$(color) {
|
|
10
|
+
&:hover {
|
|
11
|
+
border-color: var(--color-$(type)-border-$(color));
|
|
12
|
+
}
|
|
13
|
+
&-hover {
|
|
11
14
|
&:hover {
|
|
12
15
|
border-color: var(--color-$(type)-border-$(color));
|
|
13
16
|
}
|
|
14
|
-
&-hover {
|
|
15
|
-
&:hover {
|
|
16
|
-
border-color: var(--color-$(type)-border-$(color));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
.fill {
|
|
2
2
|
&_active {
|
|
3
3
|
@each $type in accent, primary, secondary, tertiary, quaternary, surface,
|
|
4
|
-
error, success, warning, info, danger, gradient, disabled, hover,
|
|
4
|
+
error, success, danger, warning, info, danger, gradient, disabled, hover,
|
|
5
|
+
inverse {
|
|
5
6
|
@each $color in primary, secondary, tertiary, quaternary, accent,
|
|
6
7
|
disabled, hover, inverse {
|
|
7
8
|
&_$(type) {
|
|
@@ -13,16 +14,25 @@
|
|
|
13
14
|
&-$(color) {
|
|
14
15
|
background: var(--color-$(type)-fill-$(color));
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
&-primary {
|
|
19
|
-
&-active {
|
|
20
|
-
background: var(--color-$(type)-fill--primary-active);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
*/
|
|
24
17
|
}
|
|
25
18
|
}
|
|
26
19
|
}
|
|
20
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
21
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum, orange,
|
|
22
|
+
clementine, apricot, papaya, kumquat, light-orange, peach, flamingo,
|
|
23
|
+
rose-gold, pink-sand, vintage-rose, grapefruit, cream, mellow-yellow,
|
|
24
|
+
canary-yellow, pollen, flash-light, lemon-cream, flash, dark-green, green,
|
|
25
|
+
spearmint, mint, beryl, sea-foam, turquoise, blue, light-blue, cerulian,
|
|
26
|
+
surf-blue, pacific-green, blue-cobalt, dark-teal, blue-horizon,
|
|
27
|
+
denim-blue, linen-blue, deep-navy, midnight-blue, purple, ultra-violet,
|
|
28
|
+
lilac, ocean-blue, delft-blue, indigo, lavender-gray, lavender, mist-blue,
|
|
29
|
+
storm-gray, cactus, pine-green, cyprus-green, northern-blue, azure,
|
|
30
|
+
alaskan-blue, khaki, dark-olive, soft-white, antique-white, yellow-gold,
|
|
31
|
+
gold, camel, walnut, stone, pebble, cocoa, coastal-gray, white, black,
|
|
32
|
+
alto, athens-gray, sonic-silver {
|
|
33
|
+
&_$(palette) {
|
|
34
|
+
background: var(--color-palette-$(palette));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
27
37
|
}
|
|
28
38
|
}
|
|
@@ -74,6 +74,25 @@
|
|
|
74
74
|
/* } */
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
78
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum,
|
|
79
|
+
orange, clementine, apricot, papaya, kumquat, light-orange, peach,
|
|
80
|
+
flamingo, rose-gold, pink-sand, vintage-rose, grapefruit, cream,
|
|
81
|
+
mellow-yellow, canary-yellow, pollen, flash-light, lemon-cream, flash,
|
|
82
|
+
dark-green, green, spearmint, mint, beryl, sea-foam, turquoise, blue,
|
|
83
|
+
light-blue, cerulian, surf-blue, pacific-green, blue-cobalt, dark-teal,
|
|
84
|
+
blue-horizon, denim-blue, linen-blue, deep-navy, midnight-blue, purple,
|
|
85
|
+
ultra-violet, lilac, ocean-blue, delft-blue, indigo, lavender-gray,
|
|
86
|
+
lavender, mist-blue, storm-gray, cactus, pine-green, cyprus-green,
|
|
87
|
+
northern-blue, azure, alaskan-blue, khaki, dark-olive, soft-white,
|
|
88
|
+
antique-white, yellow-gold, gold, camel, walnut, stone, pebble, cocoa,
|
|
89
|
+
coastal-gray, white, black, alto, athens-gray, sonic-silver {
|
|
90
|
+
&_$(palette) {
|
|
91
|
+
&:hover {
|
|
92
|
+
background: var(--color-palette-$(palette));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
77
96
|
}
|
|
78
97
|
}
|
|
79
98
|
}
|
|
@@ -60,5 +60,24 @@
|
|
|
60
60
|
/* } */
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
64
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum, orange,
|
|
65
|
+
clementine, apricot, papaya, kumquat, light-orange, peach, flamingo,
|
|
66
|
+
rose-gold, pink-sand, vintage-rose, grapefruit, cream, mellow-yellow,
|
|
67
|
+
canary-yellow, pollen, flash-light, lemon-cream, flash, dark-green, green,
|
|
68
|
+
spearmint, mint, beryl, sea-foam, turquoise, blue, light-blue, cerulian,
|
|
69
|
+
surf-blue, pacific-green, blue-cobalt, dark-teal, blue-horizon,
|
|
70
|
+
denim-blue, linen-blue, deep-navy, midnight-blue, purple, ultra-violet,
|
|
71
|
+
lilac, ocean-blue, delft-blue, indigo, lavender-gray, lavender, mist-blue,
|
|
72
|
+
storm-gray, cactus, pine-green, cyprus-green, northern-blue, azure,
|
|
73
|
+
alaskan-blue, khaki, dark-olive, soft-white, antique-white, yellow-gold,
|
|
74
|
+
gold, camel, walnut, stone, pebble, cocoa, coastal-gray, white, black,
|
|
75
|
+
alto, athens-gray, sonic-silver {
|
|
76
|
+
&_$(palette) {
|
|
77
|
+
&:hover {
|
|
78
|
+
background: var(--color-palette-$(palette));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
63
82
|
}
|
|
64
83
|
}
|
|
@@ -15,6 +15,23 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
19
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum,
|
|
20
|
+
orange, clementine, apricot, papaya, kumquat, light-orange, peach,
|
|
21
|
+
flamingo, rose-gold, pink-sand, vintage-rose, grapefruit, cream,
|
|
22
|
+
mellow-yellow, canary-yellow, pollen, flash-light, lemon-cream, flash,
|
|
23
|
+
dark-green, green, spearmint, mint, beryl, sea-foam, turquoise, blue,
|
|
24
|
+
light-blue, cerulian, surf-blue, pacific-green, blue-cobalt, dark-teal,
|
|
25
|
+
blue-horizon, denim-blue, linen-blue, deep-navy, midnight-blue, purple,
|
|
26
|
+
ultra-violet, lilac, ocean-blue, delft-blue, indigo, lavender-gray,
|
|
27
|
+
lavender, mist-blue, storm-gray, cactus, pine-green, cyprus-green,
|
|
28
|
+
northern-blue, azure, alaskan-blue, khaki, dark-olive, soft-white,
|
|
29
|
+
antique-white, yellow-gold, gold, camel, walnut, stone, pebble, cocoa,
|
|
30
|
+
coastal-gray, white, black, alto, athens-gray, sonic-silver {
|
|
31
|
+
&_$(palette) {
|
|
32
|
+
color: var(--color-palette-$(palette));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
18
35
|
}
|
|
19
36
|
}
|
|
20
37
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.text {
|
|
2
|
+
&&-color {
|
|
3
|
+
&_active {
|
|
4
|
+
&_hover {
|
|
5
|
+
@each $type in accent, primary, secondary, tertiary, quaternary,
|
|
6
|
+
surface, error, success, warning, info, danger, gradient, disabled,
|
|
7
|
+
hover, inverse {
|
|
8
|
+
@each $color in primary, secondary, tertiary, quaternary, accent,
|
|
9
|
+
disabled, hover, inverse {
|
|
10
|
+
&_$(type) {
|
|
11
|
+
&-text {
|
|
12
|
+
&-$(color) {
|
|
13
|
+
color: var(--color-$(type)-text-$(color));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@each $palette in red, neon-pink, electric-pink, hibiscus, pink,
|
|
20
|
+
pink-citrus, pomagranate, dragon-fruit, camellia, red-rose, plum,
|
|
21
|
+
orange, clementine, apricot, papaya, kumquat, light-orange, peach,
|
|
22
|
+
flamingo, rose-gold, pink-sand, vintage-rose, grapefruit, cream,
|
|
23
|
+
mellow-yellow, canary-yellow, pollen, flash-light, lemon-cream, flash,
|
|
24
|
+
dark-green, green, spearmint, mint, beryl, sea-foam, turquoise, blue,
|
|
25
|
+
light-blue, cerulian, surf-blue, pacific-green, blue-cobalt,
|
|
26
|
+
dark-teal, blue-horizon, denim-blue, linen-blue, deep-navy,
|
|
27
|
+
midnight-blue, purple, ultra-violet, lilac, ocean-blue, delft-blue,
|
|
28
|
+
indigo, lavender-gray, lavender, mist-blue, storm-gray, cactus,
|
|
29
|
+
pine-green, cyprus-green, northern-blue, azure, alaskan-blue, khaki,
|
|
30
|
+
dark-olive, soft-white, antique-white, yellow-gold, gold, camel,
|
|
31
|
+
walnut, stone, pebble, cocoa, coastal-gray, white, black, alto,
|
|
32
|
+
athens-gray, sonic-silver {
|
|
33
|
+
&_$(palette) {
|
|
34
|
+
color: var(--color-palette-$(palette));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import AvatarStack from '.'
|
|
2
|
+
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Atoms / Avatar Stack',
|
|
5
|
+
component: AvatarStack,
|
|
6
|
+
args: {
|
|
7
|
+
avatarSize: 48,
|
|
8
|
+
users: [
|
|
9
|
+
{
|
|
10
|
+
id: 0,
|
|
11
|
+
src: 'https://as2.ftcdn.net/v2/jpg/07/52/13/37/1000_F_752133729_dz4GYDkaKZ6vRCNadT5Pz2EBe43ShRos.jpg',
|
|
12
|
+
firstName: 'firstName',
|
|
13
|
+
secondName: 'secondName',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 1,
|
|
17
|
+
src: 'https://as2.ftcdn.net/v2/jpg/07/52/13/37/1000_F_752133729_dz4GYDkaKZ6vRCNadT5Pz2EBe43ShRos.jpg',
|
|
18
|
+
firstName: 'firstName',
|
|
19
|
+
secondName: 'secondName',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 2,
|
|
23
|
+
src: 'https://as2.ftcdn.net/v2/jpg/07/52/13/37/1000_F_752133729_dz4GYDkaKZ6vRCNadT5Pz2EBe43ShRos.jpg',
|
|
24
|
+
firstName: 'firstName',
|
|
25
|
+
secondName: 'secondName',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 3,
|
|
29
|
+
src: 'https://as2.ftcdn.net/v2/jpg/07/52/13/37/1000_F_752133729_dz4GYDkaKZ6vRCNadT5Pz2EBe43ShRos.jpg',
|
|
30
|
+
firstName: 'firstName',
|
|
31
|
+
secondName: 'secondName',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 4,
|
|
35
|
+
src: 'https://as2.ftcdn.net/v2/jpg/07/52/13/37/1000_F_752133729_dz4GYDkaKZ6vRCNadT5Pz2EBe43ShRos.jpg',
|
|
36
|
+
firstName: 'firstName',
|
|
37
|
+
secondName: 'secondName',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default meta
|
|
44
|
+
|
|
45
|
+
export const Default = {
|
|
46
|
+
render: (args) => {
|
|
47
|
+
return <AvatarStack {...args} />
|
|
48
|
+
},
|
|
49
|
+
}
|
|
@@ -3,7 +3,62 @@ import { Meta } from '@storybook/blocks'
|
|
|
3
3
|
<Meta title="Hooks / useDevicePropsGenerator" />
|
|
4
4
|
|
|
5
5
|
# `useDevicePropsGenerator`
|
|
6
|
-
Хук позволяет автоматически получать значения
|
|
6
|
+
Хук позволяет автоматически получать значения `props` или `appearance`, которые соответствуют `viewport` пользователя, а также преобразовывать их в `CSS‑классы`.
|
|
7
|
+
|
|
8
|
+
Важно учитывать приоритет при котором будут применяться стили:
|
|
9
|
+
|
|
10
|
+
1. Сначала используется значение из props, соответствующее текущему устройству
|
|
11
|
+
- Передали
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
<Component textAlignMobile="center" />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Получили
|
|
18
|
+
```jsx
|
|
19
|
+
<Component style={{ textAlign: 'center' }} />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
2. Если такого нет — используется значение из props без учёта устройства
|
|
23
|
+
- Передали
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
<Component textAlign="right" />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Получили
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
<Component style={{ textAlign: 'right' }} />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. Если и его нет — берётся значение из appearance-конфига для текущего устройства
|
|
36
|
+
|
|
37
|
+
- Передали
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
{
|
|
41
|
+
textAlignMobile: 'left'
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- Получили
|
|
46
|
+
|
|
47
|
+
```jsx
|
|
48
|
+
<Component style={{ textAlign: 'left' }} />
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
4. И в последнюю очередь — значение из appearance-конфига без учёта устройства
|
|
52
|
+
|
|
53
|
+
- Передали
|
|
54
|
+
```jsx
|
|
55
|
+
textAlign: 'justify'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- Получили
|
|
59
|
+
```jsx
|
|
60
|
+
<Component style={{ textAlign: 'justify' }} />
|
|
61
|
+
```
|
|
7
62
|
|
|
8
63
|
## Использование
|
|
9
64
|
|
|
@@ -19,35 +74,25 @@ const componentConfig: ComponentConfig = {
|
|
|
19
74
|
```
|
|
20
75
|
|
|
21
76
|
2. Для того чтобы передавать несколько appearance в одной строке, например:
|
|
22
|
-
|
|
23
77
|
```jsx
|
|
24
78
|
<Component appearance='errorPrimary sizeM' />
|
|
25
79
|
```
|
|
26
80
|
|
|
27
81
|
где `errorPrimary` это
|
|
28
|
-
|
|
29
82
|
```js
|
|
30
83
|
{
|
|
31
84
|
fill: 'errorTertiary',
|
|
32
|
-
borderColor: 'errorBorderQuaternary',
|
|
33
|
-
borderHover: 'errorBorderQuaternary',
|
|
34
|
-
textColor: 'surfaceTextPrimary',
|
|
35
|
-
iconBeforeFill: 'errorItemQuaternary',
|
|
36
|
-
iconClearFill: 'errorItemPrimary',
|
|
37
|
-
placeholderTextColor: 'surfaceTextQuaternary',
|
|
38
85
|
}
|
|
39
86
|
```
|
|
40
87
|
|
|
41
88
|
а `sizeM` это
|
|
42
|
-
|
|
43
|
-
```js
|
|
89
|
+
```ts
|
|
44
90
|
{
|
|
45
91
|
size: 'm',
|
|
46
|
-
textSize: 'm',
|
|
47
92
|
}
|
|
48
93
|
```
|
|
49
94
|
|
|
50
|
-
|
|
95
|
+
Нужен appearanceConfig
|
|
51
96
|
```js
|
|
52
97
|
const appearanceConfig = appearance?.split(' ').reduce(
|
|
53
98
|
(resultConfig, appearanceKey) => ({
|
|
@@ -57,19 +102,12 @@ const componentConfig: ComponentConfig = {
|
|
|
57
102
|
{},
|
|
58
103
|
)
|
|
59
104
|
```
|
|
60
|
-
|
|
105
|
+
Которому передается созданный ранее componentConfig и его результатом будет единый объект со свойствами из разных appearance
|
|
61
106
|
|
|
62
107
|
```js
|
|
63
108
|
{
|
|
64
109
|
fill: 'errorTertiary',
|
|
65
|
-
borderColor: 'errorBorderQuaternary',
|
|
66
|
-
borderHover: 'errorBorderQuaternary',
|
|
67
|
-
textColor: 'surfaceTextPrimary',
|
|
68
|
-
iconBeforeFill: 'errorItemQuaternary',
|
|
69
|
-
iconClearFill: 'errorItemPrimary',
|
|
70
|
-
placeholderTextColor: 'surfaceTextQuaternary',
|
|
71
110
|
size: "m",
|
|
72
|
-
textSize: "m"
|
|
73
111
|
}
|
|
74
112
|
```
|
|
75
113
|
|
|
@@ -106,7 +144,7 @@ const componentConfig: ComponentConfig = {
|
|
|
106
144
|
</table>
|
|
107
145
|
|
|
108
146
|
|
|
109
|
-
Из propsGenerator получаем переменные со строками, которые соответствуют appearance переданными в хук. Если указать просто fill
|
|
147
|
+
Из propsGenerator получаем переменные со строками, которые соответствуют appearance переданными в хук. Если указать просто `fill`, то получим `errorTertiary`,
|
|
110
148
|
если укажем `fillClass` то получим `error-tertiary`, поэтому везде в приведенном ниже примере указан суффикс `Class`.
|
|
111
149
|
|
|
112
150
|
```js
|
|
@@ -114,100 +152,36 @@ const componentConfig: ComponentConfig = {
|
|
|
114
152
|
|
|
115
153
|
const {
|
|
116
154
|
fillClass,
|
|
117
|
-
borderColorClass,
|
|
118
|
-
borderHoverClass,
|
|
119
|
-
borderWidthClass,
|
|
120
|
-
textColorClass,
|
|
121
|
-
textSizeClass,
|
|
122
|
-
textWeightClass,
|
|
123
|
-
caretClass,
|
|
124
|
-
placeholderTextColorClass,
|
|
125
|
-
shapeClass,
|
|
126
155
|
sizeClass,
|
|
127
|
-
widthClass,
|
|
128
156
|
} = propsGenerator
|
|
129
157
|
```
|
|
130
158
|
|
|
131
159
|
4. Применяем стили к компоненту. Важно учитывать, если в названии класса указывается сначала название компонента, это означает что он ссылается на стили,
|
|
132
|
-
которые определены внутри директории этого компонента
|
|
160
|
+
которые определены внутри директории этого компонента `src/components/Component/css`
|
|
133
161
|
|
|
134
|
-
```
|
|
135
|
-
|
|
162
|
+
```jsx
|
|
163
|
+
'textarea__input'
|
|
136
164
|
```
|
|
137
165
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
```js
|
|
166
|
+
Если в названии класса нет название компонента, это означает что ссылаемся на глобальный класс, который определен `src/styles`
|
|
167
|
+
```jsx
|
|
141
168
|
`fill_${fillClass}`
|
|
142
169
|
```
|
|
143
170
|
|
|
144
|
-
|
|
171
|
+
```jsx
|
|
145
172
|
<textarea
|
|
146
|
-
id={id}
|
|
147
173
|
className={clsx(
|
|
148
174
|
'textarea__input',
|
|
149
|
-
(textSizeClass || textColorClass || textWeightClass) && 'text',
|
|
150
|
-
caretClass && `caret-color_${caretClass}`,
|
|
151
175
|
fillClass && `fill_${fillClass}`,
|
|
152
|
-
|
|
153
|
-
borderWidthClass && `border-width_${borderWidthClass}`,
|
|
154
|
-
borderHoverClass && `border-color_hover_${borderHoverClass}`,
|
|
155
|
-
placeholderTextColorClass && `placeholder-text-color_${placeholderTextColorClass}`,
|
|
156
|
-
textSizeClass && `text_size_${textSizeClass}`,
|
|
157
|
-
textColorClass && `text-color_${textColorClass}`,
|
|
158
|
-
textWeightClass && `text-weight_${textWeightClass}`,
|
|
159
|
-
widthClass && `width_${widthClass}`,
|
|
176
|
+
sizeClass && `size_${sizeClass}`,
|
|
160
177
|
)}
|
|
161
178
|
/>
|
|
162
179
|
```
|
|
163
|
-
к примеру `fill`, будет отображаться в браузере как `fill_`
|
|
164
180
|
|
|
165
|
-
|
|
181
|
+
К примеру fill, будет отображаться в браузере как `fill_error-tertiary`.
|
|
166
182
|
|
|
167
|
-
Возьмем appearance из приведенного ранее примера
|
|
168
|
-
```js
|
|
169
|
-
{
|
|
170
|
-
fill: 'errorTertiary',
|
|
171
|
-
borderColor: 'errorBorderQuaternary',
|
|
172
|
-
borderHover: 'errorBorderQuaternary',
|
|
173
|
-
textColor: 'surfaceTextPrimary',
|
|
174
|
-
iconBeforeFill: 'errorItemQuaternary',
|
|
175
|
-
iconClearFill: 'errorItemPrimary',
|
|
176
|
-
placeholderTextColor: 'surfaceTextQuaternary',
|
|
177
|
-
size: "m",
|
|
178
|
-
textSize: "m"
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
и возьмем из него свойство `fill_error-tertiary`
|
|
183
|
-
|
|
184
|
-
5. Cоздаются классы, которые соответствуют структуре определенной в css-файлах, например глобальный класс `fill`
|
|
185
|
-
|
|
186
|
-
```css
|
|
187
|
-
.fill {
|
|
188
|
-
&_none {
|
|
189
|
-
background-color: transparent;
|
|
190
|
-
}
|
|
191
|
-
@each $type in accent, primary, secondary, tertiary, quaternary, surface,
|
|
192
|
-
error, success, warning, info, danger, gradient, disabled, hover, inverse {
|
|
193
|
-
@each $color in primary, secondary, tertiary, quaternary, accent, disabled,
|
|
194
|
-
hover, inverse {
|
|
195
|
-
&_$(type) {
|
|
196
|
-
&-item {
|
|
197
|
-
&-$(color) {
|
|
198
|
-
background: var(--color-$(type)-item-$(color));
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
&-$(color) {
|
|
202
|
-
background: var(--color-$(type)-$(color));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
```
|
|
209
183
|
|
|
210
|
-
6. Чтобы применить стили в зависимости от viewPort
|
|
184
|
+
6. Чтобы применить стили в зависимости от `viewPort`, для этого нужно указать в `appearance` суффикс `Mobile` или `Desktop` или `Tablet`
|
|
211
185
|
|
|
212
186
|
```js
|
|
213
187
|
{
|
|
@@ -215,16 +189,16 @@ const componentConfig: ComponentConfig = {
|
|
|
215
189
|
textSizeMobile: 'm',
|
|
216
190
|
}
|
|
217
191
|
```
|
|
218
|
-
|
|
192
|
+
|
|
193
|
+
Или напрямую при использовании компонента
|
|
219
194
|
|
|
220
195
|
```js
|
|
221
196
|
<Component sizeMobile="m"/>
|
|
222
197
|
```
|
|
223
198
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
3. Desktop
|
|
199
|
+
Всего доступны 3 типа размеров
|
|
200
|
+
1. Mobile (от `240px` до `768px`)
|
|
201
|
+
2. Tablet (от `768px` до `960px`)
|
|
202
|
+
3. Desktop (от `960px` до `1920px`)
|
|
229
203
|
|
|
230
|
-
|
|
204
|
+
Подробнее об этом можно узнать в `src/context/UIContext.tsx`, ознакомиться с размерами для (`Mobile`, `Tablet`, `Desktop`) можно в `src/hooks/useMediaQueries/mediaQueries.json`
|