@onereach/ui-components 4.4.3 → 4.4.4-beta.2722.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/dist/bundled/v2/components/index.d.ts +2 -0
- package/dist/bundled/v2/components/index.js +6 -4
- package/dist/bundled/v2/index.js +7 -5
- package/dist/bundled/v3/OrCombinedInput.vue_vue_type_script_lang-cb7a88f3.js +66 -0
- package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.js +11 -66
- package/dist/bundled/v3/components/OrCombinedInputV3/index.js +1 -1
- package/dist/bundled/v3/components/index.d.ts +2 -0
- package/dist/bundled/v3/components/index.js +5 -3
- package/dist/bundled/v3/index.js +11 -8
- package/dist/esm/v2/OrCombinedInput-5994d9fc.js +158 -0
- package/dist/esm/v2/components/index.d.ts +2 -0
- package/dist/esm/v2/components/index.js +4 -3
- package/dist/esm/v2/components/or-combined-input-v3/index.js +6 -158
- package/dist/esm/v2/index.js +4 -3
- package/dist/esm/v3/OrCombinedInput-14c23a04.js +129 -0
- package/dist/esm/v3/components/index.d.ts +2 -0
- package/dist/esm/v3/components/index.js +3 -2
- package/dist/esm/v3/components/or-combined-input-v3/index.js +6 -129
- package/dist/esm/v3/index.js +3 -2
- package/package.json +2 -3
- package/src/components/index.ts +2 -0
- package/src/components/or-button/OrButton.stories.ts +8 -0
- package/src/components/or-bottom-sheet-v3/OrBottomSheet.docs.mdx +0 -7
- package/src/components/or-bottom-sheet-v3/OrBottomSheet.stories3.ts +0 -110
- package/src/components/or-button-v3/OrButton.docs.mdx +0 -14
- package/src/components/or-button-v3/OrButton.stories3.ts +0 -130
- package/src/components/or-card-collection-v3/OrCardCollection.docs.mdx +0 -7
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +0 -378
- package/src/components/or-card-v3/OrCard.docs.mdx +0 -10
- package/src/components/or-card-v3/OrCard.stories3.ts +0 -74
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.docs.mdx +0 -7
- package/src/components/or-checkbox-group-v3/OrCheckboxGroup.stories3.ts +0 -399
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.docs.mdx +0 -7
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.stories3.ts +0 -112
- package/src/components/or-checkbox-v3/OrCheckbox.docs.mdx +0 -12
- package/src/components/or-checkbox-v3/OrCheckbox.stories3.ts +0 -155
- package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +0 -7
- package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +0 -201
- package/src/components/or-confirm-v3/OrConfirm.docs.mdx +0 -16
- package/src/components/or-confirm-v3/OrConfirm.stories3.ts +0 -252
- package/src/components/or-date-picker-v3/OrDatePicker.docs.mdx +0 -7
- package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +0 -174
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.docs.mdx +0 -7
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.stories3.ts +0 -183
- package/src/components/or-empty-state-v3/OrEmptyState.stories3.ts +0 -87
- package/src/components/or-error-tag-v3/OrErrorTag.docs.mdx +0 -8
- package/src/components/or-error-tag-v3/OrErrorTag.stories3.ts +0 -56
- package/src/components/or-expansion-panel-v3/OrExpansionPanel.docs.mdx +0 -7
- package/src/components/or-expansion-panel-v3/OrExpansionPanel.stories3.ts +0 -137
- package/src/components/or-fab-v3/OrFab.docs.mdx +0 -7
- package/src/components/or-fab-v3/OrFab.stories3.ts +0 -81
- package/src/components/or-form-group-v3/OrFormGroup.stories3.ts +0 -114
- package/src/components/or-icon-button-v3/OrIconButton.docs.mdx +0 -14
- package/src/components/or-icon-button-v3/OrIconButton.stories3.ts +0 -105
- package/src/components/or-icon-v3/OrIcon.docs.mdx +0 -12
- package/src/components/or-icon-v3/OrIcon.stories3.ts +0 -53
- package/src/components/or-inline-input-v3/OrInlineInput.docs.mdx +0 -7
- package/src/components/or-inline-input-v3/OrInlineInput.stories3.ts +0 -137
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.docs.mdx +0 -7
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.stories3.ts +0 -126
- package/src/components/or-input-v3/OrInput.docs.mdx +0 -16
- package/src/components/or-input-v3/OrInput.stories3.ts +0 -222
- package/src/components/or-link-v3/OrLink.docs.mdx +0 -7
- package/src/components/or-link-v3/OrLink.stories3.ts +0 -163
- package/src/components/or-loader-v3/OrLoader.docs.mdx +0 -14
- package/src/components/or-loader-v3/OrLoader.stories3.ts +0 -86
- package/src/components/or-menu-item-v3/OrMenuItem.docs.mdx +0 -7
- package/src/components/or-menu-item-v3/OrMenuItem.stories3.ts +0 -90
- package/src/components/or-menu-v3/OrMenu.docs.mdx +0 -7
- package/src/components/or-menu-v3/OrMenu.stories3.ts +0 -167
- package/src/components/or-modal-v3/OrModal.docs.mdx +0 -10
- package/src/components/or-modal-v3/OrModal.stories3.ts +0 -278
- package/src/components/or-notification-v3/OrNotification.docs.mdx +0 -7
- package/src/components/or-notification-v3/OrNotification.stories3.ts +0 -122
- package/src/components/or-overlay-v3/OrOverlay.docs.mdx +0 -11
- package/src/components/or-overlay-v3/OrOverlay.stories3.ts +0 -61
- package/src/components/or-pagination-v3/OrPagination.docs.mdx +0 -7
- package/src/components/or-pagination-v3/OrPagination.stories3.ts +0 -81
- package/src/components/or-popover-v3/OrPopover.docs.mdx +0 -11
- package/src/components/or-popover-v3/OrPopover.stories3.ts +0 -115
- package/src/components/or-progress-v3/OrProgress.docs.mdx +0 -12
- package/src/components/or-progress-v3/OrProgress.stories3.ts +0 -220
- package/src/components/or-radio-group-v3/OrRadioGroup.stories3.ts +0 -81
- package/src/components/or-radio-v3/OrRadio.docs.mdx +0 -11
- package/src/components/or-radio-v3/OrRadio.stories3.ts +0 -151
- package/src/components/or-search-v3/OrSearch.docs.mdx +0 -16
- package/src/components/or-search-v3/OrSearch.stories3.ts +0 -126
- package/src/components/or-segmented-control-v3/OrSegmentedControl.docs.mdx +0 -7
- package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +0 -100
- package/src/components/or-select-v3/OrSelect.docs.mdx +0 -17
- package/src/components/or-select-v3/OrSelect.stories3.ts +0 -508
- package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -13
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +0 -415
- package/src/components/or-skeleton-v3/OrSkeleton.docs.mdx +0 -14
- package/src/components/or-skeleton-v3/OrSkeleton.stories3.ts +0 -144
- package/src/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.docs.mdx +0 -7
- package/src/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.stories3.ts +0 -59
- package/src/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.docs.mdx +0 -6
- package/src/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.stories3.ts +0 -80
- package/src/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.docs.mdx +0 -7
- package/src/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.stories3.ts +0 -88
- package/src/components/or-switch-v3/OrSwitch.docs.mdx +0 -7
- package/src/components/or-switch-v3/OrSwitch.stories3.ts +0 -155
- package/src/components/or-tab-v3/OrTab.docs.mdx +0 -7
- package/src/components/or-tab-v3/OrTab.stories3.ts +0 -74
- package/src/components/or-tabs-v3/OrTabs.docs.mdx +0 -7
- package/src/components/or-tabs-v3/OrTabs.stories3.ts +0 -140
- package/src/components/or-tag-v3/OrTag.docs.mdx +0 -13
- package/src/components/or-tag-v3/OrTag.stories3.ts +0 -213
- package/src/components/or-tags-v3/OrTags.docs.mdx +0 -7
- package/src/components/or-tags-v3/OrTags.stories3.ts +0 -101
- package/src/components/or-teleport-v3/OrTeleport.docs.mdx +0 -7
- package/src/components/or-teleport-v3/OrTeleport.stories3.ts +0 -60
- package/src/components/or-text-v3/OrText.docs.mdx +0 -7
- package/src/components/or-text-v3/OrText.stories3.ts +0 -124
- package/src/components/or-textarea-v3/OrTextarea.docs.mdx +0 -14
- package/src/components/or-textarea-v3/OrTextarea.stories3.ts +0 -164
- package/src/components/or-time-picker-v3/OrTimePicker.docs.mdx +0 -7
- package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +0 -170
- package/src/components/or-toast-v3/OrToast.stories3.ts +0 -67
- package/src/components/or-toast-v3/or-toast-container-v3/OrToastContainer.docs.mdx +0 -123
- package/src/components/or-toast-v3/or-toast-container-v3/OrToastContainer.stories3.ts +0 -119
- package/src/components/or-tooltip-v3/OrTooltip.docs.mdx +0 -10
- package/src/components/or-tooltip-v3/OrTooltip.stories3.ts +0 -84
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
import OrSkeletonRectDocs from './OrSkeletonRect.docs.mdx';
|
|
3
|
-
import OrSkeletonRect from './OrSkeletonRect.vue';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Skeleton/Rect',
|
|
7
|
-
component: OrSkeletonRect,
|
|
8
|
-
|
|
9
|
-
argTypes: {
|
|
10
|
-
// Props
|
|
11
|
-
animated: {
|
|
12
|
-
control: { type: 'boolean' },
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
width: {
|
|
16
|
-
control: { type: 'text' },
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
height: {
|
|
20
|
-
control: { type: 'text' },
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: 'centered',
|
|
26
|
-
|
|
27
|
-
docs: {
|
|
28
|
-
page: OrSkeletonRectDocs,
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
design: {
|
|
32
|
-
type: 'figma',
|
|
33
|
-
url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=586%3A2974',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
} as Meta<typeof OrSkeletonRect>;
|
|
37
|
-
|
|
38
|
-
const Template: StoryFn<typeof OrSkeletonRect> = (args) => ({
|
|
39
|
-
components: {
|
|
40
|
-
OrSkeletonRect,
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
setup() {
|
|
44
|
-
return { args };
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
template: `
|
|
48
|
-
<div style="min-width: 480px">
|
|
49
|
-
<OrSkeletonRect v-bind="args" />
|
|
50
|
-
</div>
|
|
51
|
-
`,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export const Default = Template.bind({});
|
|
55
|
-
Default.args = {};
|
|
56
|
-
|
|
57
|
-
export const NotAnimated = Template.bind({});
|
|
58
|
-
NotAnimated.args = {
|
|
59
|
-
...Default.args,
|
|
60
|
-
animated: false,
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const WithWidth = Template.bind({});
|
|
64
|
-
WithWidth.args = {
|
|
65
|
-
...Default.args,
|
|
66
|
-
width: 256,
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const WithHeight = Template.bind({});
|
|
70
|
-
WithHeight.args = {
|
|
71
|
-
...Default.args,
|
|
72
|
-
height: 64,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const WithWidthAndHeight = Template.bind({});
|
|
76
|
-
WithWidthAndHeight.args = {
|
|
77
|
-
...Default.args,
|
|
78
|
-
width: 128,
|
|
79
|
-
height: 32,
|
|
80
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
import OrSkeletonTextDocs from './OrSkeletonText.docs.mdx';
|
|
3
|
-
import OrSkeletonText from './OrSkeletonText.vue';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Skeleton/Text',
|
|
7
|
-
component: OrSkeletonText,
|
|
8
|
-
|
|
9
|
-
argTypes: {
|
|
10
|
-
// Props
|
|
11
|
-
animated: {
|
|
12
|
-
control: { type: 'boolean' },
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
width: {
|
|
16
|
-
control: { type: 'text' },
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
linesCount: {
|
|
20
|
-
control: { type: 'number' },
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
fontSize: {
|
|
24
|
-
control: { type: 'number' },
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
lineHeight: {
|
|
28
|
-
control: { type: 'number' },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
parameters: {
|
|
33
|
-
layout: 'centered',
|
|
34
|
-
|
|
35
|
-
docs: {
|
|
36
|
-
page: OrSkeletonTextDocs,
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
design: {
|
|
40
|
-
type: 'figma',
|
|
41
|
-
url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=586%3A2974',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
} as Meta<typeof OrSkeletonText>;
|
|
45
|
-
|
|
46
|
-
const Template: StoryFn<typeof OrSkeletonText> = (args) => ({
|
|
47
|
-
components: {
|
|
48
|
-
OrSkeletonText,
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
setup() {
|
|
52
|
-
return { args };
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
template: `
|
|
56
|
-
<div style="min-width: 480px">
|
|
57
|
-
<OrSkeletonText v-bind="args" />
|
|
58
|
-
</div>
|
|
59
|
-
`,
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export const Default = Template.bind({});
|
|
63
|
-
Default.args = {};
|
|
64
|
-
|
|
65
|
-
export const NotAnimated = Template.bind({});
|
|
66
|
-
NotAnimated.args = {
|
|
67
|
-
...Default.args,
|
|
68
|
-
animated: false,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const WithWidth = Template.bind({});
|
|
72
|
-
WithWidth.args = {
|
|
73
|
-
...Default.args,
|
|
74
|
-
width: 256,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const WithSize = Template.bind({});
|
|
78
|
-
WithSize.args = {
|
|
79
|
-
...Default.args,
|
|
80
|
-
fontSize: 24,
|
|
81
|
-
lineHeight: 28.64,
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const WithLinesCount = Template.bind({});
|
|
85
|
-
WithLinesCount.args = {
|
|
86
|
-
...Default.args,
|
|
87
|
-
linesCount: 5,
|
|
88
|
-
};
|
|
@@ -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 OrSwitchDocs from './OrSwitch.docs.mdx';
|
|
7
|
-
import OrSwitch from './OrSwitch.vue';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Components/Switch',
|
|
11
|
-
component: OrSwitch,
|
|
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
|
-
required: {
|
|
43
|
-
control: { type: 'boolean' },
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
disabled: {
|
|
47
|
-
control: { type: 'boolean' },
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
loading: {
|
|
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: OrSwitchDocs,
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
design: {
|
|
80
|
-
type: 'figma',
|
|
81
|
-
url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=202%3A16',
|
|
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 OrSwitch>;
|
|
95
|
-
|
|
96
|
-
const Template: StoryFn<typeof OrSwitch> = (args) => ({
|
|
97
|
-
components: {
|
|
98
|
-
OrIcon,
|
|
99
|
-
OrSwitch,
|
|
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
|
-
<OrSwitch
|
|
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
|
-
</OrSwitch>
|
|
133
|
-
|
|
134
|
-
<OrSwitch
|
|
135
|
-
v-model="model"
|
|
136
|
-
value="switch-2"
|
|
137
|
-
label="Switch 2"
|
|
138
|
-
@update:modelValue="onUpdateModelValue"
|
|
139
|
-
@focus="onFocus"
|
|
140
|
-
@blur="onBlur"
|
|
141
|
-
/>
|
|
142
|
-
</div>
|
|
143
|
-
`,
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
export const Switch = Template.bind({});
|
|
147
|
-
|
|
148
|
-
Switch.args = {
|
|
149
|
-
// Slots
|
|
150
|
-
addon: '<OrIcon icon="info" />',
|
|
151
|
-
|
|
152
|
-
// Props
|
|
153
|
-
value: 'switch-1',
|
|
154
|
-
label: 'Switch 1',
|
|
155
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
import OrTabDocs from './OrTab.docs.mdx';
|
|
3
|
-
import OrTab from './OrTab.vue';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Tabs/Parts/Tab',
|
|
7
|
-
component: OrTab,
|
|
8
|
-
|
|
9
|
-
argTypes: {
|
|
10
|
-
// Slots
|
|
11
|
-
default: {
|
|
12
|
-
type: {
|
|
13
|
-
name: 'string',
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
control: { type: 'text' },
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
// Props
|
|
21
|
-
selected: {
|
|
22
|
-
control: { type: 'boolean' },
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
// Events
|
|
26
|
-
click: {
|
|
27
|
-
table: { disable: true },
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
focus: {
|
|
31
|
-
table: { disable: true },
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
blur: {
|
|
35
|
-
table: { disable: true },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
parameters: {
|
|
40
|
-
layout: 'centered',
|
|
41
|
-
|
|
42
|
-
docs: {
|
|
43
|
-
page: OrTabDocs,
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
design: {
|
|
47
|
-
type: 'figma',
|
|
48
|
-
url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=358%3A1288',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
} as Meta<typeof OrTab>;
|
|
52
|
-
|
|
53
|
-
const Template: StoryFn<typeof OrTab> = (args) => ({
|
|
54
|
-
components: {
|
|
55
|
-
OrTab,
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
setup() {
|
|
59
|
-
return { args };
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
template: `
|
|
63
|
-
<OrTab v-bind="args">
|
|
64
|
-
${args.default}
|
|
65
|
-
</OrTab>
|
|
66
|
-
`,
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export const Tab = Template.bind({});
|
|
70
|
-
|
|
71
|
-
Tab.args = {
|
|
72
|
-
// Slots
|
|
73
|
-
default: 'Tab',
|
|
74
|
-
};
|
|
@@ -1,140 +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 OrTabsDocs from './OrTabs.docs.mdx';
|
|
5
|
-
import OrTabs from './OrTabs.vue';
|
|
6
|
-
import { TabsVariant } from './props';
|
|
7
|
-
import { TabsItem } from './types';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Components/Tabs',
|
|
11
|
-
component: OrTabs,
|
|
12
|
-
|
|
13
|
-
argTypes: {
|
|
14
|
-
// Slots
|
|
15
|
-
'String(modelValue)': {
|
|
16
|
-
table: { disable: true },
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
// Props
|
|
20
|
-
items: {
|
|
21
|
-
control: { type: 'object' },
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
modelValue: {
|
|
25
|
-
control: { type: 'text' },
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
variant: {
|
|
29
|
-
control: { type: 'select' },
|
|
30
|
-
options: Object.values(TabsVariant),
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// Events
|
|
34
|
-
'update:modelValue': {
|
|
35
|
-
table: { disable: true },
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
input: {
|
|
39
|
-
table: { disable: true },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
parameters: {
|
|
44
|
-
docs: {
|
|
45
|
-
page: OrTabsDocs,
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
design: {
|
|
49
|
-
type: 'figma',
|
|
50
|
-
url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=358%3A1288',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
} as Meta<typeof OrTabs>;
|
|
54
|
-
|
|
55
|
-
const Template: StoryFn<typeof OrTabs> = (args) => ({
|
|
56
|
-
components: {
|
|
57
|
-
OrTabs,
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
setup() {
|
|
61
|
-
// State
|
|
62
|
-
const model = ref<string>();
|
|
63
|
-
|
|
64
|
-
// Effects
|
|
65
|
-
watch(model, (value) => {
|
|
66
|
-
console.debug(value);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
args,
|
|
71
|
-
model,
|
|
72
|
-
onUpdateModelValue: action('update:modelValue'),
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
template: `
|
|
77
|
-
<OrTabs
|
|
78
|
-
v-model="model"
|
|
79
|
-
v-bind="args"
|
|
80
|
-
@update:modelValue="onUpdateModelValue"
|
|
81
|
-
>
|
|
82
|
-
<template v-for="item in args.items" #[item.value]>
|
|
83
|
-
{{ item.label }} Content
|
|
84
|
-
</template>
|
|
85
|
-
</OrTabs>
|
|
86
|
-
`,
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
export const Default = Template.bind({});
|
|
90
|
-
|
|
91
|
-
Default.args = {
|
|
92
|
-
// Props
|
|
93
|
-
items: Array.from<string, TabsItem>([
|
|
94
|
-
'Alfa',
|
|
95
|
-
'Bravo',
|
|
96
|
-
'Charlie',
|
|
97
|
-
'Delta',
|
|
98
|
-
'Echo',
|
|
99
|
-
], (item) => ({
|
|
100
|
-
value: item.toLowerCase(),
|
|
101
|
-
label: item,
|
|
102
|
-
})),
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const OverflowMenu = Template.bind({});
|
|
106
|
-
|
|
107
|
-
OverflowMenu.args = {
|
|
108
|
-
// Props
|
|
109
|
-
items: Array.from<string, TabsItem>([
|
|
110
|
-
'Alfa',
|
|
111
|
-
'Bravo',
|
|
112
|
-
'Charlie',
|
|
113
|
-
'Delta',
|
|
114
|
-
'Echo',
|
|
115
|
-
'Foxtrot',
|
|
116
|
-
'Golf',
|
|
117
|
-
'Hotel',
|
|
118
|
-
'India',
|
|
119
|
-
'Juliett',
|
|
120
|
-
'Kilo',
|
|
121
|
-
'Lima',
|
|
122
|
-
'Mike',
|
|
123
|
-
'November',
|
|
124
|
-
'Oscar',
|
|
125
|
-
'Papa',
|
|
126
|
-
'Quebec',
|
|
127
|
-
'Romeo',
|
|
128
|
-
'Sierra',
|
|
129
|
-
'Tango',
|
|
130
|
-
'Uniform',
|
|
131
|
-
'Victor',
|
|
132
|
-
'Whiskey',
|
|
133
|
-
'X-Ray',
|
|
134
|
-
'Yankee',
|
|
135
|
-
'Zulu',
|
|
136
|
-
], (item) => ({
|
|
137
|
-
value: item.toLowerCase(),
|
|
138
|
-
label: item,
|
|
139
|
-
})),
|
|
140
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DocsPage } from '@storybook/addon-docs';
|
|
2
|
-
|
|
3
|
-
```ts
|
|
4
|
-
import { OrTagV3 as OrTag } from '@onereach/ui-components';
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
<DocsPage />
|
|
8
|
-
|
|
9
|
-
## Migration Guide from V1
|
|
10
|
-
- added property `variant`
|
|
11
|
-
- property `isDisabled` renamed to `disabled`
|
|
12
|
-
- removed properties `content` and `canDelete`
|
|
13
|
-
- event `delete` renamed to `reset`
|