@oneb/ui-vue 0.3.32 → 0.4.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/ChevronLeftIcon-7505e081.cjs +1 -0
- package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
- package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
- package/dist/ChevronRightIcon-b0585768.js +20 -0
- package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
- package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
- package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
- package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
- package/dist/OneHelpMenu-6ec63535.cjs +1 -0
- package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
- package/dist/OneModal-02a9a173.js +189 -0
- package/dist/OneModal-0e92c039.cjs +1 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
- package/dist/SpinnerIcon-01be39fe.cjs +1 -0
- package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +3 -4
- package/dist/checkbox/checkbox.d.ts +5 -0
- package/dist/checkbox/index.cjs +1 -1
- package/dist/checkbox/index.js +40 -34
- package/dist/chips/OneChips.vue.d.ts +2 -0
- package/dist/chips/chips.d.ts +25 -0
- package/dist/chips/index.cjs +1 -0
- package/dist/chips/index.d.ts +3 -0
- package/dist/chips/index.js +62 -0
- package/dist/clipboard-494e1513.cjs +1 -0
- package/dist/clipboard-733b79a1.js +22 -0
- package/dist/common/OneDetailsList.vue.d.ts +2 -0
- package/dist/common/OneDetailsRow.vue.d.ts +2 -0
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +68 -16
- package/dist/composables/index.cjs +1 -0
- package/dist/composables/index.d.ts +18 -0
- package/dist/composables/index.js +91 -0
- package/dist/composables/useAsyncMethod.d.ts +17 -0
- package/dist/composables/useAsyncSelect.d.ts +26 -0
- package/dist/composables/useConfirm.d.ts +27 -0
- package/dist/composables/useCursorList.d.ts +42 -0
- package/dist/composables/useDebouncedRef.d.ts +6 -0
- package/dist/composables/useFileUpload.d.ts +21 -0
- package/dist/composables/useFormSubmit.d.ts +23 -0
- package/dist/composables/useIsMobile.d.ts +8 -0
- package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
- package/dist/confirm/confirm.d.ts +10 -0
- package/dist/confirm/index.cjs +1 -0
- package/dist/confirm/index.d.ts +5 -0
- package/dist/confirm/index.js +59 -0
- package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
- package/dist/cursorList/index.cjs +1 -0
- package/dist/cursorList/index.d.ts +3 -0
- package/dist/cursorList/index.js +78 -0
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +256 -301
- package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
- package/dist/dateTime/dateTime.d.ts +43 -0
- package/dist/dateTime/index.cjs +1 -0
- package/dist/dateTime/index.d.ts +3 -0
- package/dist/dateTime/index.js +66 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +302 -376
- package/dist/dropdown-5cb64ab7.cjs +1 -0
- package/dist/dropdown-c81fb945.js +101 -0
- package/dist/entityPicker/index.cjs +1 -1
- package/dist/entityPicker/index.js +57 -57
- package/dist/entityPicker/useEntityModal.d.ts +7 -3
- package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
- package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
- package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
- package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
- package/dist/errorsPage/errorsType.d.ts +5 -0
- package/dist/errorsPage/index.cjs +1 -1
- package/dist/errorsPage/index.d.ts +8 -0
- package/dist/errorsPage/index.js +557 -28
- package/dist/errorsPage/useCrashState.d.ts +10 -0
- package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
- package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
- package/dist/fileUpload/fileUpload.d.ts +17 -0
- package/dist/fileUpload/index.cjs +1 -0
- package/dist/fileUpload/index.d.ts +6 -0
- package/dist/fileUpload/index.js +228 -0
- package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
- package/dist/filterBuilder/filterBuilder.d.ts +17 -0
- package/dist/filterBuilder/index.cjs +1 -0
- package/dist/filterBuilder/index.d.ts +5 -0
- package/dist/filterBuilder/index.js +257 -0
- package/dist/form/form.d.ts +1 -1
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.js +66 -574
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +99 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +242 -104
- package/dist/indicators/OneStatCard.vue.d.ts +2 -0
- package/dist/indicators/index.cjs +1 -1
- package/dist/indicators/index.d.ts +1 -0
- package/dist/indicators/index.js +66 -29
- package/dist/label/index.cjs +1 -1
- package/dist/label/index.js +5 -5
- package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
- package/dist/layout/OneBackButton.vue.d.ts +2 -0
- package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
- package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
- package/dist/layout/OneGridLayout.vue.d.ts +2 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.ts +6 -1
- package/dist/layout/index.js +1057 -765
- package/dist/layout/layout.d.ts +11 -0
- package/dist/modal/OneModalHost.vue.d.ts +2 -0
- package/dist/modal/index.cjs +1 -1
- package/dist/modal/index.d.ts +3 -0
- package/dist/modal/index.js +84 -27
- package/dist/modal/modal.d.ts +9 -0
- package/dist/modal/useModalStack.d.ts +20 -0
- package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
- package/dist/notifications/index.cjs +1 -0
- package/dist/notifications/index.d.ts +7 -0
- package/dist/notifications/index.js +477 -0
- package/dist/notifications/notifications.d.ts +53 -0
- package/dist/notifications/useNotifyfeed.d.ts +32 -0
- package/dist/periodPicker/index.cjs +1 -1
- package/dist/periodPicker/index.js +126 -139
- package/dist/popover/OnePopover.vue.d.ts +2 -0
- package/dist/popover/index.cjs +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +102 -0
- package/dist/popover/popover.d.ts +31 -0
- package/dist/progress/OneProgress.vue.d.ts +2 -0
- package/dist/progress/index.cjs +1 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +74 -0
- package/dist/progress/progress.d.ts +32 -0
- package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
- package/dist/searchInput/index.cjs +1 -0
- package/dist/searchInput/index.d.ts +3 -0
- package/dist/searchInput/index.js +103 -0
- package/dist/searchInput/searchInput.d.ts +39 -0
- package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
- package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
- package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
- package/dist/settings/index.cjs +1 -0
- package/dist/settings/index.d.ts +4 -0
- package/dist/settings/index.js +116 -0
- package/dist/spinner/OneSpinner.vue.d.ts +2 -0
- package/dist/spinner/index.cjs +1 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.js +30 -0
- package/dist/spinner/spinner.d.ts +10 -0
- package/dist/stageBadge/index.cjs +1 -1
- package/dist/stageBadge/index.js +18 -16
- package/dist/stepper/OneStepper.vue.d.ts +2 -0
- package/dist/stepper/index.cjs +1 -0
- package/dist/stepper/index.d.ts +3 -0
- package/dist/stepper/index.js +53 -0
- package/dist/stepper/stepper.d.ts +24 -0
- package/dist/style.css +1 -1
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.js +3 -4
- package/dist/tabs/OneTab.vue.d.ts +2 -0
- package/dist/tabs/OneTabs.vue.d.ts +2 -0
- package/dist/tabs/index.cjs +1 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +64 -0
- package/dist/tabs/tabs.d.ts +7 -0
- package/dist/toast/OneMascotToast.vue.d.ts +2 -0
- package/dist/toast/RabbitIcon.vue.d.ts +2 -0
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +139 -74
- package/dist/toast/useMascotToast.d.ts +12 -0
- package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
- package/dist/tooltip/index.cjs +2 -2
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +33 -30
- package/dist/useConfirm-6344b49d.cjs +1 -0
- package/dist/useConfirm-74e99a5c.js +23 -0
- package/dist/useCursorList-5c1b57aa.js +62 -0
- package/dist/useCursorList-e1cb41e7.cjs +1 -0
- package/dist/useElementWidth-b36a7ce9.js +40 -0
- package/dist/useElementWidth-b3e53f48.cjs +1 -0
- package/dist/useFileUpload-228dbc07.js +24 -0
- package/dist/useFileUpload-f47622bb.cjs +1 -0
- package/dist/useIsMobile-7b1f08cf.cjs +1 -0
- package/dist/useIsMobile-98fc0cf9.js +7 -0
- package/dist/useMediaQuery-1d87df02.cjs +1 -0
- package/dist/useMediaQuery-77a19b18.js +37 -0
- package/dist/useModal-6a5d870b.js +30 -0
- package/dist/useModal-aa6f4a57.cjs +1 -0
- package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
- package/dist/userList/OneUserList.vue.d.ts +2 -0
- package/dist/userList/OneUserListItem.vue.d.ts +2 -0
- package/dist/userList/index.cjs +1 -0
- package/dist/userList/index.d.ts +4 -0
- package/dist/userList/index.js +559 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/format.d.ts +17 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +125 -0
- package/dist/utils/string.d.ts +25 -0
- package/dist/utils/versionChecker.d.ts +26 -0
- package/package.json +215 -24
- package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
- package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/useModal-0c73777f.cjs +0 -1
- package/dist/useModal-7fe9444b.js +0 -194
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import { inject as $, computed as i, openBlock as a, createElementBlock as l, createElementVNode as s, defineComponent as K, ref as j, onMounted as G, normalizeClass as g, unref as d, toDisplayString as k, createCommentVNode as N, Fragment as A, renderList as L, createBlock as z, resolveDynamicComponent as H, createVNode as J } from "vue";
|
|
2
|
+
import { r as Q } from "./XMarkIcon-51ef0691.js";
|
|
3
|
+
const ue = {
|
|
4
|
+
id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: !1
|
|
7
|
+
},
|
|
8
|
+
validation: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: !1
|
|
11
|
+
}
|
|
12
|
+
}, pe = {
|
|
13
|
+
id: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: !1
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !1
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: !1
|
|
24
|
+
},
|
|
25
|
+
required: {
|
|
26
|
+
required: !1,
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
hint: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: !1,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
errors: {
|
|
36
|
+
type: Array,
|
|
37
|
+
required: !1
|
|
38
|
+
}
|
|
39
|
+
}, ye = {
|
|
40
|
+
name: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: !1
|
|
43
|
+
},
|
|
44
|
+
errors: {
|
|
45
|
+
type: Array,
|
|
46
|
+
required: !1
|
|
47
|
+
}
|
|
48
|
+
}, me = {
|
|
49
|
+
label: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: !1
|
|
52
|
+
}
|
|
53
|
+
}, R = {
|
|
54
|
+
/** Unique identifier for the input element */
|
|
55
|
+
id: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: !1
|
|
58
|
+
},
|
|
59
|
+
/** Name attribute for form submission */
|
|
60
|
+
name: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: !1
|
|
63
|
+
},
|
|
64
|
+
/** Placeholder text displayed when input is empty */
|
|
65
|
+
placeholder: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
/** Icon component to display at the start of the input */
|
|
70
|
+
icon: {
|
|
71
|
+
type: [Function, Object]
|
|
72
|
+
},
|
|
73
|
+
/** Type of input field */
|
|
74
|
+
type: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "text"
|
|
77
|
+
},
|
|
78
|
+
/** Additional CSS classes to apply to the input element */
|
|
79
|
+
inputClass: {
|
|
80
|
+
required: !1,
|
|
81
|
+
type: [Array, String]
|
|
82
|
+
},
|
|
83
|
+
/** Current value of the input (v-model) */
|
|
84
|
+
modelValue: {
|
|
85
|
+
required: !1,
|
|
86
|
+
type: [String, Number, Array, Boolean, Object, null]
|
|
87
|
+
},
|
|
88
|
+
/** Auto-focus the input when component mounts */
|
|
89
|
+
autofocus: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: !1
|
|
92
|
+
},
|
|
93
|
+
/** Mark input as required (adds asterisk to label) */
|
|
94
|
+
required: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
/** Disable the input field */
|
|
99
|
+
disabled: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !1
|
|
102
|
+
},
|
|
103
|
+
/** Make the input read-only */
|
|
104
|
+
readonly: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: !1
|
|
107
|
+
},
|
|
108
|
+
/** Show clear button when input has value */
|
|
109
|
+
clearable: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: !1
|
|
112
|
+
},
|
|
113
|
+
/** Use rounded styling (full rounded borders) */
|
|
114
|
+
rounded: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
},
|
|
118
|
+
/** Use large size styling */
|
|
119
|
+
large: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: !1
|
|
122
|
+
},
|
|
123
|
+
/** Mark input as invalid (shows error styling) */
|
|
124
|
+
invalid: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
required: !1,
|
|
127
|
+
default: !1
|
|
128
|
+
},
|
|
129
|
+
/** Options array for select and radio inputs */
|
|
130
|
+
options: {
|
|
131
|
+
type: Array,
|
|
132
|
+
required: !1,
|
|
133
|
+
default: []
|
|
134
|
+
},
|
|
135
|
+
/** HTML autocomplete attribute value */
|
|
136
|
+
autocomplete: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: !1,
|
|
139
|
+
default: ""
|
|
140
|
+
},
|
|
141
|
+
/** Maximum length of text input */
|
|
142
|
+
maxlength: {
|
|
143
|
+
type: Number,
|
|
144
|
+
required: !1
|
|
145
|
+
},
|
|
146
|
+
/** Minimum length of text input */
|
|
147
|
+
minlength: {
|
|
148
|
+
type: Number,
|
|
149
|
+
required: !1
|
|
150
|
+
},
|
|
151
|
+
/** Minimum value for number/date inputs */
|
|
152
|
+
min: {
|
|
153
|
+
type: [Number, String],
|
|
154
|
+
required: !1
|
|
155
|
+
},
|
|
156
|
+
/** Maximum value for number/date inputs */
|
|
157
|
+
max: {
|
|
158
|
+
type: [Number, String],
|
|
159
|
+
required: !1
|
|
160
|
+
},
|
|
161
|
+
/** Step increment for number/range inputs */
|
|
162
|
+
step: {
|
|
163
|
+
type: [Number, String],
|
|
164
|
+
required: !1
|
|
165
|
+
},
|
|
166
|
+
/** Validation pattern (regex) for text inputs */
|
|
167
|
+
pattern: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: !1
|
|
170
|
+
},
|
|
171
|
+
/** Number of rows for textarea */
|
|
172
|
+
rows: {
|
|
173
|
+
type: Number,
|
|
174
|
+
default: 3
|
|
175
|
+
},
|
|
176
|
+
/** Number of columns for textarea */
|
|
177
|
+
cols: {
|
|
178
|
+
type: Number,
|
|
179
|
+
required: !1
|
|
180
|
+
},
|
|
181
|
+
/** Allow textarea to be resized */
|
|
182
|
+
resize: {
|
|
183
|
+
type: String,
|
|
184
|
+
default: "vertical"
|
|
185
|
+
},
|
|
186
|
+
/** Spellcheck attribute for text inputs */
|
|
187
|
+
spellcheck: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
required: !1
|
|
190
|
+
},
|
|
191
|
+
/** Input mode for mobile keyboards */
|
|
192
|
+
inputmode: {
|
|
193
|
+
type: String,
|
|
194
|
+
required: !1
|
|
195
|
+
},
|
|
196
|
+
/** Tab index for keyboard navigation */
|
|
197
|
+
tabindex: {
|
|
198
|
+
type: Number,
|
|
199
|
+
required: !1
|
|
200
|
+
},
|
|
201
|
+
/** Aria label for accessibility */
|
|
202
|
+
ariaLabel: {
|
|
203
|
+
type: String,
|
|
204
|
+
required: !1
|
|
205
|
+
},
|
|
206
|
+
/** Aria described by for accessibility */
|
|
207
|
+
ariaDescribedby: {
|
|
208
|
+
type: String,
|
|
209
|
+
required: !1
|
|
210
|
+
}
|
|
211
|
+
}, ce = () => $(
|
|
212
|
+
"BaseForm",
|
|
213
|
+
() => ({
|
|
214
|
+
formId: i(() => {
|
|
215
|
+
}),
|
|
216
|
+
validation: i(() => {
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
!0
|
|
220
|
+
), T = () => $(
|
|
221
|
+
"BaseFormField",
|
|
222
|
+
() => ({
|
|
223
|
+
inputId: i(() => {
|
|
224
|
+
}),
|
|
225
|
+
inputName: i(() => {
|
|
226
|
+
}),
|
|
227
|
+
hasError: i(() => !1)
|
|
228
|
+
}),
|
|
229
|
+
!0
|
|
230
|
+
);
|
|
231
|
+
function U(w, q) {
|
|
232
|
+
return a(), l("svg", {
|
|
233
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
234
|
+
fill: "none",
|
|
235
|
+
viewBox: "0 0 24 24",
|
|
236
|
+
"stroke-width": "1.8",
|
|
237
|
+
stroke: "currentColor",
|
|
238
|
+
"aria-hidden": "true"
|
|
239
|
+
}, [
|
|
240
|
+
s("path", {
|
|
241
|
+
"stroke-linecap": "round",
|
|
242
|
+
"stroke-linejoin": "round",
|
|
243
|
+
d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
244
|
+
}),
|
|
245
|
+
s("path", {
|
|
246
|
+
"stroke-linecap": "round",
|
|
247
|
+
"stroke-linejoin": "round",
|
|
248
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
249
|
+
})
|
|
250
|
+
]);
|
|
251
|
+
}
|
|
252
|
+
function W(w, q) {
|
|
253
|
+
return a(), l("svg", {
|
|
254
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
255
|
+
fill: "none",
|
|
256
|
+
viewBox: "0 0 24 24",
|
|
257
|
+
"stroke-width": "1.8",
|
|
258
|
+
stroke: "currentColor",
|
|
259
|
+
"aria-hidden": "true"
|
|
260
|
+
}, [
|
|
261
|
+
s("path", {
|
|
262
|
+
"stroke-linecap": "round",
|
|
263
|
+
"stroke-linejoin": "round",
|
|
264
|
+
d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
265
|
+
})
|
|
266
|
+
]);
|
|
267
|
+
}
|
|
268
|
+
const X = ["id", "disabled", "tabindex"], Y = ["selected"], Z = ["selected", "value"], x = ["name", "id", "value", "rows", "cols", "maxlength", "minlength", "spellcheck", "placeholder", "disabled", "readonly", "tabindex", "aria-label", "aria-describedby"], _ = {
|
|
269
|
+
key: 2,
|
|
270
|
+
class: "flex w-full space-x-3 items-center"
|
|
271
|
+
}, ee = ["type", "name", "id", "disabled", "readonly", "tabindex", "aria-label", "aria-describedby", "checked"], re = ["for"], ae = {
|
|
272
|
+
key: 3,
|
|
273
|
+
class: "w-full space-y-1"
|
|
274
|
+
}, le = ["name", "id", "value", "disabled", "readonly", "tabindex", "checked"], ne = ["for"], oe = {
|
|
275
|
+
key: 4,
|
|
276
|
+
class: "relative"
|
|
277
|
+
}, te = { class: "absolute p-2 px-3 rounded-md h-full flex items-center select-none pointer-events-none" }, de = ["type", "name", "id", "value", "placeholder", "disabled", "readonly", "maxlength", "minlength", "min", "max", "step", "pattern", "spellcheck", "inputmode", "tabindex", "autocomplete", "aria-label", "aria-describedby"], fe = /* @__PURE__ */ K({
|
|
278
|
+
__name: "OneFormInput",
|
|
279
|
+
props: R,
|
|
280
|
+
emits: ["update:modelValue", "focus", "blur", "change", "input", "keydown", "keyup", "keypress", "clear", "toggle-password"],
|
|
281
|
+
setup(w, { expose: q, emit: I }) {
|
|
282
|
+
const r = w, n = I, { inputId: S, inputName: v, hasError: p } = T(), o = j(null), y = j(!1);
|
|
283
|
+
G(() => {
|
|
284
|
+
r.autofocus && o.value && o.value.focus();
|
|
285
|
+
});
|
|
286
|
+
const P = i(() => r.modelValue != null && r.modelValue !== ""), u = i(() => {
|
|
287
|
+
if (r.id)
|
|
288
|
+
return r.id;
|
|
289
|
+
const e = (S == null ? void 0 : S.value) || "";
|
|
290
|
+
return r.name ? `${e}-${r.name}` : e || "";
|
|
291
|
+
}), D = () => {
|
|
292
|
+
n("update:modelValue", ""), n("clear"), F();
|
|
293
|
+
}, M = () => {
|
|
294
|
+
y.value = !y.value, n("toggle-password", y.value);
|
|
295
|
+
}, F = () => {
|
|
296
|
+
if (o.value) {
|
|
297
|
+
const e = Array.isArray(o.value) ? o.value[0] : o.value;
|
|
298
|
+
e == null || e.focus();
|
|
299
|
+
}
|
|
300
|
+
}, O = i(() => {
|
|
301
|
+
const e = {
|
|
302
|
+
"shadow-sm": r.type !== "range",
|
|
303
|
+
"border-danger-base": p.value || r.invalid,
|
|
304
|
+
"pl-10": r.icon != null,
|
|
305
|
+
"pr-10": r.type === "password",
|
|
306
|
+
"rounded-full": r.rounded,
|
|
307
|
+
"rounded-md": !r.rounded,
|
|
308
|
+
"text-lg": r.large,
|
|
309
|
+
"py-2.5": r.large,
|
|
310
|
+
"py-2": !r.large
|
|
311
|
+
};
|
|
312
|
+
return r.inputClass != null && (typeof r.inputClass == "string" ? e[r.inputClass] = !0 : r.inputClass instanceof Array && r.inputClass.forEach((h) => {
|
|
313
|
+
e[h] = !0;
|
|
314
|
+
})), e;
|
|
315
|
+
}), m = (e) => {
|
|
316
|
+
const h = e.target;
|
|
317
|
+
if (r.type === "checkbox") {
|
|
318
|
+
const t = h.checked;
|
|
319
|
+
n("update:modelValue", t), n("input", e);
|
|
320
|
+
} else
|
|
321
|
+
n("update:modelValue", h.value), n("input", e);
|
|
322
|
+
}, c = (e) => n("focus", e), f = (e) => n("blur", e), b = (e) => n("change", e), C = (e) => n("keydown", e), V = (e) => n("keyup", e), B = (e) => n("keypress", e);
|
|
323
|
+
return q({
|
|
324
|
+
focus: F
|
|
325
|
+
}), (e, h) => e.type === "select" ? (a(), l("select", {
|
|
326
|
+
key: 0,
|
|
327
|
+
id: u.value,
|
|
328
|
+
ref_key: "inputElement",
|
|
329
|
+
ref: o,
|
|
330
|
+
class: g(["border border-primary-stroke px-3 w-full", {
|
|
331
|
+
"border-danger-base": d(p) || e.invalid,
|
|
332
|
+
"text-secondary-content": e.modelValue === "" || e.modelValue == null,
|
|
333
|
+
"rounded-full": e.rounded,
|
|
334
|
+
"rounded-md": !e.rounded,
|
|
335
|
+
"text-lg": e.large,
|
|
336
|
+
"py-2.5": e.large,
|
|
337
|
+
"py-2": !e.large
|
|
338
|
+
}]),
|
|
339
|
+
disabled: e.disabled,
|
|
340
|
+
tabindex: e.tabindex,
|
|
341
|
+
onInput: m,
|
|
342
|
+
onFocus: c,
|
|
343
|
+
onBlur: f,
|
|
344
|
+
onChange: b,
|
|
345
|
+
onKeydown: C,
|
|
346
|
+
onKeyup: V,
|
|
347
|
+
onKeypress: B
|
|
348
|
+
}, [
|
|
349
|
+
e.placeholder ? (a(), l("option", {
|
|
350
|
+
key: 0,
|
|
351
|
+
selected: e.modelValue === "" || e.modelValue == null,
|
|
352
|
+
disabled: "",
|
|
353
|
+
hidden: ""
|
|
354
|
+
}, k(e.placeholder), 9, Y)) : N("", !0),
|
|
355
|
+
(a(!0), l(A, null, L(e.options, (t) => (a(), l("option", {
|
|
356
|
+
selected: t.key === e.modelValue,
|
|
357
|
+
key: t.key,
|
|
358
|
+
value: t.key
|
|
359
|
+
}, k(t.value), 9, Z))), 128))
|
|
360
|
+
], 42, X)) : e.type === "textarea" ? (a(), l("textarea", {
|
|
361
|
+
key: 1,
|
|
362
|
+
name: e.name || d(v),
|
|
363
|
+
id: u.value,
|
|
364
|
+
value: e.modelValue,
|
|
365
|
+
rows: e.rows,
|
|
366
|
+
cols: e.cols,
|
|
367
|
+
maxlength: e.maxlength,
|
|
368
|
+
minlength: e.minlength,
|
|
369
|
+
spellcheck: e.spellcheck,
|
|
370
|
+
placeholder: e.placeholder,
|
|
371
|
+
disabled: e.disabled,
|
|
372
|
+
readonly: e.readonly,
|
|
373
|
+
tabindex: e.tabindex,
|
|
374
|
+
"aria-label": e.ariaLabel,
|
|
375
|
+
"aria-describedby": e.ariaDescribedby,
|
|
376
|
+
onInput: m,
|
|
377
|
+
onFocus: c,
|
|
378
|
+
onBlur: f,
|
|
379
|
+
onChange: b,
|
|
380
|
+
onKeydown: C,
|
|
381
|
+
onKeyup: V,
|
|
382
|
+
onKeypress: B,
|
|
383
|
+
class: g(["border border-primary-stroke px-3 w-full placeholder-gray-400", {
|
|
384
|
+
"border-danger-base": d(p),
|
|
385
|
+
"rounded-3xl": e.rounded,
|
|
386
|
+
"rounded-md": !e.rounded,
|
|
387
|
+
"text-lg": e.large,
|
|
388
|
+
"py-2.5": e.large,
|
|
389
|
+
"py-2": !e.large,
|
|
390
|
+
"resize-none": e.resize === "none",
|
|
391
|
+
"resize-both": e.resize === "both",
|
|
392
|
+
"resize-x": e.resize === "horizontal",
|
|
393
|
+
"resize-y": e.resize === "vertical"
|
|
394
|
+
}]),
|
|
395
|
+
ref_key: "inputElement",
|
|
396
|
+
ref: o
|
|
397
|
+
}, null, 42, x)) : e.type === "checkbox" ? (a(), l("div", _, [
|
|
398
|
+
s("input", {
|
|
399
|
+
type: e.type,
|
|
400
|
+
name: e.name || d(v),
|
|
401
|
+
id: u.value,
|
|
402
|
+
value: !0,
|
|
403
|
+
disabled: e.disabled,
|
|
404
|
+
readonly: e.readonly,
|
|
405
|
+
tabindex: e.tabindex,
|
|
406
|
+
"aria-label": e.ariaLabel,
|
|
407
|
+
"aria-describedby": e.ariaDescribedby,
|
|
408
|
+
checked: e.modelValue === !0,
|
|
409
|
+
onInput: m,
|
|
410
|
+
onFocus: c,
|
|
411
|
+
onBlur: f,
|
|
412
|
+
onChange: b,
|
|
413
|
+
class: g(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm", {
|
|
414
|
+
"border-danger-base": d(p) || e.invalid
|
|
415
|
+
}]),
|
|
416
|
+
ref_key: "inputElement",
|
|
417
|
+
ref: o
|
|
418
|
+
}, null, 42, ee),
|
|
419
|
+
s("label", {
|
|
420
|
+
for: u.value,
|
|
421
|
+
class: "text-primary-content select-none"
|
|
422
|
+
}, k(e.placeholder), 9, re)
|
|
423
|
+
])) : e.type === "radio" ? (a(), l("div", ae, [
|
|
424
|
+
(a(!0), l(A, null, L(e.options, (t, E) => (a(), l("div", {
|
|
425
|
+
key: t.key,
|
|
426
|
+
class: "flex w-full space-x-3 items-center"
|
|
427
|
+
}, [
|
|
428
|
+
s("input", {
|
|
429
|
+
type: "radio",
|
|
430
|
+
name: e.name || d(v),
|
|
431
|
+
id: `${u.value}-${E}`,
|
|
432
|
+
value: t.key,
|
|
433
|
+
disabled: e.disabled,
|
|
434
|
+
readonly: e.readonly,
|
|
435
|
+
tabindex: e.tabindex,
|
|
436
|
+
checked: t.key === e.modelValue,
|
|
437
|
+
onInput: m,
|
|
438
|
+
onFocus: c,
|
|
439
|
+
onBlur: f,
|
|
440
|
+
onChange: b,
|
|
441
|
+
class: g(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm", {
|
|
442
|
+
"border-danger-base": d(p) || e.invalid
|
|
443
|
+
}]),
|
|
444
|
+
ref_for: !0,
|
|
445
|
+
ref_key: "inputElement",
|
|
446
|
+
ref: o
|
|
447
|
+
}, null, 42, le),
|
|
448
|
+
s("label", {
|
|
449
|
+
for: `${u.value}-${E}`,
|
|
450
|
+
class: "text-primary-content select-none"
|
|
451
|
+
}, k(t.value), 9, ne)
|
|
452
|
+
]))), 128))
|
|
453
|
+
])) : (a(), l("div", oe, [
|
|
454
|
+
s("div", te, [
|
|
455
|
+
e.icon ? (a(), z(H(e.icon), {
|
|
456
|
+
key: 0,
|
|
457
|
+
class: "w-5 h-5 text-primary-content"
|
|
458
|
+
})) : N("", !0)
|
|
459
|
+
]),
|
|
460
|
+
s("input", {
|
|
461
|
+
type: y.value ? "text" : e.type,
|
|
462
|
+
name: e.name || d(v),
|
|
463
|
+
id: u.value,
|
|
464
|
+
value: e.modelValue,
|
|
465
|
+
placeholder: e.placeholder,
|
|
466
|
+
disabled: e.disabled,
|
|
467
|
+
readonly: e.readonly,
|
|
468
|
+
maxlength: e.maxlength,
|
|
469
|
+
minlength: e.minlength,
|
|
470
|
+
min: e.min,
|
|
471
|
+
max: e.max,
|
|
472
|
+
step: e.step,
|
|
473
|
+
pattern: e.pattern,
|
|
474
|
+
spellcheck: e.spellcheck,
|
|
475
|
+
inputmode: e.inputmode,
|
|
476
|
+
tabindex: e.tabindex,
|
|
477
|
+
autocomplete: e.autocomplete,
|
|
478
|
+
"aria-label": e.ariaLabel,
|
|
479
|
+
"aria-describedby": e.ariaDescribedby,
|
|
480
|
+
onInput: m,
|
|
481
|
+
onFocus: c,
|
|
482
|
+
onBlur: f,
|
|
483
|
+
onChange: b,
|
|
484
|
+
onKeydown: C,
|
|
485
|
+
onKeyup: V,
|
|
486
|
+
onKeypress: B,
|
|
487
|
+
class: g(["border border-primary-stroke w-full px-3 placeholder-gray-400 disabled:bg-gray-50", O.value]),
|
|
488
|
+
ref_key: "inputElement",
|
|
489
|
+
ref: o
|
|
490
|
+
}, null, 42, de),
|
|
491
|
+
e.clearable && P.value ? (a(), l("div", {
|
|
492
|
+
key: 0,
|
|
493
|
+
onClick: D,
|
|
494
|
+
class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
|
|
495
|
+
}, [
|
|
496
|
+
J(d(Q), { class: "w-5 h-5 text-secondary-content hover:text-primary-base" })
|
|
497
|
+
])) : e.type === "password" ? (a(), l("div", {
|
|
498
|
+
key: 1,
|
|
499
|
+
onClick: M,
|
|
500
|
+
class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
|
|
501
|
+
}, [
|
|
502
|
+
y.value ? (a(), z(d(W), {
|
|
503
|
+
key: 0,
|
|
504
|
+
class: "w-5 h-5 text-primary-content hover:text-primary-base"
|
|
505
|
+
})) : (a(), z(d(U), {
|
|
506
|
+
key: 1,
|
|
507
|
+
class: "w-5 h-5 text-secondary-content hover:text-primary-base"
|
|
508
|
+
}))
|
|
509
|
+
])) : N("", !0)
|
|
510
|
+
]));
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
export {
|
|
514
|
+
fe as _,
|
|
515
|
+
me as a,
|
|
516
|
+
ye as b,
|
|
517
|
+
ce as c,
|
|
518
|
+
pe as d,
|
|
519
|
+
ue as f,
|
|
520
|
+
T as i
|
|
521
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("vue"),F=require("./XMarkIcon-f94baa4c.cjs"),z={id:{type:String,required:!1},validation:{type:Object,required:!1}},j={id:{type:String,required:!1},label:{type:String,required:!1},name:{type:String,required:!1},required:{required:!1,type:Boolean,default:!1},hint:{type:String,required:!1,default:""},errors:{type:Array,required:!1}},L={name:{type:String,required:!1},errors:{type:Array,required:!1}},P={label:{type:String,required:!1}},A={id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,default:""},icon:{type:[Function,Object]},type:{type:String,default:"text"},inputClass:{required:!1,type:[Array,String]},modelValue:{required:!1,type:[String,Number,Array,Boolean,Object,null]},autofocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},large:{type:Boolean,default:!1},invalid:{type:Boolean,required:!1,default:!1},options:{type:Array,required:!1,default:[]},autocomplete:{type:String,required:!1,default:""},maxlength:{type:Number,required:!1},minlength:{type:Number,required:!1},min:{type:[Number,String],required:!1},max:{type:[Number,String],required:!1},step:{type:[Number,String],required:!1},pattern:{type:String,required:!1},rows:{type:Number,default:3},cols:{type:Number,required:!1},resize:{type:String,default:"vertical"},spellcheck:{type:Boolean,required:!1},inputmode:{type:String,required:!1},tabindex:{type:Number,required:!1},ariaLabel:{type:String,required:!1},ariaDescribedby:{type:String,required:!1}},D=()=>r.inject("BaseForm",()=>({formId:r.computed(()=>{}),validation:r.computed(()=>{})}),!0),q=()=>r.inject("BaseFormField",()=>({inputId:r.computed(()=>{}),inputName:r.computed(()=>{}),hasError:r.computed(()=>!1)}),!0);function I(f,b){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])}function M(f,b){return r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})])}const $=["id","disabled","tabindex"],O=["selected"],K=["selected","value"],X=["name","id","value","rows","cols","maxlength","minlength","spellcheck","placeholder","disabled","readonly","tabindex","aria-label","aria-describedby"],G={key:2,class:"flex w-full space-x-3 items-center"},H=["type","name","id","disabled","readonly","tabindex","aria-label","aria-describedby","checked"],J=["for"],Q={key:3,class:"w-full space-y-1"},R=["name","id","value","disabled","readonly","tabindex","checked"],T=["for"],U={key:4,class:"relative"},W={class:"absolute p-2 px-3 rounded-md h-full flex items-center select-none pointer-events-none"},Y=["type","name","id","value","placeholder","disabled","readonly","maxlength","minlength","min","max","step","pattern","spellcheck","inputmode","tabindex","autocomplete","aria-label","aria-describedby"],Z=r.defineComponent({__name:"OneFormInput",props:A,emits:["update:modelValue","focus","blur","change","input","keydown","keyup","keypress","clear","toggle-password"],setup(f,{expose:b,emit:E}){const l=f,a=E,{inputId:k,inputName:y,hasError:d}=q(),o=r.ref(null),s=r.ref(!1);r.onMounted(()=>{l.autofocus&&o.value&&o.value.focus()});const V=r.computed(()=>l.modelValue!=null&&l.modelValue!==""),t=r.computed(()=>{if(l.id)return l.id;const e=(k==null?void 0:k.value)||"";return l.name?`${e}-${l.name}`:e||""}),C=()=>{a("update:modelValue",""),a("clear"),B()},S=()=>{s.value=!s.value,a("toggle-password",s.value)},B=()=>{if(o.value){const e=Array.isArray(o.value)?o.value[0]:o.value;e==null||e.focus()}},N=r.computed(()=>{const e={"shadow-sm":l.type!=="range","border-danger-base":d.value||l.invalid,"pl-10":l.icon!=null,"pr-10":l.type==="password","rounded-full":l.rounded,"rounded-md":!l.rounded,"text-lg":l.large,"py-2.5":l.large,"py-2":!l.large};return l.inputClass!=null&&(typeof l.inputClass=="string"?e[l.inputClass]=!0:l.inputClass instanceof Array&&l.inputClass.forEach(m=>{e[m]=!0})),e}),i=e=>{const m=e.target;if(l.type==="checkbox"){const n=m.checked;a("update:modelValue",n),a("input",e)}else a("update:modelValue",m.value),a("input",e)},u=e=>a("focus",e),p=e=>a("blur",e),c=e=>a("change",e),h=e=>a("keydown",e),g=e=>a("keyup",e),v=e=>a("keypress",e);return b({focus:B}),(e,m)=>e.type==="select"?(r.openBlock(),r.createElementBlock("select",{key:0,id:t.value,ref_key:"inputElement",ref:o,class:r.normalizeClass(["border border-primary-stroke px-3 w-full",{"border-danger-base":r.unref(d)||e.invalid,"text-secondary-content":e.modelValue===""||e.modelValue==null,"rounded-full":e.rounded,"rounded-md":!e.rounded,"text-lg":e.large,"py-2.5":e.large,"py-2":!e.large}]),disabled:e.disabled,tabindex:e.tabindex,onInput:i,onFocus:u,onBlur:p,onChange:c,onKeydown:h,onKeyup:g,onKeypress:v},[e.placeholder?(r.openBlock(),r.createElementBlock("option",{key:0,selected:e.modelValue===""||e.modelValue==null,disabled:"",hidden:""},r.toDisplayString(e.placeholder),9,O)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.options,n=>(r.openBlock(),r.createElementBlock("option",{selected:n.key===e.modelValue,key:n.key,value:n.key},r.toDisplayString(n.value),9,K))),128))],42,$)):e.type==="textarea"?(r.openBlock(),r.createElementBlock("textarea",{key:1,name:e.name||r.unref(y),id:t.value,value:e.modelValue,rows:e.rows,cols:e.cols,maxlength:e.maxlength,minlength:e.minlength,spellcheck:e.spellcheck,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,tabindex:e.tabindex,"aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,onInput:i,onFocus:u,onBlur:p,onChange:c,onKeydown:h,onKeyup:g,onKeypress:v,class:r.normalizeClass(["border border-primary-stroke px-3 w-full placeholder-gray-400",{"border-danger-base":r.unref(d),"rounded-3xl":e.rounded,"rounded-md":!e.rounded,"text-lg":e.large,"py-2.5":e.large,"py-2":!e.large,"resize-none":e.resize==="none","resize-both":e.resize==="both","resize-x":e.resize==="horizontal","resize-y":e.resize==="vertical"}]),ref_key:"inputElement",ref:o},null,42,X)):e.type==="checkbox"?(r.openBlock(),r.createElementBlock("div",G,[r.createElementVNode("input",{type:e.type,name:e.name||r.unref(y),id:t.value,value:!0,disabled:e.disabled,readonly:e.readonly,tabindex:e.tabindex,"aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,checked:e.modelValue===!0,onInput:i,onFocus:u,onBlur:p,onChange:c,class:r.normalizeClass(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm",{"border-danger-base":r.unref(d)||e.invalid}]),ref_key:"inputElement",ref:o},null,42,H),r.createElementVNode("label",{for:t.value,class:"text-primary-content select-none"},r.toDisplayString(e.placeholder),9,J)])):e.type==="radio"?(r.openBlock(),r.createElementBlock("div",Q,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.options,(n,w)=>(r.openBlock(),r.createElementBlock("div",{key:n.key,class:"flex w-full space-x-3 items-center"},[r.createElementVNode("input",{type:"radio",name:e.name||r.unref(y),id:`${t.value}-${w}`,value:n.key,disabled:e.disabled,readonly:e.readonly,tabindex:e.tabindex,checked:n.key===e.modelValue,onInput:i,onFocus:u,onBlur:p,onChange:c,class:r.normalizeClass(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm",{"border-danger-base":r.unref(d)||e.invalid}]),ref_for:!0,ref_key:"inputElement",ref:o},null,42,R),r.createElementVNode("label",{for:`${t.value}-${w}`,class:"text-primary-content select-none"},r.toDisplayString(n.value),9,T)]))),128))])):(r.openBlock(),r.createElementBlock("div",U,[r.createElementVNode("div",W,[e.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.icon),{key:0,class:"w-5 h-5 text-primary-content"})):r.createCommentVNode("",!0)]),r.createElementVNode("input",{type:s.value?"text":e.type,name:e.name||r.unref(y),id:t.value,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,maxlength:e.maxlength,minlength:e.minlength,min:e.min,max:e.max,step:e.step,pattern:e.pattern,spellcheck:e.spellcheck,inputmode:e.inputmode,tabindex:e.tabindex,autocomplete:e.autocomplete,"aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,onInput:i,onFocus:u,onBlur:p,onChange:c,onKeydown:h,onKeyup:g,onKeypress:v,class:r.normalizeClass(["border border-primary-stroke w-full px-3 placeholder-gray-400 disabled:bg-gray-50",N.value]),ref_key:"inputElement",ref:o},null,42,Y),e.clearable&&V.value?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:C,class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[r.createVNode(r.unref(F.render),{class:"w-5 h-5 text-secondary-content hover:text-primary-base"})])):e.type==="password"?(r.openBlock(),r.createElementBlock("div",{key:1,onClick:S,class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[s.value?(r.openBlock(),r.createBlock(r.unref(M),{key:0,class:"w-5 h-5 text-primary-content hover:text-primary-base"})):(r.openBlock(),r.createBlock(r.unref(I),{key:1,class:"w-5 h-5 text-secondary-content hover:text-primary-base"}))])):r.createCommentVNode("",!0)]))}});exports._sfc_main=Z;exports.formFeedbackProps=L;exports.formFieldProps=j;exports.formLabelProps=P;exports.formProps=z;exports.injectForm=D;exports.injectFormField=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),V=require("./dropdown-5cb64ab7.cjs"),w=require("@floating-ui/dom"),D=require("@floating-ui/vue"),y=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),B=require("./i18n/index.cjs"),N=require("./XMarkIcon-f94baa4c.cjs"),C=require("./ChevronDownIcon-6889ac87.cjs"),$=require("./ChevronUpIcon-64a673e1.cjs"),j=require("./ChevronRightIcon-2992cf0d.cjs"),O=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),q=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},P={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},F=e.defineComponent({__name:"OneDropdown",props:V.dropdownProps,emits:["open","close"],setup(h,{emit:u}){const c=e.ref(!1),d=e.ref(null),v=e.ref(null),s=e.ref(null),r=u,t=h,a=()=>{c.value=!c.value,c.value?r("open"):r("close")};let p=null;const f=()=>{t.trigger==="hover"&&(p&&(clearTimeout(p),p=null),c.value||(c.value=!0,r("open")))},i=()=>{t.trigger==="hover"&&(p=setTimeout(()=>{c.value&&(c.value=!1,r("close"))},100))};e.provide("OneDropdown",{onToggle:a});let m=null;function x(){!v.value||!s.value||w.computePosition(v.value,s.value,{placement:t.stick?t.stick:"bottom-start",strategy:"fixed",middleware:[w.offset(t.offset),D.flip(),w.shift({padding:8})]}).then(({x:o,y:l})=>{s.value&&Object.assign(s.value.style,{left:`${o}px`,top:`${l}px`,visibility:"visible"})})}e.watch(c,async o=>{t.appendBody&&(o?(await e.nextTick(),v.value&&s.value&&(s.value.style.visibility="hidden",x(),m=w.autoUpdate(v.value,s.value,x))):m&&(m(),m=null))}),e.onBeforeUnmount(()=>{m&&m()});const k=e.computed(()=>{var _;if(t.appendBody)return"";const o=(_=d.value)==null?void 0:_.getBoundingClientRect(),l=o?o.x<270:!1;return o&&o.top+270>window.innerHeight?"up"+(l?"-right":"-left"):"down"+(l?"-right":"-left")}),g=e.computed(()=>{const o=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return k.value.startsWith("up")?o.push("bottom-1 mb-10"):k.value.startsWith("down")&&o.push("top-1 mt-10"),t.stick==="right"?o.push("right-0"):t.stick==="left"&&o.push("left-0"),o}),n=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:d,"data-opened":c.value,onMouseenter:f,onMouseleave:i},[e.createElementVNode("div",{ref_key:"buttonRef",ref:v},[e.renderSlot(o.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:a,isExpanded:c.value})))],512),t.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",n.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",onMouseenter:f,onMouseleave:i},[o.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],34)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[o.title?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],40,q))}}),b=e.defineComponent({__name:"OneDropdownItem",props:V.dropdownItemProps,emits:["click"],setup(h,{emit:u}){const c=u,d=h,v=e.inject("OneDropdown"),s=()=>{v!==void 0&&v.onToggle(),c("click")},r=e.computed(()=>{const t=[];return d.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):d.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):d.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):d.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",r.value]),onClick:e.withModifiers(s,["prevent"])},[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2))}});function T(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const H={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},onAccount:{type:Function},onLogout:{type:Function},t:{type:Function}},S={workspace:{type:Object,required:!0},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},onChange:{type:Function},onApp:{type:Function},t:{type:Function}},R={help:{type:Object},helpSlug:{type:String},t:{type:Function}},U=["onClick"],W={class:"flex flex-col items-center pt-5 pb-2 h-full"},X={class:"flex flex-col px-10 py-1 mt-2 text-center"},G={class:"self-center text-base font-medium tracking-wide text-black"},J={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},K={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:H,setup(h){const u=h,c=B.useOnebI18n(),d=e.computed(()=>u.t??c),v=e.computed(()=>{var t;return(t=u.menu)==null?void 0:t.map(a=>{let p={label:a.label};a.icon!=null&&(p={...p,icon:a.icon});const f=typeof a.click=="function"?a.click:()=>{};return{key:a.label,args:p,click:f}})}),s=()=>{typeof u.onAccount=="function"&&u.onAccount()},r=()=>{typeof u.onLogout=="function"&&u.onLogout()};return(t,a)=>(e.openBlock(),e.createBlock(F,{stick:"right"},{button:e.withCtx(({onToggle:p,isExpanded:f})=>{var i,m;return[e.createElementVNode("button",{onClick:p,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[f?"bg-secondary-25":""]])},[e.createVNode(y._sfc_main,{text:((i=t.user)==null?void 0:i.name)||"",size:t.iconSize,src:(m=t.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,U)]}),menu:e.withCtx(()=>{var p,f,i,m,x;return[e.createElementVNode("div",W,[e.createVNode(y._sfc_main,{text:((p=t.user)==null?void 0:p.name)||"",size:80,src:(f=t.user)==null?void 0:f.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",X,[e.createElementVNode("div",G,e.toDisplayString((i=t.user)==null?void 0:i.name),1),e.createElementVNode("div",J,e.toDisplayString((m=t.user)==null?void 0:m.email),1)]),typeof u.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(d.value("ui.layout.account")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,k=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:k.key},{ref_for:!0},k.args,{onClick:k.click}),null,16,["onClick"]))),128)),typeof t.onLogout=="function"?(e.openBlock(),e.createBlock(b,{key:0,icon:e.unref(T),label:d.value("ui.layout.logout"),class:"rounded py-3",onClick:r},null,8,["icon","label"])):e.createCommentVNode("",!0)]),a[0]||(a[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((x=t.app)==null?void 0:x.version),1)])]}),_:1}))}});function M(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},ue={class:"px-3 py-2"},de={class:"text-secondary-content text-left pb-1 text-xs uppercase"},pe={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ve={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ke={class:"pl-2"},xe={class:"text-sm mt-1 font-semibold"},ge={class:"text9 mt-1"},_e={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},ye=e.defineComponent({__name:"OneBrowserMenu",props:S,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.ref(!1),t=()=>{r.value=!r.value,r.value?c("open"):c("close")},a=e.ref(!1);e.computed(()=>a.value?$.render:C.render);const p=()=>{typeof d.onChange=="function"&&d.onChange()},f=i=>{typeof d.onApp=="function"&&d.onApp(i)};return(i,m)=>{var x,k,g;return e.openBlock(),e.createElementBlock("div",{"data-opened":r.value},[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":r.value}])},[e.createVNode(e.unref(M),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:t})):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString(s.value("ui.layout.workspaces")),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:t})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(y._sfc_main,{text:((x=i.workspace)==null?void 0:x.name)||"",src:(k=i.workspace)==null?void 0:k.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((g=i.workspace)==null?void 0:g.name),1)]),a.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.workspaces,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(n.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:p,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString(s.value("ui.layout.change_workspace")),1)])]),e.createElementVNode("div",ue,[e.createElementVNode("div",de,e.toDisplayString(s.value("ui.layout.apps")),1),e.createElementVNode("div",pe,[i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.apps,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,onClick:o=>f(n),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ve,[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ke,[e.createElementVNode("p",xe,e.toDisplayString(n.name),1),e.createElementVNode("p",ge,e.toDisplayString(n==null?void 0:n.short),1)])]),e.createElementVNode("div",null,[e.createVNode(O.OneButton,{variant:"touch",icon:e.unref(j.render),onClick:o=>f(n)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("button",_e,e.toDisplayString(s.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(ye,[["__scopeId","data-v-3675784e"]]);function E(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function z(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}function L(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})])}function Be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})])}const Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},$e={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},Ae=["onClick"],Fe={class:"uppercase text-[8px]"},Se={class:"overflow-y-auto grid rounded-xl"},Me={class:"max-h-full bg-[#FAFAFA]"},ze={key:0,class:"space-y-2"},Le=["onClick"],De={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},qe={class:"text-[10px] mt-1 text-[#979CA9]"},Ie={class:"mt-auto"},Pe={key:0},Te=["onClick"],He={class:"flex items-center space-x-3"},Re={class:"h-16"},Ue={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},We={class:"flex justify-between"},Xe=["onClick"],Ge={key:0,class:"tooltip-text min-w-[70px]"},Je={class:"flex justify-between mb-4"},Ke=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.computed(()=>{const n=d.help??{};return{label:n.label??s.value("ui.help.title"),social:n.social??s.value("ui.help.social"),socialButt:n.socialButt??s.value("ui.help.social"),buttMore:n.buttMore??s.value("ui.help.more"),buttNoMore:n.buttNoMore??s.value("ui.help.hide"),helpButton:n.helpButton??[{name:s.value("ui.help.support"),link:"https://t.me/onebapp_bot",icon:L},{name:s.value("ui.help.reference"),link:d.helpSlug?`https://oneb.app/help/${d.helpSlug}`:"https://oneb.app/help",icon:E},{name:s.value("ui.help.leave_request"),link:"https://oneb.app/support",icon:Be}],helpList:n.helpList??[],video:n.video??[],socialList:n.socialList??[],termsOffer:n.termsOffer??[{name:s.value("ui.help.terms"),link:"https://oneb.app/terms-of-service"},{name:s.value("ui.help.offer"),link:"https://oneb.app/offer"}]}}),t=e.ref(!1),a=()=>{t.value=!t.value,t.value?c("open"):c("close")},p=e.computed(()=>k.value?$.render:C.render),f=e.ref(3),i=e.computed(()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;return f.value===n});e.computed(()=>(r.value.helpList||[]).slice(0,f.value));const m=()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;f.value=i.value?3:n},x=(n,o)=>{n&&o&&typeof o.openLink=="function"?o.openLink(o):n&&window.open(n,"_blank")},k=e.ref(!1),g=()=>{k.value=!k.value};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{"data-opened":t.value},[e.createElementVNode("button",{onClick:a,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":t.value}])},[e.createVNode(e.unref(E),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:a})):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString(r.value.label),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:a})]),r.value.helpButton?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpButton,l=>(e.openBlock(),e.createElementBlock("button",{key:l.name,onClick:_=>x(l.link,l),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Fe,e.toDisplayString(l.name),1)],8,Ae))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.createElementVNode("div",Me,[r.value.helpList&&r.value.helpList.length?(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpList,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,onClick:_=>x(l.link,l),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",De,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(l.name),1),e.createElementVNode("p",qe,e.toDisplayString(l.category),1)])])],8,Le))),128))])):e.createCommentVNode("",!0)])]),r.value.helpList&&r.value.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:m,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(i.value?r.value.buttNoMore:r.value.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ie,[r.value.video?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.video,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.name),1)],8,Te))),128))])):e.createCommentVNode("",!0),r.value.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",He,[e.createVNode(e.unref(z),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(r.value.socialButt),1)]),e.createVNode(e.unref(p),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.socialList,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[l.name?(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(l.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Xe))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.termsOffer,l=>(e.openBlock(),e.createElementBlock("a",{key:l.name,target:"_blank",href:l.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(l.name),1)])])],8,Ke))),128))])])])):e.createCommentVNode("",!0)],8,Ee))}});const tt=A._export_sfc(et,[["__scopeId","data-v-56eccaba"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=F;exports._sfc_main$1=b;exports._sfc_main$2=Y;exports.browserMenuProps=S;exports.render=M;exports.render$1=z;exports.render$2=L;
|