@onereach/ui-components 4.4.3 → 4.4.4-beta.2718.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.
Files changed (123) hide show
  1. package/dist/bundled/v2/components/index.d.ts +2 -0
  2. package/dist/bundled/v2/components/index.js +6 -4
  3. package/dist/bundled/v2/index.js +7 -5
  4. package/dist/bundled/v3/OrCombinedInput.vue_vue_type_script_lang-cb7a88f3.js +66 -0
  5. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.js +11 -66
  6. package/dist/bundled/v3/components/OrCombinedInputV3/index.js +1 -1
  7. package/dist/bundled/v3/components/index.d.ts +2 -0
  8. package/dist/bundled/v3/components/index.js +5 -3
  9. package/dist/bundled/v3/index.js +11 -8
  10. package/dist/esm/v2/OrCombinedInput-5994d9fc.js +158 -0
  11. package/dist/esm/v2/components/index.d.ts +2 -0
  12. package/dist/esm/v2/components/index.js +4 -3
  13. package/dist/esm/v2/components/or-combined-input-v3/index.js +6 -158
  14. package/dist/esm/v2/index.js +4 -3
  15. package/dist/esm/v3/OrCombinedInput-14c23a04.js +129 -0
  16. package/dist/esm/v3/components/index.d.ts +2 -0
  17. package/dist/esm/v3/components/index.js +3 -2
  18. package/dist/esm/v3/components/or-combined-input-v3/index.js +6 -129
  19. package/dist/esm/v3/index.js +3 -2
  20. package/package.json +2 -3
  21. package/src/components/index.ts +2 -0
  22. package/src/components/or-bottom-sheet-v3/OrBottomSheet.docs.mdx +0 -7
  23. package/src/components/or-bottom-sheet-v3/OrBottomSheet.stories3.ts +0 -110
  24. package/src/components/or-button-v3/OrButton.docs.mdx +0 -14
  25. package/src/components/or-button-v3/OrButton.stories3.ts +0 -130
  26. package/src/components/or-card-collection-v3/OrCardCollection.docs.mdx +0 -7
  27. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +0 -378
  28. package/src/components/or-card-v3/OrCard.docs.mdx +0 -10
  29. package/src/components/or-card-v3/OrCard.stories3.ts +0 -74
  30. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +0 -7
  31. package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +0 -399
  32. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +0 -7
  33. package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +0 -112
  34. package/src/components/or-checkbox-v3/OrCheckbox.docs.mdx +0 -12
  35. package/src/components/or-checkbox-v3/OrCheckbox.stories3.ts +0 -155
  36. package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +0 -7
  37. package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +0 -201
  38. package/src/components/or-confirm-v3/OrConfirm.docs.mdx +0 -16
  39. package/src/components/or-confirm-v3/OrConfirm.stories3.ts +0 -252
  40. package/src/components/or-date-picker-v3/OrDatePicker.docs.mdx +0 -7
  41. package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +0 -174
  42. package/src/components/or-date-time-picker-v3/OrDateTimePicker.docs.mdx +0 -7
  43. package/src/components/or-date-time-picker-v3/OrDateTimePicker.stories3.ts +0 -183
  44. package/src/components/or-empty-state-v3/OrEmptyState.stories3.ts +0 -87
  45. package/src/components/or-error-tag-v3/OrErrorTag.docs.mdx +0 -8
  46. package/src/components/or-error-tag-v3/OrErrorTag.stories3.ts +0 -56
  47. package/src/components/or-expansion-panel-v3/OrExpansionPanel.docs.mdx +0 -7
  48. package/src/components/or-expansion-panel-v3/OrExpansionPanel.stories3.ts +0 -137
  49. package/src/components/or-fab-v3/OrFab.docs.mdx +0 -7
  50. package/src/components/or-fab-v3/OrFab.stories3.ts +0 -81
  51. package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +0 -114
  52. package/src/components/or-icon-button-v3/OrIconButton.docs.mdx +0 -14
  53. package/src/components/or-icon-button-v3/OrIconButton.stories3.ts +0 -105
  54. package/src/components/or-icon-v3/OrIcon.docs.mdx +0 -12
  55. package/src/components/or-icon-v3/OrIcon.stories3.ts +0 -53
  56. package/src/components/or-inline-input-v3/OrInlineInput.docs.mdx +0 -7
  57. package/src/components/or-inline-input-v3/OrInlineInput.stories3.ts +0 -137
  58. package/src/components/or-inline-textarea-v3/OrInlineTextarea.docs.mdx +0 -7
  59. package/src/components/or-inline-textarea-v3/OrInlineTextarea.stories3.ts +0 -126
  60. package/src/components/or-input-v3/OrInput.docs.mdx +0 -16
  61. package/src/components/or-input-v3/OrInput.stories3.ts +0 -222
  62. package/src/components/or-link-v3/OrLink.docs.mdx +0 -7
  63. package/src/components/or-link-v3/OrLink.stories3.ts +0 -163
  64. package/src/components/or-loader-v3/OrLoader.docs.mdx +0 -14
  65. package/src/components/or-loader-v3/OrLoader.stories3.ts +0 -86
  66. package/src/components/or-menu-item-v3/OrMenuItem.docs.mdx +0 -7
  67. package/src/components/or-menu-item-v3/OrMenuItem.stories3.ts +0 -90
  68. package/src/components/or-menu-v3/OrMenu.docs.mdx +0 -7
  69. package/src/components/or-menu-v3/OrMenu.stories3.ts +0 -167
  70. package/src/components/or-modal-v3/OrModal.docs.mdx +0 -10
  71. package/src/components/or-modal-v3/OrModal.stories3.ts +0 -278
  72. package/src/components/or-notification-v3/OrNotification.docs.mdx +0 -7
  73. package/src/components/or-notification-v3/OrNotification.stories3.ts +0 -122
  74. package/src/components/or-overlay-v3/OrOverlay.docs.mdx +0 -11
  75. package/src/components/or-overlay-v3/OrOverlay.stories3.ts +0 -61
  76. package/src/components/or-pagination-v3/OrPagination.docs.mdx +0 -7
  77. package/src/components/or-pagination-v3/OrPagination.stories3.ts +0 -81
  78. package/src/components/or-popover-v3/OrPopover.docs.mdx +0 -11
  79. package/src/components/or-popover-v3/OrPopover.stories3.ts +0 -115
  80. package/src/components/or-progress-v3/OrProgress.docs.mdx +0 -12
  81. package/src/components/or-progress-v3/OrProgress.stories3.ts +0 -220
  82. package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +0 -81
  83. package/src/components/or-radio-v3/OrRadio.docs.mdx +0 -11
  84. package/src/components/or-radio-v3/OrRadio.stories3.ts +0 -151
  85. package/src/components/or-search-v3/OrSearch.docs.mdx +0 -16
  86. package/src/components/or-search-v3/OrSearch.stories3.ts +0 -126
  87. package/src/components/or-segmented-control-v3/OrSegmentedControl.docs.mdx +0 -7
  88. package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +0 -100
  89. package/src/components/or-select-v3/OrSelect.docs.mdx +0 -17
  90. package/src/components/or-select-v3/OrSelect.stories3.ts +0 -508
  91. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -13
  92. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +0 -415
  93. package/src/components/or-skeleton-v3/OrSkeleton.docs.mdx +0 -14
  94. package/src/components/or-skeleton-v3/OrSkeleton.stories3.ts +0 -144
  95. package/src/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.docs.mdx +0 -7
  96. package/src/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.stories3.ts +0 -59
  97. package/src/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.docs.mdx +0 -6
  98. package/src/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.stories3.ts +0 -80
  99. package/src/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.docs.mdx +0 -7
  100. package/src/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.stories3.ts +0 -88
  101. package/src/components/or-switch-v3/OrSwitch.docs.mdx +0 -7
  102. package/src/components/or-switch-v3/OrSwitch.stories3.ts +0 -155
  103. package/src/components/or-tab-v3/OrTab.docs.mdx +0 -7
  104. package/src/components/or-tab-v3/OrTab.stories3.ts +0 -74
  105. package/src/components/or-tabs-v3/OrTabs.docs.mdx +0 -7
  106. package/src/components/or-tabs-v3/OrTabs.stories3.ts +0 -140
  107. package/src/components/or-tag-v3/OrTag.docs.mdx +0 -13
  108. package/src/components/or-tag-v3/OrTag.stories3.ts +0 -213
  109. package/src/components/or-tags-v3/OrTags.docs.mdx +0 -7
  110. package/src/components/or-tags-v3/OrTags.stories3.ts +0 -101
  111. package/src/components/or-teleport-v3/OrTeleport.docs.mdx +0 -7
  112. package/src/components/or-teleport-v3/OrTeleport.stories3.ts +0 -60
  113. package/src/components/or-text-v3/OrText.docs.mdx +0 -7
  114. package/src/components/or-text-v3/OrText.stories3.ts +0 -124
  115. package/src/components/or-textarea-v3/OrTextarea.docs.mdx +0 -14
  116. package/src/components/or-textarea-v3/OrTextarea.stories3.ts +0 -164
  117. package/src/components/or-time-picker-v3/OrTimePicker.docs.mdx +0 -7
  118. package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +0 -170
  119. package/src/components/or-toast-v3/OrToast.stories3.ts +0 -67
  120. package/src/components/or-toast-v3/or-toast-container-v3/OrToastContainer.docs.mdx +0 -123
  121. package/src/components/or-toast-v3/or-toast-container-v3/OrToastContainer.stories3.ts +0 -119
  122. package/src/components/or-tooltip-v3/OrTooltip.docs.mdx +0 -10
  123. package/src/components/or-tooltip-v3/OrTooltip.stories3.ts +0 -84
