@khsura/sui 1.18.3 → 1.20.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/@types/components/cards/sCardText.vue.d.ts +2 -2
- package/@types/components/datePicker/sDatePickerSwitch.vue.d.ts +2 -0
- package/@types/components/form/index.d.ts +1 -0
- package/@types/components/form/radio/sRadio.vue.d.ts +3 -0
- package/@types/components/form/sFormRow.vue.d.ts +18 -0
- package/@types/components/form/sInput.vue.d.ts +1 -0
- package/@types/components/form/sSelect.vue.d.ts +2 -0
- package/@types/components/layout/sNavigationDrawer.vue.d.ts +6 -6
- package/@types/components/progress/sProgressCircular.vue.d.ts +1 -0
- package/@types/components/progress/sProgressLinear.vue.d.ts +1 -0
- package/@types/components/sAutocomplete.vue.d.ts +3 -0
- package/@types/components/slideGroup/sSlideGroup.vue.d.ts +4 -1
- package/@types/components/table/sTable.vue.d.ts +17 -96
- package/@types/components/tabs/sTabs.vue.d.ts +2 -2
- package/@types/configs/app.d.ts +4 -0
- package/@types/configs/i18n.d.ts +3 -0
- package/@types/configs/provider.d.ts +1 -0
- package/@types/constants/color.d.ts +15 -0
- package/@types/constants/cssVariables.d.ts +4 -0
- package/@types/constants/datePicker.d.ts +7 -0
- package/@types/constants/i18n.d.ts +3 -0
- package/@types/constants/index.d.ts +3 -0
- package/@types/constants/keyboard.d.ts +12 -0
- package/@types/constants/listbox.d.ts +1 -0
- package/@types/constants/overlay.d.ts +5 -0
- package/@types/constants/tabs.d.ts +4 -0
- package/@types/definitions/props/core/propsLink.d.ts +2 -2
- package/@types/definitions/props/propsAutocomplete.d.ts +6 -0
- package/@types/definitions/props/propsInput.d.ts +1 -0
- package/@types/definitions/props/propsLink.d.ts +2 -2
- package/@types/definitions/props/propsProgressCircular.d.ts +2 -0
- package/@types/definitions/props/propsProgressLinear.d.ts +2 -0
- package/@types/definitions/props/propsSelect.d.ts +4 -0
- package/@types/definitions/props/propsSlideGroup.d.ts +4 -0
- package/@types/definitions/props/propsTable.d.ts +1 -0
- package/@types/definitions/props/propsTextarea.d.ts +3 -0
- package/@types/helpers/colorHelpers.d.ts +1 -1
- package/@types/helpers/createAppStore.d.ts +4 -0
- package/@types/lib/color.d.ts +21 -2
- package/@types/lib/index.d.ts +4 -0
- package/@types/lib/linkLocation.d.ts +9 -0
- package/@types/lib/overlayPlacement.d.ts +11 -0
- package/@types/lib/revealInScroller.d.ts +11 -0
- package/@types/lib/safeArea.d.ts +3 -0
- package/@types/playwright.visual.config.d.ts +3 -0
- package/@types/services/backgroundScrollService.d.ts +8 -2
- package/@types/services/datePicker/datePickerItemDateService.d.ts +1 -0
- package/@types/services/dialogService.d.ts +4 -8
- package/@types/services/fieldLayoutService.d.ts +19 -0
- package/@types/services/formInputService.d.ts +6 -0
- package/@types/services/index.d.ts +7 -0
- package/@types/services/linkService.d.ts +11 -1
- package/@types/services/listboxNavigationService.d.ts +20 -0
- package/@types/services/menuService.d.ts +2 -0
- package/@types/services/overlayFocusService.d.ts +10 -0
- package/@types/services/routerLinkService.d.ts +19 -0
- package/@types/services/scrollableFocusService.d.ts +10 -0
- package/@types/services/surfaceTextColorService.d.ts +8 -0
- package/@types/services/tabsService.d.ts +9 -0
- package/@types/store/index.d.ts +1 -0
- package/@types/store/scrollLockStore.d.ts +1 -0
- package/@types/tests/visual/constants/a11yAudit.d.ts +4 -0
- package/@types/tests/visual/constants/index.d.ts +4 -0
- package/@types/tests/visual/constants/resizeScroll.d.ts +10 -0
- package/@types/tests/visual/constants/storyRender.d.ts +5 -0
- package/@types/tests/visual/constants/visualMatrix.d.ts +20 -0
- package/@types/tests/visual/schemas/index.d.ts +1 -0
- package/@types/tests/visual/schemas/storyIndex.d.ts +17 -0
- package/@types/tests/visual/types/a11yAudit.d.ts +2 -0
- package/@types/tests/visual/types/index.d.ts +2 -0
- package/@types/tests/visual/types/visualStory.d.ts +8 -0
- package/@types/types/app.d.ts +2 -0
- package/@types/types/breadcrumbs.d.ts +2 -2
- package/@types/types/index.d.ts +2 -0
- package/@types/types/link.d.ts +20 -0
- package/@types/types/menu.d.ts +17 -0
- package/@types/types/safeArea.d.ts +1 -0
- package/@types/types/table.d.ts +45 -0
- package/@types/vite.config.d.ts +1 -0
- package/README.md +22 -31
- package/dist/base.css.map +1 -1
- package/dist/s-ui.css +1 -1
- package/dist/s-ui.js +3122 -2478
- package/dist/s-ui.umd.cjs +1 -1
- package/dist/styles/components/button/mixins.scss +5 -0
- package/dist/styles/components/form/_variables.scss +11 -0
- package/dist/styles/components/form/index.scss +1 -0
- package/dist/styles/components/index.scss +1 -0
- package/dist/styles/mixins/_app.scss +7 -0
- package/dist/styles/tools/_safeArea.scss +8 -0
- package/dist/styles/tools/index.scss +1 -0
- package/dist/sui-api.json +10128 -0
- package/package.json +30 -6
- package/sui-plugin/.claude-plugin/plugin.json +2 -2
- package/sui-plugin/README.md +24 -1
- package/sui-plugin/skills/sui-component/SKILL.md +13 -3
- package/sui-plugin/skills/sui-component/references/alert.md +30 -14
- package/sui-plugin/skills/sui-component/references/autocomplete.md +96 -34
- package/sui-plugin/skills/sui-component/references/badge.md +55 -29
- package/sui-plugin/skills/sui-component/references/breadcrumbs.md +33 -19
- package/sui-plugin/skills/sui-component/references/button.md +76 -37
- package/sui-plugin/skills/sui-component/references/calendar.md +64 -34
- package/sui-plugin/skills/sui-component/references/cards.md +142 -25
- package/sui-plugin/skills/sui-component/references/carousel.md +107 -42
- package/sui-plugin/skills/sui-component/references/chip.md +52 -28
- package/sui-plugin/skills/sui-component/references/date-picker.md +148 -61
- package/sui-plugin/skills/sui-component/references/dialog.md +60 -21
- package/sui-plugin/skills/sui-component/references/divider.md +15 -6
- package/sui-plugin/skills/sui-component/references/droppable.md +36 -16
- package/sui-plugin/skills/sui-component/references/expansion-panels.md +107 -30
- package/sui-plugin/skills/sui-component/references/form.md +483 -35
- package/sui-plugin/skills/sui-component/references/icon.md +30 -11
- package/sui-plugin/skills/sui-component/references/image.md +39 -17
- package/sui-plugin/skills/sui-component/references/layout.md +456 -69
- package/sui-plugin/skills/sui-component/references/list.md +223 -52
- package/sui-plugin/skills/sui-component/references/menu.md +64 -28
- package/sui-plugin/skills/sui-component/references/overlay.md +35 -16
- package/sui-plugin/skills/sui-component/references/progress.md +76 -26
- package/sui-plugin/skills/sui-component/references/sheet.md +46 -23
- package/sui-plugin/skills/sui-component/references/slide-group.md +77 -38
- package/sui-plugin/skills/sui-component/references/snackbar.md +48 -17
- package/sui-plugin/skills/sui-component/references/split-view.md +51 -12
- package/sui-plugin/skills/sui-component/references/stepper.md +58 -23
- package/sui-plugin/skills/sui-component/references/table.md +123 -55
- package/sui-plugin/skills/sui-component/references/tabs.md +78 -30
- package/sui-plugin/skills/sui-component/references/toggle-button-group.md +85 -39
- package/sui-plugin/skills/sui-component/references/toolbar.md +92 -33
- package/sui-plugin/skills/sui-component/references/tooltip.md +58 -20
- package/sui-plugin/skills/sui-component/references/window.md +89 -29
- package/sui-plugin/skills/sui-form/SKILL.md +23 -16
- package/sui-plugin/skills/sui-getting-started/SKILL.md +60 -44
- package/sui-plugin/skills/sui-layout/SKILL.md +3 -1
- package/sui-plugin/skills/sui-utilities/docs/classes.md +1 -1
|
@@ -6,34 +6,58 @@ Small pill for tags, filters or selections. Supports closable, clickable (`link`
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsChip.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `closable` | `boolean` |
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
<!-- generated:api:start SChip -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SChip props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `borderRadius` | `` number \| "tile" \| "rounded" \| `${number}em` \| `${number}px` \| `${number}rem` \| `${number}%` \| `${number}vh` \| `${number}vw` \| null `` | — | no | — |
|
|
17
|
+
| `closable` | `boolean` | — | no | — |
|
|
18
|
+
| `color` | `string` | — | no | — |
|
|
19
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
20
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
21
|
+
| `label` | `boolean` | — | no | — |
|
|
22
|
+
| `link` | `boolean` | — | no | — |
|
|
23
|
+
| `outlined` | `boolean \| null` | — | no | — |
|
|
24
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
25
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` |
|
|
26
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
27
|
+
| `underlined` | `boolean \| null` | — | no | — |
|
|
28
|
+
|
|
29
|
+
**SChip slots**
|
|
30
|
+
|
|
31
|
+
| Slot | Slot props |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `close` | `{ on: { close: () => void; }; }` |
|
|
34
|
+
| `default` | `any` |
|
|
35
|
+
|
|
36
|
+
**SChip events**
|
|
37
|
+
|
|
38
|
+
| Event | Payload |
|
|
39
|
+
| --- | --- |
|
|
40
|
+
| `click` | `[_: Event]` |
|
|
41
|
+
| `close` | `[]` |
|
|
42
|
+
|
|
43
|
+
<!-- generated:api:end SChip -->
|
|
44
|
+
|
|
45
|
+
**SChip notes**
|
|
46
|
+
|
|
47
|
+
- `color`: Preset name or CSS color
|
|
48
|
+
- `colorThreshold`: Luminance threshold for automatic light/dark text
|
|
49
|
+
- `size`: Preset size
|
|
50
|
+
- `label`: Square "label" shape instead of a pill
|
|
51
|
+
- `closable`: Show a close icon (`mdi-close`)
|
|
52
|
+
- `link`: Clickable styling; required for `click` to be emitted
|
|
53
|
+
- `disabled`: Disabled styling
|
|
54
|
+
- `outlined`: Border style, text-colored
|
|
55
|
+
- `underlined`: Underlined style
|
|
56
|
+
- `borderRadius`: Custom radius
|
|
57
|
+
- `close` (event): Close icon clicked (or `on.close()` called from the `close` slot)
|
|
58
|
+
- `click` (event): Chip clicked — **only emitted when `link` is set**
|
|
59
|
+
- `default` (slot): Chip text
|
|
60
|
+
- `close` (slot): Replaces the whole close icon, including its click handler. Only rendered when `closable`
|
|
37
61
|
|
|
38
62
|
## Usage
|
|
39
63
|
|
|
@@ -6,40 +6,71 @@ Inline date, month or year picker (rendered in an `SCard`) with min/max bounds.
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsDatePicker.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `dateFormat` | `string` | `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
9
|
+
<!-- generated:api:start SDatePicker -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SDatePicker props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `color` | `string` | — | no | — |
|
|
17
|
+
| `colorThreshold` | `number` | — | no | — |
|
|
18
|
+
| `dateFormat` | `string` | `datePickerDisplayFormat.date` | no | — |
|
|
19
|
+
| `dense` | `boolean` | — | no | — |
|
|
20
|
+
| `disabled` | `boolean` | — | no | — |
|
|
21
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
22
|
+
| `hideTitle` | `boolean` | — | no | — |
|
|
23
|
+
| `max` | `string` | — | no | — |
|
|
24
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
25
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
26
|
+
| `min` | `string` | — | no | — |
|
|
27
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
28
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
29
|
+
| `modelValue` | `string \| null` | — | no | — |
|
|
30
|
+
| `monthFormat` | `string` | `datePickerDisplayFormat.month` | no | — |
|
|
31
|
+
| `readonly` | `boolean` | — | no | — |
|
|
32
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` |
|
|
33
|
+
| `today` | `string` | `dayjs().format("YYYY-MM-DD")` | no | — |
|
|
34
|
+
| `type` | `DatePickerTypeType` | `"date"` | yes | `date`, `month`, `year` |
|
|
35
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
36
|
+
| `yearFormat` | `string` | `datePickerDisplayFormat.year` | no | — |
|
|
37
|
+
|
|
38
|
+
**SDatePicker slots**
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`v-model` — `string | null`: `'YYYY-MM-DD'` (`type="date"`), `'YYYY-MM'` (`month`), `'YYYY'` (`year`). Changing `type` converts the current value.
|
|
32
|
-
|
|
33
|
-
## Events
|
|
40
|
+
None.
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
|
38
|
-
|
|
|
42
|
+
**SDatePicker events**
|
|
43
|
+
|
|
44
|
+
| Event | Payload |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `change` | `[]` |
|
|
47
|
+
| `update:modelValue` | `[value: string \| null \| undefined]` |
|
|
48
|
+
|
|
49
|
+
<!-- generated:api:end SDatePicker -->
|
|
50
|
+
|
|
51
|
+
**SDatePicker notes**
|
|
52
|
+
|
|
53
|
+
- `type`: Picker mode and model format (typed as required — always pass it)
|
|
54
|
+
- `min`: Earliest selectable value (`'YYYY-MM-DD'`, any `type`) (default: Jan 1, 5 years before `today`)
|
|
55
|
+
- `max`: Latest selectable value (default: Dec 31, 5 years after `today`)
|
|
56
|
+
- `today`: Date highlighted as "today" (`'YYYY-MM-DD'`)
|
|
57
|
+
- `hideTitle`: Hide the title area
|
|
58
|
+
- `dateFormat`: dayjs format for the date in the title
|
|
59
|
+
- `monthFormat`: dayjs format for month labels
|
|
60
|
+
- `yearFormat`: dayjs format for years (title, switch, year list), e.g. `'YYYY年'`, `'YYYY [он]'`
|
|
61
|
+
- `disabled`: Disables the **title** buttons only (see Gotchas)
|
|
62
|
+
- `readonly`: Makes the **title** buttons read-only only
|
|
63
|
+
- `dense`: Compact layout
|
|
64
|
+
- `color`: Selected-item color
|
|
65
|
+
- `colorThreshold`: Light/dark text threshold for the selected color
|
|
66
|
+
- `theme`: Per-component theme
|
|
67
|
+
- `width` / `height` / `min*` / `max*` sizes: Picker size (`minWidth`, `maxHeight`, …)
|
|
68
|
+
- `update:modelValue` (event): Value selected
|
|
69
|
+
- `change` (event): Emitted on selection, before the model updates — read the `v-model` ref, not the event
|
|
39
70
|
|
|
40
|
-
##
|
|
71
|
+
## Model
|
|
41
72
|
|
|
42
|
-
|
|
73
|
+
`v-model` — `string | null`: `'YYYY-MM-DD'` (`type="date"`), `'YYYY-MM'` (`month`), `'YYYY'` (`year`). Changing `type` converts the current value.
|
|
43
74
|
|
|
44
75
|
## Format constants
|
|
45
76
|
|
|
@@ -85,40 +116,96 @@ Text field (type a value or pick from a popup `SDatePicker`), with optional prev
|
|
|
85
116
|
|
|
86
117
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsDatePickerInput.d.ts`
|
|
87
118
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
119
|
+
<!-- generated:api:start SDatePickerInput -->
|
|
120
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
121
|
+
|
|
122
|
+
**SDatePickerInput props**
|
|
123
|
+
|
|
124
|
+
| Prop | Type | Default | Required | Values | Description |
|
|
125
|
+
| --- | --- | --- | --- | --- | --- |
|
|
126
|
+
| `block` | `boolean` | — | no | — | Stretches the field to the width of its container. |
|
|
127
|
+
| `carousel` | `boolean` | — | no | — | Renders prev/next buttons that step the model value by one period. |
|
|
128
|
+
| `carouselNextAriaLabel` | `string \| null` | `"Next"` | no | — | — |
|
|
129
|
+
| `carouselNextIcon` | `string` | `"mdi-chevron-right"` | no | — | — |
|
|
130
|
+
| `carouselPrevAriaLabel` | `string \| null` | `"Previous"` | no | — | — |
|
|
131
|
+
| `carouselPrevIcon` | `string` | `"mdi-chevron-left"` | no | — | — |
|
|
132
|
+
| `color` | `string` | — | no | — | — |
|
|
133
|
+
| `colorThreshold` | `number` | — | no | — | — |
|
|
134
|
+
| `dateFormat` | `string` | `datePickerDisplayFormat.date` | no | — | — |
|
|
135
|
+
| `dense` | `boolean` | — | no | — | — |
|
|
136
|
+
| `dirty` | `boolean` | — | no | — | — |
|
|
137
|
+
| `disabled` | `boolean` | — | no | — | — |
|
|
138
|
+
| `error` | `boolean` | — | no | — | — |
|
|
139
|
+
| `height` | `string \| number \| null` | — | no | — | — |
|
|
140
|
+
| `hideDetails` | `boolean` | — | no | — | — |
|
|
141
|
+
| `hideError` | `boolean` | — | no | — | — |
|
|
142
|
+
| `hideTitle` | `boolean` | — | no | — | — |
|
|
143
|
+
| `id` | `string` | — | no | — | — |
|
|
144
|
+
| `label` | `string \| null` | — | no | — | — |
|
|
145
|
+
| `max` | `string` | — | no | — | — |
|
|
146
|
+
| `maxHeight` | `string \| number \| null` | — | no | — | — |
|
|
147
|
+
| `maxWidth` | `string \| number \| null` | — | no | — | — |
|
|
148
|
+
| `min` | `string` | — | no | — | — |
|
|
149
|
+
| `minHeight` | `string \| number \| null` | — | no | — | — |
|
|
150
|
+
| `minWidth` | `string \| number \| null` | — | no | — | — |
|
|
151
|
+
| `modelValue` | `string \| null` | — | no | — | — |
|
|
152
|
+
| `monthFormat` | `string` | `datePickerDisplayFormat.month` | no | — | — |
|
|
153
|
+
| `placeholder` | `string \| null` | — | no | — | — |
|
|
154
|
+
| `readonly` | `boolean` | — | no | — | — |
|
|
155
|
+
| `rules` | `FormInputModelValueRule[]` | — | no | — | — |
|
|
156
|
+
| `simple` | `boolean \| null` | — | no | — | — |
|
|
157
|
+
| `size` | `SizePropertyType` | — | no | `default`, `extra`, `large`, `mini`, `small` | — |
|
|
158
|
+
| `theme` | `AppThemeType` | — | no | `dark`, `light` | — |
|
|
159
|
+
| `tile` | `boolean` | — | no | — | — |
|
|
160
|
+
| `today` | `string` | `dayjs().format("YYYY-MM-DD")` | no | — | — |
|
|
161
|
+
| `type` | `DatePickerTypeType` | `"date"` | yes | `date`, `month`, `year` | — |
|
|
162
|
+
| `width` | `string \| number \| null` | — | no | — | — |
|
|
163
|
+
| `yearFormat` | `string` | `datePickerDisplayFormat.year` | no | — | — |
|
|
164
|
+
|
|
165
|
+
**SDatePickerInput slots**
|
|
110
166
|
|
|
111
|
-
|
|
167
|
+
None.
|
|
112
168
|
|
|
113
|
-
|
|
169
|
+
**SDatePickerInput events**
|
|
170
|
+
|
|
171
|
+
| Event | Payload |
|
|
172
|
+
| --- | --- |
|
|
173
|
+
| `change` | `[string \| null]` |
|
|
174
|
+
| `update:dirty` | `[boolean]` |
|
|
175
|
+
| `update:error` | `[boolean]` |
|
|
176
|
+
| `update:errors` | `[string[]]` |
|
|
177
|
+
| `update:modelValue` | `[value: string \| null \| undefined]` |
|
|
178
|
+
|
|
179
|
+
<!-- generated:api:end SDatePickerInput -->
|
|
180
|
+
|
|
181
|
+
**SDatePickerInput notes**
|
|
182
|
+
|
|
183
|
+
- `type`: Picker mode and model format
|
|
184
|
+
- `label`: Field label
|
|
185
|
+
- `placeholder`: Input placeholder (default: model format)
|
|
186
|
+
- `min` / `max`: Bounds for the popup and carousel buttons (default: ±5 years around `today` (picker))
|
|
187
|
+
- `rules`: Validation rules
|
|
188
|
+
- `hideDetails`: Hide label and error area
|
|
189
|
+
- Model: `''` and `null` both mean no date (before 1.20.0 `''` opened the picker on "Invalid date"; use `null` there). The picker stays 8px inside the viewport: above the field near the bottom, shifted left near the right edge
|
|
190
|
+
- `hideError`: Hide the error message
|
|
191
|
+
- `id`: Input id (default: auto)
|
|
192
|
+
- `disabled` / `readonly`: Native input states; disable carousel buttons
|
|
193
|
+
- `size`: Field size (font never below 16px)
|
|
194
|
+
- `simple`: Borderless field
|
|
195
|
+
- `tile`: Square corners
|
|
196
|
+
- `block`: Stretch to container width (otherwise hugs the value). Never wider than its container: in a narrow column it shrinks like `SInput`, keeps the calendar button and ends the value in an ellipsis
|
|
197
|
+
- `width` / `maxWidth` / `minWidth`: Field size; the popup stays 280px wide
|
|
198
|
+
- `carousel`: Prev/next buttons stepping one day / month / year
|
|
199
|
+
- `carouselPrevIcon` / `carouselNextIcon`: Button icons (default: `'mdi-chevron-left'` / `'mdi-chevron-right'`)
|
|
200
|
+
- `carouselPrevAriaLabel` / `carouselNextAriaLabel`: Button labels (default: `'Previous'` / `'Next'`)
|
|
201
|
+
- `today`, `dateFormat`, `monthFormat`, `yearFormat`, `dense`, `color`: Forwarded to the popup picker
|
|
202
|
+
- `update:modelValue` (event): Value changed
|
|
203
|
+
- `change` (event): Value committed (typed + Enter/blur, picked, or stepped)
|
|
204
|
+
- `update:error` (event): Validation state
|
|
205
|
+
- `update:errors` (event): Error messages
|
|
206
|
+
- `update:dirty` (event): Dirty state
|
|
114
207
|
|
|
115
|
-
|
|
116
|
-
|-------|---------|-------------|
|
|
117
|
-
| `update:modelValue` | `string \| null` | Value changed |
|
|
118
|
-
| `change` | `string \| null` | Value committed (typed + Enter/blur, picked, or stepped) |
|
|
119
|
-
| `update:error` | `boolean` | Validation state |
|
|
120
|
-
| `update:errors` | `string[]` | Error messages |
|
|
121
|
-
| `update:dirty` | `boolean` | Dirty state |
|
|
208
|
+
`hideTitle`, `colorThreshold` and the picker `height` are not forwarded (the popup always hides its title).
|
|
122
209
|
|
|
123
210
|
## Usage
|
|
124
211
|
|
|
@@ -6,31 +6,69 @@ Modal with a scrim, controlled by `v-model`. Centered by default; `location="bot
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsDialog.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `disabled` | `boolean
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
9
|
+
<!-- generated:api:start SDialog -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
11
|
+
|
|
12
|
+
**SDialog props**
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `activator` | `string \| HTMLElement \| ComponentPublicInstance \| null` | — | no | — |
|
|
17
|
+
| `borderless` | `boolean` | — | no | — |
|
|
18
|
+
| `closeOnClick` | `boolean` | — | no | — |
|
|
19
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
20
|
+
| `elevation` | `"" \| 0 \| 1 \| 2 \| 22 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 11 \| 12 \| 13 \| 14 \| 15 \| 16 \| 17 \| 18 \| 19 \| 20 \| 21 \| 23 \| 24 \| "1" \| "2" \| "3" \| "4" \| "5" \| "6" \| "7" \| "8" \| "9" \| "10" \| "11" \| "12" \| "13" \| "14" \| "15" \| "16" \| "17" \| "18" \| "19" \| "20" \| "21" \| "22" \| "23" \| "24" \| null` | — | no | — |
|
|
21
|
+
| `fullscreen` | `boolean` | — | no | — |
|
|
22
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
23
|
+
| `location` | `LocationRaw` | — | no | — |
|
|
24
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
25
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
26
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
27
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
28
|
+
| `modelValue` | `boolean` | — | no | — |
|
|
29
|
+
| `offsetX` | `number \| null` | — | no | — |
|
|
30
|
+
| `offsetY` | `number \| null` | — | no | — |
|
|
31
|
+
| `persistent` | `boolean` | — | no | — |
|
|
32
|
+
| `preventCloseOnClick` | `boolean` | — | no | — |
|
|
33
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
34
|
+
| `scrollable` | `boolean` | — | no | — |
|
|
35
|
+
| `scrollableBackground` | `boolean` | — | no | — |
|
|
36
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
37
|
+
| `zIndex` | `number` | — | no | — |
|
|
38
|
+
|
|
39
|
+
**SDialog slots**
|
|
40
|
+
|
|
41
|
+
| Slot | Slot props |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `activator` | `{ on: { click: () => void; }; attrs: Partial<PropsRequired<{ disabled: boolean \| null \| undefined; readonly: boolean \| null \| undefined; }>>; }` |
|
|
44
|
+
| `default` | `{}` |
|
|
45
|
+
|
|
46
|
+
**SDialog events**
|
|
47
|
+
|
|
48
|
+
| Event | Payload |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `update:modelValue` | `[value: boolean \| undefined]` |
|
|
51
|
+
|
|
52
|
+
<!-- generated:api:end SDialog -->
|
|
53
|
+
|
|
54
|
+
**SDialog notes**
|
|
55
|
+
|
|
56
|
+
- `persistent`: Clicking outside does not close the dialog
|
|
57
|
+
- `scrollable`: With an `SCard` child: title/actions stay fixed, `SCardText` scrolls
|
|
58
|
+
- `fullscreen`: Fill the viewport
|
|
59
|
+
- `location`: Only `'bottom'` has an effect (bottom sheet); anything else = centered
|
|
60
|
+
- `elevation`: Shadow depth (a light shadow is applied by default)
|
|
61
|
+
- `zIndex`: z-index of the overlay layer
|
|
62
|
+
- `disabled`: Passed to the activator via `attrs` (disables the trigger)
|
|
63
|
+
- `width` / `height`: Content dimensions
|
|
64
|
+
- `maxWidth` / `maxHeight` / `minWidth` / `minHeight`: Constraints (max-height defaults to 90% when not fullscreen). `width`, `maxWidth` and `maxHeight` are capped at the viewport, so `:max-width="420"` still leaves a 12px gutter on a phone
|
|
65
|
+
- `activator` (slot): Trigger. Bind **both** `v-on="on"` and `v-bind="attrs"`
|
|
66
|
+
- `default` (slot): Dialog content
|
|
22
67
|
|
|
23
68
|
## Model
|
|
24
69
|
|
|
25
70
|
`v-model: boolean` — open/closed.
|
|
26
71
|
|
|
27
|
-
## Slots
|
|
28
|
-
|
|
29
|
-
| Slot | Scoped data | Description |
|
|
30
|
-
|------|-------------|-------------|
|
|
31
|
-
| `activator` | `{ on, attrs }` | Trigger. Bind **both** `v-on="on"` and `v-bind="attrs"` |
|
|
32
|
-
| `default` | — | Dialog content |
|
|
33
|
-
|
|
34
72
|
## Events
|
|
35
73
|
|
|
36
74
|
None — use `v-model`.
|
|
@@ -78,5 +116,6 @@ None — use `v-model`.
|
|
|
78
116
|
| `persistent` with no close button | Always provide an explicit close action |
|
|
79
117
|
|
|
80
118
|
- The app must be wrapped in `<SApp>`: dialogs teleport into the overlay container `SApp` renders.
|
|
81
|
-
-
|
|
119
|
+
- Keyboard and screen readers are handled: the content has `role="dialog"` and `aria-modal="true"`, focus moves into the dialog on open, Tab stays inside it, Esc closes it (not when `persistent`), and focus returns to the activator on close. Esc with a menu open inside the dialog closes only the menu. There is no `close` event — watch `v-model`.
|
|
120
|
+
- A `fullscreen` dialog pads by the iPhone safe-area insets on all sides and fills them with the card colour (needs `viewport-fit=cover`, see the getting-started skill). Don't add your own `env(safe-area-inset-*)` padding to it.
|
|
82
121
|
- `borderless`, `scrollableBackground` and `closeOnClick` appear in the prop types but currently have no effect — do not rely on them.
|
|
@@ -6,20 +6,29 @@ A thin horizontal or vertical rule. Renders an `<hr role="separator">` with the
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsDivider.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- generated:api:start SDivider -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|------|------|---------|-------------|
|
|
13
|
-
| `vertical` | `boolean` | `false` | Render as a vertical divider (stretches to the parent's height) |
|
|
12
|
+
**SDivider props**
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `vertical` | `boolean` | — | no | — |
|
|
17
|
+
|
|
18
|
+
**SDivider slots**
|
|
16
19
|
|
|
17
20
|
None.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
**SDivider events**
|
|
20
23
|
|
|
21
24
|
None.
|
|
22
25
|
|
|
26
|
+
<!-- generated:api:end SDivider -->
|
|
27
|
+
|
|
28
|
+
**SDivider notes**
|
|
29
|
+
|
|
30
|
+
- `vertical`: Render as a vertical divider (stretches to the parent's height)
|
|
31
|
+
|
|
23
32
|
## Usage
|
|
24
33
|
|
|
25
34
|
```vue
|
|
@@ -6,27 +6,47 @@ Drag-and-drop drop zone (files or any dragged content). Renders a plain `<div>`
|
|
|
6
6
|
|
|
7
7
|
Types: `node_modules/@khsura/sui/@types/definitions/props/propsDroppable.d.ts`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- generated:api:start SDroppable -->
|
|
10
|
+
<!-- Generated from sui-api.json by `yarn sync:skills` (packages/app). Do not edit by hand. -->
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|------|------|---------|-------------|
|
|
13
|
-
| `disabled` | `boolean \| null` | `undefined` | Stop emitting `drop` and keep `isDraggingOver` false |
|
|
14
|
-
| `readonly` | `boolean \| null` | `undefined` | Typed (shared prop) but has no effect |
|
|
15
|
-
| `width` / `height` | `string \| number \| null` | `undefined` | Size (numbers → px) |
|
|
16
|
-
| `minWidth` / `maxWidth` | `string \| number \| null` | `undefined` | Width limits |
|
|
17
|
-
| `minHeight` / `maxHeight` | `string \| number \| null` | `undefined` | Height limits |
|
|
12
|
+
**SDroppable props**
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
| Prop | Type | Default | Required | Values |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| `disabled` | `boolean \| null` | — | no | — |
|
|
17
|
+
| `height` | `string \| number \| null` | — | no | — |
|
|
18
|
+
| `maxHeight` | `string \| number \| null` | — | no | — |
|
|
19
|
+
| `maxWidth` | `string \| number \| null` | — | no | — |
|
|
20
|
+
| `minHeight` | `string \| number \| null` | — | no | — |
|
|
21
|
+
| `minWidth` | `string \| number \| null` | — | no | — |
|
|
22
|
+
| `readonly` | `boolean \| null` | — | no | — |
|
|
23
|
+
| `width` | `string \| number \| null` | — | no | — |
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|-------|---------|-------------|
|
|
23
|
-
| `drop` | `DragEvent` | Content dropped (not emitted when `disabled` or the browser lacks DnD support) |
|
|
25
|
+
**SDroppable slots**
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
| Slot | Slot props |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `default` | `{ class: string; attrs: { isDraggingOver: boolean; disabled: boolean \| null \| undefined; supportsDragAndDrop: boolean; }; isDraggingOver: boolean; disabled: boolean \| null \| undefined; supportsDragAndDrop: boolean; }` |
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
|
31
|
+
**SDroppable events**
|
|
32
|
+
|
|
33
|
+
| Event | Payload |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `drop` | `[value: DragEvent]` |
|
|
36
|
+
|
|
37
|
+
<!-- generated:api:end SDroppable -->
|
|
38
|
+
|
|
39
|
+
**SDroppable notes**
|
|
40
|
+
|
|
41
|
+
- `disabled`: Stop emitting `drop` and keep `isDraggingOver` false
|
|
42
|
+
- `readonly`: Typed (shared prop) but has no effect
|
|
43
|
+
- `width` / `height`: Size (numbers → px)
|
|
44
|
+
- `minWidth` / `maxWidth`: Width limits
|
|
45
|
+
- `minHeight` / `maxHeight`: Height limits
|
|
46
|
+
- `drop` (event): Content dropped (not emitted when `disabled` or the browser lacks DnD support)
|
|
47
|
+
- `default` (slot): Drop-zone content. `attrs` bundles the other three
|
|
48
|
+
|
|
49
|
+
## Default slot scope
|
|
30
50
|
|
|
31
51
|
| Property | Type | Description |
|
|
32
52
|
|----------|------|-------------|
|