@vokril/ui-solid 0.34.0 → 0.37.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 +40 -0
- package/dist/Alert-DCIet3Ol.cjs +1 -0
- package/dist/Alert-DyBaU25r.js +59 -0
- package/dist/{AttributeGrid-CNkALmJq.cjs → AttributeGrid-BNQaSpfE.cjs} +1 -1
- package/dist/{AttributeGrid-DnuTPJ_P.js → AttributeGrid-tjVwSI4h.js} +4 -4
- package/dist/Badge-BXLrs2z-.cjs +1 -0
- package/dist/Badge-BguTObKo.js +99 -0
- package/dist/{Button-lMUW5P3O.cjs → Button-D5Ihf90u.cjs} +1 -1
- package/dist/{Button-CX7mylBT.js → Button-DDkZzT-k.js} +1 -1
- package/dist/CommandPalette-CGfXynfl.js +4130 -0
- package/dist/CommandPalette-CdiIycaW.cjs +2 -0
- package/dist/{CopyButton-Dnd8_2Lj.cjs → CopyButton-Hb6c_Oq1.cjs} +1 -1
- package/dist/{CopyButton-BVvv5M8g.js → CopyButton-gHxA-WL_.js} +1 -1
- package/dist/{DateRangePicker-B7XbFZP_.js → DateRangePicker-B36NSGMS.js} +5 -5
- package/dist/{DateRangePicker-Cnzwgtx-.cjs → DateRangePicker-EEcp-IbM.cjs} +1 -1
- package/dist/Disclosure-0tZlCnkH.js +76 -0
- package/dist/Disclosure-DHNtLOWi.cjs +1 -0
- package/dist/GuidedTour-DicNwdq3.cjs +1 -0
- package/dist/GuidedTour-bcaKpXPX.js +412 -0
- package/dist/{HostPortal-Dm4BmY8M.cjs → HostPortal-C1xTPZYj.cjs} +1 -1
- package/dist/{HostPortal-De65s6CU.js → HostPortal-DsVQEH2q.js} +1 -1
- package/dist/{IconPicker-Cku0jy4r.js → IconPicker-7sF4n6vD.js} +4 -4
- package/dist/{IconPicker-pYYYpMF6.cjs → IconPicker-D60txter.cjs} +1 -1
- package/dist/{Input-CHtvL4_4.cjs → Input-DTm6v0fK.cjs} +1 -1
- package/dist/{Input-C3rEQffK.js → Input-agpwYeJd.js} +1 -1
- package/dist/{Modal-zPqB1ufV.cjs → Modal-C1vp7z7l.cjs} +1 -1
- package/dist/{Modal-CjPn7xsM.js → Modal-aKptl9ig.js} +2 -2
- package/dist/{PageSkeleton-BRuqaDzr.js → PageSkeleton-XNfK8xoY.js} +516 -569
- package/dist/PageSkeleton-jljSUpu1.cjs +30 -0
- package/dist/{SearchableSelect-C-lV1vSv.cjs → SearchableSelect-CXPSoFqf.cjs} +1 -1
- package/dist/{SearchableSelect-Du12kcI9.js → SearchableSelect-DFdGGNR6.js} +3 -3
- package/dist/{StatusBarNotificationBell-Lps0FfKd.js → StatusBarNotificationBell-CnmMzXzD.js} +41 -39
- package/dist/{StatusBarNotificationBell-pBGZ_2eb.cjs → StatusBarNotificationBell-MXX_K48w.cjs} +24 -24
- package/dist/{Stepper-rpu7lpzB.cjs → Stepper-BLKD4ub3.cjs} +1 -1
- package/dist/{Stepper-DzI-gtKd.js → Stepper-D0rrrtAN.js} +1 -1
- package/dist/{Textarea-DOzZCc-O.js → Textarea-CKJDNOaL.js} +1 -1
- package/dist/{Textarea-D4nYoQ0J.cjs → Textarea-Ds3bMrq9.cjs} +1 -1
- package/dist/{TimeSeriesChart-BJqQpeEJ.cjs → TimeSeriesChart-B9cqfs1M.cjs} +1 -1
- package/dist/{TimeSeriesChart-DvAhuyVl.js → TimeSeriesChart-DBARL8HG.js} +1 -1
- package/dist/ToggleButton-DaDfg2cC.js +2186 -0
- package/dist/ToggleButton-WoM2S_S4.cjs +1 -0
- package/dist/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation--Nybjbd2.js} +36 -36
- package/dist/{server/appThemeDerivation-Be_oKljl.cjs → appThemeDerivation-Cgg74S4e.cjs} +1 -1
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{createDialogShellFocus-DFEaujn4.cjs → createDialogShellFocus-C2FKc2rv.cjs} +1 -1
- package/dist/{createDialogShellFocus-Z557MGDg.js → createDialogShellFocus-CgjiySLA.js} +2 -2
- package/dist/createResizableSidebar-BqW3Ozgd.cjs +1 -0
- package/dist/createResizableSidebar-CKbN032u.js +853 -0
- package/dist/de-BQbrl0SL.cjs +1 -0
- package/dist/{server/de-q3NXnC0J.js → de-CSWSMGCG.js} +45 -39
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +3 -3
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +38 -36
- package/dist/forms/NumberInput.d.cts +5 -0
- package/dist/forms/NumberInput.d.ts +5 -0
- package/dist/forms/RadioGroup.d.cts +13 -0
- package/dist/forms/RadioGroup.d.ts +13 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/messageKeys.d.cts +1 -1
- package/dist/i18n/messageKeys.d.ts +1 -1
- package/dist/{i18n-CBlUGOyu.js → i18n-BJiKwNyr.js} +2 -2
- package/dist/{i18n-D3s-a2a0.cjs → i18n-DrmazJQC.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +360 -353
- package/dist/layout/SettingsCard.d.cts +108 -0
- package/dist/layout/SettingsCard.d.ts +108 -0
- package/dist/layout/SettingsSubpageHeader.d.cts +29 -0
- package/dist/layout/SettingsSubpageHeader.d.ts +29 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.cts +2 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +18 -14
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notificationCatalog-DmwTAO09.cjs +1 -0
- package/dist/notificationCatalog-otJ1LHFH.js +72 -0
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +2 -2
- package/dist/overlay/ConfirmDialog.d.cts +36 -0
- package/dist/overlay/ConfirmDialog.d.ts +36 -0
- package/dist/overlay/dialogNudge.d.cts +16 -0
- package/dist/overlay/dialogNudge.d.ts +16 -0
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +85 -84
- package/dist/{rowSource-D8gyHbEE.cjs → rowSource-BWm-kZHe.cjs} +1 -1
- package/dist/{rowSource-_4IuosKj.js → rowSource-DEulMv5F.js} +1 -1
- package/dist/server/Alert-DWGobTUk.js +45 -0
- package/dist/server/Alert-DulmzLv9.cjs +1 -0
- package/dist/server/{AttributeGrid-B9j_c2wM.js → AttributeGrid-BmS2U5Gz.js} +4 -4
- package/dist/server/{AttributeGrid-BALCTvOI.cjs → AttributeGrid-fT5-b9ZJ.cjs} +1 -1
- package/dist/server/Badge-C1Jn--DR.js +68 -0
- package/dist/server/Badge-wsDCVlA8.cjs +1 -0
- package/dist/server/{Button-ft_8RNJj.js → Button-XL9Os1pR.js} +1 -1
- package/dist/server/{Button-DHefmmYz.cjs → Button-lNnNp0um.cjs} +1 -1
- package/dist/server/CommandPalette-C0MbWZHM.cjs +1 -0
- package/dist/server/CommandPalette-CgTnmrYx.js +3376 -0
- package/dist/server/{CopyButton-CiYcsQcI.js → CopyButton-BdU_8aZB.js} +1 -1
- package/dist/server/{CopyButton-D2q7tQ0m.cjs → CopyButton-BpbGM72h.cjs} +1 -1
- package/dist/server/{DateRangePicker-BeByF_wt.cjs → DateRangePicker-ClJHlO9g.cjs} +1 -1
- package/dist/server/{DateRangePicker-TIOF99wh.js → DateRangePicker-DGXmbyCR.js} +5 -5
- package/dist/server/Disclosure-CUvaGDTZ.cjs +1 -0
- package/dist/server/Disclosure-ClOFRW_3.js +55 -0
- package/dist/server/GuidedTour-CCkg6Paz.js +350 -0
- package/dist/server/GuidedTour-PETCExHX.cjs +1 -0
- package/dist/server/{HostPortal-CwyePpDX.cjs → HostPortal-BNGZ8nw4.cjs} +1 -1
- package/dist/server/{HostPortal-C4xdfRyM.js → HostPortal-CdhnKAWT.js} +1 -1
- package/dist/server/{IconPicker-DX5JVIOl.js → IconPicker-B5lUuCxR.js} +5 -5
- package/dist/server/{IconPicker-QZrwihNH.cjs → IconPicker-BfRZtScr.cjs} +1 -1
- package/dist/server/{Input-V9Szcw6w.js → Input-DFAn8kou.js} +1 -1
- package/dist/server/{Input-UX0Hk53M.cjs → Input-DOTXKwhw.cjs} +1 -1
- package/dist/server/{Modal-DNYwnQ0V.cjs → Modal-BI3FtG-d.cjs} +1 -1
- package/dist/server/{Modal-Cl_asviX.js → Modal-Cbmikig8.js} +2 -2
- package/dist/server/PageSkeleton--ssP7Di9.cjs +30 -0
- package/dist/server/{PageSkeleton-CFs7AdTA.js → PageSkeleton-DRPIcDHU.js} +393 -432
- package/dist/server/{SearchableSelect-BBu5cP6P.cjs → SearchableSelect-DsHkuiTW.cjs} +1 -1
- package/dist/server/{SearchableSelect-B2ZFnp6i.js → SearchableSelect-y0Fr7cPS.js} +3 -3
- package/dist/server/{StatusBarNotificationBell-D0UzYPs6.cjs → StatusBarNotificationBell-BrHZ2r3X.cjs} +23 -23
- package/dist/server/{StatusBarNotificationBell-DiVJ-EnY.js → StatusBarNotificationBell-CY16bTyI.js} +41 -39
- package/dist/server/{Stepper-C04rOZcI.cjs → Stepper-BOVzsqcG.cjs} +1 -1
- package/dist/server/{Stepper-CVAOsf3o.js → Stepper-DC34G5fk.js} +1 -1
- package/dist/server/{Textarea-DM4zpgWo.js → Textarea-CL2wYpW7.js} +1 -1
- package/dist/server/{Textarea-BG6F8taO.cjs → Textarea-D43xOjAJ.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-tWbSF6fJ.cjs → TimeSeriesChart-CL1GjjV5.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-kuuqH7we.js → TimeSeriesChart-CP-2M3R7.js} +1 -1
- package/dist/server/ToggleButton-BmvcLm_6.cjs +1 -0
- package/dist/server/ToggleButton-oDCxuzfp.js +1375 -0
- package/dist/server/VpRefresh-CEyHVNo-.cjs +1 -0
- package/dist/server/{VpRefresh-CjGV1jUv.js → VpRefresh-Dlqsm9Va.js} +17 -3
- package/dist/server/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation--Nybjbd2.js} +36 -36
- package/dist/{appThemeDerivation-Be_oKljl.cjs → server/appThemeDerivation-Cgg74S4e.cjs} +1 -1
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{createDialogShellFocus-B10Toy2h.js → createDialogShellFocus-BXCNQyU9.js} +1 -1
- package/dist/server/{createDialogShellFocus-usbhq9Av.cjs → createDialogShellFocus-CKsZl9Uz.cjs} +1 -1
- package/dist/server/createResizableSidebar-B8zMo4jJ.js +599 -0
- package/dist/server/createResizableSidebar-DXFKY01F.cjs +1 -0
- package/dist/server/de-BQbrl0SL.cjs +1 -0
- package/dist/{de-q3NXnC0J.js → server/de-CSWSMGCG.js} +45 -39
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +3 -3
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +38 -36
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +9 -9
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +1 -1
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/server/{i18n-CBlUGOyu.js → i18n-BJiKwNyr.js} +2 -2
- package/dist/server/{i18n-D3s-a2a0.cjs → i18n-DrmazJQC.cjs} +1 -1
- package/dist/server/index-CME-IDQX.cjs +1 -0
- package/dist/server/{index-BNXRPhpr.js → index-vTHpJ130.js} +3879 -3892
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +413 -406
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +18 -14
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notificationCatalog-BKcY-o-R.js +57 -0
- package/dist/server/notificationCatalog-DR3ZggWn.cjs +1 -0
- 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 +80 -79
- package/dist/server/{rowSource-Yw-xtlih.cjs → rowSource-BOt_vVGY.cjs} +1 -1
- package/dist/server/{rowSource-BSa7rgYJ.js → rowSource-WElLH5Tb.js} +1 -1
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +1 -1
- package/dist/server/{tr-C_dUz00P.js → tr-BL1soeyr.js} +33 -27
- package/dist/server/tr-sOAsJS3P.cjs +1 -0
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/solid/forms/NumberInput.jsx +14 -6
- package/dist/solid/forms/NumberInput.module.css.js +3 -1
- package/dist/solid/forms/RadioGroup.jsx +14 -3
- package/dist/solid/forms/RadioGroup.module.css.js +6 -1
- package/dist/solid/i18n/locales/de.json +4 -1
- package/dist/solid/i18n/locales/tr.json +4 -1
- package/dist/solid/layout/SettingsCard.jsx +103 -0
- package/dist/solid/layout/SettingsCard.module.css.js +33 -0
- package/dist/solid/layout/SettingsSubpageHeader.jsx +31 -0
- package/dist/solid/layout/SettingsSubpageHeader.module.css.js +10 -0
- package/dist/solid/layout/index.js +2 -0
- package/dist/solid/overlay/ConfirmDialog.jsx +54 -10
- package/dist/solid/overlay/ConfirmDialog.module.css.js +6 -0
- package/dist/solid/overlay/DangerousActionDialog.jsx +8 -3
- package/dist/solid/overlay/DangerousActionDialog.module.css.js +1 -0
- package/dist/solid/overlay/dialogNudge.js +18 -0
- package/dist/solid/tokens/palette/accessiblePalette.js +2 -2
- package/dist/solid/tokens/palette/palettes.js +8 -8
- package/dist/style.css +89 -89
- package/dist/theme.css +88 -88
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/palette/accessiblePalette.d.cts +2 -2
- package/dist/tokens/palette/accessiblePalette.d.ts +2 -2
- package/dist/tokens/tokens.css +88 -88
- package/dist/{tr-C_dUz00P.js → tr-BL1soeyr.js} +33 -27
- package/dist/tr-sOAsJS3P.cjs +1 -0
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-BKa5pT_B.js +0 -4029
- package/dist/CommandPalette-Bq5ydWBA.cjs +0 -2
- package/dist/GuidedTour-BTvAeAfT.cjs +0 -1
- package/dist/GuidedTour-CwbGGSIW.js +0 -483
- package/dist/PageSkeleton-Cz2bckO4.cjs +0 -30
- package/dist/ToggleButton-BTu9tcCi.js +0 -2144
- package/dist/ToggleButton-iMcQGwDn.cjs +0 -1
- package/dist/createResizableSidebar-De-8HN0W.js +0 -504
- package/dist/createResizableSidebar-JB_GlEN7.cjs +0 -1
- package/dist/de-BqFZ0Ac8.cjs +0 -1
- package/dist/notificationCatalog-CRERhjp6.js +0 -168
- package/dist/notificationCatalog-DqTkd7M6.cjs +0 -1
- package/dist/server/CommandPalette-BU9QCOyy.cjs +0 -1
- package/dist/server/CommandPalette-Dj08M64T.js +0 -3305
- package/dist/server/GuidedTour-DCoB90h1.cjs +0 -1
- package/dist/server/GuidedTour-pdx_4IrZ.js +0 -400
- package/dist/server/PageSkeleton-D0KOKLsb.cjs +0 -30
- package/dist/server/ToggleButton-BbW2zC_f.js +0 -1344
- package/dist/server/ToggleButton-CQd_Jagp.cjs +0 -1
- package/dist/server/VpRefresh-Khu7XHaq.cjs +0 -1
- package/dist/server/createResizableSidebar-CeY4cES5.cjs +0 -1
- package/dist/server/createResizableSidebar-DA0AZVNV.js +0 -312
- package/dist/server/de-BqFZ0Ac8.cjs +0 -1
- package/dist/server/index-D0BVVt2h.cjs +0 -1
- package/dist/server/notificationCatalog-CEDltsJS.cjs +0 -1
- package/dist/server/notificationCatalog-Cl1dH4aJ.js +0 -122
- package/dist/server/tr-D7bwe7tl.cjs +0 -1
- package/dist/tr-D7bwe7tl.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ 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.37.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- 65edb7f: Settings page parts in `@vokril/ui-solid/layout`, for a settings page that stays plain for most people and keeps every setting one click away:
|
|
13
|
+
|
|
14
|
+
- `SettingsCard` — a titled group: heading (`title`, `count`, `headingLevel`), a muted `description`, `actions` on the right, then a bordered card whose rows are divided by a hairline. With a title it is a `section` named by its heading.
|
|
15
|
+
- `SettingsRow` — one setting: `label` and one-sentence `description` on the left, the control on the right, wrapping under the text on a narrow card. The package's controls inside it are named by the label and described by the description, as inside a `FormField`. Also `leading` (icon), `badges`, a `modified` dot (`modifiedLabel`), `disabled` (dims the text), `tone` (`subtle`, `warning`), a full-width `footer`, and `onOpen`: an "Open" button named with the row ("Open Tools") that leads to a subpage (`openButtonId` for the host to return focus).
|
|
16
|
+
- `SettingsAdvancedRow` — a row inside the card that folds less used rows away: "› Advanced", a `summary` of what is inside and an `aside` badge ("2 changed"). Closed by default, controlled through `open` / `onToggle` (a host's settings search opens it while a match is inside). Built on `Disclosure`.
|
|
17
|
+
- `SettingsSubpageHeader` — the top of a subpage opened in place: back button (`backLabel`), `title`, `description`, `actions`; the title takes focus on mount (`focusOnMount`).
|
|
18
|
+
|
|
19
|
+
`RadioGroup` takes `variant="card"`: each option is a bordered card in a grid that fills the row (`--radio-card-min-width`, default 12rem), the native radios unchanged. Options take an `icon`, a `badge` ("Recommended") and `tone: 'danger'` for a choice that loosens safety. Without them the list variant renders as before.
|
|
20
|
+
|
|
21
|
+
`NumberInput` takes a `unit` ("s", "MB", "rows") shown after the number inside the field; it also describes the input, so a screen reader reads it with the value.
|
|
22
|
+
|
|
23
|
+
The showcase's "ui extras" view has a "Settings parts" card with a small settings page, its Advanced row and two subpages.
|
|
24
|
+
|
|
25
|
+
## 0.36.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- c512948: Viper Dark moves to near-black grounds, barely tinted toward the brand hue (`scripts/palette/vokril.mjs`, the dark neutrals now come from one `D()` ramp): chrome `--ui-shell-surface` `#131417` (was `#2A2C31`), editor and tool windows `--ui-shell-bg` `#0A0B0E` (`#1C1E23`), menus `surface` `#0F0F13` (`#212329`), `surfaceAlt` and `input` `#07080B` (`#181A1F`), `surfaceElevated` `#1E1F23` (`#2D2F35`), `border` `#232428` (`#2D2F35`), `content` `#F1F1F4` (`#EBEDF0`), `contentSecondary` `#B9BAC0` (`#C7C9CE`). The order of the grounds stays — border, elevated, chrome, menus, editor, alt, lightest first — and the brand `#808AE5`, Viper Light and the Vokril design do not change.
|
|
30
|
+
|
|
31
|
+
**For hosts:** `WELD_SURFACE` / `WELD_BG` follow the new shell greys; a host that keeps its own copy of them must update it. The derived `-text` roles of every dark theme are solved against the shell grounds too, so with darker grounds they need less lift: Vokril Dark's and High Contrast Dark's derived text colours come out slightly dimmer (Vokril Dark `brand-text` `#afa3ff` → `#a08eff`), still 4.5:1 on every ground they are read on.
|
|
32
|
+
|
|
33
|
+
## 0.35.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- 7047ee9: A dangerous confirmation is not answered by a click on its backdrop: the box nudges — a short pop on its `scale` and a ring in the danger colour — and the question stays until a button or Escape answers it (the static-backdrop pattern of desktop and web dialog kits). A stray click beside a red question is not a "no", and it no longer looks like nothing happened. This holds for `ConfirmDialog` with `variant: 'danger'`, for every `DangerousActionDialog`, and for a `sticky` `ConfirmDialog`, whose backdrop already answered nothing and now nudges too. A press on such a backdrop takes no focus: the box keeps it, with Escape and the Tab ring. Reduced motion stills the pop; the ring alone says it. A `default` `ConfirmDialog` and `SaveDiscardDialog` still close from their backdrop. The nudge is one helper (`overlay/dialogNudge.ts`: `nudgeDialog`, the `data-nudge` mark, `NUDGE_HOLD_MS`).
|
|
38
|
+
|
|
39
|
+
`ConfirmDialog` and `ConfirmOptions` take what a confirmation of a security or settings change needs to say, so a host no longer draws its own dialog for it:
|
|
40
|
+
|
|
41
|
+
- `badges` (`ConfirmBadge`: `label`, `tone`) — tags above the title, the context the question is asked in (an environment such as Production);
|
|
42
|
+
- `details` — facts about what confirming changes, one per line under the message;
|
|
43
|
+
- `warnings` — what to know before confirming, in the kit's `Alert` (danger-toned in a `danger` question, warning-toned otherwise); they join the message in the question's description;
|
|
44
|
+
- `acknowledge` — an acknowledgement, not a question: one button (`confirmLabel`, "Close" by default) answers it with `onConfirm`, and Escape and the backdrop dismiss it with `onCancel`. For the result of a verb the user asked for.
|
|
45
|
+
|
|
46
|
+
**Behaviour change:** a host whose danger confirmations were dismissed by a backdrop click now gets no `onCancel` from that click; Escape and the cancel button still cancel.
|
|
47
|
+
|
|
8
48
|
## 0.34.0
|
|
9
49
|
|
|
10
50
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("solid-js/web"),_=require("solid-js"),u="vk_alert_vmoDU",b="vk_toneInfo_QV0x-",f="vk_toneSuccess_tvYKa",g="vk_toneWarning_qgbD1",m="vk_toneDanger_0NmW5",h="vk_box_KZK1Z",k="vk_bare_3cIeV",S="vk_icon_ByVKM",C="vk_body_f2hrp",N="vk_title_-a0fr",x="vk_content_bCCOz",n={alert:u,toneInfo:b,toneSuccess:f,toneWarning:g,toneDanger:m,box:h,bare:k,icon:S,body:C,title:N,content:x};var y=e.template("<span aria-hidden=true>"),A=e.template("<div>"),w=e.template("<div><div><div>");const D={info:n.toneInfo,success:n.toneSuccess,warning:n.toneWarning,danger:n.toneDanger},I={box:n.box,bare:n.bare};function W(o){const d=()=>[n.alert,D[o.tone??"info"],I[o.variant??"box"],o.class].filter(r=>!!r).join(" ");return(()=>{var r=w(),c=r.firstChild,a=c.firstChild;return e.insert(r,e.createComponent(_.Show,{get when(){return o.icon!==void 0},get children(){var t=y();return e.insert(t,()=>o.icon),e.effect(()=>e.className(t,n.icon)),t}}),c),e.insert(c,e.createComponent(_.Show,{get when(){return o.title!==void 0},get children(){var t=A();return e.insert(t,()=>o.title),e.effect(()=>e.className(t,n.title)),t}}),a),e.insert(a,()=>o.children),e.effect(t=>{var i=d(),s=o.urgency==="polite"?"status":"alert",l=n.body,v=n.content;return i!==t.e&&e.className(r,t.e=i),s!==t.t&&e.setAttribute(r,"role",t.t=s),l!==t.a&&e.className(c,t.a=l),v!==t.o&&e.className(a,t.o=v),t},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}exports.Alert=W;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { insert as r, createComponent as u, effect as s, className as i, setAttribute as m, template as l } from "solid-js/web";
|
|
2
|
+
import { Show as f } from "solid-js";
|
|
3
|
+
const k = "vk_alert_vmoDU", h = "vk_toneInfo_QV0x-", S = "vk_toneSuccess_tvYKa", x = "vk_toneWarning_qgbD1", y = "vk_toneDanger_0NmW5", A = "vk_box_KZK1Z", C = "vk_bare_3cIeV", D = "vk_icon_ByVKM", I = "vk_body_f2hrp", W = "vk_title_-a0fr", w = "vk_content_bCCOz", e = {
|
|
4
|
+
alert: k,
|
|
5
|
+
toneInfo: h,
|
|
6
|
+
toneSuccess: S,
|
|
7
|
+
toneWarning: x,
|
|
8
|
+
toneDanger: y,
|
|
9
|
+
box: A,
|
|
10
|
+
bare: C,
|
|
11
|
+
icon: D,
|
|
12
|
+
body: I,
|
|
13
|
+
title: W,
|
|
14
|
+
content: w
|
|
15
|
+
};
|
|
16
|
+
var K = /* @__PURE__ */ l("<span aria-hidden=true>"), N = /* @__PURE__ */ l("<div>"), V = /* @__PURE__ */ l("<div><div><div>");
|
|
17
|
+
const $ = {
|
|
18
|
+
info: e.toneInfo,
|
|
19
|
+
success: e.toneSuccess,
|
|
20
|
+
warning: e.toneWarning,
|
|
21
|
+
danger: e.toneDanger
|
|
22
|
+
}, B = {
|
|
23
|
+
box: e.box,
|
|
24
|
+
bare: e.bare
|
|
25
|
+
};
|
|
26
|
+
function T(n) {
|
|
27
|
+
const g = () => [e.alert, $[n.tone ?? "info"], B[n.variant ?? "box"], n.class].filter((o) => !!o).join(" ");
|
|
28
|
+
return (() => {
|
|
29
|
+
var o = V(), c = o.firstChild, a = c.firstChild;
|
|
30
|
+
return r(o, u(f, {
|
|
31
|
+
get when() {
|
|
32
|
+
return n.icon !== void 0;
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
var t = K();
|
|
36
|
+
return r(t, () => n.icon), s(() => i(t, e.icon)), t;
|
|
37
|
+
}
|
|
38
|
+
}), c), r(c, u(f, {
|
|
39
|
+
get when() {
|
|
40
|
+
return n.title !== void 0;
|
|
41
|
+
},
|
|
42
|
+
get children() {
|
|
43
|
+
var t = N();
|
|
44
|
+
return r(t, () => n.title), s(() => i(t, e.title)), t;
|
|
45
|
+
}
|
|
46
|
+
}), a), r(a, () => n.children), s((t) => {
|
|
47
|
+
var v = g(), _ = n.urgency === "polite" ? "status" : "alert", d = e.body, b = e.content;
|
|
48
|
+
return v !== t.e && i(o, t.e = v), _ !== t.t && m(o, "role", t.t = _), d !== t.a && i(c, t.a = d), b !== t.o && i(a, t.o = b), t;
|
|
49
|
+
}, {
|
|
50
|
+
e: void 0,
|
|
51
|
+
t: void 0,
|
|
52
|
+
a: void 0,
|
|
53
|
+
o: void 0
|
|
54
|
+
}), o;
|
|
55
|
+
})();
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
T as A
|
|
59
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),v=require("solid-js"),$=require("./SearchableSelect-
|
|
1
|
+
"use strict";const t=require("solid-js/web"),v=require("solid-js"),$=require("./SearchableSelect-CXPSoFqf.cjs"),T=require("./Button-D5Ihf90u.cjs"),c=require("./i18n-DrmazJQC.cjs"),m=require("./Input-DTm6v0fK.cjs"),p=require("@vokril/icons"),z=require("./iconScale.module-CzmKG1rf.cjs"),y=require("./keys-GMxY2wcl.cjs"),L=require("./bugIndicatingError-D2X5Hfgg.cjs");function P(e,a){return e<=0?a:String(e)}const O="vk_paginationRow_hg8fj",N="vk_paginationMeta_rPi8N",M="vk_paginationActions_gD2Fz",A="vk_paginationLabel_9x9Ah",q="vk_paginationSelect_h5BcT",H="vk_paginationPage_CYJRF",_={paginationRow:O,paginationMeta:N,paginationActions:M,paginationLabel:A,paginationSelect:q,paginationPage:H};var x=t.template("<div><span></span><div><label></label><span> / ");function F(e){const a=v.createMemo(()=>e.page),r=v.createMemo(()=>e.totalPages),n=()=>a()(),i=()=>r()(),u=v.createMemo(()=>{const g=c.t("Unlimited");return e.pageSizeOptions.map(s=>({value:String(s),label:P(s,g)}))});return(()=>{var g=x(),s=g.firstChild,B=s.nextSibling,S=B.firstChild,d=S.nextSibling,R=d.firstChild;return t.insert(s,()=>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($.SearchableSelect,{size:"sm",get class(){return _.paginationSelect},get value(){return String(e.pageSize())},get options(){return u()},onChange:l=>{e.onPageSizeChange(Number(l))},searchable:!1,get ariaLabel(){return c.t("Page size")}}),null),t.insert(B,t.createComponent(T.Button,{size:"sm",variant:"secondary",get disabled(){return n()<=1},onClick:()=>e.onPageChange(Math.max(1,n()-1)),get children(){return c.t("Previous")}}),d),t.insert(d,n,R),t.insert(d,i,null),t.insert(B,t.createComponent(T.Button,{size:"sm",variant:"secondary",get disabled(){return n()>=i()},onClick:()=>e.onPageChange(Math.min(i(),n()+1)),get children(){return c.t("Next")}}),null),t.effect(l=>{var C=_.paginationRow,f=_.paginationMeta,I=_.paginationActions,V=_.paginationLabel,w=_.paginationPage;return C!==l.e&&t.className(g,l.e=C),f!==l.t&&t.className(s,l.t=f),I!==l.a&&t.className(B,l.a=I),V!==l.o&&t.className(S,l.o=V),w!==l.i&&t.className(d,l.i=w),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),g})()}const E="vk_toolbar_LSRmU",J="vk_toolbarHorizontal_qHM-8",X="vk_toolbarViewClip_Q893H",K="vk_toolbarScrollRoot_aYbLg",U="vk_toolbarScrollViewport_qBzjd",j="vk_toolbarScrollTrack_Tp8TN",D="vk_segmentedCapsule_k9EBy",G="vk_toolbarBtn_CcyXF",Q="vk_toolbarBtnActive_UgTBV",Y="vk_toolbarBtnIconOnly_BlE-b",Z="vk_toolbarHorizontalBottom_qLzhJ",W="vk_toolbarVertical_EjHi2",tt="vk_toolbarVerticalRight_DBgEa",et="vk_toolbarScrollRootVertical_VGLRy",ot="vk_toolbarScrollViewportVertical_RLF5g",rt="vk_toolbarScrollTrackVertical_c1rBF",at="vk_toolbarSettingsBtn_XXfMz",nt="vk_toolbarIcon_0FvlL",lt="vk_toolbarSpacer_N3TbQ",ct="vk_sortBadgePill_nVrIk",it="vk_sortBadgeBtn_Is9PS",st="vk_sortBadgeIcon_kw8oa",bt="vk_sortBadgeLabel_l-p33",gt="vk_sortBadgeClearBtn_ioOaP",ut="vk_sortBadgeClearIcon_0e6Kd",vt="vk_filterInputContainer_kegUv",_t="vk_filterSearchIcon_gI0m2",dt="vk_filterInput_bX9xM",Bt="vk_filterClearBtn_WerJL",St="vk_filterClearIcon_7fuAJ",o={toolbar:E,toolbarHorizontal:J,toolbarViewClip:X,toolbarScrollRoot:K,toolbarScrollViewport:U,toolbarScrollTrack:j,segmentedCapsule:D,toolbarBtn:G,toolbarBtnActive:Q,toolbarBtnIconOnly:Y,toolbarHorizontalBottom:Z,toolbarVertical:W,toolbarVerticalRight:tt,toolbarScrollRootVertical:et,toolbarScrollViewportVertical:ot,toolbarScrollTrackVertical:rt,toolbarSettingsBtn:at,toolbarIcon:nt,toolbarSpacer:lt,sortBadgePill:ct,sortBadgeBtn:it,sortBadgeIcon:st,sortBadgeLabel:bt,sortBadgeClearBtn:gt,sortBadgeClearIcon:ut,filterInputContainer:vt,filterSearchIcon:_t,filterInput:dt,filterClearBtn:Bt,filterClearIcon:St},kt="vk_searchRow_2pwXX",ht="vk_searchInput_PbDtG",mt="vk_clearBtn_upa-E",k={searchRow:kt,searchInput:ht,clearBtn:mt};var pt=t.template("<div>");function Ct(e){return t.createComponent(m.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(p.VpSearch,{get class(){return o.toolbarIcon},"aria-hidden":"true"})}})}function ft(e){let a;return v.onMount(()=>a==null?void 0:a.focus()),(()=>{var r=pt();return t.insert(r,t.createComponent(m.Input,t.mergeProps({ref(n){var i=a;typeof i=="function"?i(n):a=n},get class(){return k.searchInput},type:"search",size:"sm",get value(){return e.value},onInput:n=>e.onInput(n.currentTarget.value),onKeyDown:n=>{y.isKey(n,"Escape")&&e.onClose()},get placeholder(){return e.placeholder??c.t("Search…")}},()=>e.disabled!==void 0?{disabled:e.disabled}:{})),null),t.insert(r,t.createComponent(v.Show,{get when(){return e.value.length>0},get children(){return t.createComponent(m.PressableSurface,{type:"button",get class(){return k.clearBtn},onClick:()=>e.onInput(""),get"aria-label"(){return c.t("Clear search")},get title(){return c.t("Clear search")},get children(){return t.createComponent(p.VpClose,{get class(){return z.iconScale.iconSm},"aria-hidden":"true"})}})}}),null),t.effect(()=>t.className(r,k.searchRow)),r})()}const It=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 Vt(e,a){const r=`${a}: `;throw new L.BugIndicatingError(`${r}Non-exhaustive switch: unexpected value ${JSON.stringify(e)}`)}const wt="vk_grid_uK6pm",Tt="vk_card_33OV3",zt="vk_item_UeZrE",Pt="vk_label_a-LFz",Rt="vk_value_9ZQBt",$t="vk_valueMono_knknq",yt="vk_boolOn_5zd-H",Lt="vk_boolOff_-6I4K",Ot="vk_stacked_2T--a",b={grid:wt,card:Tt,item:zt,label:Pt,value:Rt,valueMono:$t,boolOn:yt,boolOff:Lt,stacked:Ot};var h=t.template("<span>"),Nt=t.template("<div>"),Mt=t.template("<div><span>");function At(e,a){switch(e.kind){case"text":return(()=>{var r=h();return t.insert(r,()=>e.value(a)),t.effect(()=>t.className(r,b.value)),r})();case"mono":return(()=>{var r=h();return t.insert(r,()=>e.value(a)),t.effect(()=>t.className(r,b.valueMono)),r})();case"bool":return(()=>{var r=h();return t.insert(r,(()=>{var n=t.memo(()=>!!e.on(a));return()=>n()?t.createComponent(p.VpCheck,{get class(){return z.iconScale.iconSm},"aria-hidden":"true"}):"—"})()),t.effect(()=>t.className(r,`${b.value} ${e.on(a)?b.boolOn:b.boolOff}`)),r})();case"custom":return e.render(a);default:return Vt(e,"AttributeField.kind")}}function qt(e){return t.createComponent(v.Show,{get when(){return e.row()!=null},get children(){var a=Nt();return t.insert(a,t.createComponent(v.For,{get each(){return e.fields},children:r=>(()=>{var n=Mt(),i=n.firstChild;return t.insert(i,()=>r.label),t.insert(n,()=>At(r,e.row()),null),t.effect(u=>{var g=b.item,s=b.label;return g!==u.e&&t.className(n,u.e=g),s!==u.t&&t.className(i,u.t=s),u},{e:void 0,t:void 0}),n})()})),t.effect(()=>t.className(a,`${b.grid} ${b[e.variant]??""}`)),a}})}exports.AttributeGrid=qt;exports.Pagination=F;exports.ToolbarSearchRow=ft;exports.ToolbarSearchToggle=Ct;exports.pageSizeOptionLabel=P;exports.resultTabToolbarClasses=It;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { insert as l, createComponent as c, effect as d, className as i, template as k, mergeProps as O, memo as A } from "solid-js/web";
|
|
2
2
|
import { createMemo as f, onMount as M, Show as T, For as H } from "solid-js";
|
|
3
|
-
import { S as x } from "./SearchableSelect-
|
|
4
|
-
import { B as R } from "./Button-
|
|
5
|
-
import { t as s } from "./i18n-
|
|
6
|
-
import { I as F, P as $ } from "./Input-
|
|
3
|
+
import { S as x } from "./SearchableSelect-DFdGGNR6.js";
|
|
4
|
+
import { B as R } from "./Button-DDkZzT-k.js";
|
|
5
|
+
import { t as s } from "./i18n-BJiKwNyr.js";
|
|
6
|
+
import { I as F, P as $ } from "./Input-agpwYeJd.js";
|
|
7
7
|
import { VpClose as N, VpSearch as E, VpCheck as X } from "@vokril/icons";
|
|
8
8
|
import { i as y } from "./iconScale.module-C3O0bxfp.js";
|
|
9
9
|
import { i as J } from "./keys-B2nlkpqc.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("solid-js/web"),a=require("solid-js"),c=require("./nativeTitleHold-B7Ou-W9b.cjs"),k="vk_badge_H207K",w="vk_icon_pYYcO",N="vk_dot_rH6r0",T="vk_sm_wGIZ-",C="vk_minWidth_COglg",S="vk_uppercase_VXoV8",W="vk_toneNeutral_X8HW3",B="vk_toneBrand_yGkjl",I="vk_toneInfo_wp-9H",$="vk_toneSuccess_VG8jt",D="vk_toneWarning_zPFLO",q="vk_toneDanger_cRUoq",y="vk_soft_8b-4T",A="vk_outline_gFFWD",H="vk_collapsible_DMKBX",L="vk_label_veC9k",i={badge:k,icon:w,dot:N,sm:T,minWidth:C,uppercase:S,toneNeutral:W,toneBrand:B,toneInfo:I,toneSuccess:$,toneWarning:D,toneDanger:q,soft:y,outline:A,collapsible:H,label:L};var v=e.template("<span aria-hidden=true>"),_=e.template("<span>");const E={neutral:i.toneNeutral,brand:i.toneBrand,info:i.toneInfo,success:i.toneSuccess,warning:i.toneWarning,danger:i.toneDanger},O={soft:i.soft,outline:i.outline};function V(t){let l;const f=a.createUniqueId(),g=()=>t.tooltip!==void 0?typeof t.tooltip=="function"?t.tooltip():t.tooltip:t.title,m=a.createMemo(()=>({content:g(),placement:t.tooltipPlacement})),s=()=>{const{content:o,placement:n}=m();!o||!l||(c.holdNativeTitle(l),c.tooltipCoordinator.showTooltip({id:f,target:l,content:o,placement:n}))},r=()=>{l&&(c.releaseNativeTitle(l),c.tooltipCoordinator.hideTooltip(l))};a.onCleanup(()=>{l&&c.tooltipCoordinator.hideTooltip(l)});const h=()=>[i.badge,E[t.tone??"neutral"],O[t.variant??"soft"],t.size==="sm"?i.sm:void 0,t.uppercase?i.uppercase:void 0,t.minWidth?i.minWidth:void 0,t.collapsible===!0?i.collapsible:void 0,t.class].filter(o=>!!o).join(" ");return(()=>{var o=_();return o.$$focusout=r,o.$$focusin=s,o.addEventListener("pointerleave",r),o.addEventListener("pointerenter",s),e.use(n=>l=n,o),e.insert(o,e.createComponent(a.Show,{get when(){return t.icon!==void 0},get children(){var n=v();return e.insert(n,()=>t.icon),e.effect(()=>e.className(n,i.icon)),n}}),null),e.insert(o,e.createComponent(a.Show,{get when(){return e.memo(()=>t.collapsible===!0)()&&t.icon===void 0},get children(){var n=v();return e.effect(()=>e.className(n,i.dot)),n}}),null),e.insert(o,e.createComponent(a.Show,{get when(){return t.collapsible===!0},get fallback(){return t.children},get children(){var n=_();return e.insert(n,()=>t.children),e.effect(()=>e.className(n,i.label)),n}}),null),e.effect(n=>{var u=h(),b=t.style,d=t.title;return u!==n.e&&e.className(o,n.e=u),n.t=e.style(o,b,n.t),d!==n.a&&e.setAttribute(o,"title",n.a=d),n},{e:void 0,t:void 0,a:void 0}),o})()}e.delegateEvents(["focusin","focusout"]);exports.Badge=V;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { use as N, insert as l, createComponent as r, effect as a, className as c, memo as S, style as B, setAttribute as I, template as h, delegateEvents as C } from "solid-js/web";
|
|
2
|
+
import { createUniqueId as $, createMemo as D, onCleanup as y, Show as s } from "solid-js";
|
|
3
|
+
import { r as A, t as u, h as L } from "./nativeTitleHold-A9jUISgQ.js";
|
|
4
|
+
const E = "vk_badge_H207K", H = "vk_icon_pYYcO", O = "vk_dot_rH6r0", V = "vk_sm_wGIZ-", j = "vk_minWidth_COglg", F = "vk_uppercase_VXoV8", G = "vk_toneNeutral_X8HW3", R = "vk_toneBrand_yGkjl", X = "vk_toneInfo_wp-9H", q = "vk_toneSuccess_VG8jt", z = "vk_toneWarning_zPFLO", K = "vk_toneDanger_cRUoq", M = "vk_soft_8b-4T", P = "vk_outline_gFFWD", U = "vk_collapsible_DMKBX", Y = "vk_label_veC9k", o = {
|
|
5
|
+
badge: E,
|
|
6
|
+
icon: H,
|
|
7
|
+
dot: O,
|
|
8
|
+
sm: V,
|
|
9
|
+
minWidth: j,
|
|
10
|
+
uppercase: F,
|
|
11
|
+
toneNeutral: G,
|
|
12
|
+
toneBrand: R,
|
|
13
|
+
toneInfo: X,
|
|
14
|
+
toneSuccess: q,
|
|
15
|
+
toneWarning: z,
|
|
16
|
+
toneDanger: K,
|
|
17
|
+
soft: M,
|
|
18
|
+
outline: P,
|
|
19
|
+
collapsible: U,
|
|
20
|
+
label: Y
|
|
21
|
+
};
|
|
22
|
+
var g = /* @__PURE__ */ h("<span aria-hidden=true>"), m = /* @__PURE__ */ h("<span>");
|
|
23
|
+
const p = {
|
|
24
|
+
neutral: o.toneNeutral,
|
|
25
|
+
brand: o.toneBrand,
|
|
26
|
+
info: o.toneInfo,
|
|
27
|
+
success: o.toneSuccess,
|
|
28
|
+
warning: o.toneWarning,
|
|
29
|
+
danger: o.toneDanger
|
|
30
|
+
}, x = {
|
|
31
|
+
soft: o.soft,
|
|
32
|
+
outline: o.outline
|
|
33
|
+
};
|
|
34
|
+
function tt(t) {
|
|
35
|
+
let i;
|
|
36
|
+
const b = $(), k = () => t.tooltip !== void 0 ? typeof t.tooltip == "function" ? t.tooltip() : t.tooltip : t.title, T = D(() => ({
|
|
37
|
+
content: k(),
|
|
38
|
+
placement: t.tooltipPlacement
|
|
39
|
+
})), d = () => {
|
|
40
|
+
const {
|
|
41
|
+
content: n,
|
|
42
|
+
placement: e
|
|
43
|
+
} = T();
|
|
44
|
+
!n || !i || (L(i), u.showTooltip({
|
|
45
|
+
id: b,
|
|
46
|
+
target: i,
|
|
47
|
+
content: n,
|
|
48
|
+
placement: e
|
|
49
|
+
}));
|
|
50
|
+
}, v = () => {
|
|
51
|
+
i && (A(i), u.hideTooltip(i));
|
|
52
|
+
};
|
|
53
|
+
y(() => {
|
|
54
|
+
i && u.hideTooltip(i);
|
|
55
|
+
});
|
|
56
|
+
const W = () => [o.badge, p[t.tone ?? "neutral"], x[t.variant ?? "soft"], t.size === "sm" ? o.sm : void 0, t.uppercase ? o.uppercase : void 0, t.minWidth ? o.minWidth : void 0, t.collapsible === !0 ? o.collapsible : void 0, t.class].filter((n) => !!n).join(" ");
|
|
57
|
+
return (() => {
|
|
58
|
+
var n = m();
|
|
59
|
+
return n.$$focusout = v, n.$$focusin = d, n.addEventListener("pointerleave", v), n.addEventListener("pointerenter", d), N((e) => i = e, n), l(n, r(s, {
|
|
60
|
+
get when() {
|
|
61
|
+
return t.icon !== void 0;
|
|
62
|
+
},
|
|
63
|
+
get children() {
|
|
64
|
+
var e = g();
|
|
65
|
+
return l(e, () => t.icon), a(() => c(e, o.icon)), e;
|
|
66
|
+
}
|
|
67
|
+
}), null), l(n, r(s, {
|
|
68
|
+
get when() {
|
|
69
|
+
return S(() => t.collapsible === !0)() && t.icon === void 0;
|
|
70
|
+
},
|
|
71
|
+
get children() {
|
|
72
|
+
var e = g();
|
|
73
|
+
return a(() => c(e, o.dot)), e;
|
|
74
|
+
}
|
|
75
|
+
}), null), l(n, r(s, {
|
|
76
|
+
get when() {
|
|
77
|
+
return t.collapsible === !0;
|
|
78
|
+
},
|
|
79
|
+
get fallback() {
|
|
80
|
+
return t.children;
|
|
81
|
+
},
|
|
82
|
+
get children() {
|
|
83
|
+
var e = m();
|
|
84
|
+
return l(e, () => t.children), a(() => c(e, o.label)), e;
|
|
85
|
+
}
|
|
86
|
+
}), null), a((e) => {
|
|
87
|
+
var _ = W(), w = t.style, f = t.title;
|
|
88
|
+
return _ !== e.e && c(n, e.e = _), e.t = B(n, w, e.t), f !== e.a && I(n, "title", e.a = f), e;
|
|
89
|
+
}, {
|
|
90
|
+
e: void 0,
|
|
91
|
+
t: void 0,
|
|
92
|
+
a: void 0
|
|
93
|
+
}), n;
|
|
94
|
+
})();
|
|
95
|
+
}
|
|
96
|
+
C(["focusin", "focusout"]);
|
|
97
|
+
export {
|
|
98
|
+
tt as B
|
|
99
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),a=require("solid-js"),K=require("./i18n-
|
|
1
|
+
"use strict";const t=require("solid-js/web"),a=require("solid-js"),K=require("./i18n-DrmazJQC.cjs"),h=require("./nativeTitleHold-B7Ou-W9b.cjs"),Q="vk_spinner_s8rMh",R="vk_xs_UVj9O",Y="vk_sm_G7bj9",ee="vk_lg_SEaSa",z={spinner:Q,xs:R,sm:Y,lg:ee};var te=t.template("<span data-motion-exempt=true>");const ne={xs:z.xs,sm:z.sm,md:"",lg:z.lg};function w(c){return(()=>{var e=te();return t.effect(l=>{var r=`${z.spinner} ${ne[c.size??"md"]} ${c.class??""}`,b=c.decorative?void 0:"status",s=c.decorative?void 0:c.label??K.t("Loading…"),k=c.decorative?"true":void 0;return r!==l.e&&t.className(e,l.e=r),b!==l.t&&t.setAttribute(e,"role",l.t=b),s!==l.a&&t.setAttribute(e,"aria-label",l.a=s),k!==l.o&&t.setAttribute(e,"aria-hidden",l.o=k),l},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}const ie="vk_root_Zndmu",oe="vk_size2xs_kbyEZ",re="vk_sizeXs_IUmg-",ae="vk_sizeSm_s-iaT",le="vk_sizeMd_bAI9d",se="vk_sizeLg_zhdkf",ce="vk_variantPrimary_KTVgG",de="vk_variantTonal_tkJNt",ve="vk_variantSecondary_MA7xu",ue="vk_variantDanger_L30Uq",fe="vk_variantDangerSolid_htqc7",me="vk_variantPrimarySolid_14Uwi",pe="vk_variantLink_3AapU",ge="vk_variantGhost_x0-j-",_e="vk_variantOutline_xGu8I",he="vk_active_QisSI",ye="vk_iconOnly_bhObv",be="vk_pill_-qH8n",ke="vk_fullWidth_kr6EK",Se="vk_icon_h1rmS",Le="vk_label_6-wKp",ze="vk_responsiveLabel_4Ma2i",Te="vk_loading_EWpLB",xe="vk_iconHidden_Mlyq3",Ce="vk_spinnerWrap_F8L1B",De="vk_inlineSpinner_uuJuB",Oe="vk_loadingLabelGroup_HO7pg",we="vk_labelText_v7v-A",Ie="vk_animatedDots_CPxN9",o={root:ie,size2xs:oe,sizeXs:re,sizeSm:ae,sizeMd:le,sizeLg:se,variantPrimary:ce,variantTonal:de,variantSecondary:ve,variantDanger:ue,variantDangerSolid:fe,variantPrimarySolid:me,variantLink:pe,variantGhost:ge,variantOutline:_e,active:he,iconOnly:ye,pill:be,fullWidth:ke,icon:Se,label:Le,responsiveLabel:ze,loading:Te,iconHidden:xe,spinnerWrap:Ce,inlineSpinner:De,loadingLabelGroup:Oe,labelText:we,animatedDots:Ie};var y=t.template("<span aria-hidden=true>"),Ne=t.template("<span>"),Pe=t.template("<button>"),$e=t.template("<span><span></span><span aria-hidden=true data-testid=button-animated-dots data-animated-dots=true>");const Ae={primary:o.variantPrimary,primarySolid:o.variantPrimarySolid,tonal:o.variantTonal,secondary:o.variantSecondary,danger:o.variantDanger,dangerSolid:o.variantDangerSolid,ghost:o.variantGhost,outline:o.variantOutline,link:o.variantLink},We={"2xs":o.size2xs,xs:o.sizeXs,sm:o.sizeSm,md:o.sizeMd,lg:o.sizeLg};function Ee(c){let e=c;for(;typeof e=="function";)try{e=e()}catch{break}return typeof e=="string"?e.replace(/(?:\s*\.{2,}|\s*…)\s*$/,""):Array.isArray(e)&&e.every(l=>typeof l=="string")?e.join("").replace(/(?:\s*\.{2,}|\s*…)\s*$/,""):e}function Be(c){const[e,l]=a.splitProps(c,["variant","size","iconOnly","active","pill","fullWidth","responsiveLabel","loading","loadingDelay","minLoadingDuration","loadingLabel","type","leadingIcon","trailingIcon","class","children","disabled","tooltip","tooltipShortcut","tooltipPlacement","title","aria-label","aria-description","ref","onPointerEnter","onPointerLeave","onFocusIn","onFocusOut","onClick"]);let r;const b=a.createUniqueId(),[s,k]=a.createSignal(!1);let T=!1,d,v,x=0,g;const I=()=>{r&&r.offsetWidth>0&&g===void 0&&(g=r.style.minWidth,r.style.minWidth=`${r.offsetWidth}px`)},S=()=>{r&&g!==void 0&&(r.style.minWidth=g,g=void 0)},L=i=>{i&&I(),T=i,k(i)};a.createEffect(()=>{const i=!!e.loading,n=typeof e.loadingDelay=="number"&&!Number.isNaN(e.loadingDelay)?e.loadingDelay:180,f=typeof e.minLoadingDuration=="number"&&!Number.isNaN(e.minLoadingDuration)?e.minLoadingDuration:350;if(i){if(I(),v!==void 0&&(clearTimeout(v),v=void 0),T)return;n<=0?(x=Date.now(),L(!0)):d===void 0&&(d=setTimeout(()=>{d=void 0,x=Date.now(),L(!0)},n))}else if(d!==void 0&&(clearTimeout(d),d=void 0),T){const u=Date.now()-x,p=f-u;p>0?v===void 0&&(v=setTimeout(()=>{v=void 0,L(!1),S()},p)):(L(!1),S())}else S()});let _;a.createEffect(()=>{e.loading||(_=e.children)}),a.onCleanup(()=>{d!==void 0&&(clearTimeout(d),d=void 0),v!==void 0&&(clearTimeout(v),v=void 0),S()});const C=()=>!!e.loading||s(),N=()=>{if(e.loadingLabel!==void 0)return typeof e.loadingLabel=="function"?e.loadingLabel():e.loadingLabel},G=()=>{const i=N();return i!==void 0?i:e.children!==void 0&&e.children!==""&&e.children!==null&&e.children!==!1?e.children:_!==void 0?_:e.children},M=()=>e.size==="2xs"||e.size==="xs"?"xs":"sm",q=()=>e.size==="2xs"||e.size==="xs"?"xs":e.size==="sm"?"sm":"md",F=()=>e.tooltip!==void 0?typeof e.tooltip=="function"?e.tooltip():e.tooltip:e.title,D=a.createMemo(()=>({content:F(),shortcut:e.tooltipShortcut,placement:e.tooltipPlacement})),H=a.createMemo(()=>!!e.disabled||C()),[P,U]=a.createSignal("");a.createEffect(()=>{var i;e.children,e.iconOnly,U(((i=r==null?void 0:r.textContent)==null?void 0:i.trim())??"")});const $=()=>!e.iconOnly&&P()!=="",V=()=>{const i=N();if(s()&&i)return i;if(e["aria-label"]!==void 0)return e["aria-label"];if(!$())return D().content},j=()=>{if(e["aria-description"]!==void 0)return e["aria-description"];if(e["aria-label"]!==void 0||!$())return;const i=D().content;return i&&i!==P()?i:void 0},A=()=>{const{content:i,shortcut:n,placement:f}=D();!i||!r||(h.holdNativeTitle(r),h.tooltipCoordinator.showTooltip({id:b,target:r,content:i,shortcut:n,placement:f}))},O=()=>{r&&(h.releaseNativeTitle(r),h.tooltipCoordinator.hideTooltip(r))},X=()=>{r&&h.tooltipCoordinator.hideTooltip(r)};a.onCleanup(()=>{O()});const Z=()=>{const i=e.variant??"secondary",n=e.size??(i==="link"?void 0:"md");return[o.root,Ae[i],n===void 0?void 0:We[n],e.iconOnly?o.iconOnly:void 0,e.active?o.active:void 0,e.pill?o.pill:void 0,e.fullWidth?o.fullWidth:void 0,e.responsiveLabel?o.responsiveLabel:void 0,s()?o.loading:void 0,e.class].filter(u=>!!u).join(" ")};return(()=>{var i=Pe();return t.use(n=>{r=n,typeof e.ref=="function"&&e.ref(n)},i),t.spread(i,t.mergeProps(l,{get type(){return e.type??"button"},get class(){return Z()},get disabled(){return e.disabled},get"aria-disabled"(){return C()&&!e.disabled?"true":void 0},get"aria-busy"(){return C()?"true":"false"},get"aria-label"(){return V()},get"aria-description"(){return j()},get title(){return t.memo(()=>e.tooltip!==void 0)()?void 0:e.title},onPointerEnter:n=>{A(),typeof e.onPointerEnter=="function"&&e.onPointerEnter(n)},onPointerLeave:n=>{O(),typeof e.onPointerLeave=="function"&&e.onPointerLeave(n)},onFocusIn:n=>{A(),typeof e.onFocusIn=="function"&&e.onFocusIn(n)},onFocusOut:n=>{O(),typeof e.onFocusOut=="function"&&e.onFocusOut(n)},onClick:n=>{if(H()){n.preventDefault();return}if(X(),typeof e.onClick=="function")e.onClick(n);else if(Array.isArray(e.onClick)){const[f,u]=e.onClick;f(u,n)}}}),!1,!0),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>e.leadingIcon!==void 0)()&&!s()},get children(){var n=y();return t.insert(n,()=>e.leadingIcon),t.effect(()=>t.className(n,o.icon)),n}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>!e.iconOnly)()&&s()},get children(){var n=y();return t.insert(n,t.createComponent(w,{get size(){return M()},decorative:!0})),t.effect(()=>t.className(n,o.inlineSpinner)),n}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>!!(e.children!==void 0||s()&&e.loadingLabel!==void 0))()&&!e.iconOnly},get children(){var n=Ne();return t.insert(n,(()=>{var f=t.memo(()=>!!s());return()=>f()?(()=>{var u=$e(),p=u.firstChild,J=p.nextSibling;return t.insert(p,()=>Ee(G())),t.effect(m=>{var W=o.loadingLabelGroup,E=o.labelText,B=o.animatedDots;return W!==m.e&&t.className(u,m.e=W),E!==m.t&&t.className(p,m.t=E),B!==m.a&&t.className(J,m.a=B),m},{e:void 0,t:void 0,a:void 0}),u})():t.memo(()=>!!(e.loading&&_!==void 0))()?_:e.children})()),t.effect(()=>t.className(n,o.label)),n}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&e.children!==void 0},get children(){var n=y();return t.insert(n,()=>e.children),t.effect(()=>t.className(n,`${o.icon} ${s()?o.iconHidden:""}`)),n}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>e.trailingIcon!==void 0)()&&!s()},get children(){var n=y();return t.insert(n,()=>e.trailingIcon),t.effect(()=>t.className(n,o.icon)),n}}),null),t.insert(i,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&s()},get children(){var n=y();return t.insert(n,t.createComponent(w,{get size(){return q()},decorative:!0})),t.effect(()=>t.className(n,o.spinnerWrap)),n}}),null),i})()}exports.Button=Be;exports.Spinner=w;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { effect as m, className as d, setAttribute as A, template as S, use as ai, spread as li, mergeProps as si, memo as f, insert as l, createComponent as p } from "solid-js/web";
|
|
2
2
|
import { splitProps as di, createUniqueId as ci, createSignal as j, createEffect as w, onCleanup as q, createMemo as X, Show as y } from "solid-js";
|
|
3
|
-
import { t as vi } from "./i18n-
|
|
3
|
+
import { t as vi } from "./i18n-BJiKwNyr.js";
|
|
4
4
|
import { t as B, r as ui, h as fi } from "./nativeTitleHold-A9jUISgQ.js";
|
|
5
5
|
const gi = "vk_spinner_s8rMh", pi = "vk_xs_UVj9O", mi = "vk_sm_G7bj9", _i = "vk_lg_SEaSa", O = {
|
|
6
6
|
spinner: gi,
|