@itcase/ui 1.0.97 → 1.0.100

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.
@@ -0,0 +1,317 @@
1
+ import { Cell } from '@itcase/ui/components/Cell'
2
+ import {
3
+ fillHoverProps,
4
+ fillProps,
5
+ iconFillSizeProps,
6
+ shapeProps,
7
+ sizeProps,
8
+ strokeColorProps,
9
+ textColorProps,
10
+ textSizeProps,
11
+ textWeightProps,
12
+ textWrapProps,
13
+ widthProps,
14
+ } from '@itcase/ui/constants'
15
+
16
+ export default {
17
+ title: 'Atoms / Cell',
18
+ component: Cell,
19
+ argTypes: {
20
+ advancedProps: { control: 'boolean' },
21
+ after: {
22
+ if: { arg: 'advancedProps' },
23
+ },
24
+ before: {
25
+ if: { arg: 'advancedProps' },
26
+ },
27
+ children: {
28
+ if: { arg: 'advancedProps' },
29
+ },
30
+ className: {
31
+ if: { arg: 'advancedProps' },
32
+ },
33
+ isActive: {
34
+ if: { arg: 'advancedProps' },
35
+ },
36
+ isDisabled: {
37
+ if: { arg: 'advancedProps' },
38
+ },
39
+ onClick: {
40
+ if: { arg: 'advancedProps' },
41
+ },
42
+ onMouseEnter: {
43
+ if: { arg: 'advancedProps' },
44
+ },
45
+ zeroPadding: { control: 'boolean' },
46
+ zeroGap: { control: 'boolean' },
47
+ reverse: { control: 'boolean' },
48
+ size: {
49
+ options: [null, 's', 'm', 'l', 'xl'],
50
+ control: 'inline-radio',
51
+ },
52
+ width: {
53
+ options: widthProps,
54
+ control: 'inline-radio',
55
+ if: { arg: 'advancedProps' },
56
+ },
57
+ direction: {
58
+ options: ['vertical', 'horizontal'],
59
+ control: 'inline-radio',
60
+ },
61
+ fill: {
62
+ options: fillProps,
63
+ control: 'select',
64
+ },
65
+ fillHover: {
66
+ options: fillHoverProps,
67
+ control: 'select',
68
+ },
69
+
70
+ // titleText
71
+
72
+ titleTextSize: {
73
+ options: textSizeProps,
74
+ control: 'inline-radio',
75
+ },
76
+ titleTextColor: {
77
+ options: textColorProps,
78
+ control: 'select',
79
+ },
80
+ titleTextWeight: {
81
+ options: textWeightProps,
82
+ control: 'select',
83
+ if: { arg: 'advancedProps' },
84
+ },
85
+ titleTextWrap: {
86
+ options: textWrapProps,
87
+ control: 'inline-radio',
88
+ if: { arg: 'advancedProps' },
89
+ },
90
+
91
+ // titleLabel
92
+
93
+ showTitleLabel: { control: 'boolean' },
94
+ titleLabelAppearance: {
95
+ options: [
96
+ null,
97
+ 'accent',
98
+ 'primary',
99
+ 'secondary',
100
+ 'surfacePrimary',
101
+ 'surfaceSecondary',
102
+ 'surfaceTertiary',
103
+ ],
104
+ control: 'inline-radio',
105
+ if: { arg: 'showTitleLabel' },
106
+ },
107
+ titleLabelTextSize: {
108
+ options: textSizeProps,
109
+ control: 'inline-radio',
110
+ if: { arg: 'showTitleLabel' },
111
+ },
112
+ titleLabelShape: {
113
+ options: shapeProps,
114
+ control: 'inline-radio',
115
+ if: { arg: 'showTitleLabel' },
116
+ },
117
+ titleLabelSize: {
118
+ options: sizeProps,
119
+ control: 'inline-radio',
120
+ if: { arg: 'showTitleLabel' },
121
+ },
122
+
123
+ // titleIcon
124
+
125
+ titleIconSrc: {
126
+ options: [null, 'assets/24/ChevronTop.svg'],
127
+ control: 'inline-radio',
128
+ },
129
+ titleIconFill: {
130
+ options: fillProps,
131
+ control: 'select',
132
+ if: { arg: 'titleIconSrc' },
133
+ },
134
+ titleIconFillSize: {
135
+ options: iconFillSizeProps,
136
+ control: 'inline-radio',
137
+ if: { arg: 'titleIconSrc' },
138
+ },
139
+ titleIconItemFill: {
140
+ options: fillProps,
141
+ control: 'select',
142
+ if: { arg: 'titleIconSrc' },
143
+ },
144
+ titleIconStroke: {
145
+ options: strokeColorProps,
146
+ control: 'select',
147
+ if: { arg: 'titleIconSrc' },
148
+ },
149
+ titleIconShape: {
150
+ options: shapeProps,
151
+ control: 'inline-radio',
152
+ if: { arg: 'titleIconSrc' },
153
+ },
154
+
155
+ // valueText
156
+
157
+ valueTextSize: {
158
+ options: textSizeProps,
159
+ control: 'inline-radio',
160
+ },
161
+ valueTextColor: {
162
+ options: textColorProps,
163
+ control: 'select',
164
+ },
165
+ valueTextWeight: {
166
+ options: textWeightProps,
167
+ control: 'select',
168
+ if: { arg: 'advancedProps' },
169
+ },
170
+ valueTextWrap: {
171
+ options: textWrapProps,
172
+ control: 'inline-radio',
173
+ if: { arg: 'advancedProps' },
174
+ },
175
+
176
+ // valueLabel
177
+
178
+ showValueLabel: { control: 'boolean' },
179
+ valueLabelAppearance: {
180
+ options: [
181
+ null,
182
+ 'accent',
183
+ 'primary',
184
+ 'secondary',
185
+ 'surfacePrimary',
186
+ 'surfaceSecondary',
187
+ 'surfaceTertiary',
188
+ ],
189
+ control: 'inline-radio',
190
+ if: { arg: 'showValueLabel' },
191
+ },
192
+ valueLabelTextSize: {
193
+ options: textSizeProps,
194
+ control: 'inline-radio',
195
+ if: { arg: 'showValueLabel' },
196
+ },
197
+ valueLabelShape: {
198
+ options: shapeProps,
199
+ control: 'inline-radio',
200
+ if: { arg: 'showValueLabel' },
201
+ },
202
+ valueLabelSize: {
203
+ options: sizeProps,
204
+ control: 'inline-radio',
205
+ if: { arg: 'showValueLabel' },
206
+ },
207
+
208
+ // valueIcon
209
+
210
+ valueIconSrc: {
211
+ options: [null, 'assets/24/ChevronDown.svg'],
212
+ control: 'inline-radio',
213
+ },
214
+ valueIconFill: {
215
+ options: fillProps,
216
+ control: 'select',
217
+ if: { arg: 'valueIconSrc' },
218
+ },
219
+ valueIconFillSize: {
220
+ options: iconFillSizeProps,
221
+ control: 'inline-radio',
222
+ if: { arg: 'valueIconSrc' },
223
+ },
224
+ valueIconItemFill: {
225
+ options: fillProps,
226
+ control: 'select',
227
+ if: { arg: 'valueIconSrc' },
228
+ },
229
+ valueIconStroke: {
230
+ options: strokeColorProps,
231
+ control: 'select',
232
+ if: { arg: 'valueIconSrc' },
233
+ },
234
+ valueIconShape: {
235
+ options: shapeProps,
236
+ control: 'inline-radio',
237
+ if: { arg: 'valueIconSrc' },
238
+ },
239
+ mode: {
240
+ options: [null, 'skeleton'],
241
+ control: 'inline-radio',
242
+ },
243
+ },
244
+ }
245
+
246
+ export const Default = {
247
+ args: {
248
+ title: 'Title',
249
+ titleTextColor: 'surfaceTextPrimary',
250
+ titleTextSize: 'm',
251
+ value: 'Value',
252
+ valueTextColor: 'surfaceTextPrimary',
253
+ valueTextSize: 'm',
254
+ valueTextWeight: 600,
255
+ direction: 'horizontal',
256
+ zeroPadding: false,
257
+ zeroGap: false,
258
+ reverse: false,
259
+ showTitleLabel: false,
260
+ showValueLabel: false,
261
+ },
262
+ }
263
+
264
+ export const Horizontal = {
265
+ args: {
266
+ ...Default.args,
267
+ direction: 'horizontal',
268
+ },
269
+ }
270
+
271
+ export const Vertical = {
272
+ args: {
273
+ ...Default.args,
274
+ direction: 'vertical',
275
+ },
276
+ }
277
+
278
+ export const WithLabels = {
279
+ args: {
280
+ ...Default.args,
281
+ showTitleLabel: true,
282
+ showValueLabel: true,
283
+ titleLabel: 'titleLabel',
284
+ valueLabel: 'valueLabel',
285
+ titleLabelAppearance: 'accent',
286
+ titleLabelTextSize: 's',
287
+ titleLabelShape: 'rounded',
288
+ titleLabelSize: 's',
289
+ valueLabelAppearance: 'accent',
290
+ valueLabelTextSize: 's',
291
+ valueLabelShape: 'rounded',
292
+ valueLabelSize: 's',
293
+ },
294
+ }
295
+
296
+ export const WithIcons = {
297
+ args: {
298
+ ...Default.args,
299
+ titleIconSrc: 'assets/24/ChevronDown.svg',
300
+ titleIconFill: 'accentPrimary',
301
+ titleIconFillSize: 32,
302
+ titleIconItemFill: 'surfacePrimary',
303
+ titleIconShape: 'circular',
304
+ valueIconSrc: 'assets/24/ChevronDown.svg',
305
+ valueIconFill: 'accentPrimary',
306
+ valueIconFillSize: 32,
307
+ valueIconItemFill: 'surfacePrimary',
308
+ valueIconShape: 'circular',
309
+ },
310
+ }
311
+
312
+ export const SkeletonMode = {
313
+ args: {
314
+ ...Default.args,
315
+ mode: 'skeleton',
316
+ },
317
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.0.97",
3
+ "version": "1.0.100",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -15,7 +15,8 @@
15
15
  "./constants": "./dist/constants.js",
16
16
  "./constants/*": "./dist/constants/*.js",
17
17
  "./context/*": "./dist/context/*.js",
18
- "./hooks/*": "./dist/hooks/*.js"
18
+ "./hooks/*": "./dist/hooks/*.js",
19
+ "./stories/*": "./dist/stories/*.js"
19
20
  },
