@onereach/ui-components 4.7.5 → 4.7.6
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/OrExpansionPanelV3/OrExpansionPanel.js +33 -25
- package/dist/bundled/v2/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +15 -28
- package/dist/bundled/v2/components/OrExpansionPanelV3/index.js +1 -3
- package/dist/bundled/v2/components/OrExpansionPanelV3/props.d.ts +0 -5
- package/dist/bundled/v2/components/OrExpansionPanelV3/props.js +1 -7
- package/dist/bundled/v2/components/OrExpansionPanelV3/styles.d.ts +3 -4
- package/dist/bundled/v2/components/OrExpansionPanelV3/styles.js +5 -17
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -1
- package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/index.js +2 -2
- package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-ca9d5307.js → OrExpansionPanel.vue_vue_type_script_lang-d4ed6199.js} +29 -20
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-85fcf3fa.js → OrSelect.vue_vue_type_script_lang-ba73f458.js} +1 -1
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +5 -7
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +11 -22
- package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +2 -4
- package/dist/bundled/v3/components/OrExpansionPanelV3/props.d.ts +0 -5
- package/dist/bundled/v3/components/OrExpansionPanelV3/props.js +1 -7
- package/dist/bundled/v3/components/OrExpansionPanelV3/styles.d.ts +3 -4
- package/dist/bundled/v3/components/OrExpansionPanelV3/styles.js +5 -17
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/index.js +3 -3
- package/dist/bundled/v3/components/index.js +3 -3
- package/dist/bundled/v3/index.js +4 -4
- package/dist/esm/v2/{OrExpansionPanel-b8411db6.js → OrExpansionPanel-d3a2218d.js} +36 -48
- package/dist/esm/v2/{OrSelect-7f2d3a94.js → OrSelect-1132c7dc.js} +1 -1
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +15 -28
- package/dist/esm/v2/components/or-expansion-panel-v3/index.js +1 -5
- package/dist/esm/v2/components/or-expansion-panel-v3/props.d.ts +0 -5
- package/dist/esm/v2/components/or-expansion-panel-v3/styles.d.ts +3 -4
- package/dist/esm/v2/components/or-select-v3/index.js +3 -3
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrExpansionPanel-df527763.js → OrExpansionPanel-c016d8fa.js} +35 -47
- package/dist/esm/v3/{OrSelect-c931ed6e.js → OrSelect-9432ac4d.js} +1 -1
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +11 -22
- package/dist/esm/v3/components/or-expansion-panel-v3/index.js +1 -5
- package/dist/esm/v3/components/or-expansion-panel-v3/props.d.ts +0 -5
- package/dist/esm/v3/components/or-expansion-panel-v3/styles.d.ts +3 -4
- package/dist/esm/v3/components/or-select-v3/index.js +3 -3
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -2
- package/src/components/or-expansion-panel-v3/OrExpansionPanel.vue +35 -28
- package/src/components/or-expansion-panel-v3/props.ts +0 -6
- package/src/components/or-expansion-panel-v3/styles.ts +3 -25
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
2
|
-
import { ExpansionPanelVariant, ExpansionPanelColor
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
|
+
import { ExpansionPanelVariant, ExpansionPanelColor } from './props.js';
|
|
3
|
+
import { ExpansionPanelRoot, ExpansionPanelRootVariants, ExpansionPanelHeader, ExpansionPanelHeaderColors, ExpansionPanelAddon } from './styles.js';
|
|
4
4
|
import __vue_component__$1 from '../OrIconV3/OrIcon.js';
|
|
5
|
-
import { usePopoverState } from '../../hooks/usePopoverState.js';
|
|
6
5
|
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
7
6
|
import '../OrIconV3/props.js';
|
|
8
7
|
import '../OrIconV3/styles.js';
|
|
9
|
-
import '../../index-ec92055d.js';
|
|
10
8
|
|
|
11
9
|
var script = defineComponent({
|
|
12
10
|
name: 'OrExpansionPanel',
|
|
@@ -30,40 +28,50 @@ var script = defineComponent({
|
|
|
30
28
|
type: String,
|
|
31
29
|
default: ExpansionPanelColor.Default
|
|
32
30
|
},
|
|
33
|
-
backgroundColor: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: ExpansionPanelBackgroundColor.Primary
|
|
36
|
-
},
|
|
37
31
|
disabled: {
|
|
38
32
|
type: Boolean,
|
|
39
33
|
default: false
|
|
40
34
|
}
|
|
41
35
|
},
|
|
42
|
-
emits: ['
|
|
43
|
-
expose: ['root', '
|
|
36
|
+
emits: ['open', 'close'],
|
|
37
|
+
expose: ['root', 'open', 'close'],
|
|
44
38
|
setup(props, context) {
|
|
45
39
|
// Refs
|
|
46
40
|
const root = ref();
|
|
47
41
|
// Styles
|
|
48
|
-
const rootStyles = computed(() => ['or-expansion-panel-v3', ...
|
|
42
|
+
const rootStyles = computed(() => ['or-expansion-panel-v3', ...ExpansionPanelRoot, ...ExpansionPanelRootVariants[props.variant]]);
|
|
49
43
|
const headerStyles = computed(() => [...ExpansionPanelHeader, ...ExpansionPanelHeaderColors[props.color]]);
|
|
50
44
|
const addonStyles = computed(() => [...ExpansionPanelAddon]);
|
|
51
45
|
// State
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
close
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
const expanded = ref(false);
|
|
47
|
+
// Events
|
|
48
|
+
watch(expanded, value => {
|
|
49
|
+
context.emit(value ? 'open' : 'close');
|
|
50
|
+
});
|
|
51
|
+
watch(() => props.isOpen, newIsOpen => {
|
|
52
|
+
if (newIsOpen) {
|
|
53
|
+
open();
|
|
54
|
+
} else {
|
|
55
|
+
close();
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
immediate: true
|
|
59
|
+
});
|
|
60
|
+
// Methods
|
|
61
|
+
function open() {
|
|
62
|
+
expanded.value = true;
|
|
63
|
+
}
|
|
64
|
+
function close() {
|
|
65
|
+
expanded.value = false;
|
|
66
|
+
}
|
|
58
67
|
return {
|
|
59
68
|
root,
|
|
60
69
|
rootStyles,
|
|
61
70
|
headerStyles,
|
|
62
71
|
addonStyles,
|
|
63
|
-
|
|
72
|
+
expanded,
|
|
64
73
|
open,
|
|
65
|
-
close
|
|
66
|
-
toggle
|
|
74
|
+
close
|
|
67
75
|
};
|
|
68
76
|
}
|
|
69
77
|
});
|
|
@@ -93,11 +101,11 @@ var __vue_render__ = function () {
|
|
|
93
101
|
on: {
|
|
94
102
|
"click": function ($event) {
|
|
95
103
|
$event.stopPropagation();
|
|
96
|
-
|
|
104
|
+
_vm.expanded ? _vm.close() : _vm.open();
|
|
97
105
|
}
|
|
98
106
|
}
|
|
99
107
|
}, [_c('OrIcon', {
|
|
100
|
-
class: [_vm.
|
|
108
|
+
class: [_vm.expanded ? 'rotate-0' : 'rotate-[-90deg]'],
|
|
101
109
|
attrs: {
|
|
102
110
|
"icon": 'expand_more',
|
|
103
111
|
"variant": 'filled-bold'
|
|
@@ -110,8 +118,8 @@ var __vue_render__ = function () {
|
|
|
110
118
|
directives: [{
|
|
111
119
|
name: "show",
|
|
112
120
|
rawName: "v-show",
|
|
113
|
-
value: _vm.
|
|
114
|
-
expression: "
|
|
121
|
+
value: _vm.expanded,
|
|
122
|
+
expression: "expanded"
|
|
115
123
|
}]
|
|
116
124
|
}, [_vm._t("default")], 2)]);
|
|
117
125
|
};
|
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import {
|
|
2
|
+
import { ExpansionPanelColor, ExpansionPanelVariant } from './props';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
6
|
headerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
7
7
|
addonStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
8
|
-
|
|
8
|
+
expanded: import("@vue/composition-api").Ref<boolean>;
|
|
9
9
|
open: () => void;
|
|
10
10
|
close: () => void;
|
|
11
|
-
toggle: () => void;
|
|
12
11
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
13
12
|
label: {
|
|
14
13
|
type: StringConstructor;
|
|
15
14
|
required: true;
|
|
16
15
|
};
|
|
17
16
|
isOpen: {
|
|
18
|
-
type:
|
|
17
|
+
type: PropType<boolean>;
|
|
19
18
|
default: boolean;
|
|
20
19
|
};
|
|
21
20
|
variant: {
|
|
22
|
-
type: PropType<
|
|
21
|
+
type: PropType<ExpansionPanelVariant>;
|
|
23
22
|
default: ExpansionPanelVariant;
|
|
24
23
|
};
|
|
25
24
|
color: {
|
|
26
|
-
type: PropType<
|
|
25
|
+
type: PropType<ExpansionPanelColor>;
|
|
27
26
|
default: ExpansionPanelColor;
|
|
28
27
|
};
|
|
29
|
-
backgroundColor: {
|
|
30
|
-
type: PropType<"primary" | "secondary" | "inherit">;
|
|
31
|
-
default: ExpansionPanelBackgroundColor;
|
|
32
|
-
};
|
|
33
28
|
disabled: {
|
|
34
29
|
type: BooleanConstructor;
|
|
35
30
|
default: boolean;
|
|
@@ -40,21 +35,17 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
40
35
|
required: true;
|
|
41
36
|
};
|
|
42
37
|
isOpen: {
|
|
43
|
-
type:
|
|
38
|
+
type: PropType<boolean>;
|
|
44
39
|
default: boolean;
|
|
45
40
|
};
|
|
46
41
|
variant: {
|
|
47
|
-
type: PropType<
|
|
42
|
+
type: PropType<ExpansionPanelVariant>;
|
|
48
43
|
default: ExpansionPanelVariant;
|
|
49
44
|
};
|
|
50
45
|
color: {
|
|
51
|
-
type: PropType<
|
|
46
|
+
type: PropType<ExpansionPanelColor>;
|
|
52
47
|
default: ExpansionPanelColor;
|
|
53
48
|
};
|
|
54
|
-
backgroundColor: {
|
|
55
|
-
type: PropType<"primary" | "secondary" | "inherit">;
|
|
56
|
-
default: ExpansionPanelBackgroundColor;
|
|
57
|
-
};
|
|
58
49
|
disabled: {
|
|
59
50
|
type: BooleanConstructor;
|
|
60
51
|
default: boolean;
|
|
@@ -62,9 +53,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
62
53
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
63
54
|
label: string;
|
|
64
55
|
isOpen: boolean;
|
|
65
|
-
variant:
|
|
66
|
-
color:
|
|
67
|
-
backgroundColor: "primary" | "secondary" | "inherit";
|
|
56
|
+
variant: ExpansionPanelVariant;
|
|
57
|
+
color: ExpansionPanelColor;
|
|
68
58
|
disabled: boolean;
|
|
69
59
|
} & {} & {
|
|
70
60
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -73,24 +63,21 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
73
63
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
64
|
headerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
75
65
|
addonStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
76
|
-
|
|
66
|
+
expanded: import("@vue/composition-api").Ref<boolean>;
|
|
77
67
|
open: () => void;
|
|
78
68
|
close: () => void;
|
|
79
|
-
toggle: () => void;
|
|
80
69
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
81
70
|
label: string;
|
|
82
71
|
isOpen: boolean;
|
|
83
|
-
variant:
|
|
84
|
-
color:
|
|
85
|
-
backgroundColor: "primary" | "secondary" | "inherit";
|
|
72
|
+
variant: ExpansionPanelVariant;
|
|
73
|
+
color: ExpansionPanelColor;
|
|
86
74
|
disabled: boolean;
|
|
87
75
|
} & {} & {
|
|
88
76
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
89
77
|
}, {
|
|
90
78
|
isOpen: boolean;
|
|
91
|
-
variant:
|
|
92
|
-
color:
|
|
93
|
-
backgroundColor: "primary" | "secondary" | "inherit";
|
|
79
|
+
variant: ExpansionPanelVariant;
|
|
80
|
+
color: ExpansionPanelColor;
|
|
94
81
|
disabled: boolean;
|
|
95
82
|
}, true>);
|
|
96
83
|
export default _default;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export { default as OrExpansionPanelV3 } from './OrExpansionPanel.js';
|
|
2
|
-
export {
|
|
2
|
+
export { ExpansionPanelColor, ExpansionPanelVariant } from './props.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './styles.js';
|
|
5
5
|
import '../OrIconV3/OrIcon.js';
|
|
6
6
|
import '../OrIconV3/props.js';
|
|
7
7
|
import '../OrIconV3/styles.js';
|
|
8
8
|
import '../../normalize-component-6e8e3d80.js';
|
|
9
|
-
import '../../hooks/usePopoverState.js';
|
|
10
|
-
import '../../index-ec92055d.js';
|
|
@@ -8,11 +8,5 @@ var ExpansionPanelColor;
|
|
|
8
8
|
ExpansionPanelColor["Default"] = "default";
|
|
9
9
|
ExpansionPanelColor["Danger"] = "danger";
|
|
10
10
|
})(ExpansionPanelColor || (ExpansionPanelColor = {}));
|
|
11
|
-
var ExpansionPanelBackgroundColor;
|
|
12
|
-
(function (ExpansionPanelBackgroundColor) {
|
|
13
|
-
ExpansionPanelBackgroundColor["Primary"] = "primary";
|
|
14
|
-
ExpansionPanelBackgroundColor["Secondary"] = "secondary";
|
|
15
|
-
ExpansionPanelBackgroundColor["Inherit"] = "inherit";
|
|
16
|
-
})(ExpansionPanelBackgroundColor || (ExpansionPanelBackgroundColor = {}));
|
|
17
11
|
|
|
18
|
-
export {
|
|
12
|
+
export { ExpansionPanelColor, ExpansionPanelVariant };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const ExpansionPanelBackgroundColors: Record<`${ExpansionPanelBackgroundColor}-${ExpansionPanelVariant}`, string[]>;
|
|
1
|
+
import { ExpansionPanelColor, ExpansionPanelVariant } from './props';
|
|
2
|
+
export declare const ExpansionPanelRoot: string[];
|
|
3
|
+
export declare const ExpansionPanelRootVariants: Record<ExpansionPanelVariant, string[]>;
|
|
5
4
|
export declare const ExpansionPanelHeader: string[];
|
|
6
5
|
export declare const ExpansionPanelHeaderColors: Record<ExpansionPanelColor, string[]>;
|
|
7
6
|
export declare const ExpansionPanelAddon: string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ExpansionPanelRoot = [
|
|
2
2
|
// Layout
|
|
3
3
|
'layout-column'];
|
|
4
|
-
const
|
|
4
|
+
const ExpansionPanelRootVariants = {
|
|
5
5
|
'default': [
|
|
6
6
|
// Spacing
|
|
7
7
|
'gap-sm'],
|
|
@@ -9,21 +9,9 @@ const ExpansionPanelVariants = {
|
|
|
9
9
|
// Shape
|
|
10
10
|
'rounded-md',
|
|
11
11
|
// Spacing
|
|
12
|
-
'px-md', 'py-md', 'gap-md'
|
|
13
|
-
};
|
|
14
|
-
const ExpansionPanelBackgroundColors = {
|
|
15
|
-
'primary-default': [],
|
|
16
|
-
'primary-card': [
|
|
17
|
-
// Theme
|
|
18
|
-
'theme-background-surface-1', 'dark:theme-background-surface-1-dark'],
|
|
19
|
-
'secondary-default': [],
|
|
20
|
-
'secondary-card': [
|
|
21
|
-
// Theme
|
|
22
|
-
'theme-background-surface-3', 'dark:theme-background-surface-3-dark'],
|
|
23
|
-
'inherit-default': [],
|
|
24
|
-
'inherit-card': [
|
|
12
|
+
'px-md', 'py-md', 'gap-md',
|
|
25
13
|
// Theme
|
|
26
|
-
'theme-background-
|
|
14
|
+
'theme-background-surface-1', 'dark:theme-background-surface-1-dark']
|
|
27
15
|
};
|
|
28
16
|
const ExpansionPanelHeader = [
|
|
29
17
|
// Layout
|
|
@@ -62,4 +50,4 @@ const ExpansionPanelAddon = [
|
|
|
62
50
|
// Theme
|
|
63
51
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
64
52
|
|
|
65
|
-
export {
|
|
53
|
+
export { ExpansionPanelAddon, ExpansionPanelHeader, ExpansionPanelHeaderColors, ExpansionPanelRoot, ExpansionPanelRootVariants };
|
|
@@ -27,7 +27,6 @@ import '../../style-inject.es-4c6f2515.js';
|
|
|
27
27
|
import '../OrErrorV3/styles.js';
|
|
28
28
|
import '../OrExpansionPanelV3/props.js';
|
|
29
29
|
import '../OrExpansionPanelV3/styles.js';
|
|
30
|
-
import '../../hooks/usePopoverState.js';
|
|
31
30
|
import '../OrHintV3/styles.js';
|
|
32
31
|
import '../OrIconV3/props.js';
|
|
33
32
|
import '../OrIconV3/styles.js';
|
|
@@ -39,6 +38,7 @@ import '../OrIconButtonV3/styles.js';
|
|
|
39
38
|
import '../OrTooltipV3/OrTooltip.js';
|
|
40
39
|
import '../OrTooltipV3/styles.js';
|
|
41
40
|
import '../OrPopoverV3/props.js';
|
|
41
|
+
import '../../hooks/usePopoverState.js';
|
|
42
42
|
import '../OrLoaderV3/OrLoader.js';
|
|
43
43
|
import '../OrLoaderV3/props.js';
|
|
44
44
|
import '../OrLoaderV3/styles.js';
|
|
@@ -22,7 +22,6 @@ import '../OrExpansionPanelV3/styles.js';
|
|
|
22
22
|
import '../OrIconV3/OrIcon.js';
|
|
23
23
|
import '../OrIconV3/props.js';
|
|
24
24
|
import '../OrIconV3/styles.js';
|
|
25
|
-
import '../../hooks/usePopoverState.js';
|
|
26
25
|
import '../OrHintV3/OrHint.js';
|
|
27
26
|
import '../OrHintV3/styles.js';
|
|
28
27
|
import '../OrInputV3/OrInput.js';
|
|
@@ -46,6 +45,7 @@ import '../OrTeleportV3/OrTeleport.js';
|
|
|
46
45
|
import 'vue';
|
|
47
46
|
import '../../hooks/useElevation.js';
|
|
48
47
|
import '../../utils/isVisible.js';
|
|
48
|
+
import '../../hooks/usePopoverState.js';
|
|
49
49
|
import '../../hooks/useResponsive/useResponsive.js';
|
|
50
50
|
import '../OrInputBoxV3/OrInputBox.js';
|
|
51
51
|
import '../OrInputBoxV3/styles.js';
|
|
@@ -45,7 +45,7 @@ export { default as OrError } from './OrError/OrError.js';
|
|
|
45
45
|
export { default as OrErrorTagV3 } from './OrErrorTagV3/OrErrorTag.js';
|
|
46
46
|
export { default as OrErrorV3 } from './OrErrorV3/OrError.js';
|
|
47
47
|
export { default as OrExpansionPanelV3 } from './OrExpansionPanelV3/OrExpansionPanel.js';
|
|
48
|
-
export {
|
|
48
|
+
export { ExpansionPanelColor, ExpansionPanelVariant } from './OrExpansionPanelV3/props.js';
|
|
49
49
|
export { default as OrFabV3 } from './OrFabV3/OrFab.js';
|
|
50
50
|
export { FabColor } from './OrFabV3/props.js';
|
|
51
51
|
export { default as OrFloating } from './OrFloating/OrFloating.js';
|