@vokril/ui-solid 0.5.0 → 0.8.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/CHANGELOG.md +65 -0
- package/README.md +20 -1
- package/dist/AttributeGrid-Bnn1w5XX.cjs +1 -0
- package/dist/AttributeGrid-DJdW32LQ.js +320 -0
- package/dist/CommandPalette-BBDBVARB.cjs +2 -0
- package/dist/CommandPalette-e6FePgys.js +3950 -0
- package/dist/{DateRangePicker-jnZfDhQA.js → DateRangePicker-BcqoUao4.js} +4 -4
- package/dist/{DateRangePicker-CHrwr34H.cjs → DateRangePicker-DHI3SNna.cjs} +1 -1
- package/dist/{GuidedTour-DHgMaTVv.js → GuidedTour-B-BXe3ul.js} +2239 -2223
- package/dist/{GuidedTour-B-67TJlO.cjs → GuidedTour-c7XiyOmE.cjs} +7 -7
- package/dist/{IconPicker-C_gAGvo0.cjs → IconPicker-D2dZK0n3.cjs} +1 -1
- package/dist/{IconPicker-BxofGXCS.js → IconPicker-Fd2IE2Dm.js} +2 -2
- package/dist/Input-BEnk4FCF.cjs +1 -0
- package/dist/Input-PZ5wRvPx.js +227 -0
- package/dist/{Modal-BmtEt5Yo.js → Modal-CsiV55WW.js} +1 -1
- package/dist/{Modal-BSSY6C3D.cjs → Modal-DpDHzCWT.cjs} +1 -1
- package/dist/{Popover-Cg8LZCYo.js → Popover-C3dFuObM.js} +49 -45
- package/dist/Popover-Dbi7L860.cjs +1 -0
- package/dist/{SearchableSelect-ByCRBEZI.js → SearchableSelect-C6KL7e42.js} +2 -2
- package/dist/{SearchableSelect-9pgcO5JS.cjs → SearchableSelect-zT8XNpmt.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-DpTaPcoW.cjs → StatusBarNotificationBell-2bIRvg2s.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-Czirj1Df.js → StatusBarNotificationBell-B5knnCWK.js} +5 -5
- package/dist/{Stepper-CrTxBpDL.js → Stepper-B26aF0bA.js} +1 -1
- package/dist/{Stepper-C3dnwwiV.cjs → Stepper-Bl8P6HJx.cjs} +1 -1
- package/dist/Textarea-BUxibzkR.js +42 -0
- package/dist/Textarea-BunKEY68.cjs +1 -0
- package/dist/{ToggleButton-CFvMUndy.cjs → ToggleButton-DuKoI5PE.cjs} +1 -1
- package/dist/{ToggleButton-DBWFnm_R.js → ToggleButton-DwvUV2en.js} +6 -6
- package/dist/base.css +0 -1
- package/dist/{createResizableSidebar-uf_OJsjO.js → createResizableSidebar-B22SKv9b.js} +1 -1
- package/dist/{createResizableSidebar-DVATOkMf.cjs → createResizableSidebar-C3I0HSwo.cjs} +1 -1
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/format-Dih0q9gm.cjs +1 -0
- package/dist/{format-Dd946oS-.js → format-UGlMj0HW.js} +91 -88
- package/dist/forms/formFieldContext.d.cts +15 -0
- package/dist/forms/formFieldContext.d.ts +15 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +41 -40
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.d.cts +1 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +7 -6
- package/dist/grid/resultTabToolbarClasses.d.cts +47 -0
- package/dist/grid/resultTabToolbarClasses.d.ts +47 -0
- package/dist/iconScale.module-C3O0bxfp.js +13 -0
- package/dist/iconScale.module-CzmKG1rf.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1106 -1008
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +2 -2
- package/dist/overlay/DropdownMenu.d.cts +15 -1
- package/dist/overlay/DropdownMenu.d.ts +15 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +2 -0
- package/dist/overlay/index.d.ts +2 -0
- package/dist/overlay/index.js +132 -122
- package/dist/overlay/menu/MenuParts.d.cts +121 -0
- package/dist/overlay/menu/MenuParts.d.ts +121 -0
- package/dist/overlay/menu/index.d.cts +2 -0
- package/dist/overlay/menu/index.d.ts +2 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.cts +28 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.ts +28 -0
- package/dist/overlay/overlayStack.d.cts +6 -0
- package/dist/overlay/overlayStack.d.ts +6 -0
- package/dist/overlay/panelClasses.d.cts +50 -0
- package/dist/overlay/panelClasses.d.ts +50 -0
- package/dist/overlay/popover/PopoverPanel.d.cts +103 -0
- package/dist/overlay/popover/PopoverPanel.d.ts +103 -0
- package/dist/overlay/popover/index.d.cts +2 -0
- package/dist/overlay/popover/index.d.ts +2 -0
- package/dist/overlay/popover/popoverFocusNavigation.d.cts +6 -2
- package/dist/overlay/popover/popoverFocusNavigation.d.ts +6 -2
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-DvGdPMdq.js +203 -0
- package/dist/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/AttributeGrid-BCYNwNjw.js +281 -0
- package/dist/server/AttributeGrid-BVAQshm3.cjs +1 -0
- package/dist/server/CommandPalette-4RCiBlmz.js +3210 -0
- package/dist/server/CommandPalette-Dd8AW-WZ.cjs +1 -0
- package/dist/server/{DateRangePicker-BK2Ul2uy.js → DateRangePicker-TW0Dy4u6.js} +4 -4
- package/dist/server/{DateRangePicker-s-I_rNUK.cjs → DateRangePicker-sX2m4194.cjs} +1 -1
- package/dist/server/{GuidedTour-BvDY-xaZ.js → GuidedTour-Bc7SqDXY.js} +756 -740
- package/dist/server/{GuidedTour-zesfTSmE.cjs → GuidedTour-DvMqeZIU.cjs} +8 -8
- package/dist/server/{IconPicker-Bw8tZjCl.cjs → IconPicker-Bat7VYeo.cjs} +1 -1
- package/dist/server/{IconPicker-BCUZcq-i.js → IconPicker-Dw4tbosO.js} +2 -2
- package/dist/server/Input-CjvD8w18.cjs +1 -0
- package/dist/server/Input-DaEN2JJd.js +127 -0
- package/dist/server/{Modal-CM54uXRu.js → Modal-Jf89av-C.js} +2 -2
- package/dist/server/{Modal-R86Fb2mX.cjs → Modal-W2cb3Xrx.cjs} +1 -1
- package/dist/server/{Popover-CTnX42Jq.js → Popover-BRU2E-ek.js} +17 -13
- package/dist/server/Popover-C2VwtQyu.cjs +1 -0
- package/dist/server/{SearchableSelect-Cog_rb31.js → SearchableSelect-0dP7bp0a.js} +2 -2
- package/dist/server/{SearchableSelect-fofn1Bjg.cjs → SearchableSelect-nMecJAYS.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-Mh81s2kG.js → StatusBarNotificationBell-Bk9ETGFK.js} +5 -5
- package/dist/server/{StatusBarNotificationBell-COaYD8sz.cjs → StatusBarNotificationBell-t7B7rSrd.cjs} +1 -1
- package/dist/server/{Stepper-BdOBuNco.js → Stepper-CJIoTXSv.js} +1 -1
- package/dist/server/{Stepper-DqwKOszc.cjs → Stepper-RFkjF_fm.cjs} +1 -1
- package/dist/server/Textarea-BQf2lL59.cjs +1 -0
- package/dist/server/Textarea-BTH48NET.js +37 -0
- package/dist/server/{ToggleButton-B0YuAGY4.js → ToggleButton-BAhucFQT.js} +6 -6
- package/dist/server/{ToggleButton-CbX1kbpI.cjs → ToggleButton-D9IXRIdl.cjs} +1 -1
- package/dist/server/{createResizableSidebar-D28fY_SX.cjs → createResizableSidebar-BymQA2Fs.cjs} +1 -1
- package/dist/server/{createResizableSidebar-BfTFOM7v.js → createResizableSidebar-IcXBM-BE.js} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/server/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/server/format-CW_FVfq2.js +385 -0
- package/dist/server/format-x-8syaS2.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +41 -40
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +7 -6
- package/dist/server/iconScale.module-C3O0bxfp.js +13 -0
- package/dist/server/iconScale.module-CzmKG1rf.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1442 -1344
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +2 -2
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +131 -121
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-DvGdPMdq.js +203 -0
- package/dist/server/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{useFloatingDropdown-HD3G-ECb.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/server/{useFloatingDropdown-vYQiMh6N.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/solid/forms/Checkbox.jsx +5 -2
- package/dist/solid/forms/Input.jsx +5 -2
- package/dist/solid/forms/Textarea.jsx +5 -2
- package/dist/solid/forms/formFieldContext.js +7 -0
- package/dist/solid/grid/index.js +1 -0
- package/dist/solid/grid/resultTabToolbarClasses.js +33 -0
- package/dist/solid/index.js +1 -0
- package/dist/solid/overlay/DropdownMenu.jsx +48 -26
- package/dist/solid/overlay/DropdownMenu.module.css.js +1 -7
- package/dist/solid/overlay/index.js +2 -0
- package/dist/solid/overlay/menu/MenuParts.jsx +140 -0
- package/dist/solid/overlay/menu/MenuParts.module.css.js +34 -0
- package/dist/solid/overlay/menu/index.js +2 -0
- package/dist/solid/overlay/menu/menuSurfaceClasses.js +16 -0
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/solid/overlay/panelClasses.js +29 -0
- package/dist/solid/overlay/popover/Popover.jsx +1 -1
- package/dist/solid/overlay/popover/PopoverPanel.jsx +95 -0
- package/dist/solid/overlay/popover/PopoverPanel.module.css.js +22 -0
- package/dist/solid/overlay/popover/index.js +1 -0
- package/dist/solid/overlay/popover/popoverFocusNavigation.js +7 -1
- package/dist/solid/styles/detachedLayout.module.css.js +8 -0
- package/dist/solid/styles/detachedLayoutClasses.js +8 -0
- package/dist/solid/styles/hljsTheme.module.css.js +4 -0
- package/dist/solid/styles/hljsThemeClasses.js +4 -0
- package/dist/solid/styles/iconScaleClasses.js +11 -0
- package/dist/solid/styles/index.js +5 -0
- package/dist/solid/styles/menuSurface.module.css.js +17 -0
- package/dist/solid/styles/recordTable.module.css.js +6 -0
- package/dist/solid/styles/recordTableClasses.js +6 -0
- package/dist/solid/styles/widgetChrome.module.css.js +13 -0
- package/dist/solid/styles/widgetChromeClasses.js +13 -0
- package/dist/solid/widgets/index.js +1 -0
- package/dist/solid/widgets/settingsFieldClasses.js +26 -0
- package/dist/style.css +2 -2
- package/dist/styles/detachedLayoutClasses.d.cts +17 -0
- package/dist/styles/detachedLayoutClasses.d.ts +17 -0
- package/dist/styles/hljsThemeClasses.d.cts +11 -0
- package/dist/styles/hljsThemeClasses.d.ts +11 -0
- package/dist/styles/iconScaleClasses.d.cts +19 -0
- package/dist/styles/iconScaleClasses.d.ts +19 -0
- package/dist/styles/index.d.cts +5 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/recordTableClasses.d.cts +17 -0
- package/dist/styles/recordTableClasses.d.ts +17 -0
- package/dist/styles/widgetChromeClasses.d.cts +31 -0
- package/dist/styles/widgetChromeClasses.d.ts +31 -0
- package/dist/theme.css +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CaQNfmfZ.js → useFloatingDropdown-CfPEYRut.js} +1 -1
- package/dist/{useFloatingDropdown-BKckfuUv.cjs → useFloatingDropdown-DcU7ozDg.cjs} +1 -1
- package/dist/widgets/index.d.cts +1 -0
- package/dist/widgets/index.d.ts +1 -0
- package/dist/widgets/settingsFieldClasses.d.cts +41 -0
- package/dist/widgets/settingsFieldClasses.d.ts +41 -0
- package/package.json +1 -1
- package/dist/AttributeGrid-BUyv-hUX.js +0 -260
- package/dist/AttributeGrid-Tk8KJx8e.cjs +0 -1
- package/dist/CommandPalette-CIAqAbBE.cjs +0 -2
- package/dist/CommandPalette-l_vmlEnR.js +0 -3371
- package/dist/Input-BqiQPUxA.js +0 -215
- package/dist/Input-BrxV_Xcb.cjs +0 -1
- package/dist/Popover-B8ozGuDX.cjs +0 -1
- package/dist/Textarea-CXFZz3Oe.js +0 -36
- package/dist/Textarea-vl5fZzJa.cjs +0 -1
- package/dist/format-aHRZi12I.cjs +0 -1
- package/dist/iconScale.module-BA7n9qSH.cjs +0 -1
- package/dist/iconScale.module-Cw_Yn8O6.js +0 -10
- package/dist/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/overlayStack-ND6EQZlX.js +0 -196
- package/dist/server/AttributeGrid-CSidAjfz.cjs +0 -1
- package/dist/server/AttributeGrid-D6b2qQS9.js +0 -221
- package/dist/server/CommandPalette-9dL9DSG8.js +0 -2704
- package/dist/server/CommandPalette-Q296oZjU.cjs +0 -1
- package/dist/server/Input-Cxwc5CK4.js +0 -115
- package/dist/server/Input-k-IAQ5Wp.cjs +0 -1
- package/dist/server/Popover-BkZ9n6TA.cjs +0 -1
- package/dist/server/Textarea-DAoq3wWf.cjs +0 -1
- package/dist/server/Textarea-D_1mHXTj.js +0 -31
- package/dist/server/format-BWHKiXRe.cjs +0 -1
- package/dist/server/format-BubrMUMq.js +0 -382
- package/dist/server/iconScale.module-BA7n9qSH.cjs +0 -1
- package/dist/server/iconScale.module-Cw_Yn8O6.js +0 -10
- package/dist/server/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/server/overlayStack-ND6EQZlX.js +0 -196
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,71 @@ All notable changes to `@vokril/ui-solid` are listed here. Versions follow
|
|
|
5
5
|
contain breaking changes. From 0.1.1 on, entries are written by Changesets
|
|
6
6
|
(`npm run release:version`) above the previous release.
|
|
7
7
|
|
|
8
|
+
## 0.8.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- Class maps for the stylesheets a host used to copy because it could not `composes` from the package. A host puts the names on its own elements, next to its own class; the package's rules sit in a `vk.*` layer or load before the host's CSS, so a host class outside any cascade layer wins where both set a property:
|
|
13
|
+
|
|
14
|
+
- `iconScaleClasses` (root): icon sizes from the text size tokens (`icon3xs` … `iconXl`);
|
|
15
|
+
- `widgetChromeClasses` (root): a dashboard widget's body, header row, title, host name and count pill;
|
|
16
|
+
- `recordTableClasses` (root): the "label → value" table skeleton (`table`, `cell`, `labelCell`);
|
|
17
|
+
- `hljsThemeClasses` (root): the highlight.js token theme, put on the container of the highlighted `<pre>` blocks;
|
|
18
|
+
- `detachedLayoutClasses` (root): the layout of a view in a window of its own;
|
|
19
|
+
- `settingsFieldClasses` (root): the widget settings form, for a field the field components do not cover (a select, a slider with its value beside the label, a hint under a custom control);
|
|
20
|
+
- `panelClasses` (`/overlay`): the `Panel` chrome, with the side-panel (`*Rail`) and admin-section (`*Admin`) header variants;
|
|
21
|
+
- `resultTabToolbarClasses` (`/grid`): the toolbar above a result grid (view buttons, sort badges, filter field, trailing buttons).
|
|
22
|
+
|
|
23
|
+
Each map names every class of its stylesheet. `hljsTheme` and `detachedLayout` were not used by any component, so `ui.css` now carries their rules too.
|
|
24
|
+
|
|
25
|
+
## 0.7.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- `PopoverPanel` in `/overlay`: the parts of a form panel inside a `Popover` (site details, a bookmark editor, an account card), built on `Panel`:
|
|
30
|
+
|
|
31
|
+
- `PopoverPanel.Root`: the column, at the one shared width `--popover-panel-width` (24rem, 360px at the 15px root), so every form panel opens at the same size whatever it holds;
|
|
32
|
+
- `PopoverPanel.Header`: the title as an `h3` heading (section headings are `h4`), with optional `actions` and a close button (`onClose`, `closeLabel`, default "Close");
|
|
33
|
+
- `PopoverPanel.Body`: the content column; it scrolls when the popover reaches the window's height while the header and footer stay in place, so the Popover's own `scrollable` stays off;
|
|
34
|
+
- `PopoverPanel.Section`: a group of fields under a heading in small capitals, like a menu section, with an optional `aside` slot; the `section` is named by its heading;
|
|
35
|
+
- `PopoverPanel.Field`: a setting row, label on the left and control on the right, with an optional muted `description`. The package's controls (`Toggle`, `SearchableSelect`, `NumberInput`, `Input`, `Checkbox`, …) take their accessible name from the label and their description from the muted line, as inside a `FormField`, so they need no `ariaLabel`;
|
|
36
|
+
- `PopoverPanel.Separator`: the rule a menu draws between its groups;
|
|
37
|
+
- `PopoverPanel.Footer`: the actions under a rule, aligned to the end, spread (`align="between"`) or stacked (`align="stretch"`).
|
|
38
|
+
|
|
39
|
+
The parts add the menu rows' inline inset to the Popover's padding, so a panel's title and labels start where a menu row's label starts.
|
|
40
|
+
- `--popover-panel-width` token.
|
|
41
|
+
- The form field context (`useFormFieldAria`) takes `wrapsControlInLabel`: a field that lays its label out beside the control instead of wrapping it in a `<label>` sets it to false, and `Input`, `Textarea` and `Checkbox` then point `aria-labelledby` at the label (`nativeControlLabelledBy`). Inside a `FormField` nothing changes: its `<label>` keeps naming them.
|
|
42
|
+
|
|
43
|
+
## 0.6.0
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- Menu parts in `/overlay`, the rows and headings a menu or a menu-like panel is built from, drawn from the same `menuSurface` vocabulary as the context menu, the menu bar and the select lists. Put them inside a `Popover`, which draws the surface:
|
|
48
|
+
|
|
49
|
+
- `MenuList`: the scrolling column of rows;
|
|
50
|
+
- `MenuSection`: a heading in small capitals with an optional `aside` slot on its right ("Show all", a clear or refresh button); its rows are announced as a group named by the heading;
|
|
51
|
+
- `MenuItem`: a row with an optional `icon`, a `description` line under the label, a `badge` after it, muted `meta` text on the right and `trailing` controls (close, delete, pause) that are their own click targets inside the row's hover tint (inside the `menuitem` in a menu; next to the row's button for roles whose children are presentational). `checked` makes it a checkable row, `selected` marks the current value, `pressed` a toggle row in a dialog panel (`aria-pressed`), `active` the keyboard cursor of a list that keeps focus elsewhere; `reserveIcon` and `reserveCheck` keep the columns on rows without them so labels line up. `role` takes `menuitem` (default), `menuitemcheckbox`, `menuitemradio`, `option` or `button`;
|
|
52
|
+
- `MenuSeparator`, `MenuEmpty` and `MenuSearch`;
|
|
53
|
+
- `MenuDisclosure`: a row that opens its content in place, under itself, instead of in a side submenu, so the content can hold form controls; for panels with the `dialog` role.
|
|
54
|
+
- `menuSurfaceClasses` exposes the class names of the shared surface vocabulary (`surface`, `viewport`, `item`, `itemActive`, `itemSelected`, `label`, `itemIcon`, `check`, `shortcut`, `chevron`, `separator`, `empty`, …) for a host row that does not fit `MenuItem`. A host stylesheet cannot `composes` from the package; it puts these classes on its own elements instead.
|
|
55
|
+
- `DropdownMenu` is drawn from the menu parts. Items can be `{ type: 'section', label }` headings (a heading with no rows after it is not drawn), and rows take `description`, `checked` and `selected`. `surfaceClass` sets a class on the floating panel (`menuClass` stays on the list). Existing item lists render as before, with one visible change: the row tint is the menu surface's, the same as the context menu's, instead of `--ui-color-hover`.
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- A selected or active menu row keeps its tint when it has pointer focus. A menu focuses its first row on open, and when that row was the current value its tint disappeared until the pointer moved.
|
|
60
|
+
- `Popover` with the `menu` role moves with the arrow keys across `menuitemcheckbox` and `menuitemradio` rows too, and skips rows disabled with `aria-disabled`.
|
|
61
|
+
- `Popover` leaves an outside click to a layer open above it, as it already did with Escape: with a dialog or a menu open over the popover, a click outside both closes only the top layer. It used to close the popover underneath as well. A tooltip above the popover does not count: overlay layers have `isTopmostForPointer()`, which skips tooltips (they take part in the Escape order but never take a click).
|
|
62
|
+
|
|
63
|
+
## 0.5.1
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- `DropdownMenu` keeps the icon column on rows without an icon once any row of the list has one, so all labels start at the same place, as in the context menu. A list without icons has no empty column.
|
|
68
|
+
- `DropdownMenu` draws one surface. Its list painted its own background, border, radius and shadow inside the `Popover`, which already is the menu surface, so the menu showed a box inside a box; the theme's floating-panel shadow also matched the list by its `menuList` class name. The rows now sit on the Popover's surface:
|
|
69
|
+
|
|
70
|
+
- rows have rounded corners and the separator is visible (it had the list's own colour);
|
|
71
|
+
- the row tint is `--ui-color-hover` on hover and keyboard focus. `--ui-color-surface-hover` equals the elevated panel, so no tint showed in the light theme, and the first row, which the Popover focuses on open, no longer looks selected when the menu is opened with the pointer.
|
|
72
|
+
|
|
8
73
|
## 0.5.0
|
|
9
74
|
|
|
10
75
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -64,6 +64,25 @@ render(() => <App />, document.getElementById('root')!);
|
|
|
64
64
|
|
|
65
65
|
The page-wide rules live in `base.css` for apps that want them.
|
|
66
66
|
|
|
67
|
+
The package does not export its CSS modules, so a host stylesheet cannot `composes` from them. A
|
|
68
|
+
host element that should look like part of the kit takes the class names from a class map and
|
|
69
|
+
puts them next to its own class:
|
|
70
|
+
|
|
71
|
+
| Map | Import | Classes |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `menuSurfaceClasses` | `/overlay` | The floating menu surface and its rows |
|
|
74
|
+
| `panelClasses` | `/overlay` | `Panel` chrome, with the side-panel (`*Rail`) and admin-section (`*Admin`) headers |
|
|
75
|
+
| `resultTabToolbarClasses` | `/grid` | The toolbar above a result grid: view buttons, sort badges, trailing buttons |
|
|
76
|
+
| `settingsFieldClasses` | root | The widget settings form's fields |
|
|
77
|
+
| `iconScaleClasses` | root | Icon sizes that follow the text size |
|
|
78
|
+
| `widgetChromeClasses` | root | A dashboard widget's body and header row |
|
|
79
|
+
| `recordTableClasses` | root | The "label → value" table skeleton |
|
|
80
|
+
| `hljsThemeClasses` | root | The highlight.js token theme, on the container of the `<pre>` blocks |
|
|
81
|
+
| `detachedLayoutClasses` | root | The layout of a view in a window of its own |
|
|
82
|
+
|
|
83
|
+
Each map's rules sit in a `vk.*` layer or load before the host's CSS, so a host class outside any
|
|
84
|
+
cascade layer, on the same element and of the same specificity, wins where both set a property.
|
|
85
|
+
|
|
67
86
|
## Entry points
|
|
68
87
|
|
|
69
88
|
Every subpath has ESM, CommonJS, type declarations, a server build and a Solid source build
|
|
@@ -74,7 +93,7 @@ Every subpath has ESM, CommonJS, type declarations, a server build and a Solid s
|
|
|
74
93
|
| `@vokril/ui-solid` | All 114 general components, the theme API, notifications, i18n helpers and the icons. |
|
|
75
94
|
| `/forms` | Button, Input, Checkbox, Toggle, Combobox, SearchableSelect, Slider, SegmentedControl, RadioGroup, date pickers, FormField, TagInput, CopyButton, … (31) |
|
|
76
95
|
| `/feedback` | Badge, Alert, Progress, Spinner, Skeleton, EmptyState, StatusDot, Kbd, CodeBlock, AppErrorBoundary, … (19) |
|
|
77
|
-
| `/overlay` | Modal, ConfirmDialog, Drawer, Popover, Tooltip, DropdownMenu, ContextMenu, CommandPalette, Panel, OverlayScrollArea, …
|
|
96
|
+
| `/overlay` | Modal, ConfirmDialog, Drawer, Popover, PopoverPanel (form panel parts), Tooltip, DropdownMenu, menu parts (MenuList, MenuSection, MenuItem, MenuDisclosure, …), ContextMenu, CommandPalette, Panel, OverlayScrollArea, … |
|
|
78
97
|
| `/navigation` | Tabs, Accordion, Breadcrumb, Stepper |
|
|
79
98
|
| `/layout` | PageHeader, ResizableSplitPane, ResizeHandle, plus the navigation components |
|
|
80
99
|
| `/notifications` | `toast`, `NotificationHost`, catalog notifications (`defineNotification`), `NotificationPanel`, `NotificationsCenter`, `StatusBarNotificationBell` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("solid-js/web"),v=require("solid-js"),T=require("./SearchableSelect-zT8XNpmt.cjs"),I=require("./Button-X8QR6llv.cjs"),c=require("./i18n-B9ccWgcR.cjs"),S=require("./Input-BEnk4FCF.cjs"),k=require("@vokril/icons"),V=require("./iconScale.module-CzmKG1rf.cjs"),z=require("./keys-BeeC5_RZ.cjs"),R=require("./bugIndicatingError-D2X5Hfgg.cjs");function w(e,r){return e<=0?r:String(e)}const P="vk_paginationRow_hg8fj",$="vk_paginationMeta_rPi8N",y="vk_paginationActions_gD2Fz",L="vk_paginationLabel_9x9Ah",O="vk_paginationSelect_h5BcT",N="vk_paginationPage_CYJRF",u={paginationRow:P,paginationMeta:$,paginationActions:y,paginationLabel:L,paginationSelect:O,paginationPage:N};var A=t.template("<div><span></span><div><label></label><span> / ");function M(e){const r=v.createMemo(()=>{const a=c.t("Unlimited");return e.pageSizeOptions.map(n=>({value:String(n),label:w(n,a)}))});return(()=>{var a=A(),n=a.firstChild,i=n.nextSibling,s=i.firstChild,g=s.nextSibling,_=g.firstChild;return t.insert(n,()=>c.t("Showing {shown} of {total} items",{shown:e.shownCount(),total:e.totalCount()})),t.insert(s,()=>c.t("Page size"),null),t.insert(s,t.createComponent(T.SearchableSelect,{size:"sm",get class(){return u.paginationSelect},get value(){return String(e.pageSize())},get options(){return r()},onChange:l=>{e.onPageSizeChange(Number(l))},searchable:!1,get ariaLabel(){return c.t("Page size")}}),null),t.insert(i,t.createComponent(I.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()<=1},onClick:()=>e.onPageChange(Math.max(1,e.page()-1)),get children(){return c.t("Previous")}}),g),t.insert(g,()=>e.page(),_),t.insert(g,()=>e.totalPages(),null),t.insert(i,t.createComponent(I.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()>=e.totalPages()},onClick:()=>e.onPageChange(Math.min(e.totalPages(),e.page()+1)),get children(){return c.t("Next")}}),null),t.effect(l=>{var h=u.paginationRow,m=u.paginationMeta,C=u.paginationActions,f=u.paginationLabel,p=u.paginationPage;return h!==l.e&&t.className(a,l.e=h),m!==l.t&&t.className(n,l.t=m),C!==l.a&&t.className(i,l.a=C),f!==l.o&&t.className(s,l.o=f),p!==l.i&&t.className(g,l.i=p),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()}const q="vk_toolbar_LSRmU",H="vk_toolbarHorizontal_qHM-8",x="vk_toolbarViewClip_Q893H",F="vk_toolbarScrollRoot_aYbLg",E="vk_toolbarScrollViewport_qBzjd",J="vk_toolbarScrollTrack_Tp8TN",X="vk_segmentedCapsule_k9EBy",K="vk_toolbarBtn_CcyXF",U="vk_toolbarBtnActive_UgTBV",j="vk_toolbarBtnIconOnly_BlE-b",D="vk_toolbarHorizontalBottom_qLzhJ",G="vk_toolbarVertical_EjHi2",Q="vk_toolbarVerticalRight_DBgEa",Y="vk_toolbarScrollRootVertical_VGLRy",Z="vk_toolbarScrollViewportVertical_RLF5g",W="vk_toolbarScrollTrackVertical_c1rBF",tt="vk_toolbarSettingsBtn_XXfMz",et="vk_toolbarIcon_0FvlL",ot="vk_toolbarSpacer_N3TbQ",at="vk_sortBadgePill_nVrIk",rt="vk_sortBadgeBtn_Is9PS",nt="vk_sortBadgeIcon_kw8oa",lt="vk_sortBadgeLabel_l-p33",ct="vk_sortBadgeClearBtn_ioOaP",it="vk_sortBadgeClearIcon_0e6Kd",st="vk_filterInputContainer_kegUv",bt="vk_filterSearchIcon_gI0m2",gt="vk_filterInput_bX9xM",ut="vk_filterClearBtn_WerJL",vt="vk_filterClearIcon_7fuAJ",o={toolbar:q,toolbarHorizontal:H,toolbarViewClip:x,toolbarScrollRoot:F,toolbarScrollViewport:E,toolbarScrollTrack:J,segmentedCapsule:X,toolbarBtn:K,toolbarBtnActive:U,toolbarBtnIconOnly:j,toolbarHorizontalBottom:D,toolbarVertical:G,toolbarVerticalRight:Q,toolbarScrollRootVertical:Y,toolbarScrollViewportVertical:Z,toolbarScrollTrackVertical:W,toolbarSettingsBtn:tt,toolbarIcon:et,toolbarSpacer:ot,sortBadgePill:at,sortBadgeBtn:rt,sortBadgeIcon:nt,sortBadgeLabel:lt,sortBadgeClearBtn:ct,sortBadgeClearIcon:it,filterInputContainer:st,filterSearchIcon:bt,filterInput:gt,filterClearBtn:ut,filterClearIcon:vt},_t="vk_searchRow_2pwXX",dt="vk_searchInput_PbDtG",Bt="vk_clearBtn_upa-E",d={searchRow:_t,searchInput:dt,clearBtn:Bt};var St=t.template("<div>");function kt(e){return t.createComponent(S.PressableSurface,{type:"button",get class(){return`${o.toolbarSettingsBtn} ${e.active?o.toolbarBtnActive:""}`},get onClick(){return e.onToggle},get"aria-pressed"(){return e.active},get"aria-label"(){return c.t("Search")},get title(){return c.t("Search")},get children(){return t.createComponent(k.VpSearch,{get class(){return o.toolbarIcon},"aria-hidden":"true"})}})}function ht(e){let r;return v.onMount(()=>r==null?void 0:r.focus()),(()=>{var a=St();return t.insert(a,t.createComponent(S.Input,t.mergeProps({ref(n){var i=r;typeof i=="function"?i(n):r=n},get class(){return d.searchInput},type:"search",size:"sm",get value(){return e.value},onInput:n=>e.onInput(n.currentTarget.value),onKeyDown:n=>{z.isKey(n,"Escape")&&e.onClose()},get placeholder(){return e.placeholder??c.t("Search…")}},()=>e.disabled!==void 0?{disabled:e.disabled}:{})),null),t.insert(a,t.createComponent(v.Show,{get when(){return e.value.length>0},get children(){return t.createComponent(S.PressableSurface,{type:"button",get class(){return d.clearBtn},onClick:()=>e.onInput(""),get"aria-label"(){return c.t("Clear search")},get title(){return c.t("Clear search")},get children(){return t.createComponent(k.VpClose,{get class(){return V.iconScale.iconSm},"aria-hidden":"true"})}})}}),null),t.effect(()=>t.className(a,d.searchRow)),a})()}const mt=Object.freeze({toolbar:o.toolbar,toolbarHorizontal:o.toolbarHorizontal,toolbarHorizontalBottom:o.toolbarHorizontalBottom,toolbarVertical:o.toolbarVertical,toolbarVerticalRight:o.toolbarVerticalRight,toolbarViewClip:o.toolbarViewClip,toolbarScrollRoot:o.toolbarScrollRoot,toolbarScrollViewport:o.toolbarScrollViewport,toolbarScrollTrack:o.toolbarScrollTrack,toolbarScrollRootVertical:o.toolbarScrollRootVertical,toolbarScrollViewportVertical:o.toolbarScrollViewportVertical,toolbarScrollTrackVertical:o.toolbarScrollTrackVertical,segmentedCapsule:o.segmentedCapsule,toolbarBtn:o.toolbarBtn,toolbarBtnActive:o.toolbarBtnActive,toolbarBtnIconOnly:o.toolbarBtnIconOnly,toolbarIcon:o.toolbarIcon,toolbarSpacer:o.toolbarSpacer,toolbarSettingsBtn:o.toolbarSettingsBtn,sortBadgePill:o.sortBadgePill,sortBadgeBtn:o.sortBadgeBtn,sortBadgeIcon:o.sortBadgeIcon,sortBadgeLabel:o.sortBadgeLabel,sortBadgeClearBtn:o.sortBadgeClearBtn,sortBadgeClearIcon:o.sortBadgeClearIcon,filterInputContainer:o.filterInputContainer,filterSearchIcon:o.filterSearchIcon,filterInput:o.filterInput,filterClearBtn:o.filterClearBtn,filterClearIcon:o.filterClearIcon});function Ct(e,r){const a=`${r}: `;throw new R.BugIndicatingError(`${a}Non-exhaustive switch: unexpected value ${JSON.stringify(e)}`)}const ft="vk_grid_uK6pm",pt="vk_card_33OV3",It="vk_item_UeZrE",Vt="vk_label_a-LFz",wt="vk_value_9ZQBt",Tt="vk_valueMono_knknq",zt="vk_boolOn_5zd-H",Rt="vk_boolOff_-6I4K",Pt="vk_stacked_2T--a",b={grid:ft,card:pt,item:It,label:Vt,value:wt,valueMono:Tt,boolOn:zt,boolOff:Rt,stacked:Pt};var B=t.template("<span>"),$t=t.template("<div>"),yt=t.template("<div><span>");function Lt(e,r){switch(e.kind){case"text":return(()=>{var a=B();return t.insert(a,()=>e.value(r)),t.effect(()=>t.className(a,b.value)),a})();case"mono":return(()=>{var a=B();return t.insert(a,()=>e.value(r)),t.effect(()=>t.className(a,b.valueMono)),a})();case"bool":return(()=>{var a=B();return t.insert(a,(()=>{var n=t.memo(()=>!!e.on(r));return()=>n()?t.createComponent(k.VpCheck,{get class(){return V.iconScale.iconSm},"aria-hidden":"true"}):"—"})()),t.effect(()=>t.className(a,`${b.value} ${e.on(r)?b.boolOn:b.boolOff}`)),a})();case"custom":return e.render(r);default:return Ct(e,"AttributeField.kind")}}function Ot(e){return t.createComponent(v.Show,{get when(){return e.row()!=null},get children(){var r=$t();return t.insert(r,t.createComponent(v.For,{get each(){return e.fields},children:a=>(()=>{var n=yt(),i=n.firstChild;return t.insert(i,()=>a.label),t.insert(n,()=>Lt(a,e.row()),null),t.effect(s=>{var g=b.item,_=b.label;return g!==s.e&&t.className(n,s.e=g),_!==s.t&&t.className(i,s.t=_),s},{e:void 0,t:void 0}),n})()})),t.effect(()=>t.className(r,`${b.grid} ${b[e.variant]??""}`)),r}})}exports.AttributeGrid=Ot;exports.Pagination=M;exports.ToolbarSearchRow=ht;exports.ToolbarSearchToggle=kt;exports.pageSizeOptionLabel=w;exports.resultTabToolbarClasses=mt;
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { insert as l, createComponent as c, effect as _, className as i, template as B, mergeProps as P, memo as T } from "solid-js/web";
|
|
2
|
+
import { createMemo as $, onMount as y, Show as w, For as L } from "solid-js";
|
|
3
|
+
import { S as O } from "./SearchableSelect-C6KL7e42.js";
|
|
4
|
+
import { B as V } from "./Button-BZWXPn8y.js";
|
|
5
|
+
import { t as s } from "./i18n-CYq-dVvv.js";
|
|
6
|
+
import { I as A, P as z } from "./Input-PZ5wRvPx.js";
|
|
7
|
+
import { VpClose as M, VpSearch as H, VpCheck as x } from "@vokril/icons";
|
|
8
|
+
import { i as R } from "./iconScale.module-C3O0bxfp.js";
|
|
9
|
+
import { i as F } from "./keys-Bfgdfak_.js";
|
|
10
|
+
import { B as N } from "./bugIndicatingError-h3J5qkL6.js";
|
|
11
|
+
function E(t, a) {
|
|
12
|
+
return t <= 0 ? a : String(t);
|
|
13
|
+
}
|
|
14
|
+
const X = "vk_paginationRow_hg8fj", J = "vk_paginationMeta_rPi8N", K = "vk_paginationActions_gD2Fz", U = "vk_paginationLabel_9x9Ah", j = "vk_paginationSelect_h5BcT", q = "vk_paginationPage_CYJRF", d = {
|
|
15
|
+
paginationRow: X,
|
|
16
|
+
paginationMeta: J,
|
|
17
|
+
paginationActions: K,
|
|
18
|
+
paginationLabel: U,
|
|
19
|
+
paginationSelect: j,
|
|
20
|
+
paginationPage: q
|
|
21
|
+
};
|
|
22
|
+
var D = /* @__PURE__ */ B("<div><span></span><div><label></label><span> / ");
|
|
23
|
+
function Zt(t) {
|
|
24
|
+
const a = $(() => {
|
|
25
|
+
const e = s("Unlimited");
|
|
26
|
+
return t.pageSizeOptions.map((r) => ({
|
|
27
|
+
value: String(r),
|
|
28
|
+
label: E(r, e)
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
31
|
+
return (() => {
|
|
32
|
+
var e = D(), r = e.firstChild, g = r.nextSibling, b = g.firstChild, v = b.nextSibling, S = v.firstChild;
|
|
33
|
+
return l(r, () => s("Showing {shown} of {total} items", {
|
|
34
|
+
shown: t.shownCount(),
|
|
35
|
+
total: t.totalCount()
|
|
36
|
+
})), l(b, () => s("Page size"), null), l(b, c(O, {
|
|
37
|
+
size: "sm",
|
|
38
|
+
get class() {
|
|
39
|
+
return d.paginationSelect;
|
|
40
|
+
},
|
|
41
|
+
get value() {
|
|
42
|
+
return String(t.pageSize());
|
|
43
|
+
},
|
|
44
|
+
get options() {
|
|
45
|
+
return a();
|
|
46
|
+
},
|
|
47
|
+
onChange: (n) => {
|
|
48
|
+
t.onPageSizeChange(Number(n));
|
|
49
|
+
},
|
|
50
|
+
searchable: !1,
|
|
51
|
+
get ariaLabel() {
|
|
52
|
+
return s("Page size");
|
|
53
|
+
}
|
|
54
|
+
}), null), l(g, c(V, {
|
|
55
|
+
size: "sm",
|
|
56
|
+
variant: "secondary",
|
|
57
|
+
get disabled() {
|
|
58
|
+
return t.page() <= 1;
|
|
59
|
+
},
|
|
60
|
+
onClick: () => t.onPageChange(Math.max(1, t.page() - 1)),
|
|
61
|
+
get children() {
|
|
62
|
+
return s("Previous");
|
|
63
|
+
}
|
|
64
|
+
}), v), l(v, () => t.page(), S), l(v, () => t.totalPages(), null), l(g, c(V, {
|
|
65
|
+
size: "sm",
|
|
66
|
+
variant: "secondary",
|
|
67
|
+
get disabled() {
|
|
68
|
+
return t.page() >= t.totalPages();
|
|
69
|
+
},
|
|
70
|
+
onClick: () => t.onPageChange(Math.min(t.totalPages(), t.page() + 1)),
|
|
71
|
+
get children() {
|
|
72
|
+
return s("Next");
|
|
73
|
+
}
|
|
74
|
+
}), null), _((n) => {
|
|
75
|
+
var f = d.paginationRow, m = d.paginationMeta, C = d.paginationActions, I = d.paginationLabel, p = d.paginationPage;
|
|
76
|
+
return f !== n.e && i(e, n.e = f), m !== n.t && i(r, n.t = m), C !== n.a && i(g, n.a = C), I !== n.o && i(b, n.o = I), p !== n.i && i(v, n.i = p), n;
|
|
77
|
+
}, {
|
|
78
|
+
e: void 0,
|
|
79
|
+
t: void 0,
|
|
80
|
+
a: void 0,
|
|
81
|
+
o: void 0,
|
|
82
|
+
i: void 0
|
|
83
|
+
}), e;
|
|
84
|
+
})();
|
|
85
|
+
}
|
|
86
|
+
const G = "vk_toolbar_LSRmU", Q = "vk_toolbarHorizontal_qHM-8", Y = "vk_toolbarViewClip_Q893H", Z = "vk_toolbarScrollRoot_aYbLg", W = "vk_toolbarScrollViewport_qBzjd", tt = "vk_toolbarScrollTrack_Tp8TN", ot = "vk_segmentedCapsule_k9EBy", et = "vk_toolbarBtn_CcyXF", at = "vk_toolbarBtnActive_UgTBV", rt = "vk_toolbarBtnIconOnly_BlE-b", lt = "vk_toolbarHorizontalBottom_qLzhJ", nt = "vk_toolbarVertical_EjHi2", it = "vk_toolbarVerticalRight_DBgEa", ct = "vk_toolbarScrollRootVertical_VGLRy", st = "vk_toolbarScrollViewportVertical_RLF5g", gt = "vk_toolbarScrollTrackVertical_c1rBF", bt = "vk_toolbarSettingsBtn_XXfMz", ut = "vk_toolbarIcon_0FvlL", vt = "vk_toolbarSpacer_N3TbQ", _t = "vk_sortBadgePill_nVrIk", dt = "vk_sortBadgeBtn_Is9PS", Bt = "vk_sortBadgeIcon_kw8oa", St = "vk_sortBadgeLabel_l-p33", kt = "vk_sortBadgeClearBtn_ioOaP", ht = "vk_sortBadgeClearIcon_0e6Kd", ft = "vk_filterInputContainer_kegUv", mt = "vk_filterSearchIcon_gI0m2", Ct = "vk_filterInput_bX9xM", It = "vk_filterClearBtn_WerJL", pt = "vk_filterClearIcon_7fuAJ", o = {
|
|
87
|
+
toolbar: G,
|
|
88
|
+
toolbarHorizontal: Q,
|
|
89
|
+
toolbarViewClip: Y,
|
|
90
|
+
toolbarScrollRoot: Z,
|
|
91
|
+
toolbarScrollViewport: W,
|
|
92
|
+
toolbarScrollTrack: tt,
|
|
93
|
+
segmentedCapsule: ot,
|
|
94
|
+
toolbarBtn: et,
|
|
95
|
+
toolbarBtnActive: at,
|
|
96
|
+
toolbarBtnIconOnly: rt,
|
|
97
|
+
toolbarHorizontalBottom: lt,
|
|
98
|
+
toolbarVertical: nt,
|
|
99
|
+
toolbarVerticalRight: it,
|
|
100
|
+
toolbarScrollRootVertical: ct,
|
|
101
|
+
toolbarScrollViewportVertical: st,
|
|
102
|
+
toolbarScrollTrackVertical: gt,
|
|
103
|
+
toolbarSettingsBtn: bt,
|
|
104
|
+
toolbarIcon: ut,
|
|
105
|
+
toolbarSpacer: vt,
|
|
106
|
+
sortBadgePill: _t,
|
|
107
|
+
sortBadgeBtn: dt,
|
|
108
|
+
sortBadgeIcon: Bt,
|
|
109
|
+
sortBadgeLabel: St,
|
|
110
|
+
sortBadgeClearBtn: kt,
|
|
111
|
+
sortBadgeClearIcon: ht,
|
|
112
|
+
filterInputContainer: ft,
|
|
113
|
+
filterSearchIcon: mt,
|
|
114
|
+
filterInput: Ct,
|
|
115
|
+
filterClearBtn: It,
|
|
116
|
+
filterClearIcon: pt
|
|
117
|
+
}, Vt = "vk_searchRow_2pwXX", wt = "vk_searchInput_PbDtG", zt = "vk_clearBtn_upa-E", k = {
|
|
118
|
+
searchRow: Vt,
|
|
119
|
+
searchInput: wt,
|
|
120
|
+
clearBtn: zt
|
|
121
|
+
};
|
|
122
|
+
var Rt = /* @__PURE__ */ B("<div>");
|
|
123
|
+
function Wt(t) {
|
|
124
|
+
return c(z, {
|
|
125
|
+
type: "button",
|
|
126
|
+
get class() {
|
|
127
|
+
return `${o.toolbarSettingsBtn} ${t.active ? o.toolbarBtnActive : ""}`;
|
|
128
|
+
},
|
|
129
|
+
get onClick() {
|
|
130
|
+
return t.onToggle;
|
|
131
|
+
},
|
|
132
|
+
get "aria-pressed"() {
|
|
133
|
+
return t.active;
|
|
134
|
+
},
|
|
135
|
+
get "aria-label"() {
|
|
136
|
+
return s("Search");
|
|
137
|
+
},
|
|
138
|
+
get title() {
|
|
139
|
+
return s("Search");
|
|
140
|
+
},
|
|
141
|
+
get children() {
|
|
142
|
+
return c(H, {
|
|
143
|
+
get class() {
|
|
144
|
+
return o.toolbarIcon;
|
|
145
|
+
},
|
|
146
|
+
"aria-hidden": "true"
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function to(t) {
|
|
152
|
+
let a;
|
|
153
|
+
return y(() => a == null ? void 0 : a.focus()), (() => {
|
|
154
|
+
var e = Rt();
|
|
155
|
+
return l(e, c(A, P({
|
|
156
|
+
ref(r) {
|
|
157
|
+
var g = a;
|
|
158
|
+
typeof g == "function" ? g(r) : a = r;
|
|
159
|
+
},
|
|
160
|
+
get class() {
|
|
161
|
+
return k.searchInput;
|
|
162
|
+
},
|
|
163
|
+
type: "search",
|
|
164
|
+
size: "sm",
|
|
165
|
+
get value() {
|
|
166
|
+
return t.value;
|
|
167
|
+
},
|
|
168
|
+
onInput: (r) => t.onInput(r.currentTarget.value),
|
|
169
|
+
onKeyDown: (r) => {
|
|
170
|
+
F(r, "Escape") && t.onClose();
|
|
171
|
+
},
|
|
172
|
+
get placeholder() {
|
|
173
|
+
return t.placeholder ?? s("Search…");
|
|
174
|
+
}
|
|
175
|
+
}, () => t.disabled !== void 0 ? {
|
|
176
|
+
disabled: t.disabled
|
|
177
|
+
} : {})), null), l(e, c(w, {
|
|
178
|
+
get when() {
|
|
179
|
+
return t.value.length > 0;
|
|
180
|
+
},
|
|
181
|
+
get children() {
|
|
182
|
+
return c(z, {
|
|
183
|
+
type: "button",
|
|
184
|
+
get class() {
|
|
185
|
+
return k.clearBtn;
|
|
186
|
+
},
|
|
187
|
+
onClick: () => t.onInput(""),
|
|
188
|
+
get "aria-label"() {
|
|
189
|
+
return s("Clear search");
|
|
190
|
+
},
|
|
191
|
+
get title() {
|
|
192
|
+
return s("Clear search");
|
|
193
|
+
},
|
|
194
|
+
get children() {
|
|
195
|
+
return c(M, {
|
|
196
|
+
get class() {
|
|
197
|
+
return R.iconSm;
|
|
198
|
+
},
|
|
199
|
+
"aria-hidden": "true"
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}), null), _(() => i(e, k.searchRow)), e;
|
|
205
|
+
})();
|
|
206
|
+
}
|
|
207
|
+
const oo = Object.freeze({
|
|
208
|
+
toolbar: o.toolbar,
|
|
209
|
+
toolbarHorizontal: o.toolbarHorizontal,
|
|
210
|
+
toolbarHorizontalBottom: o.toolbarHorizontalBottom,
|
|
211
|
+
toolbarVertical: o.toolbarVertical,
|
|
212
|
+
toolbarVerticalRight: o.toolbarVerticalRight,
|
|
213
|
+
toolbarViewClip: o.toolbarViewClip,
|
|
214
|
+
toolbarScrollRoot: o.toolbarScrollRoot,
|
|
215
|
+
toolbarScrollViewport: o.toolbarScrollViewport,
|
|
216
|
+
toolbarScrollTrack: o.toolbarScrollTrack,
|
|
217
|
+
toolbarScrollRootVertical: o.toolbarScrollRootVertical,
|
|
218
|
+
toolbarScrollViewportVertical: o.toolbarScrollViewportVertical,
|
|
219
|
+
toolbarScrollTrackVertical: o.toolbarScrollTrackVertical,
|
|
220
|
+
segmentedCapsule: o.segmentedCapsule,
|
|
221
|
+
toolbarBtn: o.toolbarBtn,
|
|
222
|
+
toolbarBtnActive: o.toolbarBtnActive,
|
|
223
|
+
toolbarBtnIconOnly: o.toolbarBtnIconOnly,
|
|
224
|
+
toolbarIcon: o.toolbarIcon,
|
|
225
|
+
toolbarSpacer: o.toolbarSpacer,
|
|
226
|
+
toolbarSettingsBtn: o.toolbarSettingsBtn,
|
|
227
|
+
sortBadgePill: o.sortBadgePill,
|
|
228
|
+
sortBadgeBtn: o.sortBadgeBtn,
|
|
229
|
+
sortBadgeIcon: o.sortBadgeIcon,
|
|
230
|
+
sortBadgeLabel: o.sortBadgeLabel,
|
|
231
|
+
sortBadgeClearBtn: o.sortBadgeClearBtn,
|
|
232
|
+
sortBadgeClearIcon: o.sortBadgeClearIcon,
|
|
233
|
+
filterInputContainer: o.filterInputContainer,
|
|
234
|
+
filterSearchIcon: o.filterSearchIcon,
|
|
235
|
+
filterInput: o.filterInput,
|
|
236
|
+
filterClearBtn: o.filterClearBtn,
|
|
237
|
+
filterClearIcon: o.filterClearIcon
|
|
238
|
+
});
|
|
239
|
+
function Pt(t, a) {
|
|
240
|
+
const e = `${a}: `;
|
|
241
|
+
throw new N(
|
|
242
|
+
`${e}Non-exhaustive switch: unexpected value ${JSON.stringify(t)}`
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
const Tt = "vk_grid_uK6pm", $t = "vk_card_33OV3", yt = "vk_item_UeZrE", Lt = "vk_label_a-LFz", Ot = "vk_value_9ZQBt", At = "vk_valueMono_knknq", Mt = "vk_boolOn_5zd-H", Ht = "vk_boolOff_-6I4K", xt = "vk_stacked_2T--a", u = {
|
|
246
|
+
grid: Tt,
|
|
247
|
+
card: $t,
|
|
248
|
+
item: yt,
|
|
249
|
+
label: Lt,
|
|
250
|
+
value: Ot,
|
|
251
|
+
valueMono: At,
|
|
252
|
+
boolOn: Mt,
|
|
253
|
+
boolOff: Ht,
|
|
254
|
+
stacked: xt
|
|
255
|
+
};
|
|
256
|
+
var h = /* @__PURE__ */ B("<span>"), Ft = /* @__PURE__ */ B("<div>"), Nt = /* @__PURE__ */ B("<div><span>");
|
|
257
|
+
function Et(t, a) {
|
|
258
|
+
switch (t.kind) {
|
|
259
|
+
case "text":
|
|
260
|
+
return (() => {
|
|
261
|
+
var e = h();
|
|
262
|
+
return l(e, () => t.value(a)), _(() => i(e, u.value)), e;
|
|
263
|
+
})();
|
|
264
|
+
case "mono":
|
|
265
|
+
return (() => {
|
|
266
|
+
var e = h();
|
|
267
|
+
return l(e, () => t.value(a)), _(() => i(e, u.valueMono)), e;
|
|
268
|
+
})();
|
|
269
|
+
case "bool":
|
|
270
|
+
return (() => {
|
|
271
|
+
var e = h();
|
|
272
|
+
return l(e, (() => {
|
|
273
|
+
var r = T(() => !!t.on(a));
|
|
274
|
+
return () => r() ? c(x, {
|
|
275
|
+
get class() {
|
|
276
|
+
return R.iconSm;
|
|
277
|
+
},
|
|
278
|
+
"aria-hidden": "true"
|
|
279
|
+
}) : "—";
|
|
280
|
+
})()), _(() => i(e, `${u.value} ${t.on(a) ? u.boolOn : u.boolOff}`)), e;
|
|
281
|
+
})();
|
|
282
|
+
case "custom":
|
|
283
|
+
return t.render(a);
|
|
284
|
+
default:
|
|
285
|
+
return Pt(t, "AttributeField.kind");
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function eo(t) {
|
|
289
|
+
return c(w, {
|
|
290
|
+
get when() {
|
|
291
|
+
return t.row() != null;
|
|
292
|
+
},
|
|
293
|
+
get children() {
|
|
294
|
+
var a = Ft();
|
|
295
|
+
return l(a, c(L, {
|
|
296
|
+
get each() {
|
|
297
|
+
return t.fields;
|
|
298
|
+
},
|
|
299
|
+
children: (e) => (() => {
|
|
300
|
+
var r = Nt(), g = r.firstChild;
|
|
301
|
+
return l(g, () => e.label), l(r, () => Et(e, t.row()), null), _((b) => {
|
|
302
|
+
var v = u.item, S = u.label;
|
|
303
|
+
return v !== b.e && i(r, b.e = v), S !== b.t && i(g, b.t = S), b;
|
|
304
|
+
}, {
|
|
305
|
+
e: void 0,
|
|
306
|
+
t: void 0
|
|
307
|
+
}), r;
|
|
308
|
+
})()
|
|
309
|
+
})), _(() => i(a, `${u.grid} ${u[t.variant] ?? ""}`)), a;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
export {
|
|
314
|
+
eo as A,
|
|
315
|
+
Zt as P,
|
|
316
|
+
to as T,
|
|
317
|
+
Wt as a,
|
|
318
|
+
E as p,
|
|
319
|
+
oo as r
|
|
320
|
+
};
|