@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,8 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
2
|
-
import '@vueuse/core';
|
|
3
|
-
import { u as usePopoverState } from './usePopoverState-8a95a300.js';
|
|
4
|
-
import '@onereach/styles/tailwind.config';
|
|
5
|
-
import 'tailwindcss/resolveConfig';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
6
2
|
import { _ as __vue_component__$1 } from './OrIcon-d35a84d8.js';
|
|
7
3
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
8
4
|
|
|
@@ -16,17 +12,11 @@ var ExpansionPanelColor;
|
|
|
16
12
|
ExpansionPanelColor["Default"] = "default";
|
|
17
13
|
ExpansionPanelColor["Danger"] = "danger";
|
|
18
14
|
})(ExpansionPanelColor || (ExpansionPanelColor = {}));
|
|
19
|
-
var ExpansionPanelBackgroundColor;
|
|
20
|
-
(function (ExpansionPanelBackgroundColor) {
|
|
21
|
-
ExpansionPanelBackgroundColor["Primary"] = "primary";
|
|
22
|
-
ExpansionPanelBackgroundColor["Secondary"] = "secondary";
|
|
23
|
-
ExpansionPanelBackgroundColor["Inherit"] = "inherit";
|
|
24
|
-
})(ExpansionPanelBackgroundColor || (ExpansionPanelBackgroundColor = {}));
|
|
25
15
|
|
|
26
|
-
const
|
|
16
|
+
const ExpansionPanelRoot = [
|
|
27
17
|
// Layout
|
|
28
18
|
'layout-column'];
|
|
29
|
-
const
|
|
19
|
+
const ExpansionPanelRootVariants = {
|
|
30
20
|
'default': [
|
|
31
21
|
// Spacing
|
|
32
22
|
'gap-sm'],
|
|
@@ -34,21 +24,9 @@ const ExpansionPanelVariants = {
|
|
|
34
24
|
// Shape
|
|
35
25
|
'rounded-md',
|
|
36
26
|
// Spacing
|
|
37
|
-
'px-md', 'py-md', 'gap-md'
|
|
38
|
-
};
|
|
39
|
-
const ExpansionPanelBackgroundColors = {
|
|
40
|
-
'primary-default': [],
|
|
41
|
-
'primary-card': [
|
|
42
|
-
// Theme
|
|
43
|
-
'theme-background-surface-1', 'dark:theme-background-surface-1-dark'],
|
|
44
|
-
'secondary-default': [],
|
|
45
|
-
'secondary-card': [
|
|
46
|
-
// Theme
|
|
47
|
-
'theme-background-surface-3', 'dark:theme-background-surface-3-dark'],
|
|
48
|
-
'inherit-default': [],
|
|
49
|
-
'inherit-card': [
|
|
27
|
+
'px-md', 'py-md', 'gap-md',
|
|
50
28
|
// Theme
|
|
51
|
-
'theme-background-
|
|
29
|
+
'theme-background-surface-1', 'dark:theme-background-surface-1-dark']
|
|
52
30
|
};
|
|
53
31
|
const ExpansionPanelHeader = [
|
|
54
32
|
// Layout
|
|
@@ -109,40 +87,50 @@ var script = defineComponent({
|
|
|
109
87
|
type: String,
|
|
110
88
|
default: ExpansionPanelColor.Default
|
|
111
89
|
},
|
|
112
|
-
backgroundColor: {
|
|
113
|
-
type: String,
|
|
114
|
-
default: ExpansionPanelBackgroundColor.Primary
|
|
115
|
-
},
|
|
116
90
|
disabled: {
|
|
117
91
|
type: Boolean,
|
|
118
92
|
default: false
|
|
119
93
|
}
|
|
120
94
|
},
|
|
121
|
-
emits: ['
|
|
122
|
-
expose: ['root', '
|
|
95
|
+
emits: ['open', 'close'],
|
|
96
|
+
expose: ['root', 'open', 'close'],
|
|
123
97
|
setup(props, context) {
|
|
124
98
|
// Refs
|
|
125
99
|
const root = ref();
|
|
126
100
|
// Styles
|
|
127
|
-
const rootStyles = computed(() => ['or-expansion-panel-v3', ...
|
|
101
|
+
const rootStyles = computed(() => ['or-expansion-panel-v3', ...ExpansionPanelRoot, ...ExpansionPanelRootVariants[props.variant]]);
|
|
128
102
|
const headerStyles = computed(() => [...ExpansionPanelHeader, ...ExpansionPanelHeaderColors[props.color]]);
|
|
129
103
|
const addonStyles = computed(() => [...ExpansionPanelAddon]);
|
|
130
104
|
// State
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
close
|
|
135
|
-
|
|
136
|
-
|
|
105
|
+
const expanded = ref(false);
|
|
106
|
+
// Events
|
|
107
|
+
watch(expanded, value => {
|
|
108
|
+
context.emit(value ? 'open' : 'close');
|
|
109
|
+
});
|
|
110
|
+
watch(() => props.isOpen, newIsOpen => {
|
|
111
|
+
if (newIsOpen) {
|
|
112
|
+
open();
|
|
113
|
+
} else {
|
|
114
|
+
close();
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
immediate: true
|
|
118
|
+
});
|
|
119
|
+
// Methods
|
|
120
|
+
function open() {
|
|
121
|
+
expanded.value = true;
|
|
122
|
+
}
|
|
123
|
+
function close() {
|
|
124
|
+
expanded.value = false;
|
|
125
|
+
}
|
|
137
126
|
return {
|
|
138
127
|
root,
|
|
139
128
|
rootStyles,
|
|
140
129
|
headerStyles,
|
|
141
130
|
addonStyles,
|
|
142
|
-
|
|
131
|
+
expanded,
|
|
143
132
|
open,
|
|
144
|
-
close
|
|
145
|
-
toggle
|
|
133
|
+
close
|
|
146
134
|
};
|
|
147
135
|
}
|
|
148
136
|
});
|
|
@@ -172,11 +160,11 @@ var __vue_render__ = function () {
|
|
|
172
160
|
on: {
|
|
173
161
|
"click": function ($event) {
|
|
174
162
|
$event.stopPropagation();
|
|
175
|
-
|
|
163
|
+
_vm.expanded ? _vm.close() : _vm.open();
|
|
176
164
|
}
|
|
177
165
|
}
|
|
178
166
|
}, [_c('OrIcon', {
|
|
179
|
-
class: [_vm.
|
|
167
|
+
class: [_vm.expanded ? 'rotate-0' : 'rotate-[-90deg]'],
|
|
180
168
|
attrs: {
|
|
181
169
|
"icon": 'expand_more',
|
|
182
170
|
"variant": 'filled-bold'
|
|
@@ -189,8 +177,8 @@ var __vue_render__ = function () {
|
|
|
189
177
|
directives: [{
|
|
190
178
|
name: "show",
|
|
191
179
|
rawName: "v-show",
|
|
192
|
-
value: _vm.
|
|
193
|
-
expression: "
|
|
180
|
+
value: _vm.expanded,
|
|
181
|
+
expression: "expanded"
|
|
194
182
|
}]
|
|
195
183
|
}, [_vm._t("default")], 2)]);
|
|
196
184
|
};
|
|
@@ -215,4 +203,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
215
203
|
staticRenderFns: __vue_staticRenderFns__
|
|
216
204
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
217
205
|
|
|
218
|
-
export { ExpansionPanelVariant as E, __vue_component__ as _, ExpansionPanelColor as a
|
|
206
|
+
export { ExpansionPanelVariant as E, __vue_component__ as _, ExpansionPanelColor as a };
|
|
@@ -6,7 +6,7 @@ import '@onereach/styles/tailwind.config';
|
|
|
6
6
|
import 'tailwindcss/resolveConfig';
|
|
7
7
|
import { _ as __vue_component__$1, i as isEmptyValue } from './OrCheckbox-41f2822d.js';
|
|
8
8
|
import { _ as __vue_component__$2 } from './OrError-4ffc1c39.js';
|
|
9
|
-
import { _ as __vue_component__$3 } from './OrExpansionPanel-
|
|
9
|
+
import { _ as __vue_component__$3 } from './OrExpansionPanel-d3a2218d.js';
|
|
10
10
|
import { _ as __vue_component__$4 } from './OrHint-aa221198.js';
|
|
11
11
|
import { _ as __vue_component__$5 } from './OrIcon-d35a84d8.js';
|
|
12
12
|
import { _ as __vue_component__$7 } from './OrInputBox-7f3c0ee9.js';
|
|
@@ -33,7 +33,7 @@ export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../OrEmptyState-2d3fd6
|
|
|
33
33
|
export { _ as OrError } from '../OrError-efc74907.js';
|
|
34
34
|
export { _ as OrErrorTagV3 } from '../OrErrorTag-a55ae01a.js';
|
|
35
35
|
export { _ as OrErrorV3 } from '../OrError-4ffc1c39.js';
|
|
36
|
-
export {
|
|
36
|
+
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, _ as OrExpansionPanelV3 } from '../OrExpansionPanel-d3a2218d.js';
|
|
37
37
|
export { F as FabColor, _ as OrFabV3 } from '../OrFab-f3a590c0.js';
|
|
38
38
|
export { _ as OrFloating, a as OrFloatingHideStrategy, O as OrFloatingPlacements } from '../OrFloating-e7ac7618.js';
|
|
39
39
|
export { F as FormGroupDirection, _ as OrFormGroupV3 } from '../OrFormGroup-29a514db.js';
|
|
@@ -78,7 +78,7 @@ export { _ as OrSearch } from '../OrSearch-e2941d35.js';
|
|
|
78
78
|
export { _ as OrSearchV3 } from '../OrSearch-cbd7fd0b.js';
|
|
79
79
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-a1ea5b72.js';
|
|
80
80
|
export { _ as OrSelect } from '../OrSelect-49239b74.js';
|
|
81
|
-
export { _ as OrSelectV3 } from '../OrSelect-
|
|
81
|
+
export { _ as OrSelectV3 } from '../OrSelect-1132c7dc.js';
|
|
82
82
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-c56a9221.js';
|
|
83
83
|
export { _ as OrSidebarV3 } from '../OrSidebar-865f307e.js';
|
|
84
84
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-b3a41f02.js';
|
|
@@ -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,8 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, _ as OrExpansionPanelV3 } from '../../OrExpansionPanel-d3a2218d.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
|
-
import '@vueuse/core';
|
|
4
|
-
import '../../usePopoverState-8a95a300.js';
|
|
5
|
-
import '@onereach/styles/tailwind.config';
|
|
6
|
-
import 'tailwindcss/resolveConfig';
|
|
7
3
|
import '../../OrIcon-d35a84d8.js';
|
|
8
4
|
import '../../normalize-component-6e8e3d80.js';
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { _ as OrSelectV3 } from '../../OrSelect-1132c7dc.js';
|
|
2
2
|
export { I as SelectSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-906b3ef8.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-e1f90e0a.js';
|
|
@@ -12,8 +12,7 @@ import '../../OrLabel-63380256.js';
|
|
|
12
12
|
import '../../normalize-component-6e8e3d80.js';
|
|
13
13
|
import '../../style-inject.es-4c6f2515.js';
|
|
14
14
|
import '../../OrError-4ffc1c39.js';
|
|
15
|
-
import '../../OrExpansionPanel-
|
|
16
|
-
import '../../usePopoverState-8a95a300.js';
|
|
15
|
+
import '../../OrExpansionPanel-d3a2218d.js';
|
|
17
16
|
import '../../OrIcon-d35a84d8.js';
|
|
18
17
|
import '../../OrHint-aa221198.js';
|
|
19
18
|
import '../../OrInputBox-7f3c0ee9.js';
|
|
@@ -22,6 +21,7 @@ import '../../useResponsive-a02e95b7.js';
|
|
|
22
21
|
import '../../useValidationAttributes-d1abbe34.js';
|
|
23
22
|
import '../../OrIconButton-ab726d49.js';
|
|
24
23
|
import '../../OrTooltip-bf4c725c.js';
|
|
24
|
+
import '../../usePopoverState-8a95a300.js';
|
|
25
25
|
import '../../OrPopover-ef16a904.js';
|
|
26
26
|
import '@floating-ui/dom';
|
|
27
27
|
import '../../useElevation-a50ec347.js';
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export { E as EmptyStateSize, _ as OrEmptyStateV3 } from './OrEmptyState-2d3fd68
|
|
|
33
33
|
export { _ as OrError } from './OrError-efc74907.js';
|
|
34
34
|
export { _ as OrErrorTagV3 } from './OrErrorTag-a55ae01a.js';
|
|
35
35
|
export { _ as OrErrorV3 } from './OrError-4ffc1c39.js';
|
|
36
|
-
export {
|
|
36
|
+
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, _ as OrExpansionPanelV3 } from './OrExpansionPanel-d3a2218d.js';
|
|
37
37
|
export { F as FabColor, _ as OrFabV3 } from './OrFab-f3a590c0.js';
|
|
38
38
|
export { _ as OrFloating, a as OrFloatingHideStrategy, O as OrFloatingPlacements } from './OrFloating-e7ac7618.js';
|
|
39
39
|
export { F as FormGroupDirection, _ as OrFormGroupV3 } from './OrFormGroup-29a514db.js';
|
|
@@ -78,7 +78,7 @@ export { _ as OrSearch } from './OrSearch-e2941d35.js';
|
|
|
78
78
|
export { _ as OrSearchV3 } from './OrSearch-cbd7fd0b.js';
|
|
79
79
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-a1ea5b72.js';
|
|
80
80
|
export { _ as OrSelect } from './OrSelect-49239b74.js';
|
|
81
|
-
export { _ as OrSelectV3 } from './OrSelect-
|
|
81
|
+
export { _ as OrSelectV3 } from './OrSelect-1132c7dc.js';
|
|
82
82
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-c56a9221.js';
|
|
83
83
|
export { _ as OrSidebarV3 } from './OrSidebar-865f307e.js';
|
|
84
84
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-b3a41f02.js';
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
2
|
-
import '@vueuse/core';
|
|
3
|
-
import { u as usePopoverState } from './usePopoverState-8a95a300.js';
|
|
4
|
-
import '@onereach/styles/tailwind.config';
|
|
5
|
-
import 'tailwindcss/resolveConfig';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
6
2
|
import { s as script$1 } from './OrIcon-62793572.js';
|
|
7
3
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, createVNode, toDisplayString, renderSlot, withDirectives, vShow } from 'vue';
|
|
8
4
|
|
|
@@ -16,17 +12,11 @@ var ExpansionPanelColor;
|
|
|
16
12
|
ExpansionPanelColor["Default"] = "default";
|
|
17
13
|
ExpansionPanelColor["Danger"] = "danger";
|
|
18
14
|
})(ExpansionPanelColor || (ExpansionPanelColor = {}));
|
|
19
|
-
var ExpansionPanelBackgroundColor;
|
|
20
|
-
(function (ExpansionPanelBackgroundColor) {
|
|
21
|
-
ExpansionPanelBackgroundColor["Primary"] = "primary";
|
|
22
|
-
ExpansionPanelBackgroundColor["Secondary"] = "secondary";
|
|
23
|
-
ExpansionPanelBackgroundColor["Inherit"] = "inherit";
|
|
24
|
-
})(ExpansionPanelBackgroundColor || (ExpansionPanelBackgroundColor = {}));
|
|
25
15
|
|
|
26
|
-
const
|
|
16
|
+
const ExpansionPanelRoot = [
|
|
27
17
|
// Layout
|
|
28
18
|
'layout-column'];
|
|
29
|
-
const
|
|
19
|
+
const ExpansionPanelRootVariants = {
|
|
30
20
|
'default': [
|
|
31
21
|
// Spacing
|
|
32
22
|
'gap-sm'],
|
|
@@ -34,21 +24,9 @@ const ExpansionPanelVariants = {
|
|
|
34
24
|
// Shape
|
|
35
25
|
'rounded-md',
|
|
36
26
|
// Spacing
|
|
37
|
-
'px-md', 'py-md', 'gap-md'
|
|
38
|
-
};
|
|
39
|
-
const ExpansionPanelBackgroundColors = {
|
|
40
|
-
'primary-default': [],
|
|
41
|
-
'primary-card': [
|
|
42
|
-
// Theme
|
|
43
|
-
'theme-background-surface-1', 'dark:theme-background-surface-1-dark'],
|
|
44
|
-
'secondary-default': [],
|
|
45
|
-
'secondary-card': [
|
|
27
|
+
'px-md', 'py-md', 'gap-md',
|
|
46
28
|
// Theme
|
|
47
|
-
'theme-background-surface-
|
|
48
|
-
'inherit-default': [],
|
|
49
|
-
'inherit-card': [
|
|
50
|
-
// Theme
|
|
51
|
-
'theme-background-inherit', 'dark:theme-background-inherit']
|
|
29
|
+
'theme-background-surface-1', 'dark:theme-background-surface-1-dark']
|
|
52
30
|
};
|
|
53
31
|
const ExpansionPanelHeader = [
|
|
54
32
|
// Layout
|
|
@@ -109,40 +87,50 @@ var script = defineComponent({
|
|
|
109
87
|
type: String,
|
|
110
88
|
default: ExpansionPanelColor.Default
|
|
111
89
|
},
|
|
112
|
-
backgroundColor: {
|
|
113
|
-
type: String,
|
|
114
|
-
default: ExpansionPanelBackgroundColor.Primary
|
|
115
|
-
},
|
|
116
90
|
disabled: {
|
|
117
91
|
type: Boolean,
|
|
118
92
|
default: false
|
|
119
93
|
}
|
|
120
94
|
},
|
|
121
|
-
emits: ['
|
|
122
|
-
expose: ['root', '
|
|
95
|
+
emits: ['open', 'close'],
|
|
96
|
+
expose: ['root', 'open', 'close'],
|
|
123
97
|
setup(props, context) {
|
|
124
98
|
// Refs
|
|
125
99
|
const root = ref();
|
|
126
100
|
// Styles
|
|
127
|
-
const rootStyles = computed(() => ['or-expansion-panel-v3', ...
|
|
101
|
+
const rootStyles = computed(() => ['or-expansion-panel-v3', ...ExpansionPanelRoot, ...ExpansionPanelRootVariants[props.variant]]);
|
|
128
102
|
const headerStyles = computed(() => [...ExpansionPanelHeader, ...ExpansionPanelHeaderColors[props.color]]);
|
|
129
103
|
const addonStyles = computed(() => [...ExpansionPanelAddon]);
|
|
130
104
|
// State
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
close
|
|
135
|
-
|
|
136
|
-
|
|
105
|
+
const expanded = ref(false);
|
|
106
|
+
// Events
|
|
107
|
+
watch(expanded, value => {
|
|
108
|
+
context.emit(value ? 'open' : 'close');
|
|
109
|
+
});
|
|
110
|
+
watch(() => props.isOpen, newIsOpen => {
|
|
111
|
+
if (newIsOpen) {
|
|
112
|
+
open();
|
|
113
|
+
} else {
|
|
114
|
+
close();
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
immediate: true
|
|
118
|
+
});
|
|
119
|
+
// Methods
|
|
120
|
+
function open() {
|
|
121
|
+
expanded.value = true;
|
|
122
|
+
}
|
|
123
|
+
function close() {
|
|
124
|
+
expanded.value = false;
|
|
125
|
+
}
|
|
137
126
|
return {
|
|
138
127
|
root,
|
|
139
128
|
rootStyles,
|
|
140
129
|
headerStyles,
|
|
141
130
|
addonStyles,
|
|
142
|
-
|
|
131
|
+
expanded,
|
|
143
132
|
open,
|
|
144
|
-
close
|
|
145
|
-
toggle
|
|
133
|
+
close
|
|
146
134
|
};
|
|
147
135
|
}
|
|
148
136
|
});
|
|
@@ -165,17 +153,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
165
153
|
class: normalizeClass(_ctx.headerStyles),
|
|
166
154
|
tabindex: !_ctx.disabled ? 0 : null,
|
|
167
155
|
disabled: _ctx.disabled ? '' : null,
|
|
168
|
-
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.
|
|
156
|
+
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.expanded ? _ctx.close() : _ctx.open(), ["stop"]))
|
|
169
157
|
}, [createVNode(_component_OrIcon, {
|
|
170
|
-
class: normalizeClass([_ctx.
|
|
158
|
+
class: normalizeClass([_ctx.expanded ? 'rotate-0' : 'rotate-[-90deg]']),
|
|
171
159
|
icon: 'expand_more',
|
|
172
160
|
variant: 'filled-bold'
|
|
173
161
|
}, null, 8 /* PROPS */, ["class"]), createElementVNode("span", _hoisted_4, toDisplayString(_ctx.label), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_3), createElementVNode("div", {
|
|
174
162
|
class: normalizeClass(_ctx.addonStyles)
|
|
175
|
-
}, [renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)]), withDirectives(createElementVNode("div", null, [renderSlot(_ctx.$slots, "default")], 512 /* NEED_PATCH */), [[vShow, _ctx.
|
|
163
|
+
}, [renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)]), withDirectives(createElementVNode("div", null, [renderSlot(_ctx.$slots, "default")], 512 /* NEED_PATCH */), [[vShow, _ctx.expanded]])], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
176
164
|
}
|
|
177
165
|
|
|
178
166
|
script.render = render;
|
|
179
167
|
script.__file = "src/components/or-expansion-panel-v3/OrExpansionPanel.vue";
|
|
180
168
|
|
|
181
|
-
export { ExpansionPanelVariant as E, ExpansionPanelColor as a,
|
|
169
|
+
export { ExpansionPanelVariant as E, ExpansionPanelColor as a, script as s };
|
|
@@ -6,7 +6,7 @@ import '@onereach/styles/tailwind.config';
|
|
|
6
6
|
import 'tailwindcss/resolveConfig';
|
|
7
7
|
import { s as script$1, i as isEmptyValue } from './OrCheckbox-2194e473.js';
|
|
8
8
|
import { s as script$2 } from './OrError-c01d0c29.js';
|
|
9
|
-
import { s as script$3 } from './OrExpansionPanel-
|
|
9
|
+
import { s as script$3 } from './OrExpansionPanel-c016d8fa.js';
|
|
10
10
|
import { s as script$4 } from './OrHint-06ab89d7.js';
|
|
11
11
|
import { s as script$5 } from './OrIcon-62793572.js';
|
|
12
12
|
import { s as script$7, I as InputBoxSize } from './OrInputBox-32814878.js';
|
|
@@ -31,7 +31,7 @@ export { E as EmptyStateSize, s as OrEmptyStateV3 } from '../OrEmptyState-5349a1
|
|
|
31
31
|
export { s as OrError } from '../OrError-f90296db.js';
|
|
32
32
|
export { s as OrErrorTagV3 } from '../OrErrorTag-ade9192b.js';
|
|
33
33
|
export { s as OrErrorV3 } from '../OrError-c01d0c29.js';
|
|
34
|
-
export {
|
|
34
|
+
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, s as OrExpansionPanelV3 } from '../OrExpansionPanel-c016d8fa.js';
|
|
35
35
|
export { F as FabColor, s as OrFabV3 } from '../OrFab-83cd7ed7.js';
|
|
36
36
|
export { s as OrFloating, a as OrFloatingHideStrategy, O as OrFloatingPlacements } from '../OrFloating-1a9ccfe9.js';
|
|
37
37
|
export { F as FormGroupDirection, s as OrFormGroupV3 } from '../OrFormGroup-9f581536.js';
|
|
@@ -76,7 +76,7 @@ export { s as OrSearch } from '../OrSearch-d0c8aca7.js';
|
|
|
76
76
|
export { s as OrSearchV3 } from '../OrSearch-c5ecb005.js';
|
|
77
77
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-359fbf3a.js';
|
|
78
78
|
export { s as OrSelect } from '../OrSelect-60205145.js';
|
|
79
|
-
export { s as OrSelectV3 } from '../OrSelect-
|
|
79
|
+
export { s as OrSelectV3 } from '../OrSelect-9432ac4d.js';
|
|
80
80
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-aaf73310.js';
|
|
81
81
|
export { s as OrSidebarV3 } from '../OrSidebar-7f5795da.js';
|
|
82
82
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-5fb7a6a1.js';
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import {
|
|
2
|
+
import { ExpansionPanelColor, ExpansionPanelVariant } from './props';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
label: {
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
8
|
isOpen: {
|
|
9
|
-
type:
|
|
9
|
+
type: PropType<boolean>;
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
variant: {
|
|
13
|
-
type: PropType<
|
|
13
|
+
type: PropType<ExpansionPanelVariant>;
|
|
14
14
|
default: ExpansionPanelVariant;
|
|
15
15
|
};
|
|
16
16
|
color: {
|
|
17
|
-
type: PropType<
|
|
17
|
+
type: PropType<ExpansionPanelColor>;
|
|
18
18
|
default: ExpansionPanelColor;
|
|
19
19
|
};
|
|
20
|
-
backgroundColor: {
|
|
21
|
-
type: PropType<"primary" | "secondary" | "inherit">;
|
|
22
|
-
default: ExpansionPanelBackgroundColor;
|
|
23
|
-
};
|
|
24
20
|
disabled: {
|
|
25
21
|
type: BooleanConstructor;
|
|
26
22
|
default: boolean;
|
|
@@ -30,44 +26,37 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
30
26
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
31
27
|
headerStyles: import("vue-demi").ComputedRef<string[]>;
|
|
32
28
|
addonStyles: import("vue-demi").ComputedRef<string[]>;
|
|
33
|
-
|
|
29
|
+
expanded: import("vue-demi").Ref<boolean>;
|
|
34
30
|
open: () => void;
|
|
35
31
|
close: () => void;
|
|
36
|
-
|
|
37
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:state" | "open" | "close")[], "update:state" | "open" | "close", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
32
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("open" | "close")[], "open" | "close", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
38
33
|
label: {
|
|
39
34
|
type: StringConstructor;
|
|
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;
|
|
61
52
|
};
|
|
62
53
|
}>> & {
|
|
63
|
-
"onUpdate:state"?: ((...args: any[]) => any) | undefined;
|
|
64
54
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
65
55
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
66
56
|
}, {
|
|
67
57
|
isOpen: boolean;
|
|
68
|
-
variant:
|
|
69
|
-
color:
|
|
70
|
-
backgroundColor: "primary" | "secondary" | "inherit";
|
|
58
|
+
variant: ExpansionPanelVariant;
|
|
59
|
+
color: ExpansionPanelColor;
|
|
71
60
|
disabled: boolean;
|
|
72
61
|
}>;
|
|
73
62
|
export default _default;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, s as OrExpansionPanelV3 } from '../../OrExpansionPanel-c016d8fa.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
|
-
import '@vueuse/core';
|
|
4
|
-
import '../../usePopoverState-8a95a300.js';
|
|
5
|
-
import '@onereach/styles/tailwind.config';
|
|
6
|
-
import 'tailwindcss/resolveConfig';
|
|
7
3
|
import '../../OrIcon-62793572.js';
|
|
8
4
|
import 'vue';
|
|
@@ -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[];
|