20
21
  "scripts": {
21
22
  "build": "npm run build-js && npm run build-css",
@@ -81,7 +82,7 @@
81
82
  "babel-plugin-inline-react-svg": "^2.0.2",
82
83
  "babel-plugin-react-docgen": "^4.2.1",
83
84
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
84
- "eslint": "8.56.0",
85
+ "eslint": "8.57.0",
85
86
  "eslint-config-prettier": "^9.1.0",
86
87
  "eslint-config-standard": "^17.1.0",
87
88
  "eslint-plugin-babel": "^5.3.1",
@@ -101,26 +102,27 @@
101
102
  "postcss-cli": "^11.0.0",
102
103
  "postcss-combine-duplicated-selectors": "^10.0.3",
103
104
  "postcss-csso": "^6.0.1",
104
- "postcss-dark-theme-class": "^1.2.0",
105
- "postcss-discard-duplicates": "^6.0.1",
105
+ "postcss-dark-theme-class": "^1.2.1",
106
+ "postcss-discard-duplicates": "^6.0.2",
106
107
  "postcss-each": "^1.1.0",
107
108
  "postcss-easings": "^4.0.0",
108
109
  "postcss-flexbugs-fixes": "^5.0.2",
109
110
  "postcss-hexrgba": "^2.1.0",
110
- "postcss-import": "^16.0.0",
111
+ "postcss-import": "^16.0.1",
111
112
  "postcss-import-ext-glob": "^2.1.1",
112
113
  "postcss-mixins": "^9.0.4",
113
114
  "postcss-nested": "^6.0.1",
114
115
  "postcss-nested-ancestors": "^3.0.0",
115
116
  "postcss-normalize": "^10.0.1",
116
117
  "postcss-prepend-imports": "^1.0.1",
117
- "postcss-preset-env": "^9.3.0",
118
+ "postcss-preset-env": "^9.4.0",
118
119
  "postcss-pxtorem": "^6.1.0",
119
120
  "postcss-responsive-type": "github:ITCase/postcss-responsive-type",
120
121
  "postcss-sort-media-queries": "^5.2.0",
121
122
  "prettier": "^3.2.5",
122
123
  "react-datepicker": "^6.1.0",
123
- "rollup": "^4.10.0",
124
+ "rollup": "^4.12.0",
125
+ "rollup-plugin-copy": "^3.5.0",
124
126
  "rollup-plugin-peer-deps-external": "^2.2.4",
125
127
  "semantic-release": "^23.0.2",
126
128
  "stylelint": "^16.2.1",