@xleddyl/443-components-vue 0.5.0 → 0.6.2
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/README.md +25 -6
- package/dist/chart/BarChart.vue +11 -4
- package/dist/chart/BarChart.vue.d.ts +2 -0
- package/dist/chart/ChartLegend.vue +43 -4
- package/dist/chart/ChartLegend.vue.d.ts +4 -2
- package/dist/chart/ChartPanel.vue +10 -10
- package/dist/chart/ChartPanel.vue.d.ts +11 -8
- package/dist/chart/ChartSummary.vue +8 -3
- package/dist/chart/ChartSummary.vue.d.ts +3 -1
- package/dist/chart/DoughnutChart.vue +11 -4
- package/dist/chart/LineChart.vue +8 -2
- package/dist/chart/LineChart.vue.d.ts +2 -0
- package/dist/chart/chart.css +19 -0
- package/dist/chart/patterns.d.ts +6 -0
- package/dist/chart/patterns.mjs +79 -0
- package/dist/chart/types.d.ts +5 -0
- package/dist/chart/useChartColors.mjs +1 -1
- package/dist/components/core/Button.vue +11 -1
- package/dist/components/core/Button.vue.d.ts +1 -1
- package/dist/components/core/FieldMessage.vue +6 -0
- package/dist/components/core/FieldMessage.vue.d.ts +1 -1
- package/dist/components/core/Form.vue +18 -1
- package/dist/components/core/FormAlerts.vue +41 -3
- package/dist/components/core/FormField.vue +43 -24
- package/dist/components/core/Input.vue.d.ts +6 -6
- package/dist/components/core/Root.vue +6 -1
- package/dist/components/core/Root.vue.d.ts +2 -2
- package/dist/components/core/Spinner.vue +6 -11
- package/dist/components/core/Spinner.vue.d.ts +2 -2
- package/dist/components/core/Textarea.vue.d.ts +2 -2
- package/dist/components/core/VisuallyHidden.vue.d.ts +2 -2
- package/dist/components/data/Avatar.vue +8 -5
- package/dist/components/data/AvatarGroup.vue +6 -3
- package/dist/components/data/Badge.vue.d.ts +1 -1
- package/dist/components/data/FilterPills.vue +18 -2
- package/dist/components/data/Pagination.vue +24 -18
- package/dist/components/data/Pagination.vue.d.ts +2 -2
- package/dist/components/data/SelectionBar.vue +32 -3
- package/dist/components/data/Stat.vue +7 -1
- package/dist/components/data/Stat.vue.d.ts +2 -2
- package/dist/components/data/Table.vue +62 -14
- package/dist/components/data/Tag.vue +24 -4
- package/dist/components/data/Tag.vue.d.ts +3 -3
- package/dist/components/data/Timeline.vue +12 -1
- package/dist/components/data/Tree.vue +137 -36
- package/dist/components/data/Tree.vue.d.ts +13 -14
- package/dist/components/data/types.d.ts +2 -1
- package/dist/components/feedback/Alert.vue +18 -9
- package/dist/components/feedback/Alert.vue.d.ts +2 -2
- package/dist/components/feedback/LoadingOverlay.vue +35 -3
- package/dist/components/feedback/Meter.vue +28 -3
- package/dist/components/feedback/Progress.vue +2 -7
- package/dist/components/feedback/Progress.vue.d.ts +1 -1
- package/dist/components/feedback/ProgressRing.vue +2 -6
- package/dist/components/feedback/ProgressRing.vue.d.ts +1 -1
- package/dist/components/forms/Calendar.vue +49 -26
- package/dist/components/forms/Calendar.vue.d.ts +9 -5
- package/dist/components/forms/CheckboxGroup.vue +14 -4
- package/dist/components/forms/CheckboxGroup.vue.d.ts +1 -0
- package/dist/components/forms/ColorInput.vue +68 -15
- package/dist/components/forms/ColorInput.vue.d.ts +16 -13
- package/dist/components/forms/Combobox.vue +18 -4
- package/dist/components/forms/DateInput.vue.d.ts +6 -6
- package/dist/components/forms/DatePicker.vue +23 -7
- package/dist/components/forms/DatePicker.vue.d.ts +4 -2
- package/dist/components/forms/FileInput.vue +31 -13
- package/dist/components/forms/FileInput.vue.d.ts +2 -2
- package/dist/components/forms/InputAddon.vue +18 -2
- package/dist/components/forms/InputGroup.vue +27 -0
- package/dist/components/forms/InputGroup.vue.d.ts +2 -0
- package/dist/components/forms/NumberInput.vue +6 -7
- package/dist/components/forms/NumberInput.vue.d.ts +6 -6
- package/dist/components/forms/PasswordInput.vue +12 -6
- package/dist/components/forms/PasswordInput.vue.d.ts +6 -7
- package/dist/components/forms/PinInput.vue +11 -1
- package/dist/components/forms/PinInput.vue.d.ts +8 -6
- package/dist/components/forms/RadioGroup.vue +15 -5
- package/dist/components/forms/RadioGroup.vue.d.ts +1 -0
- package/dist/components/forms/SegmentedControl.vue +15 -10
- package/dist/components/forms/SegmentedControl.vue.d.ts +1 -0
- package/dist/components/forms/Slider.vue +9 -0
- package/dist/components/forms/Slider.vue.d.ts +8 -6
- package/dist/components/forms/Switch.vue +7 -0
- package/dist/components/forms/Switch.vue.d.ts +2 -2
- package/dist/components/forms/TimeInput.vue.d.ts +6 -6
- package/dist/components/forms/types.d.ts +4 -0
- package/dist/components/layout/Accordion.vue.d.ts +2 -2
- package/dist/components/layout/AppShell.vue +40 -18
- package/dist/components/layout/AppShell.vue.d.ts +11 -9
- package/dist/components/layout/Card.vue +50 -16
- package/dist/components/layout/Card.vue.d.ts +13 -11
- package/dist/components/layout/CopyButton.vue +13 -5
- package/dist/components/layout/CopyButton.vue.d.ts +3 -3
- package/dist/components/layout/NavLink.vue +10 -1
- package/dist/components/layout/NavLink.vue.d.ts +2 -2
- package/dist/components/layout/PageHeader.vue +2 -2
- package/dist/components/layout/Separator.vue +6 -3
- package/dist/components/layout/Sidebar.vue +14 -7
- package/dist/components/layout/Sidebar.vue.d.ts +0 -2
- package/dist/components/layout/SidebarNav.vue +16 -44
- package/dist/components/layout/Stack.vue.d.ts +2 -2
- package/dist/components/layout/Tabs.vue +10 -18
- package/dist/components/layout/Tabs.vue.d.ts +2 -2
- package/dist/components/layout/Toolbar.vue +10 -4
- package/dist/components/layout/Toolbar.vue.d.ts +1 -0
- package/dist/components/layout/types.d.ts +1 -0
- package/dist/components/overlays/CommandPalette.vue +8 -4
- package/dist/components/overlays/CommandPalette.vue.d.ts +3 -8
- package/dist/components/overlays/ConfirmDialog.vue +7 -5
- package/dist/components/overlays/ConfirmDialog.vue.d.ts +12 -8
- package/dist/components/overlays/ConfirmHost.vue +22 -19
- package/dist/components/overlays/ConfirmHost.vue.d.ts +8 -6
- package/dist/components/overlays/ContextMenu.vue +9 -11
- package/dist/components/overlays/ContextMenu.vue.d.ts +2 -2
- package/dist/components/overlays/Drawer.vue +2 -0
- package/dist/components/overlays/Drawer.vue.d.ts +4 -2
- package/dist/components/overlays/DropdownMenu.vue +13 -21
- package/dist/components/overlays/DropdownMenu.vue.d.ts +2 -2
- package/dist/components/overlays/HoverCard.vue +8 -2
- package/dist/components/overlays/HoverCard.vue.d.ts +2 -2
- package/dist/components/overlays/Modal.vue +2 -0
- package/dist/components/overlays/Modal.vue.d.ts +4 -2
- package/dist/components/overlays/Popover.vue +19 -4
- package/dist/components/overlays/Popover.vue.d.ts +2 -2
- package/dist/components/overlays/Toaster.vue +39 -7
- package/dist/components/overlays/Tooltip.vue +39 -14
- package/dist/components/overlays/types.d.ts +6 -0
- package/dist/components/templates/AccountMenu.vue.d.ts +2 -2
- package/dist/components/templates/AppearanceSettings.vue +83 -77
- package/dist/components/templates/AppearanceSettings.vue.d.ts +2 -2
- package/dist/components/templates/AuthLayout.vue +2 -2
- package/dist/components/templates/Brand.vue.d.ts +2 -2
- package/dist/components/templates/DashboardLayout.vue +3 -7
- package/dist/components/templates/DashboardLayout.vue.d.ts +8 -18
- package/dist/components/templates/DetailPage.vue +3 -1
- package/dist/components/templates/DetailPage.vue.d.ts +2 -2
- package/dist/components/templates/ErrorPage.vue +11 -5
- package/dist/components/templates/ErrorPage.vue.d.ts +10 -6
- package/dist/components/templates/FormPage.vue +16 -3
- package/dist/components/templates/ListPage.vue +19 -6
- package/dist/components/templates/ListPage.vue.d.ts +1 -0
- package/dist/components/templates/NotFoundPage.vue +2 -0
- package/dist/components/templates/NotFoundPage.vue.d.ts +4 -0
- package/dist/components/templates/SaveBar.vue +18 -3
- package/dist/components/templates/SaveBar.vue.d.ts +5 -5
- package/dist/components/templates/SettingsGroup.vue +1 -1
- package/dist/components/templates/SettingsGroup.vue.d.ts +3 -1
- package/dist/components/templates/SettingsModal.vue +73 -46
- package/dist/components/templates/SettingsModal.vue.d.ts +9 -11
- package/dist/components/templates/SettingsPage.vue.d.ts +2 -2
- package/dist/components/templates/SettingsSection.vue.d.ts +4 -2
- package/dist/components/templates/types.d.ts +4 -0
- package/dist/composables/useAlert.mjs +5 -10
- package/dist/composables/useConfirm.mjs +5 -5
- package/dist/composables/useField.d.ts +4 -0
- package/dist/composables/useField.mjs +16 -5
- package/dist/composables/useFileDrop.mjs +2 -1
- package/dist/composables/useOverlay.mjs +2 -1
- package/dist/composables/usePreset.mjs +4 -10
- package/dist/composables/usePrompt.mjs +6 -13
- package/dist/composables/useScrollLock.mjs +4 -3
- package/dist/composables/useTheme.mjs +3 -11
- package/dist/composables/useToast.mjs +2 -1
- package/dist/editor/RichTextEditor.vue +31 -6
- package/dist/editor/RichTextEditor.vue.d.ts +2 -2
- package/dist/editor/rich-text-editor.css +9 -4
- package/dist/grid/DataGrid.vue +72 -12
- package/dist/grid/GridToolbar.vue +1 -1
- package/dist/grid/GridToolbar.vue.d.ts +2 -2
- package/dist/grid/cells/BadgeCell.vue +3 -1
- package/dist/grid/cells/BadgeCell.vue.d.ts +17 -3
- package/dist/grid/cells/DateCell.vue +3 -1
- package/dist/grid/cells/DateCell.vue.d.ts +17 -3
- package/dist/grid/cells/EmptyCell.vue +15 -0
- package/dist/grid/cells/EmptyCell.vue.d.ts +392 -0
- package/dist/grid/cells/LinkCell.vue +9 -2
- package/dist/grid/cells/LinkCell.vue.d.ts +17 -3
- package/dist/grid/data-grid.css +5 -5
- package/dist/grid/types.d.ts +2 -0
- package/dist/internal/core/ButtonContent.vue +3 -0
- package/dist/internal/core/LiveRegion.vue +26 -0
- package/dist/internal/core/LiveRegion.vue.d.ts +393 -0
- package/dist/internal/core/copy.d.ts +6 -0
- package/dist/internal/core/copy.mjs +14 -0
- package/dist/internal/core/focus.d.ts +6 -0
- package/dist/internal/core/focus.mjs +46 -0
- package/dist/internal/core/intl.d.ts +4 -2
- package/dist/internal/core/intl.mjs +23 -22
- package/dist/internal/core/live.d.ts +6 -0
- package/dist/internal/core/live.mjs +22 -0
- package/dist/internal/core/preset.d.ts +0 -1
- package/dist/internal/core/preset.mjs +4 -14
- package/dist/internal/core/resize.d.ts +1 -0
- package/dist/internal/core/resize.mjs +11 -0
- package/dist/internal/core/roving.d.ts +7 -0
- package/dist/internal/core/roving.mjs +19 -1
- package/dist/internal/core/scroll-edges.d.ts +5 -0
- package/dist/internal/core/scroll-edges.mjs +63 -0
- package/dist/internal/core/storage.d.ts +2 -0
- package/dist/internal/core/storage.mjs +8 -0
- package/dist/internal/core/theme.d.ts +0 -1
- package/dist/internal/core/theme.mjs +4 -13
- package/dist/internal/core/tone.d.ts +1 -0
- package/dist/internal/core/tone.mjs +4 -0
- package/dist/internal/core/transition.d.ts +1 -0
- package/dist/internal/core/transition.mjs +20 -0
- package/dist/internal/data/rows.mjs +6 -5
- package/dist/internal/data/tree.d.ts +2 -3
- package/dist/internal/feedback/LoadingHost.vue +16 -6
- package/dist/internal/feedback/loading.mjs +2 -1
- package/dist/internal/feedback/progress.d.ts +12 -0
- package/dist/internal/feedback/progress.mjs +13 -0
- package/dist/internal/floating/layer.d.ts +1 -1
- package/dist/internal/floating/layer.mjs +17 -10
- package/dist/internal/forms/keys.d.ts +4 -0
- package/dist/internal/forms/keys.mjs +1 -0
- package/dist/internal/forms/name.d.ts +2 -0
- package/dist/internal/forms/name.mjs +12 -0
- package/dist/internal/forms/standard-schema.d.ts +0 -2
- package/dist/internal/forms/standard-schema.mjs +0 -18
- package/dist/internal/layout/NavGroup.vue +104 -0
- package/dist/internal/layout/NavGroup.vue.d.ts +412 -0
- package/dist/internal/overlays/DialogFrame.vue +53 -6
- package/dist/internal/overlays/DialogFrame.vue.d.ts +5 -2
- package/dist/internal/overlays/MenuList.vue +4 -11
- package/dist/internal/overlays/MenuList.vue.d.ts +6 -6
- package/dist/internal/overlays/OverlayView.vue +2 -0
- package/dist/internal/overlays/OverlayView.vue.d.ts +8 -6
- package/dist/internal/overlays/confirm.d.ts +6 -1
- package/dist/internal/overlays/confirm.mjs +5 -2
- package/dist/internal/overlays/dialog.d.ts +1 -0
- package/dist/internal/overlays/dialog.mjs +9 -9
- package/dist/internal/overlays/hover.d.ts +1 -0
- package/dist/internal/overlays/hover.mjs +20 -3
- package/dist/internal/overlays/menu.d.ts +9 -0
- package/dist/internal/overlays/menu.mjs +15 -0
- package/dist/internal/overlays/stack.d.ts +1 -0
- package/dist/locale/en.mjs +70 -18
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.mjs +5 -11
- package/dist/locale/it.mjs +70 -18
- package/dist/locale/types.d.ts +54 -2
- package/dist/nuxt/runtime/RouteAnnouncer.vue +21 -0
- package/dist/nuxt/runtime/RouteAnnouncer.vue.d.ts +3 -0
- package/dist/nuxt/runtime/layout-head.d.ts +2 -0
- package/dist/nuxt/runtime/layout-head.mjs +13 -0
- package/dist/nuxt/runtime/layouts/auth.vue +4 -0
- package/dist/nuxt/runtime/layouts/auth.vue.d.ts +2 -2
- package/dist/nuxt/runtime/layouts/dashboard.vue +4 -0
- package/dist/nuxt/runtime/layouts/dashboard.vue.d.ts +2 -2
- package/dist/nuxt/runtime/locale.mjs +9 -1
- package/dist/nuxt/runtime/theme.mjs +17 -12
- package/dist/styles/base.css +0 -13
- package/dist/styles/core/button.css +8 -8
- package/dist/styles/core/field-message.css +2 -2
- package/dist/styles/core/form-field.css +11 -2
- package/dist/styles/core/input.css +4 -7
- package/dist/styles/core/kbd.css +0 -1
- package/dist/styles/data/badge.css +8 -4
- package/dist/styles/data/description-list.css +2 -2
- package/dist/styles/data/filter-pills.css +5 -8
- package/dist/styles/data/pagination.css +2 -2
- package/dist/styles/data/stat.css +3 -3
- package/dist/styles/data/table.css +2 -2
- package/dist/styles/data/tag.css +1 -2
- package/dist/styles/data/timeline.css +1 -1
- package/dist/styles/data/tree.css +31 -10
- package/dist/styles/feedback/alert.css +0 -3
- package/dist/styles/feedback/loading-host.css +4 -0
- package/dist/styles/feedback/loading-overlay.css +4 -0
- package/dist/styles/forced-colors.css +215 -0
- package/dist/styles/forms/calendar.css +2 -2
- package/dist/styles/forms/choice.css +2 -2
- package/dist/styles/forms/color-input.css +1 -1
- package/dist/styles/forms/combobox.css +2 -24
- package/dist/styles/forms/date-input.css +2 -2
- package/dist/styles/forms/date-picker.css +3 -7
- package/dist/styles/forms/file-input.css +4 -3
- package/dist/styles/forms/input-group.css +6 -0
- package/dist/styles/forms/number-input.css +2 -2
- package/dist/styles/forms/password-input.css +5 -2
- package/dist/styles/forms/pin-input.css +4 -2
- package/dist/styles/forms/segmented.css +2 -2
- package/dist/styles/forms/select.css +6 -6
- package/dist/styles/forms/slider.css +5 -4
- package/dist/styles/forms/switch.css +5 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/layout/app-shell.css +15 -3
- package/dist/styles/layout/copy-button.css +1 -1
- package/dist/styles/layout/nav-link.css +1 -33
- package/dist/styles/layout/separator.css +1 -1
- package/dist/styles/layout/sidebar-nav.css +15 -4
- package/dist/styles/layout/sidebar.css +20 -6
- package/dist/styles/layout/tabs.css +9 -4
- package/dist/styles/layout/theme-switch.css +0 -6
- package/dist/styles/overlays/command.css +9 -15
- package/dist/styles/overlays/confirm.css +1 -1
- package/dist/styles/overlays/drawer.css +0 -1
- package/dist/styles/overlays/menu.css +2 -17
- package/dist/styles/overlays/modal.css +29 -6
- package/dist/styles/overlays/toast.css +1 -2
- package/dist/styles/presets.css +4 -4
- package/dist/styles/shared.css +96 -3
- package/dist/styles/templates/account-menu.css +3 -3
- package/dist/styles/templates/auth-layout.css +1 -1
- package/dist/styles/templates/brand.css +3 -3
- package/dist/styles/templates/empty-page.css +1 -1
- package/dist/styles/templates/form-page.css +10 -0
- package/dist/styles/templates/save-bar.css +10 -0
- package/dist/styles/templates/settings-modal.css +42 -44
- package/dist/styles/templates/settings-page.css +3 -3
- package/dist/styles/tokens.css +12 -2
- package/package.json +1 -1
- package/dist/internal/overlays/focus.d.ts +0 -1
- package/dist/internal/overlays/focus.mjs +0 -24
|
@@ -29,11 +29,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
29
29
|
min?: (string | number) | undefined;
|
|
30
30
|
max?: (string | number) | undefined;
|
|
31
31
|
pattern?: string | undefined;
|
|
32
|
+
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
33
|
+
indeterminate?: boolean | undefined;
|
|
32
34
|
title?: string | undefined;
|
|
33
35
|
list?: string | undefined;
|
|
34
36
|
results?: (string | number) | undefined;
|
|
35
37
|
placeholder?: string | undefined;
|
|
36
38
|
name?: string | undefined;
|
|
39
|
+
dir?: string | undefined;
|
|
37
40
|
role?: string | undefined;
|
|
38
41
|
'aria-label'?: string | undefined;
|
|
39
42
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -192,7 +195,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
192
195
|
accesskey?: string | undefined;
|
|
193
196
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
194
197
|
contextmenu?: string | undefined;
|
|
195
|
-
dir?: string | undefined;
|
|
196
198
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
197
199
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
198
200
|
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
@@ -245,9 +247,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
245
247
|
accept?: string | undefined;
|
|
246
248
|
alt?: string | undefined;
|
|
247
249
|
capture?: boolean | "user" | "environment" | undefined;
|
|
248
|
-
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
249
250
|
crossorigin?: string | undefined;
|
|
250
|
-
indeterminate?: boolean | undefined;
|
|
251
251
|
maxlength?: (string | number) | undefined;
|
|
252
252
|
minlength?: (string | number) | undefined;
|
|
253
253
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -288,11 +288,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
288
288
|
min?: (string | number) | undefined;
|
|
289
289
|
max?: (string | number) | undefined;
|
|
290
290
|
pattern?: string | undefined;
|
|
291
|
+
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
292
|
+
indeterminate?: boolean | undefined;
|
|
291
293
|
title?: string | undefined;
|
|
292
294
|
list?: string | undefined;
|
|
293
295
|
results?: (string | number) | undefined;
|
|
294
296
|
placeholder?: string | undefined;
|
|
295
297
|
name?: string | undefined;
|
|
298
|
+
dir?: string | undefined;
|
|
296
299
|
role?: string | undefined;
|
|
297
300
|
'aria-label'?: string | undefined;
|
|
298
301
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -451,7 +454,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
451
454
|
accesskey?: string | undefined;
|
|
452
455
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
453
456
|
contextmenu?: string | undefined;
|
|
454
|
-
dir?: string | undefined;
|
|
455
457
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
456
458
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
457
459
|
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
@@ -504,9 +506,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
504
506
|
accept?: string | undefined;
|
|
505
507
|
alt?: string | undefined;
|
|
506
508
|
capture?: boolean | "user" | "environment" | undefined;
|
|
507
|
-
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
508
509
|
crossorigin?: string | undefined;
|
|
509
|
-
indeterminate?: boolean | undefined;
|
|
510
510
|
maxlength?: (string | number) | undefined;
|
|
511
511
|
minlength?: (string | number) | undefined;
|
|
512
512
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -520,7 +520,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
520
520
|
minLength: number;
|
|
521
521
|
invalid: boolean;
|
|
522
522
|
size: FieldSize;
|
|
523
|
-
autocomplete: string;
|
|
524
523
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
525
524
|
declare const _default: typeof __VLS_export;
|
|
526
525
|
export default _default;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
:data-form-type="noAutofill ? 'other' : void 0"
|
|
23
23
|
:id="control.id.value"
|
|
24
24
|
:name="control.field?.name.value"
|
|
25
|
+
:aria-label="label"
|
|
25
26
|
v-bind="$attrs"
|
|
26
27
|
:disabled="control.disabled.value || void 0"
|
|
27
28
|
:required="control.required.value || void 0"
|
|
@@ -70,9 +71,10 @@
|
|
|
70
71
|
</template>
|
|
71
72
|
|
|
72
73
|
<script setup>
|
|
73
|
-
import { computed, ref, useTemplateRef } from "vue";
|
|
74
|
+
import { computed, ref, useAttrs, useTemplateRef } from "vue";
|
|
74
75
|
import { useFieldControl } from "../../composables/useField";
|
|
75
76
|
import { joinIds } from "../../internal/forms/control";
|
|
77
|
+
import { hasNameAttrs, warnUnnamed } from "../../internal/forms/name";
|
|
76
78
|
defineOptions({ inheritAttrs: false });
|
|
77
79
|
const props = defineProps({
|
|
78
80
|
length: { type: Number, required: false, default: 6 },
|
|
@@ -80,6 +82,7 @@ const props = defineProps({
|
|
|
80
82
|
mask: { type: Boolean, required: false },
|
|
81
83
|
maskChar: { type: String, required: false, default: "\u2022" },
|
|
82
84
|
uppercase: { type: Boolean, required: false },
|
|
85
|
+
label: { type: String, required: false },
|
|
83
86
|
placeholder: { type: String, required: false },
|
|
84
87
|
separatorAfter: { type: Array, required: false, default: () => [] },
|
|
85
88
|
autocomplete: { type: String, required: false, default: "one-time-code" },
|
|
@@ -102,6 +105,13 @@ const control = useFieldControl({
|
|
|
102
105
|
disabled: () => props.disabled,
|
|
103
106
|
required: () => props.required
|
|
104
107
|
});
|
|
108
|
+
const attrs = useAttrs();
|
|
109
|
+
warnUnnamed(
|
|
110
|
+
"PinInput",
|
|
111
|
+
() => Boolean(
|
|
112
|
+
props.label || control.labelledBy.value || hasNameAttrs(attrs) || inputRef.value?.labels?.length
|
|
113
|
+
)
|
|
114
|
+
);
|
|
105
115
|
const chars = computed(() => Array.from(model.value ?? ""));
|
|
106
116
|
const activeIndex = computed(() => Math.min(caret.value, props.length - 1));
|
|
107
117
|
const allowed = computed(() => {
|
|
@@ -6,6 +6,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
6
6
|
mask?: boolean;
|
|
7
7
|
maskChar?: string;
|
|
8
8
|
uppercase?: boolean;
|
|
9
|
+
label?: string;
|
|
9
10
|
placeholder?: string | undefined;
|
|
10
11
|
separatorAfter?: number[];
|
|
11
12
|
autocomplete?: string | undefined;
|
|
@@ -25,10 +26,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
25
26
|
min?: (string | number) | undefined;
|
|
26
27
|
max?: (string | number) | undefined;
|
|
27
28
|
pattern?: string | undefined | undefined;
|
|
29
|
+
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
30
|
+
indeterminate?: boolean | undefined | undefined;
|
|
28
31
|
title?: string | undefined | undefined;
|
|
29
32
|
list?: string | undefined | undefined;
|
|
30
33
|
results?: (string | number) | undefined;
|
|
31
34
|
name?: string | undefined | undefined;
|
|
35
|
+
dir?: string | undefined | undefined;
|
|
32
36
|
role?: string | undefined | undefined;
|
|
33
37
|
'aria-label'?: string | undefined | undefined;
|
|
34
38
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -187,7 +191,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
187
191
|
accesskey?: string | undefined | undefined;
|
|
188
192
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
189
193
|
contextmenu?: string | undefined | undefined;
|
|
190
|
-
dir?: string | undefined | undefined;
|
|
191
194
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
192
195
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
193
196
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -229,9 +232,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
229
232
|
accept?: string | undefined | undefined;
|
|
230
233
|
alt?: string | undefined | undefined;
|
|
231
234
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
232
|
-
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
233
235
|
crossorigin?: string | undefined | undefined;
|
|
234
|
-
indeterminate?: boolean | undefined | undefined;
|
|
235
236
|
maxlength?: (string | number) | undefined;
|
|
236
237
|
minlength?: (string | number) | undefined;
|
|
237
238
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -250,6 +251,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
250
251
|
mask?: boolean;
|
|
251
252
|
maskChar?: string;
|
|
252
253
|
uppercase?: boolean;
|
|
254
|
+
label?: string;
|
|
253
255
|
placeholder?: string | undefined;
|
|
254
256
|
separatorAfter?: number[];
|
|
255
257
|
autocomplete?: string | undefined;
|
|
@@ -269,10 +271,13 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
269
271
|
min?: (string | number) | undefined;
|
|
270
272
|
max?: (string | number) | undefined;
|
|
271
273
|
pattern?: string | undefined | undefined;
|
|
274
|
+
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
275
|
+
indeterminate?: boolean | undefined | undefined;
|
|
272
276
|
title?: string | undefined | undefined;
|
|
273
277
|
list?: string | undefined | undefined;
|
|
274
278
|
results?: (string | number) | undefined;
|
|
275
279
|
name?: string | undefined | undefined;
|
|
280
|
+
dir?: string | undefined | undefined;
|
|
276
281
|
role?: string | undefined | undefined;
|
|
277
282
|
'aria-label'?: string | undefined | undefined;
|
|
278
283
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -431,7 +436,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
431
436
|
accesskey?: string | undefined | undefined;
|
|
432
437
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
433
438
|
contextmenu?: string | undefined | undefined;
|
|
434
|
-
dir?: string | undefined | undefined;
|
|
435
439
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
436
440
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
437
441
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -473,9 +477,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
473
477
|
accept?: string | undefined | undefined;
|
|
474
478
|
alt?: string | undefined | undefined;
|
|
475
479
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
476
|
-
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
477
480
|
crossorigin?: string | undefined | undefined;
|
|
478
|
-
indeterminate?: boolean | undefined | undefined;
|
|
479
481
|
maxlength?: (string | number) | undefined;
|
|
480
482
|
minlength?: (string | number) | undefined;
|
|
481
483
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<fieldset
|
|
3
3
|
:id="control.id.value"
|
|
4
4
|
data-k-shake
|
|
5
|
-
:aria-labelledby="
|
|
5
|
+
:aria-labelledby="hasLegend ? void 0 : control.labelledBy.value"
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
:disabled="control.disabled.value || void 0"
|
|
8
8
|
:aria-describedby="joinIds($attrs['aria-describedby'], control.describedBy.value)"
|
|
9
9
|
:aria-invalid="control.invalid.value ? 'true' : void 0"
|
|
10
|
-
:aria-required="control.required.value ? 'true' : void 0"
|
|
10
|
+
:aria-required="control.required.value && !control.labelledBy.value ? 'true' : void 0"
|
|
11
11
|
:aria-readonly="readonly ? 'true' : void 0"
|
|
12
12
|
role="radiogroup"
|
|
13
13
|
class="k-choice-group k-radio-group"
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
{ 'is-invalid': control.invalid.value, 'is-disabled': control.disabled.value }
|
|
18
18
|
]"
|
|
19
19
|
>
|
|
20
|
-
<legend v-if="
|
|
21
|
-
<slot name="legend">{{
|
|
20
|
+
<legend v-if="hasLegend" class="k-choice-group-legend">
|
|
21
|
+
<slot name="legend">{{ legendText }}</slot>
|
|
22
22
|
</legend>
|
|
23
23
|
<div class="k-choice-group-items">
|
|
24
24
|
<slot>
|
|
@@ -37,14 +37,16 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script setup>
|
|
40
|
-
import { computed, provide, useId } from "vue";
|
|
40
|
+
import { computed, provide, useAttrs, useId, useSlots } from "vue";
|
|
41
41
|
import { useFieldControl } from "../../composables/useField";
|
|
42
42
|
import { joinIds } from "../../internal/forms/control";
|
|
43
|
+
import { hasNameAttrs, warnUnnamed } from "../../internal/forms/name";
|
|
43
44
|
import { RADIO_GROUP_KEY } from "../../internal/forms/keys";
|
|
44
45
|
import Radio from "./Radio.vue";
|
|
45
46
|
defineOptions({ inheritAttrs: false });
|
|
46
47
|
const props = defineProps({
|
|
47
48
|
options: { type: Array, required: false, default: () => [] },
|
|
49
|
+
label: { type: String, required: false },
|
|
48
50
|
legend: { type: String, required: false },
|
|
49
51
|
orientation: { type: String, required: false, default: "vertical" },
|
|
50
52
|
variant: { type: String, required: false, default: "default" },
|
|
@@ -63,6 +65,14 @@ const control = useFieldControl({
|
|
|
63
65
|
required: () => props.required,
|
|
64
66
|
labelable: false
|
|
65
67
|
});
|
|
68
|
+
const slots = useSlots();
|
|
69
|
+
const attrs = useAttrs();
|
|
70
|
+
const legendText = computed(() => props.label ?? props.legend);
|
|
71
|
+
const hasLegend = computed(() => Boolean(legendText.value || slots.legend));
|
|
72
|
+
warnUnnamed(
|
|
73
|
+
"RadioGroup",
|
|
74
|
+
() => hasLegend.value || Boolean(control.labelledBy.value) || hasNameAttrs(attrs)
|
|
75
|
+
);
|
|
66
76
|
provide(RADIO_GROUP_KEY, {
|
|
67
77
|
name: computed(() => props.name ?? control.field?.name.value ?? fallbackName),
|
|
68
78
|
size: computed(() => props.size),
|
|
@@ -3,6 +3,7 @@ import type { ChoiceOption, ChoiceOrientation, ChoiceValue, RadioGroupVariant }
|
|
|
3
3
|
declare const __VLS_export: <T extends ChoiceValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
5
5
|
options?: ChoiceOption<T>[];
|
|
6
|
+
label?: string;
|
|
6
7
|
legend?: string;
|
|
7
8
|
orientation?: ChoiceOrientation;
|
|
8
9
|
variant?: RadioGroupVariant;
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
ref="rootRef"
|
|
4
4
|
:id="control.id.value"
|
|
5
5
|
data-k-shake
|
|
6
|
-
:aria-
|
|
6
|
+
:aria-label="label"
|
|
7
|
+
:aria-labelledby="label || $attrs['aria-label'] ? void 0 : control.labelledBy.value"
|
|
7
8
|
v-bind="$attrs"
|
|
8
9
|
:aria-describedby="joinIds($attrs['aria-describedby'], control.describedBy.value)"
|
|
9
10
|
:aria-invalid="control.invalid.value ? 'true' : void 0"
|
|
10
11
|
:aria-disabled="control.disabled.value ? 'true' : void 0"
|
|
11
12
|
:aria-readonly="props.readonly ? 'true' : void 0"
|
|
12
|
-
:aria-required="control.required.value ? 'true' : void 0"
|
|
13
|
+
:aria-required="control.required.value && !control.labelledBy.value ? 'true' : void 0"
|
|
13
14
|
role="radiogroup"
|
|
14
15
|
class="k-segmented"
|
|
15
16
|
:class="[
|
|
@@ -64,14 +65,17 @@
|
|
|
64
65
|
</template>
|
|
65
66
|
|
|
66
67
|
<script setup>
|
|
67
|
-
import { computed, nextTick,
|
|
68
|
+
import { computed, nextTick, onMounted, ref, useAttrs, useId, watch } from "vue";
|
|
69
|
+
import { useResizeObserver } from "../../internal/core/resize";
|
|
68
70
|
import { useFieldControl } from "../../composables/useField";
|
|
69
71
|
import { joinIds } from "../../internal/forms/control";
|
|
72
|
+
import { hasNameAttrs, warnUnnamed } from "../../internal/forms/name";
|
|
70
73
|
import Icon from "../core/Icon.vue";
|
|
71
74
|
import { rovingIndex } from "../../internal/core/roving";
|
|
72
75
|
defineOptions({ inheritAttrs: false });
|
|
73
76
|
const props = defineProps({
|
|
74
77
|
options: { type: Array, required: true },
|
|
78
|
+
label: { type: String, required: false },
|
|
75
79
|
name: { type: String, required: false },
|
|
76
80
|
size: { type: String, required: false, default: "md" },
|
|
77
81
|
block: { type: Boolean, required: false },
|
|
@@ -88,13 +92,17 @@ const rootRef = ref(null);
|
|
|
88
92
|
const itemRefs = [];
|
|
89
93
|
const ready = ref(false);
|
|
90
94
|
const indicator = ref({ x: 0, width: 0 });
|
|
91
|
-
let observer;
|
|
92
95
|
const control = useFieldControl({
|
|
93
96
|
invalid: () => props.invalid,
|
|
94
97
|
disabled: () => props.disabled,
|
|
95
98
|
required: () => props.required,
|
|
96
99
|
labelable: false
|
|
97
100
|
});
|
|
101
|
+
const attrs = useAttrs();
|
|
102
|
+
warnUnnamed(
|
|
103
|
+
"SegmentedControl",
|
|
104
|
+
() => Boolean(props.label || control.labelledBy.value) || hasNameAttrs(attrs)
|
|
105
|
+
);
|
|
98
106
|
function titleId(index) {
|
|
99
107
|
return `${baseId}-title-${index}`;
|
|
100
108
|
}
|
|
@@ -102,7 +110,8 @@ const activeIndex = computed(
|
|
|
102
110
|
() => props.options.findIndex((option) => option.value === model.value)
|
|
103
111
|
);
|
|
104
112
|
const focusIndex = computed(() => {
|
|
105
|
-
if (activeIndex.value >= 0
|
|
113
|
+
if (activeIndex.value >= 0 && !props.options[activeIndex.value]?.disabled)
|
|
114
|
+
return activeIndex.value;
|
|
106
115
|
return Math.max(
|
|
107
116
|
0,
|
|
108
117
|
props.options.findIndex((option) => !option.disabled)
|
|
@@ -158,10 +167,6 @@ watch(
|
|
|
158
167
|
onMounted(() => {
|
|
159
168
|
measure();
|
|
160
169
|
requestAnimationFrame(() => ready.value = true);
|
|
161
|
-
if (typeof ResizeObserver !== "undefined" && rootRef.value) {
|
|
162
|
-
observer = new ResizeObserver(measure);
|
|
163
|
-
observer.observe(rootRef.value);
|
|
164
|
-
}
|
|
165
170
|
});
|
|
166
|
-
|
|
171
|
+
useResizeObserver(() => [rootRef.value], measure);
|
|
167
172
|
</script>
|
|
@@ -3,6 +3,7 @@ import type { ChoiceValue, SegmentedOption } from './types';
|
|
|
3
3
|
declare const __VLS_export: <T extends ChoiceValue, R extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
5
5
|
options: SegmentedOption<T>[];
|
|
6
|
+
label?: string;
|
|
6
7
|
name?: string;
|
|
7
8
|
size?: FieldSize;
|
|
8
9
|
block?: boolean;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
ref="inputRef"
|
|
23
23
|
:id="control.id.value ?? ownId"
|
|
24
24
|
:name="control.field?.name.value"
|
|
25
|
+
:aria-label="label"
|
|
25
26
|
v-bind="$attrs"
|
|
26
27
|
:disabled="control.disabled.value || void 0"
|
|
27
28
|
:aria-invalid="control.invalid.value ? 'true' : void 0"
|
|
@@ -56,8 +57,10 @@
|
|
|
56
57
|
import { computed, useAttrs, useId, useTemplateRef } from "vue";
|
|
57
58
|
import { useFieldControl } from "../../composables/useField";
|
|
58
59
|
import { joinIds } from "../../internal/forms/control";
|
|
60
|
+
import { hasNameAttrs, warnUnnamed } from "../../internal/forms/name";
|
|
59
61
|
defineOptions({ inheritAttrs: false });
|
|
60
62
|
const props = defineProps({
|
|
63
|
+
label: { type: String, required: false },
|
|
61
64
|
min: { type: Number, required: false, default: 0 },
|
|
62
65
|
max: { type: Number, required: false, default: 100 },
|
|
63
66
|
step: { type: Number, required: false, default: 1 },
|
|
@@ -80,6 +83,12 @@ const control = useFieldControl({
|
|
|
80
83
|
invalid: () => props.invalid,
|
|
81
84
|
disabled: () => props.disabled
|
|
82
85
|
});
|
|
86
|
+
warnUnnamed(
|
|
87
|
+
"Slider",
|
|
88
|
+
() => Boolean(
|
|
89
|
+
props.label || control.labelledBy.value || hasNameAttrs(attrs) || inputRef.value?.labels?.length
|
|
90
|
+
)
|
|
91
|
+
);
|
|
83
92
|
const current = computed(() => {
|
|
84
93
|
const value = model.value ?? props.min;
|
|
85
94
|
return Math.min(props.max, Math.max(props.min, value));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FieldSize } from '../core/types';
|
|
2
2
|
import type { SliderBubble } from './types';
|
|
3
3
|
declare const __VLS_export: import("vue").DefineComponent<{
|
|
4
|
+
label?: string;
|
|
4
5
|
min?: (string | number) | undefined;
|
|
5
6
|
max?: (string | number) | undefined;
|
|
6
7
|
step?: (string | number) | undefined;
|
|
@@ -20,11 +21,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
20
21
|
form?: string | undefined | undefined;
|
|
21
22
|
required?: (boolean | "true" | "false") | undefined;
|
|
22
23
|
pattern?: string | undefined | undefined;
|
|
24
|
+
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
25
|
+
indeterminate?: boolean | undefined | undefined;
|
|
23
26
|
title?: string | undefined | undefined;
|
|
24
27
|
list?: string | undefined | undefined;
|
|
25
28
|
results?: (string | number) | undefined;
|
|
26
29
|
placeholder?: string | undefined | undefined;
|
|
27
30
|
name?: string | undefined | undefined;
|
|
31
|
+
dir?: string | undefined | undefined;
|
|
28
32
|
role?: string | undefined | undefined;
|
|
29
33
|
'aria-label'?: string | undefined | undefined;
|
|
30
34
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -181,7 +185,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
181
185
|
accesskey?: string | undefined | undefined;
|
|
182
186
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
183
187
|
contextmenu?: string | undefined | undefined;
|
|
184
|
-
dir?: string | undefined | undefined;
|
|
185
188
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
186
189
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
187
190
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -224,9 +227,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
224
227
|
accept?: string | undefined | undefined;
|
|
225
228
|
alt?: string | undefined | undefined;
|
|
226
229
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
227
|
-
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
228
230
|
crossorigin?: string | undefined | undefined;
|
|
229
|
-
indeterminate?: boolean | undefined | undefined;
|
|
230
231
|
maxlength?: (string | number) | undefined;
|
|
231
232
|
minlength?: (string | number) | undefined;
|
|
232
233
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -239,6 +240,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
239
240
|
change: (value: number) => any;
|
|
240
241
|
"update:modelValue": (value: number | null | undefined) => any;
|
|
241
242
|
}, string, import("vue").PublicProps, Readonly<{
|
|
243
|
+
label?: string;
|
|
242
244
|
min?: (string | number) | undefined;
|
|
243
245
|
max?: (string | number) | undefined;
|
|
244
246
|
step?: (string | number) | undefined;
|
|
@@ -258,11 +260,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
258
260
|
form?: string | undefined | undefined;
|
|
259
261
|
required?: (boolean | "true" | "false") | undefined;
|
|
260
262
|
pattern?: string | undefined | undefined;
|
|
263
|
+
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
264
|
+
indeterminate?: boolean | undefined | undefined;
|
|
261
265
|
title?: string | undefined | undefined;
|
|
262
266
|
list?: string | undefined | undefined;
|
|
263
267
|
results?: (string | number) | undefined;
|
|
264
268
|
placeholder?: string | undefined | undefined;
|
|
265
269
|
name?: string | undefined | undefined;
|
|
270
|
+
dir?: string | undefined | undefined;
|
|
266
271
|
role?: string | undefined | undefined;
|
|
267
272
|
'aria-label'?: string | undefined | undefined;
|
|
268
273
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -419,7 +424,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
419
424
|
accesskey?: string | undefined | undefined;
|
|
420
425
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
421
426
|
contextmenu?: string | undefined | undefined;
|
|
422
|
-
dir?: string | undefined | undefined;
|
|
423
427
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
424
428
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
425
429
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -462,9 +466,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
462
466
|
accept?: string | undefined | undefined;
|
|
463
467
|
alt?: string | undefined | undefined;
|
|
464
468
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
465
|
-
checked?: any[] | Set<any> | (boolean | "true" | "false") | undefined;
|
|
466
469
|
crossorigin?: string | undefined | undefined;
|
|
467
|
-
indeterminate?: boolean | undefined | undefined;
|
|
468
470
|
maxlength?: (string | number) | undefined;
|
|
469
471
|
minlength?: (string | number) | undefined;
|
|
470
472
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
import { computed, useAttrs, useId, useSlots, useTemplateRef } from "vue";
|
|
58
58
|
import { useFieldControl } from "../../composables/useField";
|
|
59
59
|
import { joinIds } from "../../internal/forms/control";
|
|
60
|
+
import { hasNameAttrs, warnUnnamed } from "../../internal/forms/name";
|
|
60
61
|
import Icon from "../core/Icon.vue";
|
|
61
62
|
defineOptions({ inheritAttrs: false });
|
|
62
63
|
const props = defineProps({
|
|
@@ -90,6 +91,12 @@ const control = useFieldControl({
|
|
|
90
91
|
const checked = computed(() => Boolean(model.value));
|
|
91
92
|
const hasLabel = computed(() => Boolean(props.label || slots.default));
|
|
92
93
|
const hasDescription = computed(() => Boolean(props.description || slots.description));
|
|
94
|
+
warnUnnamed(
|
|
95
|
+
"Switch",
|
|
96
|
+
() => Boolean(
|
|
97
|
+
hasLabel.value || control.labelledBy.value || hasNameAttrs(attrs) || buttonRef.value?.labels?.length
|
|
98
|
+
)
|
|
99
|
+
);
|
|
93
100
|
const buttonId = computed(() => attrs.id ?? control.id.value ?? ownId);
|
|
94
101
|
const formName = computed(() => props.name ?? control.field?.name.value);
|
|
95
102
|
function toggle() {
|
|
@@ -29,6 +29,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
29
29
|
title?: string | undefined | undefined;
|
|
30
30
|
results?: (string | number) | undefined;
|
|
31
31
|
placeholder?: string | undefined | undefined;
|
|
32
|
+
dir?: string | undefined | undefined;
|
|
32
33
|
role?: string | undefined | undefined;
|
|
33
34
|
'aria-label'?: string | undefined | undefined;
|
|
34
35
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -184,7 +185,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
184
185
|
accesskey?: string | undefined | undefined;
|
|
185
186
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
186
187
|
contextmenu?: string | undefined | undefined;
|
|
187
|
-
dir?: string | undefined | undefined;
|
|
188
188
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
189
189
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
190
190
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -251,6 +251,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
251
251
|
title?: string | undefined | undefined;
|
|
252
252
|
results?: (string | number) | undefined;
|
|
253
253
|
placeholder?: string | undefined | undefined;
|
|
254
|
+
dir?: string | undefined | undefined;
|
|
254
255
|
role?: string | undefined | undefined;
|
|
255
256
|
'aria-label'?: string | undefined | undefined;
|
|
256
257
|
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
@@ -406,7 +407,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
406
407
|
accesskey?: string | undefined | undefined;
|
|
407
408
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
408
409
|
contextmenu?: string | undefined | undefined;
|
|
409
|
-
dir?: string | undefined | undefined;
|
|
410
410
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
411
411
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
412
412
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -17,12 +17,15 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
17
17
|
value?: any;
|
|
18
18
|
form?: string | undefined;
|
|
19
19
|
pattern?: string | undefined;
|
|
20
|
+
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
21
|
+
indeterminate?: boolean | undefined;
|
|
20
22
|
title?: string | undefined;
|
|
21
23
|
style?: unknown;
|
|
22
24
|
list?: string | undefined;
|
|
23
25
|
results?: (string | number) | undefined;
|
|
24
26
|
placeholder?: string | undefined;
|
|
25
27
|
name?: string | undefined;
|
|
28
|
+
dir?: string | undefined;
|
|
26
29
|
class?: unknown;
|
|
27
30
|
role?: string | undefined;
|
|
28
31
|
'aria-label'?: string | undefined;
|
|
@@ -181,7 +184,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
181
184
|
accesskey?: string | undefined;
|
|
182
185
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
183
186
|
contextmenu?: string | undefined;
|
|
184
|
-
dir?: string | undefined;
|
|
185
187
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
186
188
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
187
189
|
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
@@ -234,9 +236,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
234
236
|
accept?: string | undefined;
|
|
235
237
|
alt?: string | undefined;
|
|
236
238
|
capture?: boolean | "user" | "environment" | undefined;
|
|
237
|
-
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
238
239
|
crossorigin?: string | undefined;
|
|
239
|
-
indeterminate?: boolean | undefined;
|
|
240
240
|
maxlength?: (string | number) | undefined;
|
|
241
241
|
minlength?: (string | number) | undefined;
|
|
242
242
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -263,12 +263,15 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
263
263
|
value?: any;
|
|
264
264
|
form?: string | undefined;
|
|
265
265
|
pattern?: string | undefined;
|
|
266
|
+
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
267
|
+
indeterminate?: boolean | undefined;
|
|
266
268
|
title?: string | undefined;
|
|
267
269
|
style?: unknown;
|
|
268
270
|
list?: string | undefined;
|
|
269
271
|
results?: (string | number) | undefined;
|
|
270
272
|
placeholder?: string | undefined;
|
|
271
273
|
name?: string | undefined;
|
|
274
|
+
dir?: string | undefined;
|
|
272
275
|
class?: unknown;
|
|
273
276
|
role?: string | undefined;
|
|
274
277
|
'aria-label'?: string | undefined;
|
|
@@ -427,7 +430,6 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
427
430
|
accesskey?: string | undefined;
|
|
428
431
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
429
432
|
contextmenu?: string | undefined;
|
|
430
|
-
dir?: string | undefined;
|
|
431
433
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
432
434
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
433
435
|
enterKeyHint?: import("vue").HTMLAttributes["enterkeyhint"];
|
|
@@ -480,9 +482,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
480
482
|
accept?: string | undefined;
|
|
481
483
|
alt?: string | undefined;
|
|
482
484
|
capture?: boolean | "user" | "environment" | undefined;
|
|
483
|
-
checked?: (boolean | "true" | "false") | any[] | Set<any> | undefined;
|
|
484
485
|
crossorigin?: string | undefined;
|
|
485
|
-
indeterminate?: boolean | undefined;
|
|
486
486
|
maxlength?: (string | number) | undefined;
|
|
487
487
|
minlength?: (string | number) | undefined;
|
|
488
488
|
multiple?: (boolean | "true" | "false") | undefined;
|
|
@@ -59,3 +59,7 @@ export type FileInputAcceptMode = 'filter' | 'hint';
|
|
|
59
59
|
export type PinInputMode = 'numeric' | 'alphanumeric' | 'alphabetic';
|
|
60
60
|
export type RadioGroupVariant = 'default' | 'card';
|
|
61
61
|
export type SliderBubble = boolean | 'always';
|
|
62
|
+
export type ColorSwatch = string | {
|
|
63
|
+
value: string;
|
|
64
|
+
label?: string;
|
|
65
|
+
};
|
|
@@ -27,6 +27,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
27
27
|
style?: import("vue").StyleValue;
|
|
28
28
|
results?: (string | number) | undefined;
|
|
29
29
|
placeholder?: string | undefined | undefined;
|
|
30
|
+
dir?: string | undefined | undefined;
|
|
30
31
|
class?: import("vue").ClassValue;
|
|
31
32
|
role?: string | undefined | undefined;
|
|
32
33
|
'aria-label'?: string | undefined | undefined;
|
|
@@ -182,7 +183,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
182
183
|
accesskey?: string | undefined | undefined;
|
|
183
184
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
184
185
|
contextmenu?: string | undefined | undefined;
|
|
185
|
-
dir?: string | undefined | undefined;
|
|
186
186
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
187
187
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
188
188
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|
|
@@ -229,6 +229,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
229
229
|
style?: import("vue").StyleValue;
|
|
230
230
|
results?: (string | number) | undefined;
|
|
231
231
|
placeholder?: string | undefined | undefined;
|
|
232
|
+
dir?: string | undefined | undefined;
|
|
232
233
|
class?: import("vue").ClassValue;
|
|
233
234
|
role?: string | undefined | undefined;
|
|
234
235
|
'aria-label'?: string | undefined | undefined;
|
|
@@ -384,7 +385,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
384
385
|
accesskey?: string | undefined | undefined;
|
|
385
386
|
contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
386
387
|
contextmenu?: string | undefined | undefined;
|
|
387
|
-
dir?: string | undefined | undefined;
|
|
388
388
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
389
389
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
390
390
|
enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
|