@@ -1,399 +0,0 @@
1
- import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref, watch } from 'vue-demi';
4
- import { FormGroupDirection } from '../or-form-group-v3';
5
- import OrCheckboxGroupDocs from './OrCheckboxGroup.docs.mdx';
6
- import OrCheckboxGroup from './OrCheckboxGroup.vue';
7
- import { OrIconV3 as OrIcon } from '../or-icon-v3';
8
-
9
- export default {
10
- title: 'Components/Checkbox/Group',
11
- component: OrCheckboxGroup,
12
- argTypes: {
13
- label: {
14
- control: { type: 'text' },
15
- },
16
- error: {
17
- control: { type: 'text' },
18
- },
19
- hint: {
20
- control: { type: 'text' },
21
- },
22
- direction: {
23
- control: {
24
- type: 'radio',
25
- },
26
- options: Object.values(FormGroupDirection),
27
- },
28
- },
29
- parameters: {
30
- docs: {
31
- page: OrCheckboxGroupDocs,
32
- },
33
- design: {
34
- type: 'figma',
35
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=202%3A12',
36
- },
37
- },
38
- } as Meta<typeof OrCheckboxGroup>;
39
-
40
- const Template: StoryFn<typeof OrCheckboxGroup> = (args) => ({
41
- components: {
42
- OrCheckboxGroup,
43
- },
44
- setup() {
45
- const model = ref([]);
46
-
47
- watch(model, (value) => {
48
- console.debug(value);
49
- });
50
-
51
- return {
52
- args,
53
- model,
54
- onUpdateModelValue: action('update:modelValue'),
55
- };
56
- },
57
-
58
- template: `
59
- <div class="contents">
60
- <OrCheckboxGroup
61
- v-bind="args"
62
- v-model="model"
63
- @update:modelValue="onUpdateModelValue"
64
- />
65
- </div>
66
- `,
67
- });
68
-
69
- export const FlatGroup = Template.bind({});
70
-
71
- FlatGroup.args = {
72
- label: 'Checkbox Group',
73
- options: [
74
- {
75
- label: 'Option 1',
76
- value: '1',
77
- },
78
- {
79
- label: 'Option 2',
80
- value: '2',
81
- },
82
- {
83
- label: 'Option 3',
84
- value: '3',
85
- },
86
- ],
87
- };
88
-
89
- export const CollapsibleGroup = Template.bind({});
90
-
91
- CollapsibleGroup.args = {
92
- label: 'Checkbox Group',
93
- options: [
94
- {
95
- label: 'Parent switcher label',
96
- collapsible: true,
97
- children: [
98
- {
99
- label: 'Option 1',
100
- value: '1',
101
- },
102
- {
103
- label: 'Option 2',
104
- value: '2',
105
- },
106
- {
107
- label: 'Option 3',
108
- value: '3',
109
- },
110
- ],
111
- },
112
- ],
113
- };
114
-
115
- export const Tree = Template.bind({});
116
-
117
- Tree.args = {
118
- label: 'Checkbox Group tree',
119
- options: [
120
- {
121
- label: 'Option 1',
122
- children: [
123
- {
124
- label: 'Option 1.1',
125
- value: '1.1',
126
- },
127
- {
128
- label: 'Option 1.2',
129
- value: '1.2',
130
- },
131
- {
132
- label: 'Option 1.3',
133
- value: '1.3',
134
- },
135
- ],
136
- },
137
- ],
138
- };
139
-
140
-
141
- export const DeepTree = Template.bind({});
142
-
143
- DeepTree.args = {
144
- label: 'Checkbox Group tree',
145
- options: [
146
- {
147
- label: 'Option 1',
148
- value: '1',
149
- },
150
- {
151
- label: 'Option 2',
152
- value: '2',
153
- },
154
- {
155
- label: 'Option 3',
156
- children: [
157
- {
158
- label: 'Option 3.1',
159
- value: '3.1',
160
- },
161
- {
162
- label: 'Option 3.2',
163
- value: '3.2',
164
- },
165
- {
166
- label: 'Option 3.3',
167
- children: [
168
- {
169
- label: 'Option 3.3.1',
170
- value: '3.3.1',
171
- },
172
- {
173
- label: 'Option 3.3.2',
174
- value: '3.3.2',
175
- },
176
- {
177
- label: 'Option 3.3.3',
178
- value: '3.3.3',
179
- },
180
- ],
181
- },
182
- ],
183
- },
184
- ],
185
- };
186
-
187
-
188
- export const DeepCollapsibleTree = Template.bind({});
189
-
190
- DeepCollapsibleTree.args = {
191
- label: 'Checkbox Group tree',
192
- options: [
193
- {
194
- label: 'Option 1',
195
- value: '1',
196
- },
197
- {
198
- label: 'Option 2',
199
- value: '2',
200
- },
201
- {
202
- label: 'Option 3',
203
- collapsible: true,
204
- children: [
205
- {
206
- label: 'Option 3.1',
207
- value: '3.1',
208
- },
209
- {
210
- label: 'Option 3.2',
211
- value: '3.2',
212
- },
213
- {
214
- label: 'Option 3.3',
215
- collapsible: true,
216
- children: [
217
- {
218
- label: 'Option 3.3.1',
219
- value: '3.3.1',
220
- },
221
- {
222
- label: 'Option 3.3.2',
223
- value: '3.3.2',
224
- },
225
- {
226
- label: 'Option 3.3.3',
227
- value: '3.3.3',
228
- },
229
- ],
230
- },
231
- ],
232
- },
233
- ],
234
- };
235
-
236
- export const DeepPartiallyCollapsibleTree = Template.bind({});
237
-
238
- DeepPartiallyCollapsibleTree.args = {
239
- label: 'Checkbox Group tree',
240
- options: [
241
- {
242
- label: 'Option 1',
243
- value: '1',
244
- },
245
- {
246
- label: 'Option 2',
247
- value: '2',
248
- },
249
- {
250
- label: 'Option 3',
251
- collapsible: true,
252
- children: [
253
- {
254
- label: 'Option 3.1',
255
- value: '3.1',
256
- },
257
- {
258
- label: 'Option 3.2',
259
- value: '3.2',
260
- },
261
- {
262
- label: 'Option 3.3',
263
- children: [
264
- {
265
- label: 'Option 3.3.1',
266
- value: '3.3.1',
267
- },
268
- {
269
- label: 'Option 3.3.2',
270
- value: '3.3.2',
271
- },
272
- {
273
- label: 'Option 3.3.3',
274
- value: '3.3.3',
275
- },
276
- ],
277
- },
278
- ],
279
- },
280
- ],
281
- };
282
-
283
- const TemplateWithAddon: StoryFn<typeof OrCheckboxGroup> = (args) => ({
284
- components: {
285
- OrCheckboxGroup,
286
- OrIcon,
287
- },
288
- setup() {
289
- const model = ref([]);
290
-
291
- watch(model, (value) => {
292
- console.debug(value);
293
- });
294
-
295
- return {
296
- args,
297
- model,
298
- onUpdateModelValue: action('update:modelValue'),
299
- };
300
- },
301
-
302
- template: `
303
- <div class="contents">
304
- <OrCheckboxGroup
305
- v-bind="args"
306
- v-model="model"
307
- @update:modelValue="onUpdateModelValue"
308
- >
309
- <template #addon>
310
- <OrIcon icon="info" />
311
- </template>
312
- </OrCheckboxGroup>
313
- </div>
314
- `,
315
- });
316
-
317
- export const WithAddon = TemplateWithAddon.bind({});
318
-
319
- WithAddon.args = {
320
- label: 'Checkbox Group',
321
- options: [
322
- {
323
- label: 'Option 1',
324
- value: '1',
325
- },
326
- {
327
- label: 'Option 2',
328
- value: '2',
329
- },
330
- {
331
- label: 'Option 3',
332
- value: '3',
333
- },
334
- ],
335
- };
336
-
337
- export const DeepPartiallyCollapsed = Template.bind({});
338
-
339
- DeepPartiallyCollapsed.args = {
340
- label: 'Checkbox Group tree',
341
- options: [
342
- {
343
- label: 'Option 1',
344
- value: '1',
345
- },
346
- {
347
- label: 'Option 2',
348
- value: '2',
349
- },
350
- {
351
- label: 'Option 3',
352
- collapsible: true,
353
- expanded: false,
354
- children: [
355
- {
356
- label: 'Option 3.1',
357
- value: '3.1',
358
- },
359
- {
360
- label: 'Option 3.2',
361
- value: '3.2',
362
- },
363
- {
364
- label: 'Option 3.3',
365
- collapsible: true,
366
- expanded: false,
367
- children: [
368
- {
369
- label: 'Option 3.3.1',
370
- value: '3.3.1',
371
- },
372
- {
373
- label: 'Option 3.3.2',
374
- value: '3.3.2',
375
- },
376
- {
377
- label: 'Option 3.3.3',
378
- collapsible: true,
379
- children: [
380
- {
381
- label: 'Option 3.3.3.1',
382
- value: '3.3.3.1',
383
- },
384
- {
385
- label: 'Option 3.3.3.2',
386
- value: '3.3.3.2',
387
- },
388
- ],
389
- },
390
- {
391
- label: 'Option 3.3.4',
392
- value: '3.3.3',
393
- },
394
- ],
395
- },
396
- ],
397
- },
398
- ],
399
- };
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrCheckboxTreeV3 as OrCheckboxTree } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
@@ -1,112 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- import { ref } from 'vue-demi';
3
- import OrCheckboxTreeDocs from './OrCheckboxTree.docs.mdx';
4
- import OrCheckboxTree from './OrCheckboxTree.vue';
5
-
6
- export default {
7
- title: 'Components/Checkbox/Tree',
8
- component: OrCheckboxTree,
9
- parameters: {
10
- docs: {
11
- page: OrCheckboxTreeDocs,
12
- },
13
- },
14
- } as Meta<typeof OrCheckboxTree>;
15
-
16
- const Template: StoryFn<typeof OrCheckboxTree> = (args) => ({
17
- components: {
18
- OrCheckboxTree,
19
- },
20
- setup() {
21
- const model = ref<string[]>([]);
22
- return {
23
- args,
24
- model,
25
- };
26
- },
27
- template: `
28
- <div class="contents">
29
- <OrCheckboxTree
30
- v-for="item in args.items"
31
- v-model="model"
32
- :item="item"
33
- />
34
- </div>
35
- `,
36
- });
37
-
38
- export const Default = Template.bind({});
39
- Default.args = {
40
- items: [
41
- {
42
- label: 'Option 1',
43
- value: '1',
44
- },
45
- {
46
- label: 'Option 2',
47
- value: '2',
48
- },
49
- {
50
- label: 'Option 3',
51
- children: [
52
- {
53
- label: 'Option 3.1',
54
- value: '3.1',
55
- },
56
- {
57
- label: 'Option 3.2',
58
- collapsible: true,
59
- children: [
60
- {
61
- label: 'Option 3.2.1',
62
- value: '3.2.1',
63
- },
64
- {
65
- label: 'Option 3.2.2',
66
- value: '3.2.2',
67
- },
68
- {
69
- label: 'Option 3.2.3',
70
- children: [
71
- {
72
- label: 'Option',
73
- value: '3.3.1',
74
- },
75
- {
76
- label: 'Option',
77
- value: '3.3.2',
78
- },
79
- {
80
- label: 'Option',
81
- value: '3.3.3',
82
- },
83
- ],
84
- },
85
- ],
86
- },
87
- {
88
- label: 'Option 3.3',
89
- value: '3.3',
90
- },
91
- ],
92
- },
93
- {
94
- label: 'Option 4',
95
- value: '4',
96
- },
97
- {
98
- label: 'Option 5',
99
- collapsible: true,
100
- children: [
101
- {
102
- label: 'Option 5.1',
103
- value: '5.1',
104
- },
105
- {
106
- label: 'Option 5.2',
107
- value: '5.2',
108
- },
109
- ],
110
- },
111
- ],
112
- };
@@ -1,12 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrCheckboxV3 as OrCheckbox } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
8
-
9
- ## Migration Guide from V1
10
- - added properties `indeterminate` and `required`
11
- - property `isDisabled` renamed to `disabled`
12
- - removed properties `withState` and `value`
@@ -1,155 +0,0 @@
1
- import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref, watch } from 'vue-demi';
4
- import { OrIconV3 as OrIcon } from '../or-icon-v3';
5
- import { LabelVariant } from '../or-label-v3';
6
- import OrCheckboxDocs from './OrCheckbox.docs.mdx';
7
- import OrCheckbox from './OrCheckbox.vue';
8
-
9
- export default {
10
- title: 'Components/Checkbox',
11
- component: OrCheckbox,
12
-
13
- argTypes: {
14
- // Slots
15
- addon: {
16
- type: {
17
- name: 'string',
18
- required: false,
19
- },
20
-
21
- control: { type: 'text' },
22
- },
23
-
24
- // Props
25
- modelValue: {
26
- control: { type: 'object' },
27
- },
28
-
29
- value: {
30
- control: { type: 'text' },
31
- },
32
-
33
- label: {
34
- control: { type: 'text' },
35
- },
36
-
37
- labelVariant: {
38
- control: { type: 'select' },
39
- options: Object.values(LabelVariant),
40
- },
41
-
42
- indeterminate: {
43
- control: { type: 'boolean' },
44
- },
45
-
46
- required: {
47
- control: { type: 'boolean' },
48
- },
49
-
50
- disabled: {
51
- control: { type: 'boolean' },
52
- },
53
-
54
- // Events
55
- 'update:modelValue': {
56
- table: { disable: true },
57
- },
58
-
59
- input: {
60
- table: { disable: true },
61
- },
62
-
63
- focus: {
64
- table: { disable: true },
65
- },
66
-
67
- blur: {
68
- table: { disable: true },
69
- },
70
- },
71
-
72
- parameters: {
73
- layout: 'centered',
74
-
75
- docs: {
76
- page: OrCheckboxDocs,
77
- },
78
-
79
- design: {
80
- type: 'figma',
81
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=202%3A12',
82
- },
83
- },
84
-
85
- decorators: [
86
- () => ({
87
- template: `
88
- <div class="flex flex-col gap-sm">
89
- <story />
90
- </div>
91
- `,
92
- }),
93
- ],
94
- } as Meta<typeof OrCheckbox>;
95
-
96
- const Template: StoryFn<typeof OrCheckbox> = (args) => ({
97
- components: {
98
- OrCheckbox,
99
- OrIcon,
100
- },
101
-
102
- setup() {
103
- // State
104
- const model = ref<string[]>([]);
105
-
106
- // Effects
107
- watch(model, (value) => {
108
- console.debug(value);
109
- });
110
-
111
- return {
112
- args,
113
- model,
114
- onUpdateModelValue: action('update:modelValue'),
115
- onFocus: action('focus'),
116
- onBlur: action('blur'),
117
- };
118
- },
119
-
120
- template: `
121
- <div class="contents">
122
- <OrCheckbox
123
- v-model="model"
124
- v-bind="args"
125
- @update:modelValue="onUpdateModelValue"
126
- @focus="onFocus"
127
- @blur="onBlur"
128
- >
129
- <template #addon>
130
- ${args.addon}
131
- </template>
132
- </OrCheckbox>
133
-
134
- <OrCheckbox
135
- v-model="model"
136
- value="checkbox-2"
137
- label="Checkbox 2"
138
- @update:modelValue="onUpdateModelValue"
139
- @focus="onFocus"
140
- @blur="onBlur"
141
- />
142
- </div>
143
- `,
144
- });
145
-
146
- export const Checkbox = Template.bind({});
147
-
148
- Checkbox.args = {
149
- // Slots
150
- addon: '<OrIcon icon="info" />',
151
-
152
- // Props
153
- value: 'checkbox-1',
154
- label: 'Checkbox 1',
155
- };
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrCombinedInputV3 as OrCombinedInput } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />