@onereach/ui-components 2.62.7-beta.1932.0 → 2.62.7
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/v2/{OrInlineInput-f00cba5e.js → OrInlineInput-8455f9da.js} +4 -5
- package/dist/v2/{OrInlineTextarea-75de33d0.js → OrInlineTextarea-1127e512.js} +4 -5
- package/dist/v2/{OrTabs-f2a60b41.js → OrTabs-b4a9740b.js} +1 -1
- package/dist/v2/components/index.d.ts +0 -1
- package/dist/v2/index.js +3 -4
- package/dist/v2/index2.js +3 -4
- package/dist/v2/index34.js +1 -1
- package/dist/v2/index36.js +1 -1
- package/dist/v2/index63.js +16 -2
- package/dist/v2/index64.js +24 -15
- package/dist/v2/index65.js +4 -26
- package/dist/v2/index66.js +1 -2
- package/dist/v2/index67.js +4 -3
- package/dist/v2/index68.js +4 -3
- package/dist/v2/index69.js +10 -3
- package/dist/v2/index70.js +6 -3
- package/dist/v2/index71.js +2 -13
- package/dist/v2/index72.js +6 -4
- package/dist/v2/index73.js +4 -6
- package/dist/v2/index74.js +1 -2
- package/dist/v2/index75.js +3 -3
- package/dist/v2/index76.js +4 -3
- package/dist/v2/index77.js +15 -4
- package/dist/v2/index78.js +11 -14
- package/dist/v2/index79.js +13 -11
- package/dist/v2/index80.js +2 -14
- package/dist/v2/index81.js +2 -2
- package/dist/v2/index82.js +3 -2
- package/dist/v2/index83.js +6 -1
- package/dist/v2/index84.js +20 -7
- package/dist/v2/index85.js +9 -12
- package/dist/v2/index86.js +1 -18
- package/dist/v2/index87.js +18 -2
- package/dist/v2/index88.js +2 -18
- package/dist/v2/index89.js +10 -2
- package/dist/v2/index90.js +11 -9
- package/dist/v2/index91.js +1 -12
- package/dist/v2/index92.js +6 -1
- package/dist/v2/index93.js +1 -5
- package/dist/v3/{OrInlineInput-bac4abdd.js → OrInlineInput-a080b0a3.js} +2 -3
- package/dist/v3/{OrInlineTextarea-d1ec1bba.js → OrInlineTextarea-08767485.js} +2 -3
- package/dist/v3/{OrTabs-ac0be933.js → OrTabs-194ca950.js} +1 -1
- package/dist/v3/components/index.d.ts +0 -1
- package/dist/v3/index.js +3 -4
- package/dist/v3/index2.js +3 -4
- package/dist/v3/index34.js +1 -1
- package/dist/v3/index36.js +1 -1
- package/dist/v3/index63.js +15 -2
- package/dist/v3/index64.js +22 -13
- package/dist/v3/index65.js +3 -24
- package/dist/v3/index66.js +1 -2
- package/dist/v3/index67.js +4 -3
- package/dist/v3/index68.js +4 -3
- package/dist/v3/index69.js +9 -3
- package/dist/v3/index70.js +4 -3
- package/dist/v3/index71.js +2 -10
- package/dist/v3/index72.js +5 -3
- package/dist/v3/index73.js +3 -5
- package/dist/v3/index74.js +1 -2
- package/dist/v3/index75.js +3 -3
- package/dist/v3/index76.js +4 -3
- package/dist/v3/index77.js +14 -4
- package/dist/v3/index78.js +10 -13
- package/dist/v3/index79.js +12 -10
- package/dist/v3/index80.js +1 -13
- package/dist/v3/index81.js +1 -1
- package/dist/v3/index82.js +3 -1
- package/dist/v3/index83.js +6 -1
- package/dist/v3/index84.js +16 -6
- package/dist/v3/index85.js +9 -12
- package/dist/v3/index86.js +1 -15
- package/dist/v3/index87.js +17 -2
- package/dist/v3/index88.js +2 -17
- package/dist/v3/index89.js +8 -2
- package/dist/v3/index90.js +9 -6
- package/dist/v3/index91.js +1 -11
- package/dist/v3/index92.js +6 -1
- package/dist/v3/index93.js +1 -5
- package/package.json +4 -3
- package/src/components/index.ts +0 -1
- package/src/components/or-checkbox-v3/OrCheckbox.stories3.ts +1 -1
- package/src/components/or-inline-input-v3/OrInlineInput.vue +2 -2
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +2 -2
- package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
- package/src/components/or-switch-v3/OrSwitch.stories3.ts +1 -1
- package/src/components/or-tabs-v3/OrTabs.stories3.ts +4 -9
- package/src/components/or-tabs-v3/OrTabs.vue +1 -1
- package/src/hooks/useClassAttribute.ts +1 -1
- package/dist/v2/OrSegmentedControl-17df63b8.js +0 -236
- package/dist/v2/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +0 -12
- package/dist/v2/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +0 -77
- package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +0 -47
- package/dist/v2/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/index.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/props.d.ts +0 -4
- package/dist/v2/components/or-segmented-control-v3/styles.d.ts +0 -3
- package/dist/v2/components/or-segmented-control-v3/types.d.ts +0 -4
- package/dist/v2/index94.js +0 -3
- package/dist/v3/OrSegmentedControl-2bbc0f22.js +0 -184
- package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.stories3.d.ts +0 -12
- package/dist/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +0 -77
- package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +0 -47
- package/dist/v3/components/or-segmented-control-v3/components/or-segmented-control-item/styles.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/index.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/props.d.ts +0 -4
- package/dist/v3/components/or-segmented-control-v3/styles.d.ts +0 -3
- package/dist/v3/components/or-segmented-control-v3/types.d.ts +0 -4
- package/dist/v3/index94.js +0 -3
- package/src/components/or-segmented-control-v3/OrSegmentedControl.docs.mdx +0 -7
- package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +0 -106
- package/src/components/or-segmented-control-v3/OrSegmentedControl.vue +0 -107
- package/src/components/or-segmented-control-v3/components/or-segmented-control-item/OrSegmentedControlItem.vue +0 -64
- package/src/components/or-segmented-control-v3/components/or-segmented-control-item/styles.ts +0 -50
- package/src/components/or-segmented-control-v3/index.ts +0 -3
- package/src/components/or-segmented-control-v3/props.ts +0 -4
- package/src/components/or-segmented-control-v3/styles.ts +0 -24
- package/src/components/or-segmented-control-v3/types.ts +0 -4
package/dist/v3/index83.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
export { s as
|
|
1
|
+
export { s as OrTextareaV3 } from './OrTextarea-09aa33dc.js';
|
|
2
|
+
export { a as TextareaSize } from './OrInputBox-634230b1.js';
|
|
2
3
|
import 'vue-demi';
|
|
3
4
|
import './useClassAttribute-47fdb016.js';
|
|
4
5
|
import '@vueuse/core';
|
|
6
|
+
import './OrError-19a62a18.js';
|
|
5
7
|
import 'vue';
|
|
8
|
+
import './OrHint-73835593.js';
|
|
9
|
+
import './OrLabel-7d4fe80b.js';
|
|
10
|
+
import './style-inject.es-4c6f2515.js';
|
package/dist/v3/index84.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
export { s as
|
|
2
|
-
export { a as TextareaSize } from './OrInputBox-634230b1.js';
|
|
1
|
+
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-faa4f81a.js';
|
|
3
2
|
import 'vue-demi';
|
|
4
|
-
import './useClassAttribute-47fdb016.js';
|
|
5
3
|
import '@vueuse/core';
|
|
6
|
-
import './
|
|
4
|
+
import './useToggle-29e4d7c7.js';
|
|
5
|
+
import './px-to-rem-0b26b83e.js';
|
|
6
|
+
import './dom-7a41831b.js';
|
|
7
|
+
import 'lodash';
|
|
8
|
+
import './OrLabel-876f8729.js';
|
|
7
9
|
import 'vue';
|
|
8
|
-
import './OrHint-73835593.js';
|
|
9
|
-
import './OrLabel-7d4fe80b.js';
|
|
10
10
|
import './style-inject.es-4c6f2515.js';
|
|
11
|
+
import './OrIconButton-f72cb8d9.js';
|
|
12
|
+
import './OrIcon-e23028f8.js';
|
|
13
|
+
import './OrTooltip-121eae2b.js';
|
|
14
|
+
import './OrFloating-3da814a2.js';
|
|
15
|
+
import '@floating-ui/dom';
|
|
16
|
+
import './OrTeleportVue3-ad639f12.js';
|
|
17
|
+
import './OrLoader-15174477.js';
|
|
18
|
+
import './OrHint-1414c530.js';
|
|
19
|
+
import './OrError-f90296db.js';
|
|
20
|
+
import './OrCollapse-37a52e8f.js';
|
package/dist/v3/index85.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
export { s as
|
|
1
|
+
export { s as OrToast, a as OrToastContainer } from './OrToastContainer-fe6abe90.js';
|
|
2
|
+
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
3
|
+
import './OrIconButton-f72cb8d9.js';
|
|
2
4
|
import 'vue-demi';
|
|
3
|
-
import '
|
|
4
|
-
import './useToggle-29e4d7c7.js';
|
|
5
|
-
import './px-to-rem-0b26b83e.js';
|
|
6
|
-
import './dom-7a41831b.js';
|
|
5
|
+
import './OrIcon-e23028f8.js';
|
|
7
6
|
import 'lodash';
|
|
8
|
-
import './
|
|
7
|
+
import './OrTooltip-121eae2b.js';
|
|
9
8
|
import 'vue';
|
|
10
9
|
import './style-inject.es-4c6f2515.js';
|
|
11
|
-
import './OrIconButton-f72cb8d9.js';
|
|
12
|
-
import './OrIcon-e23028f8.js';
|
|
13
|
-
import './OrTooltip-121eae2b.js';
|
|
14
10
|
import './OrFloating-3da814a2.js';
|
|
15
11
|
import '@floating-ui/dom';
|
|
16
12
|
import './OrTeleportVue3-ad639f12.js';
|
|
13
|
+
import './dom-7a41831b.js';
|
|
14
|
+
import './px-to-rem-0b26b83e.js';
|
|
17
15
|
import './OrLoader-15174477.js';
|
|
18
|
-
import './
|
|
19
|
-
import '
|
|
20
|
-
import './OrCollapse-37a52e8f.js';
|
|
16
|
+
import './OrProgress-d0d52c86.js';
|
|
17
|
+
import '@vueuse/core';
|
package/dist/v3/index86.js
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
3
|
-
import './OrIconButton-f72cb8d9.js';
|
|
1
|
+
export { a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
4
2
|
import 'vue-demi';
|
|
5
|
-
import './OrIcon-e23028f8.js';
|
|
6
|
-
import 'lodash';
|
|
7
|
-
import './OrTooltip-121eae2b.js';
|
|
8
|
-
import 'vue';
|
|
9
|
-
import './style-inject.es-4c6f2515.js';
|
|
10
|
-
import './OrFloating-3da814a2.js';
|
|
11
|
-
import '@floating-ui/dom';
|
|
12
|
-
import './OrTeleportVue3-ad639f12.js';
|
|
13
|
-
import './dom-7a41831b.js';
|
|
14
|
-
import './px-to-rem-0b26b83e.js';
|
|
15
|
-
import './OrLoader-15174477.js';
|
|
16
|
-
import './OrProgress-d0d52c86.js';
|
|
17
3
|
import '@vueuse/core';
|
package/dist/v3/index87.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
export { a as
|
|
2
|
-
|
|
1
|
+
export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-d5d4ab32.js';
|
|
2
|
+
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
|
+
import 'vue-demi';
|
|
5
|
+
import './OrTeleport.vue3-8099178c.js';
|
|
6
|
+
import 'vue';
|
|
7
|
+
import './OrIconButton-5fb3a9aa.js';
|
|
8
|
+
import './useClassAttribute-47fdb016.js';
|
|
9
|
+
import './OrIcon-b3906e35.js';
|
|
10
|
+
import './OrTooltip-36c6728c.js';
|
|
11
|
+
import './OrPopover-3525c670.js';
|
|
12
|
+
import '@floating-ui/dom';
|
|
13
|
+
import './useElevation-0e973238.js';
|
|
14
|
+
import './useResponsive-a02e95b7.js';
|
|
15
|
+
import './OrBottomSheet-9de57dd0.js';
|
|
16
|
+
import './OrOverlay-27050c19.js';
|
|
17
|
+
import './OrLoader-60943812.js';
|
|
18
|
+
import './style-inject.es-4c6f2515.js';
|
package/dist/v3/index88.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
export { a as
|
|
2
|
-
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
|
|
3
|
-
import '@vueuse/core';
|
|
1
|
+
export { a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
|
|
4
2
|
import 'vue-demi';
|
|
5
|
-
import '
|
|
6
|
-
import 'vue';
|
|
7
|
-
import './OrIconButton-5fb3a9aa.js';
|
|
8
|
-
import './useClassAttribute-47fdb016.js';
|
|
9
|
-
import './OrIcon-b3906e35.js';
|
|
10
|
-
import './OrTooltip-36c6728c.js';
|
|
11
|
-
import './OrPopover-3525c670.js';
|
|
12
|
-
import '@floating-ui/dom';
|
|
13
|
-
import './useElevation-0e973238.js';
|
|
14
|
-
import './useResponsive-a02e95b7.js';
|
|
15
|
-
import './OrBottomSheet-9de57dd0.js';
|
|
16
|
-
import './OrOverlay-27050c19.js';
|
|
17
|
-
import './OrLoader-60943812.js';
|
|
18
|
-
import './style-inject.es-4c6f2515.js';
|
|
3
|
+
import '@vueuse/core';
|
package/dist/v3/index89.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-121eae2b.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
|
-
import '
|
|
3
|
+
import 'lodash';
|
|
4
|
+
import 'vue';
|
|
5
|
+
import './style-inject.es-4c6f2515.js';
|
|
6
|
+
import './OrFloating-3da814a2.js';
|
|
7
|
+
import '@floating-ui/dom';
|
|
8
|
+
import './OrTeleportVue3-ad639f12.js';
|
|
9
|
+
import './dom-7a41831b.js';
|
package/dist/v3/index90.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export { s as
|
|
1
|
+
export { s as OrTooltipV3 } from './OrTooltip-36c6728c.js';
|
|
2
|
+
export { P as TooltipPlacement } from './OrPopover-3525c670.js';
|
|
3
|
+
import '@vueuse/core';
|
|
2
4
|
import 'vue-demi';
|
|
3
|
-
import '
|
|
5
|
+
import './useClassAttribute-47fdb016.js';
|
|
4
6
|
import 'vue';
|
|
5
|
-
import './style-inject.es-4c6f2515.js';
|
|
6
|
-
import './OrFloating-3da814a2.js';
|
|
7
7
|
import '@floating-ui/dom';
|
|
8
|
-
import './
|
|
9
|
-
import './
|
|
8
|
+
import './useElevation-0e973238.js';
|
|
9
|
+
import './useResponsive-a02e95b7.js';
|
|
10
|
+
import './OrBottomSheet-9de57dd0.js';
|
|
11
|
+
import './OrOverlay-27050c19.js';
|
|
12
|
+
import './OrTeleport.vue3-8099178c.js';
|
package/dist/v3/index91.js
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { P as TooltipPlacement } from './OrPopover-3525c670.js';
|
|
3
|
-
import '@vueuse/core';
|
|
1
|
+
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
4
2
|
import 'vue-demi';
|
|
5
|
-
import './useClassAttribute-47fdb016.js';
|
|
6
|
-
import 'vue';
|
|
7
|
-
import '@floating-ui/dom';
|
|
8
|
-
import './useElevation-0e973238.js';
|
|
9
|
-
import './useResponsive-a02e95b7.js';
|
|
10
|
-
import './OrBottomSheet-9de57dd0.js';
|
|
11
|
-
import './OrOverlay-27050c19.js';
|
|
12
|
-
import './OrTeleport.vue3-8099178c.js';
|
package/dist/v3/index92.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
2
|
+
export { u as useElevation } from './useElevation-0e973238.js';
|
|
3
|
+
export { u as useOverflow } from './useOverflow-ac506c65.js';
|
|
4
|
+
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
5
|
+
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
2
6
|
import 'vue-demi';
|
|
7
|
+
import '@vueuse/core';
|
package/dist/v3/index93.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
2
|
-
export { u as useElevation } from './useElevation-0e973238.js';
|
|
3
|
-
export { u as useOverflow } from './useOverflow-ac506c65.js';
|
|
4
1
|
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
5
|
-
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
6
|
-
import 'vue-demi';
|
|
7
2
|
import '@vueuse/core';
|
|
3
|
+
import 'vue-demi';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.62.7
|
|
3
|
+
"version": "2.62.7",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@codemirror/lang-json": "6.0.0",
|
|
30
30
|
"@codemirror/lang-markdown": "6.0.1",
|
|
31
31
|
"@floating-ui/dom": "0.3.1",
|
|
32
|
-
"@onereach/styles": "^2.
|
|
32
|
+
"@onereach/styles": "^2.31.0",
|
|
33
33
|
"@splidejs/splide": "4.0.6",
|
|
34
34
|
"@types/lodash": "4.14.173",
|
|
35
35
|
"@types/sortablejs": "1.10.7",
|
|
@@ -78,5 +78,6 @@
|
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
"gitHead": "68786c7ab00263953414278989c2661a57789053"
|
|
82
83
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -58,7 +58,6 @@ export * from './or-radio';
|
|
|
58
58
|
export * from './or-radio-group';
|
|
59
59
|
export * from './or-radio-v3';
|
|
60
60
|
export * from './or-search-v3';
|
|
61
|
-
export * from './or-segmented-control-v3';
|
|
62
61
|
export * from './or-select';
|
|
63
62
|
export * from './or-select-v3';
|
|
64
63
|
export * from './or-sidebar';
|
|
@@ -217,7 +217,7 @@ export default defineComponent({
|
|
|
217
217
|
|
|
218
218
|
function reset(): void {
|
|
219
219
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
220
|
-
draftModelValue.value = proxyModelValue.value
|
|
220
|
+
draftModelValue.value = proxyModelValue.value;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
activated.value = false;
|
|
@@ -225,7 +225,7 @@ export default defineComponent({
|
|
|
225
225
|
|
|
226
226
|
// Effects
|
|
227
227
|
watch(proxyModelValue, (value) => {
|
|
228
|
-
draftModelValue.value = value
|
|
228
|
+
draftModelValue.value = value;
|
|
229
229
|
}, { immediate: true });
|
|
230
230
|
|
|
231
231
|
return {
|
|
@@ -205,7 +205,7 @@ export default defineComponent({
|
|
|
205
205
|
|
|
206
206
|
function reset(): void {
|
|
207
207
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
208
|
-
draftModelValue.value = proxyModelValue.value
|
|
208
|
+
draftModelValue.value = proxyModelValue.value;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
activated.value = false;
|
|
@@ -213,7 +213,7 @@ export default defineComponent({
|
|
|
213
213
|
|
|
214
214
|
// Effects
|
|
215
215
|
watch(proxyModelValue, (value) => {
|
|
216
|
-
draftModelValue.value = value
|
|
216
|
+
draftModelValue.value = value;
|
|
217
217
|
}, { immediate: true });
|
|
218
218
|
|
|
219
219
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
-
import { ref
|
|
3
|
+
import { ref } from 'vue-demi';
|
|
4
4
|
import OrTabsDocs from './OrTabs.docs.mdx';
|
|
5
5
|
import OrTabs from './OrTabs.vue';
|
|
6
6
|
import { TabsVariant } from './props';
|
|
@@ -63,16 +63,11 @@ const Template: StoryFn<typeof OrTabs> = (args) => ({
|
|
|
63
63
|
|
|
64
64
|
setup() {
|
|
65
65
|
// State
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
// Effects
|
|
69
|
-
watch(model, (value) => {
|
|
70
|
-
console.debug(value);
|
|
71
|
-
});
|
|
66
|
+
const value = ref<string>();
|
|
72
67
|
|
|
73
68
|
return {
|
|
74
69
|
args,
|
|
75
|
-
|
|
70
|
+
value,
|
|
76
71
|
onUpdateModelValue: action('update:modelValue'),
|
|
77
72
|
onInput: action('input'),
|
|
78
73
|
};
|
|
@@ -80,7 +75,7 @@ const Template: StoryFn<typeof OrTabs> = (args) => ({
|
|
|
80
75
|
|
|
81
76
|
template: `
|
|
82
77
|
<OrTabs
|
|
83
|
-
v-model="
|
|
78
|
+
v-model="value"
|
|
84
79
|
v-bind="args"
|
|
85
80
|
@update:modelValue="onUpdateModelValue"
|
|
86
81
|
@input="onInput"
|
|
@@ -8,7 +8,7 @@ export function useClassAttribute(): UseClassAttributeReturn {
|
|
|
8
8
|
|
|
9
9
|
// Functions
|
|
10
10
|
function composeClass(): UnwrapRef<UseClassAttributeReturn> {
|
|
11
|
-
const { staticClass = '', class: classProperty } = (currentInstance?.vnode as
|
|
11
|
+
const { staticClass = '', class: classProperty } = (currentInstance?.vnode as VNode).data ?? {};
|
|
12
12
|
|
|
13
13
|
if (!classProperty) {
|
|
14
14
|
return staticClass || undefined;
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
2
|
-
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
|
-
import '@vueuse/core';
|
|
4
|
-
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
5
|
-
|
|
6
|
-
const SegmentedControlItemRoot = [
|
|
7
|
-
// Layout
|
|
8
|
-
'flex', 'items-center', 'justify-center',
|
|
9
|
-
// Shape
|
|
10
|
-
'rounded-md',
|
|
11
|
-
// Interactivity
|
|
12
|
-
'interactivity-auto',
|
|
13
|
-
// Theme
|
|
14
|
-
'theme-foreground-default', 'dark:theme-foreground-default-dark',
|
|
15
|
-
// Theme (selected)
|
|
16
|
-
'selected:theme-background-default', 'dark:selected:theme-background-default-dark',
|
|
17
|
-
// Theme (selected, enabled)
|
|
18
|
-
'selected:enabled:shadow-card', 'dark:selected:enabled:shadow-card-dark'];
|
|
19
|
-
const SegmentedControlItemRootSizes = {
|
|
20
|
-
'm': [
|
|
21
|
-
// Box
|
|
22
|
-
'h-[44px] md:h-[36px]',
|
|
23
|
-
// Spacing
|
|
24
|
-
'px-sm+ md:px-sm+',
|
|
25
|
-
// Typography
|
|
26
|
-
'typography-body-2-regular'],
|
|
27
|
-
's': [
|
|
28
|
-
// Box
|
|
29
|
-
'h-[36px] md:h-[32px]',
|
|
30
|
-
// Spacing
|
|
31
|
-
'px-sm+ md:px-sm',
|
|
32
|
-
// Typography
|
|
33
|
-
'typography-caption-regular']
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var script$1 = defineComponent({
|
|
37
|
-
name: 'OrSegmentedControlItem',
|
|
38
|
-
inheritAttrs: false,
|
|
39
|
-
props: {
|
|
40
|
-
size: {
|
|
41
|
-
type: String,
|
|
42
|
-
required: true
|
|
43
|
-
},
|
|
44
|
-
selected: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false
|
|
47
|
-
},
|
|
48
|
-
disabled: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
setup(props) {
|
|
54
|
-
// Refs
|
|
55
|
-
const root = ref();
|
|
56
|
-
// Styles
|
|
57
|
-
const classAttribute = useClassAttribute();
|
|
58
|
-
const rootStyles = computed(() => ['or-segmented-control-item', ...SegmentedControlItemRoot, ...SegmentedControlItemRootSizes[props.size], classAttribute.value]);
|
|
59
|
-
return {
|
|
60
|
-
root,
|
|
61
|
-
rootStyles
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
/* script */
|
|
67
|
-
const __vue_script__$1 = script$1;
|
|
68
|
-
|
|
69
|
-
/* template */
|
|
70
|
-
var __vue_render__$1 = function () {
|
|
71
|
-
var _vm = this;
|
|
72
|
-
var _h = _vm.$createElement;
|
|
73
|
-
var _c = _vm._self._c || _h;
|
|
74
|
-
return _c('div', _vm._b({
|
|
75
|
-
ref: "root",
|
|
76
|
-
class: _vm.rootStyles,
|
|
77
|
-
attrs: {
|
|
78
|
-
"selected": _vm.selected ? '' : null,
|
|
79
|
-
"disabled": _vm.disabled ? '' : null
|
|
80
|
-
},
|
|
81
|
-
on: {
|
|
82
|
-
"click": function ($event) {
|
|
83
|
-
return _vm.$emit('click', $event);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}, 'div', _vm.$attrs, false), [_c('div', {
|
|
87
|
-
class: ['truncate']
|
|
88
|
-
}, [_vm._t("default")], 2)]);
|
|
89
|
-
};
|
|
90
|
-
var __vue_staticRenderFns__$1 = [];
|
|
91
|
-
|
|
92
|
-
/* style */
|
|
93
|
-
const __vue_inject_styles__$1 = undefined;
|
|
94
|
-
/* scoped */
|
|
95
|
-
const __vue_scope_id__$1 = undefined;
|
|
96
|
-
/* module identifier */
|
|
97
|
-
const __vue_module_identifier__$1 = undefined;
|
|
98
|
-
/* functional template */
|
|
99
|
-
const __vue_is_functional_template__$1 = false;
|
|
100
|
-
/* style inject */
|
|
101
|
-
|
|
102
|
-
/* style inject SSR */
|
|
103
|
-
|
|
104
|
-
/* style inject shadow dom */
|
|
105
|
-
|
|
106
|
-
const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
|
|
107
|
-
render: __vue_render__$1,
|
|
108
|
-
staticRenderFns: __vue_staticRenderFns__$1
|
|
109
|
-
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
|
|
110
|
-
|
|
111
|
-
var SegmentedControlSize;
|
|
112
|
-
(function (SegmentedControlSize) {
|
|
113
|
-
SegmentedControlSize["M"] = "m";
|
|
114
|
-
SegmentedControlSize["S"] = "s";
|
|
115
|
-
})(SegmentedControlSize || (SegmentedControlSize = {}));
|
|
116
|
-
|
|
117
|
-
const SegmentedControlRoot = [
|
|
118
|
-
// Layout
|
|
119
|
-
'grid', 'grid-flow-col', 'auto-cols-fr',
|
|
120
|
-
// Shape
|
|
121
|
-
'rounded-md',
|
|
122
|
-
// Spacing
|
|
123
|
-
'px-[2px]', 'py-[2px]',
|
|
124
|
-
// Theme
|
|
125
|
-
'theme-background-surface-variant', 'dark:theme-background-surface-variant-dark'];
|
|
126
|
-
const SegmentedControlRootSizes = {
|
|
127
|
-
'm': [],
|
|
128
|
-
's': []
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
var script = defineComponent({
|
|
132
|
-
name: 'OrSegmentedControl',
|
|
133
|
-
components: {
|
|
134
|
-
OrSegmentedControlItem: __vue_component__$1
|
|
135
|
-
},
|
|
136
|
-
inheritAttrs: false,
|
|
137
|
-
props: {
|
|
138
|
-
options: {
|
|
139
|
-
type: Array,
|
|
140
|
-
default: []
|
|
141
|
-
},
|
|
142
|
-
modelValue: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: undefined
|
|
145
|
-
},
|
|
146
|
-
value: {
|
|
147
|
-
type: String,
|
|
148
|
-
default: undefined
|
|
149
|
-
},
|
|
150
|
-
size: {
|
|
151
|
-
type: String,
|
|
152
|
-
default: SegmentedControlSize.M
|
|
153
|
-
},
|
|
154
|
-
disabled: {
|
|
155
|
-
type: Boolean,
|
|
156
|
-
default: false
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
emits: ['update:modelValue', 'input'],
|
|
160
|
-
expose: ['root'],
|
|
161
|
-
setup(props, context) {
|
|
162
|
-
// Refs
|
|
163
|
-
const root = ref();
|
|
164
|
-
// Styles
|
|
165
|
-
const classAttribute = useClassAttribute();
|
|
166
|
-
const rootStyles = computed(() => ['or-segmented-control', ...SegmentedControlRoot, ...SegmentedControlRootSizes[props.size], classAttribute.value]);
|
|
167
|
-
// State
|
|
168
|
-
const proxyModelValue = computed({
|
|
169
|
-
get: () => {
|
|
170
|
-
var _a;
|
|
171
|
-
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
set: value => {
|
|
175
|
-
context.emit('input', value);
|
|
176
|
-
context.emit('update:modelValue', value);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
return {
|
|
180
|
-
root,
|
|
181
|
-
rootStyles,
|
|
182
|
-
proxyModelValue
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
/* script */
|
|
188
|
-
const __vue_script__ = script;
|
|
189
|
-
|
|
190
|
-
/* template */
|
|
191
|
-
var __vue_render__ = function () {
|
|
192
|
-
var _vm = this;
|
|
193
|
-
var _h = _vm.$createElement;
|
|
194
|
-
var _c = _vm._self._c || _h;
|
|
195
|
-
return _c('div', _vm._b({
|
|
196
|
-
ref: "root",
|
|
197
|
-
class: _vm.rootStyles
|
|
198
|
-
}, 'div', _vm.$attrs, false), _vm._l(_vm.options, function (option) {
|
|
199
|
-
return _c('OrSegmentedControlItem', {
|
|
200
|
-
key: option.value,
|
|
201
|
-
attrs: {
|
|
202
|
-
"size": _vm.size,
|
|
203
|
-
"selected": option.value === _vm.proxyModelValue,
|
|
204
|
-
"disabled": _vm.disabled
|
|
205
|
-
},
|
|
206
|
-
on: {
|
|
207
|
-
"click": function ($event) {
|
|
208
|
-
$event.stopPropagation();
|
|
209
|
-
_vm.proxyModelValue = option.value;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}, [_vm._v("\n " + _vm._s(option.label) + "\n ")]);
|
|
213
|
-
}), 1);
|
|
214
|
-
};
|
|
215
|
-
var __vue_staticRenderFns__ = [];
|
|
216
|
-
|
|
217
|
-
/* style */
|
|
218
|
-
const __vue_inject_styles__ = undefined;
|
|
219
|
-
/* scoped */
|
|
220
|
-
const __vue_scope_id__ = undefined;
|
|
221
|
-
/* module identifier */
|
|
222
|
-
const __vue_module_identifier__ = undefined;
|
|
223
|
-
/* functional template */
|
|
224
|
-
const __vue_is_functional_template__ = false;
|
|
225
|
-
/* style inject */
|
|
226
|
-
|
|
227
|
-
/* style inject SSR */
|
|
228
|
-
|
|
229
|
-
/* style inject shadow dom */
|
|
230
|
-
|
|
231
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
232
|
-
render: __vue_render__,
|
|
233
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
234
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
235
|
-
|
|
236
|
-
export { SegmentedControlSize as S, __vue_component__ as _ };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
3
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
4
|
-
} | string[], {} & {}, {
|
|
5
|
-
[x: number]: string;
|
|
6
|
-
} | {}, true>)>;
|
|
7
|
-
export default _default;
|
|
8
|
-
export declare const Base: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
10
|
-
} | string[], {} & {}, {
|
|
11
|
-
[x: number]: string;
|
|
12
|
-
} | {}, true>)>;
|