@vokril/ui-solid 0.18.0 → 0.19.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 +13 -0
- package/README.md +3 -1
- package/dist/{AttributeGrid-7cLOWtPn.cjs → AttributeGrid-Qzt5LYnu.cjs} +1 -1
- package/dist/{AttributeGrid-CVyqzT7-.js → AttributeGrid-XTVaiwLe.js} +2 -2
- package/dist/Button-U95Tz8F5.cjs +1 -0
- package/dist/Button-qtxB2SYf.js +305 -0
- package/dist/{CommandPalette-BH7c1cbU.js → CommandPalette-CBA_Shqx.js} +7 -7
- package/dist/{CommandPalette-Dfb4V-Hb.cjs → CommandPalette-CBFIo0FX.cjs} +1 -1
- package/dist/{CopyButton-BtgGbiy9.cjs → CopyButton-CsM8UeX5.cjs} +1 -1
- package/dist/{CopyButton-BF7L1TCO.js → CopyButton-NfxWzVHT.js} +1 -1
- package/dist/{DateRangePicker-Ce2tTbJ4.cjs → DateRangePicker-BKHxyHL4.cjs} +1 -1
- package/dist/{DateRangePicker-jSQBwB78.js → DateRangePicker-C8IVJRT2.js} +3 -3
- package/dist/{GuidedTour-CYaR5Ozj.cjs → GuidedTour-B61cbsdy.cjs} +1 -1
- package/dist/{GuidedTour-CWDtBRHv.js → GuidedTour-Dj41FCdE.js} +2 -2
- package/dist/{HostPortal-X1iw719T.js → HostPortal-CXGUUhP8.js} +1 -1
- package/dist/{HostPortal-B9Tzk_uN.cjs → HostPortal-CgJwxt-f.cjs} +1 -1
- package/dist/{IconPicker-4bdAeGxS.cjs → IconPicker-BZCQG8SO.cjs} +1 -1
- package/dist/{IconPicker-Df6uIUpJ.js → IconPicker-DC9E35Ou.js} +2 -2
- package/dist/{Modal-CQG8l4x7.cjs → Modal-CaurOG_K.cjs} +1 -1
- package/dist/{Modal-CUPe98-o.js → Modal-DJpQqqTJ.js} +2 -2
- package/dist/{PageSkeleton-CUTLh9Ip.js → PageSkeleton-C0eVQO20.js} +2 -2
- package/dist/{PageSkeleton-C3mo6UGh.cjs → PageSkeleton-DICmahMs.cjs} +1 -1
- package/dist/{Popover-YfzC0Tjh.cjs → Popover-CWrR51eG.cjs} +1 -1
- package/dist/{Popover-Dht1jFEy.js → Popover-Cttb6NYT.js} +1 -1
- package/dist/{SearchableSelect-pCaUie2M.cjs → SearchableSelect-ClrAX2hK.cjs} +1 -1
- package/dist/{SearchableSelect-C01brsF0.js → SearchableSelect-DayP1Qs6.js} +2 -2
- package/dist/{StatusBarNotificationBell-BwqVV09r.js → StatusBarNotificationBell-CQkhUMHX.js} +6 -6
- package/dist/{StatusBarNotificationBell-C5Zc2IvW.cjs → StatusBarNotificationBell-Dw9RRZK1.cjs} +1 -1
- package/dist/{Stepper-CtaTpnQu.cjs → Stepper-DTuchuOX.cjs} +1 -1
- package/dist/{Stepper-38IAEOyT.js → Stepper-aiuAdbkl.js} +1 -1
- package/dist/{TimeSeriesChart-_NOs_Job.cjs → TimeSeriesChart-CvU0lxar.cjs} +1 -1
- package/dist/{TimeSeriesChart-ByKG4E1G.js → TimeSeriesChart-SHx_cp8y.js} +1 -1
- package/dist/ToggleButton-BcHNAGPy.cjs +1 -0
- package/dist/{ToggleButton-D-N0C2Fu.js → ToggleButton-BhP17bvW.js} +277 -276
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{createDialogShellFocus-CxRqhbRN.cjs → createDialogShellFocus-CsrZ2GDZ.cjs} +1 -1
- package/dist/{createDialogShellFocus-BBFu3Z_O.js → createDialogShellFocus-Vv3hhW-I.js} +2 -2
- package/dist/{createResizableSidebar-q7aC7SAO.cjs → createResizableSidebar-Dau7TIuH.cjs} +1 -1
- package/dist/{createResizableSidebar-CfFxQUny.js → createResizableSidebar-gvf9me4K.js} +2 -2
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-BrALT8Ew.js → dialogFocusRestore--dH59ER2.js} +1 -1
- package/dist/{dialogFocusRestore-CcEsB50v.cjs → dialogFocusRestore-CL-ExfAA.cjs} +1 -1
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +2 -2
- package/dist/fonts/inter.css +8 -0
- package/dist/fonts/jetbrains-mono.css +8 -0
- package/dist/forms/Button.d.cts +6 -1
- package/dist/forms/Button.d.ts +6 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +7 -7
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +24 -24
- 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 +1 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +8 -8
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-Bj6Lg1Rm.js +209 -0
- package/dist/overlayStack-eD8AmuwY.cjs +1 -0
- package/dist/server/{AttributeGrid-C7aWbIe5.cjs → AttributeGrid-C_CvCXpC.cjs} +1 -1
- package/dist/server/{AttributeGrid-B2s_rp00.js → AttributeGrid-D8QYVZDq.js} +2 -2
- package/dist/server/{Button-Ck03cbUs.js → Button-BPNNFcHc.js} +73 -71
- package/dist/server/Button-VKl-_GaO.cjs +1 -0
- package/dist/server/{CommandPalette-VewDIghb.cjs → CommandPalette-CRT5VEoR.cjs} +1 -1
- package/dist/server/{CommandPalette-DwlWZI1s.js → CommandPalette-DE59Rq-n.js} +7 -7
- package/dist/server/{CopyButton-UvtFwOtA.js → CopyButton-HDffWzaN.js} +1 -1
- package/dist/server/{CopyButton-BOmAUQD4.cjs → CopyButton-rWDnbTBF.cjs} +1 -1
- package/dist/server/{DateRangePicker-Cr58DczM.js → DateRangePicker-Dl3zr-PD.js} +3 -3
- package/dist/server/{DateRangePicker-BJteKzOY.cjs → DateRangePicker-Dq0HGz27.cjs} +1 -1
- package/dist/server/{GuidedTour-Rlsp8rOe.cjs → GuidedTour-BoPGRyX5.cjs} +1 -1
- package/dist/server/{GuidedTour-C4msn-Ag.js → GuidedTour-CIlHyRcR.js} +2 -2
- package/dist/server/{HostPortal-X1iw719T.js → HostPortal-CXGUUhP8.js} +1 -1
- package/dist/server/{HostPortal-B9Tzk_uN.cjs → HostPortal-CgJwxt-f.cjs} +1 -1
- package/dist/server/{IconPicker-9DfOxql6.cjs → IconPicker-BDS92veL.cjs} +1 -1
- package/dist/server/{IconPicker-N0wub1Aj.js → IconPicker-CZxYKJOT.js} +3 -3
- package/dist/server/{Modal-D__GTo-n.cjs → Modal-CtJFoR96.cjs} +1 -1
- package/dist/server/{Modal-DeQjfpkG.js → Modal-j54-C2Md.js} +3 -3
- package/dist/server/{PageSkeleton-D4i-UcnI.cjs → PageSkeleton-B0V43uDV.cjs} +1 -1
- package/dist/server/{PageSkeleton-C41pXOcr.js → PageSkeleton-BfGfda9G.js} +2 -2
- package/dist/server/{Popover-AYYDbpLv.cjs → Popover-BsxIKBbl.cjs} +1 -1
- package/dist/server/{Popover-BolicH3A.js → Popover-Cg28aPUZ.js} +1 -1
- package/dist/server/{SearchableSelect-Ca9g8ztu.cjs → SearchableSelect-ClQzcYdL.cjs} +1 -1
- package/dist/server/{SearchableSelect-CEcuBnge.js → SearchableSelect-DtcMC7Xu.js} +2 -2
- package/dist/server/{StatusBarNotificationBell-DyEQF2W7.js → StatusBarNotificationBell-C7zqUWP1.js} +6 -6
- package/dist/server/{StatusBarNotificationBell-BotYny7q.cjs → StatusBarNotificationBell-SO16PL5V.cjs} +1 -1
- package/dist/server/{Stepper-B_eL85hK.js → Stepper-B7wf8h9G.js} +1 -1
- package/dist/server/{Stepper--pusyxso.cjs → Stepper-CCEItuZb.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-aSHquoBv.js → TimeSeriesChart-DjNQiCn_.js} +1 -1
- package/dist/server/{TimeSeriesChart-nZeB5jtN.cjs → TimeSeriesChart-TsaZS7YU.cjs} +1 -1
- package/dist/server/{ToggleButton-DjlWwgLJ.js → ToggleButton-CHaIvApv.js} +39 -39
- package/dist/server/ToggleButton-D6Tux9wG.cjs +1 -0
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{createDialogShellFocus-DNjzmcGj.js → createDialogShellFocus-BFo8awdj.js} +1 -1
- package/dist/server/{createDialogShellFocus-PRRfMli-.cjs → createDialogShellFocus-BiBAZOCI.cjs} +1 -1
- package/dist/server/{createResizableSidebar-DdWdAB9l.js → createResizableSidebar-BQG5elmd.js} +2 -2
- package/dist/server/{createResizableSidebar-CZtGmUnA.cjs → createResizableSidebar-tU8FO2MK.cjs} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-BrALT8Ew.js → dialogFocusRestore--dH59ER2.js} +1 -1
- package/dist/server/{dialogFocusRestore-CcEsB50v.cjs → dialogFocusRestore-CL-ExfAA.cjs} +1 -1
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +2 -2
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/{index-Cqod09d_.cjs → index-BfR3Xipt.cjs} +1 -1
- package/dist/server/{index-BNYr6EIW.js → index-Wv18Fcu8.js} +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +24 -24
- 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 +1 -1
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +8 -8
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-Bj6Lg1Rm.js +209 -0
- package/dist/server/overlayStack-eD8AmuwY.cjs +1 -0
- package/dist/{useFloatingDropdown-BN4J092P.js → server/useFloatingDropdown-2Tz_es0W.js} +1 -1
- package/dist/server/{useFloatingDropdown-D9OvEFAp.cjs → useFloatingDropdown-D5UayoN6.cjs} +1 -1
- package/dist/solid/forms/Button.jsx +1 -0
- package/dist/solid/forms/Button.module.css.js +1 -0
- package/dist/solid/forms/Slider.jsx +6 -3
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{server/useFloatingDropdown-BN4J092P.js → useFloatingDropdown-2Tz_es0W.js} +1 -1
- package/dist/{useFloatingDropdown-D9OvEFAp.cjs → useFloatingDropdown-D5UayoN6.cjs} +1 -1
- package/package.json +4 -2
- package/dist/Button-BiKPB3cH.js +0 -303
- package/dist/Button-Nx7byQZc.cjs +0 -1
- package/dist/ToggleButton-Bz3zAtec.cjs +0 -1
- package/dist/overlayStack-DvGdPMdq.js +0 -203
- package/dist/overlayStack-DvKYN7SD.cjs +0 -1
- package/dist/server/Button-DWFMF5y0.cjs +0 -1
- package/dist/server/ToggleButton-57_0SA-V.cjs +0 -1
- package/dist/server/overlayStack-DvGdPMdq.js +0 -203
- package/dist/server/overlayStack-DvKYN7SD.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.19.0
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- `Button` takes `variant="primarySolid"`: the brand as a solid fill (`--ui-color-brand-surface`, the label in its paired `--ui-color-on-brand`), for the one action a bar or form leads with where the `primary` tint does not stand out — on a brand-tinted bar it all but disappears. The hover lightens the same surface (`--ui-gradient-primary-hover`), which keeps the label at 4.5:1 or more on the four built-in palettes; disabled and busy keep an opaque, barely tinted ground with the muted text colour instead of fading out; the focus ring is the other variants'.
|
|
13
|
+
- The default font faces have stylesheets of their own: `@vokril/ui-solid/fonts/inter.css` needs only `@fontsource/inter` and `@vokril/ui-solid/fonts/jetbrains-mono.css` only `@fontsource/jetbrains-mono` (the same weights and subsets as `fonts.css`). A bundler resolves every `@import` of `fonts.css`, so an app with only Inter installed failed to build (`ENOENT … __vite-optional-peer-dep:@fontsource/ubuntu/latin-300.css`); `fonts.css` is unchanged and still loads every bundled face.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Importing the kit creates no reactive computation: `overlayDepth` and `isAnyOverlayOpen` (`/overlay`, `/overlay-stack`) are memos created on their first read, in a root of their own, instead of at module level. Solid's development build no longer prints "computations created outside a `createRoot` or `render` will never be disposed" (twice) on every page that imports the kit. Both stay reactive accessors with the same values.
|
|
18
|
+
- `Slider` paints its thumb where the range input takes the pointer: the thumb's centre travels from half a thumb in from the left end to half a thumb in from the right, like the native thumb, instead of across the whole width — it no longer overhangs the track by half its size at either end or sits up to half a thumb away from the real hit point. The fill ends under the thumb's centre. The root carries the value as `--slider-ratio` (0–1) next to `--slider-fill`.
|
|
19
|
+
- `Slider` is at least 1.75rem (28px at a 16px root) tall on a coarse pointer (`@media (pointer: coarse)`), so a finger has a target taller than the thumb (about 12px at `size="sm"`); the track and the thumb keep their size, centred in the taller row.
|
|
20
|
+
|
|
8
21
|
## 0.18.0
|
|
9
22
|
|
|
10
23
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -71,7 +71,9 @@ showing (the stack hides meanwhile); a window without a center passes `() => fal
|
|
|
71
71
|
| `@vokril/ui-solid/ui.css` | Component styles only. |
|
|
72
72
|
| `@vokril/ui-solid/base.css` | Opt-in global rules for apps built entirely on the kit: body colours, control font reset, focus rings, thin scrollbars inside `.app`. |
|
|
73
73
|
| `@vokril/ui-solid/desktop/app-shell.css` | Opt-in full-window desktop shell: 15px root font, `html`/`body` box. |
|
|
74
|
-
| `@vokril/ui-solid/fonts.css` |
|
|
74
|
+
| `@vokril/ui-solid/fonts.css` | Every bundled font face. A bundler resolves each of its `@import`s, so all 13 optional `@fontsource/*` peers must be installed; an app that uses only the default faces imports the two files below instead. |
|
|
75
|
+
| `@vokril/ui-solid/fonts/inter.css` | The default sans face (Inter) alone; needs only `@fontsource/inter`. |
|
|
76
|
+
| `@vokril/ui-solid/fonts/jetbrains-mono.css` | The default monospace face (JetBrains Mono) alone; needs only `@fontsource/jetbrains-mono`. |
|
|
75
77
|
| `@vokril/ui-solid/tokens/tokens.css` | Same as `theme.css`, at its older path. |
|
|
76
78
|
| `@vokril/ui-solid/tokens/breakpoints.css` | `@custom-media` breakpoints for your own CSS (needs a PostCSS custom-media step). |
|
|
77
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("solid-js/web"),v=require("solid-js"),T=require("./SearchableSelect-
|
|
1
|
+
"use strict";const t=require("solid-js/web"),v=require("solid-js"),T=require("./SearchableSelect-ClrAX2hK.cjs"),I=require("./Button-U95Tz8F5.cjs"),c=require("./i18n-DZ0JlZal.cjs"),S=require("./Input-CZruORyy.cjs"),k=require("@vokril/icons"),V=require("./iconScale.module-CzmKG1rf.cjs"),z=require("./keys-GMxY2wcl.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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import { createMemo as $, onMount as y, Show as w, For as L } from "solid-js";
|
|
3
|
-
import { S as O } from "./SearchableSelect-
|
|
4
|
-
import { B as V } from "./Button-
|
|
3
|
+
import { S as O } from "./SearchableSelect-DayP1Qs6.js";
|
|
4
|
+
import { B as V } from "./Button-qtxB2SYf.js";
|
|
5
5
|
import { t as s } from "./i18n-DW9kcu0G.js";
|
|
6
6
|
import { I as A, P as z } from "./Input-DkPhsdfk.js";
|
|
7
7
|
import { VpClose as M, VpSearch as H, VpCheck as x } from "@vokril/icons";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("solid-js/web"),a=require("solid-js"),J=require("./i18n-DZ0JlZal.cjs"),D=require("./tooltipCoordinator-DslqMlsI.cjs"),K="vk_spinner_s8rMh",Q="vk_xs_UVj9O",R="vk_sm_G7bj9",Y="vk_lg_SEaSa",L={spinner:K,xs:Q,sm:R,lg:Y};var ee=t.template("<span data-motion-exempt=true>");const te={xs:L.xs,sm:L.sm,md:"",lg:L.lg};function O(c){return(()=>{var e=ee();return t.effect(l=>{var r=`${L.spinner} ${te[c.size??"md"]} ${c.class??""}`,b=c.decorative?void 0:"status",s=c.decorative?void 0:c.label??J.t("Loading…"),y=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),y!==l.o&&t.setAttribute(e,"aria-hidden",l.o=y),l},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}const ie="vk_root_Zndmu",ne="vk_size2xs_kbyEZ",oe="vk_sizeXs_IUmg-",re="vk_sizeSm_s-iaT",ae="vk_sizeMd_bAI9d",le="vk_sizeLg_zhdkf",se="vk_variantPrimary_KTVgG",ce="vk_variantTonal_tkJNt",de="vk_variantSecondary_MA7xu",ve="vk_variantDanger_L30Uq",ue="vk_variantDangerSolid_htqc7",fe="vk_variantPrimarySolid_14Uwi",me="vk_variantLink_3AapU",pe="vk_variantGhost_x0-j-",ge="vk_variantOutline_xGu8I",_e="vk_active_QisSI",he="vk_iconOnly_bhObv",be="vk_pill_-qH8n",ye="vk_fullWidth_kr6EK",ke="vk_icon_h1rmS",Se="vk_label_6-wKp",Le="vk_responsiveLabel_4Ma2i",ze="vk_loading_EWpLB",xe="vk_iconHidden_Mlyq3",Te="vk_spinnerWrap_F8L1B",Ce="vk_inlineSpinner_uuJuB",Ae="vk_loadingLabelGroup_HO7pg",De="vk_labelText_v7v-A",Oe="vk_animatedDots_CPxN9",o={root:ie,size2xs:ne,sizeXs:oe,sizeSm:re,sizeMd:ae,sizeLg:le,variantPrimary:se,variantTonal:ce,variantSecondary:de,variantDanger:ve,variantDangerSolid:ue,variantPrimarySolid:fe,variantLink:me,variantGhost:pe,variantOutline:ge,active:_e,iconOnly:he,pill:be,fullWidth:ye,icon:ke,label:Se,responsiveLabel:Le,loading:ze,iconHidden:xe,spinnerWrap:Te,inlineSpinner:Ce,loadingLabelGroup:Ae,labelText:De,animatedDots:Oe};var h=t.template("<span aria-hidden=true>"),we=t.template("<span>"),Ie=t.template("<button>"),Pe=t.template("<span><span></span><span aria-hidden=true data-testid=button-animated-dots data-animated-dots=true>");const $e={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},Ne={"2xs":o.size2xs,xs:o.sizeXs,sm:o.sizeSm,md:o.sizeMd,lg:o.sizeLg};function We(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 Ee(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,y]=a.createSignal(!1);let z=!1,d,v,x=0,g;const w=()=>{r&&r.offsetWidth>0&&g===void 0&&(g=r.style.minWidth,r.style.minWidth=`${r.offsetWidth}px`)},k=()=>{r&&g!==void 0&&(r.style.minWidth=g,g=void 0)},S=n=>{n&&w(),z=n,y(n)};a.createEffect(()=>{const n=!!e.loading,i=typeof e.loadingDelay=="number"&&!Number.isNaN(e.loadingDelay)?e.loadingDelay:180,m=typeof e.minLoadingDuration=="number"&&!Number.isNaN(e.minLoadingDuration)?e.minLoadingDuration:350;if(n){if(w(),v!==void 0&&(clearTimeout(v),v=void 0),z)return;i<=0?(x=Date.now(),S(!0)):d===void 0&&(d=setTimeout(()=>{d=void 0,x=Date.now(),S(!0)},i))}else if(d!==void 0&&(clearTimeout(d),d=void 0),z){const u=Date.now()-x,p=m-u;p>0?v===void 0&&(v=setTimeout(()=>{v=void 0,S(!1),k()},p)):(S(!1),k())}else k()});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),k()});const T=()=>!!e.loading||s(),I=()=>{if(e.loadingLabel!==void 0)return typeof e.loadingLabel=="function"?e.loadingLabel():e.loadingLabel},G=()=>{const n=I();return n!==void 0?n:e.children!==void 0&&e.children!==""&&e.children!==null&&e.children!==!1?e.children:_!==void 0?_:e.children},q=()=>e.size==="2xs"||e.size==="xs"?"xs":"sm",F=()=>e.size==="2xs"||e.size==="xs"?"xs":e.size==="sm"?"sm":"md",C=()=>e.tooltip!==void 0?typeof e.tooltip=="function"?e.tooltip():e.tooltip:e.title,[P,M]=a.createSignal("");a.createEffect(()=>{var n;e.children,e.iconOnly,M(((n=r==null?void 0:r.textContent)==null?void 0:n.trim())??"")});const $=()=>!e.iconOnly&&P()!=="",H=()=>{const n=I();if(s()&&n)return n;if(e["aria-label"]!==void 0)return e["aria-label"];if(!$())return C()},U=()=>{if(e["aria-description"]!==void 0)return e["aria-description"];if(e["aria-label"]!==void 0||!$())return;const n=C();return n&&n!==P()?n:void 0},N=()=>{const n=C();!n||!r||(r.hasAttribute("title")&&(r.setAttribute("data-suppressed-title",r.getAttribute("title")??""),r.removeAttribute("title")),D.tooltipCoordinator.showTooltip({id:b,target:r,content:n,shortcut:e.tooltipShortcut,placement:e.tooltipPlacement}))},V=()=>{if(r&&r.hasAttribute("data-suppressed-title")){const n=r.getAttribute("data-suppressed-title");n&&r.setAttribute("title",n),r.removeAttribute("data-suppressed-title")}},A=()=>{V(),r&&D.tooltipCoordinator.hideTooltip(r)},j=()=>{r&&D.tooltipCoordinator.hideTooltip(r)};a.onCleanup(()=>{A()});const X=()=>{const n=e.variant??"secondary",i=e.size??(n==="link"?void 0:"md");return[o.root,$e[n],i===void 0?void 0:Ne[i],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 n=Ie();return t.use(i=>{r=i,typeof e.ref=="function"&&e.ref(i)},n),t.spread(n,t.mergeProps(l,{get type(){return e.type??"button"},get class(){return X()},get disabled(){return e.disabled},get"aria-disabled"(){return T()&&!e.disabled?"true":void 0},get"aria-busy"(){return T()?"true":"false"},get"aria-label"(){return H()},get"aria-description"(){return U()},get title(){return t.memo(()=>e.tooltip!==void 0)()?void 0:e.title},onPointerEnter:i=>{N(),typeof e.onPointerEnter=="function"&&e.onPointerEnter(i)},onPointerLeave:i=>{A(),typeof e.onPointerLeave=="function"&&e.onPointerLeave(i)},onFocusIn:i=>{N(),typeof e.onFocusIn=="function"&&e.onFocusIn(i)},onFocusOut:i=>{A(),typeof e.onFocusOut=="function"&&e.onFocusOut(i)},onClick:i=>{if(e.disabled||T()){i.preventDefault();return}if(j(),typeof e.onClick=="function")e.onClick(i);else if(Array.isArray(e.onClick)){const[m,u]=e.onClick;m(u,i)}}}),!1,!0),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>e.leadingIcon!==void 0)()&&!s()},get children(){var i=h();return t.insert(i,()=>e.leadingIcon),t.effect(()=>t.className(i,o.icon)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!e.iconOnly)()&&s()},get children(){var i=h();return t.insert(i,t.createComponent(O,{get size(){return q()},decorative:!0})),t.effect(()=>t.className(i,o.inlineSpinner)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!(e.children!==void 0||s()&&e.loadingLabel!==void 0))()&&!e.iconOnly},get children(){var i=we();return t.insert(i,(()=>{var m=t.memo(()=>!!s());return()=>m()?(()=>{var u=Pe(),p=u.firstChild,Z=p.nextSibling;return t.insert(p,()=>We(G())),t.effect(f=>{var W=o.loadingLabelGroup,E=o.labelText,B=o.animatedDots;return W!==f.e&&t.className(u,f.e=W),E!==f.t&&t.className(p,f.t=E),B!==f.a&&t.className(Z,f.a=B),f},{e:void 0,t:void 0,a:void 0}),u})():t.memo(()=>!!(e.loading&&_!==void 0))()?_:e.children})()),t.effect(()=>t.className(i,o.label)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&e.children!==void 0},get children(){var i=h();return t.insert(i,()=>e.children),t.effect(()=>t.className(i,`${o.icon} ${s()?o.iconHidden:""}`)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>e.trailingIcon!==void 0)()&&!s()},get children(){var i=h();return t.insert(i,()=>e.trailingIcon),t.effect(()=>t.className(i,o.icon)),i}}),null),t.insert(n,t.createComponent(a.Show,{get when(){return t.memo(()=>!!e.iconOnly)()&&s()},get children(){var i=h();return t.insert(i,t.createComponent(O,{get size(){return F()},decorative:!0})),t.effect(()=>t.className(i,o.spinnerWrap)),i}}),null),n})()}exports.Button=Ee;exports.Spinner=O;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { effect as g, className as d, setAttribute as C, template as S, use as oi, spread as ri, mergeProps as ai, memo as f, insert as l, createComponent as p } from "solid-js/web";
|
|
2
|
+
import { splitProps as li, createUniqueId as si, createSignal as j, createEffect as w, onCleanup as q, Show as h } from "solid-js";
|
|
3
|
+
import { t as di } from "./i18n-DW9kcu0G.js";
|
|
4
|
+
import { t as B } from "./tooltipCoordinator-BzxEyKhA.js";
|
|
5
|
+
const ci = "vk_spinner_s8rMh", vi = "vk_xs_UVj9O", ui = "vk_sm_G7bj9", fi = "vk_lg_SEaSa", D = {
|
|
6
|
+
spinner: ci,
|
|
7
|
+
xs: vi,
|
|
8
|
+
sm: ui,
|
|
9
|
+
lg: fi
|
|
10
|
+
};
|
|
11
|
+
var pi = /* @__PURE__ */ S("<span data-motion-exempt=true>");
|
|
12
|
+
const gi = {
|
|
13
|
+
xs: D.xs,
|
|
14
|
+
sm: D.sm,
|
|
15
|
+
md: "",
|
|
16
|
+
lg: D.lg
|
|
17
|
+
};
|
|
18
|
+
function X(s) {
|
|
19
|
+
return (() => {
|
|
20
|
+
var i = pi();
|
|
21
|
+
return g((r) => {
|
|
22
|
+
var o = `${D.spinner} ${gi[s.size ?? "md"]} ${s.class ?? ""}`, z = s.decorative ? void 0 : "status", a = s.decorative ? void 0 : s.label ?? di("Loading…"), x = s.decorative ? "true" : void 0;
|
|
23
|
+
return o !== r.e && d(i, r.e = o), z !== r.t && C(i, "role", r.t = z), a !== r.a && C(i, "aria-label", r.a = a), x !== r.o && C(i, "aria-hidden", r.o = x), r;
|
|
24
|
+
}, {
|
|
25
|
+
e: void 0,
|
|
26
|
+
t: void 0,
|
|
27
|
+
a: void 0,
|
|
28
|
+
o: void 0
|
|
29
|
+
}), i;
|
|
30
|
+
})();
|
|
31
|
+
}
|
|
32
|
+
const mi = "vk_root_Zndmu", _i = "vk_size2xs_kbyEZ", bi = "vk_sizeXs_IUmg-", hi = "vk_sizeSm_s-iaT", yi = "vk_sizeMd_bAI9d", ki = "vk_sizeLg_zhdkf", Li = "vk_variantPrimary_KTVgG", Si = "vk_variantTonal_tkJNt", zi = "vk_variantSecondary_MA7xu", xi = "vk_variantDanger_L30Uq", Ti = "vk_variantDangerSolid_htqc7", Ai = "vk_variantPrimarySolid_14Uwi", Di = "vk_variantLink_3AapU", Oi = "vk_variantGhost_x0-j-", Ii = "vk_variantOutline_xGu8I", Pi = "vk_active_QisSI", $i = "vk_iconOnly_bhObv", Wi = "vk_pill_-qH8n", Ci = "vk_fullWidth_kr6EK", wi = "vk_icon_h1rmS", Bi = "vk_label_6-wKp", Ei = "vk_responsiveLabel_4Ma2i", Gi = "vk_loading_EWpLB", Ni = "vk_iconHidden_Mlyq3", Fi = "vk_spinnerWrap_F8L1B", Mi = "vk_inlineSpinner_uuJuB", Hi = "vk_loadingLabelGroup_HO7pg", Ui = "vk_labelText_v7v-A", Vi = "vk_animatedDots_CPxN9", n = {
|
|
33
|
+
root: mi,
|
|
34
|
+
size2xs: _i,
|
|
35
|
+
sizeXs: bi,
|
|
36
|
+
sizeSm: hi,
|
|
37
|
+
sizeMd: yi,
|
|
38
|
+
sizeLg: ki,
|
|
39
|
+
variantPrimary: Li,
|
|
40
|
+
variantTonal: Si,
|
|
41
|
+
variantSecondary: zi,
|
|
42
|
+
variantDanger: xi,
|
|
43
|
+
variantDangerSolid: Ti,
|
|
44
|
+
variantPrimarySolid: Ai,
|
|
45
|
+
variantLink: Di,
|
|
46
|
+
variantGhost: Oi,
|
|
47
|
+
variantOutline: Ii,
|
|
48
|
+
active: Pi,
|
|
49
|
+
iconOnly: $i,
|
|
50
|
+
pill: Wi,
|
|
51
|
+
fullWidth: Ci,
|
|
52
|
+
icon: wi,
|
|
53
|
+
label: Bi,
|
|
54
|
+
responsiveLabel: Ei,
|
|
55
|
+
loading: Gi,
|
|
56
|
+
iconHidden: Ni,
|
|
57
|
+
spinnerWrap: Fi,
|
|
58
|
+
inlineSpinner: Mi,
|
|
59
|
+
loadingLabelGroup: Hi,
|
|
60
|
+
labelText: Ui,
|
|
61
|
+
animatedDots: Vi
|
|
62
|
+
};
|
|
63
|
+
var L = /* @__PURE__ */ S("<span aria-hidden=true>"), ji = /* @__PURE__ */ S("<span>"), qi = /* @__PURE__ */ S("<button>"), Xi = /* @__PURE__ */ S("<span><span></span><span aria-hidden=true data-testid=button-animated-dots data-animated-dots=true>");
|
|
64
|
+
const Zi = {
|
|
65
|
+
primary: n.variantPrimary,
|
|
66
|
+
primarySolid: n.variantPrimarySolid,
|
|
67
|
+
tonal: n.variantTonal,
|
|
68
|
+
secondary: n.variantSecondary,
|
|
69
|
+
danger: n.variantDanger,
|
|
70
|
+
dangerSolid: n.variantDangerSolid,
|
|
71
|
+
ghost: n.variantGhost,
|
|
72
|
+
outline: n.variantOutline,
|
|
73
|
+
link: n.variantLink
|
|
74
|
+
}, Ki = {
|
|
75
|
+
"2xs": n.size2xs,
|
|
76
|
+
xs: n.sizeXs,
|
|
77
|
+
sm: n.sizeSm,
|
|
78
|
+
md: n.sizeMd,
|
|
79
|
+
lg: n.sizeLg
|
|
80
|
+
};
|
|
81
|
+
function Ji(s) {
|
|
82
|
+
let i = s;
|
|
83
|
+
for (; typeof i == "function"; )
|
|
84
|
+
try {
|
|
85
|
+
i = i();
|
|
86
|
+
} catch {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return typeof i == "string" ? i.replace(/(?:\s*\.{2,}|\s*…)\s*$/, "") : Array.isArray(i) && i.every((r) => typeof r == "string") ? i.join("").replace(/(?:\s*\.{2,}|\s*…)\s*$/, "") : i;
|
|
90
|
+
}
|
|
91
|
+
function tt(s) {
|
|
92
|
+
const [i, r] = li(s, ["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"]);
|
|
93
|
+
let o;
|
|
94
|
+
const z = si(), [a, x] = j(!1);
|
|
95
|
+
let O = !1, c, v, I = 0, y;
|
|
96
|
+
const E = () => {
|
|
97
|
+
o && o.offsetWidth > 0 && y === void 0 && (y = o.style.minWidth, o.style.minWidth = `${o.offsetWidth}px`);
|
|
98
|
+
}, T = () => {
|
|
99
|
+
o && y !== void 0 && (o.style.minWidth = y, y = void 0);
|
|
100
|
+
}, A = (e) => {
|
|
101
|
+
e && E(), O = e, x(e);
|
|
102
|
+
};
|
|
103
|
+
w(() => {
|
|
104
|
+
const e = !!i.loading, t = typeof i.loadingDelay == "number" && !Number.isNaN(i.loadingDelay) ? i.loadingDelay : 180, _ = typeof i.minLoadingDuration == "number" && !Number.isNaN(i.minLoadingDuration) ? i.minLoadingDuration : 350;
|
|
105
|
+
if (e) {
|
|
106
|
+
if (E(), v !== void 0 && (clearTimeout(v), v = void 0), O)
|
|
107
|
+
return;
|
|
108
|
+
t <= 0 ? (I = Date.now(), A(!0)) : c === void 0 && (c = setTimeout(() => {
|
|
109
|
+
c = void 0, I = Date.now(), A(!0);
|
|
110
|
+
}, t));
|
|
111
|
+
} else if (c !== void 0 && (clearTimeout(c), c = void 0), O) {
|
|
112
|
+
const u = Date.now() - I, b = _ - u;
|
|
113
|
+
b > 0 ? v === void 0 && (v = setTimeout(() => {
|
|
114
|
+
v = void 0, A(!1), T();
|
|
115
|
+
}, b)) : (A(!1), T());
|
|
116
|
+
} else
|
|
117
|
+
T();
|
|
118
|
+
});
|
|
119
|
+
let k;
|
|
120
|
+
w(() => {
|
|
121
|
+
i.loading || (k = i.children);
|
|
122
|
+
}), q(() => {
|
|
123
|
+
c !== void 0 && (clearTimeout(c), c = void 0), v !== void 0 && (clearTimeout(v), v = void 0), T();
|
|
124
|
+
});
|
|
125
|
+
const P = () => !!i.loading || a(), G = () => {
|
|
126
|
+
if (i.loadingLabel !== void 0)
|
|
127
|
+
return typeof i.loadingLabel == "function" ? i.loadingLabel() : i.loadingLabel;
|
|
128
|
+
}, Z = () => {
|
|
129
|
+
const e = G();
|
|
130
|
+
return e !== void 0 ? e : i.children !== void 0 && i.children !== "" && i.children !== null && i.children !== !1 ? i.children : k !== void 0 ? k : i.children;
|
|
131
|
+
}, K = () => i.size === "2xs" || i.size === "xs" ? "xs" : "sm", J = () => i.size === "2xs" || i.size === "xs" ? "xs" : i.size === "sm" ? "sm" : "md", $ = () => i.tooltip !== void 0 ? typeof i.tooltip == "function" ? i.tooltip() : i.tooltip : i.title, [N, Q] = j("");
|
|
132
|
+
w(() => {
|
|
133
|
+
var e;
|
|
134
|
+
i.children, i.iconOnly, Q(((e = o == null ? void 0 : o.textContent) == null ? void 0 : e.trim()) ?? "");
|
|
135
|
+
});
|
|
136
|
+
const F = () => !i.iconOnly && N() !== "", R = () => {
|
|
137
|
+
const e = G();
|
|
138
|
+
if (a() && e)
|
|
139
|
+
return e;
|
|
140
|
+
if (i["aria-label"] !== void 0)
|
|
141
|
+
return i["aria-label"];
|
|
142
|
+
if (!F())
|
|
143
|
+
return $();
|
|
144
|
+
}, Y = () => {
|
|
145
|
+
if (i["aria-description"] !== void 0) return i["aria-description"];
|
|
146
|
+
if (i["aria-label"] !== void 0 || !F()) return;
|
|
147
|
+
const e = $();
|
|
148
|
+
return e && e !== N() ? e : void 0;
|
|
149
|
+
}, M = () => {
|
|
150
|
+
const e = $();
|
|
151
|
+
!e || !o || (o.hasAttribute("title") && (o.setAttribute("data-suppressed-title", o.getAttribute("title") ?? ""), o.removeAttribute("title")), B.showTooltip({
|
|
152
|
+
id: z,
|
|
153
|
+
target: o,
|
|
154
|
+
content: e,
|
|
155
|
+
shortcut: i.tooltipShortcut,
|
|
156
|
+
placement: i.tooltipPlacement
|
|
157
|
+
}));
|
|
158
|
+
}, ii = () => {
|
|
159
|
+
if (o && o.hasAttribute("data-suppressed-title")) {
|
|
160
|
+
const e = o.getAttribute("data-suppressed-title");
|
|
161
|
+
e && o.setAttribute("title", e), o.removeAttribute("data-suppressed-title");
|
|
162
|
+
}
|
|
163
|
+
}, W = () => {
|
|
164
|
+
ii(), o && B.hideTooltip(o);
|
|
165
|
+
}, ti = () => {
|
|
166
|
+
o && B.hideTooltip(o);
|
|
167
|
+
};
|
|
168
|
+
q(() => {
|
|
169
|
+
W();
|
|
170
|
+
});
|
|
171
|
+
const ei = () => {
|
|
172
|
+
const e = i.variant ?? "secondary", t = i.size ?? (e === "link" ? void 0 : "md");
|
|
173
|
+
return [n.root, Zi[e], t === void 0 ? void 0 : Ki[t], i.iconOnly ? n.iconOnly : void 0, i.active ? n.active : void 0, i.pill ? n.pill : void 0, i.fullWidth ? n.fullWidth : void 0, i.responsiveLabel ? n.responsiveLabel : void 0, a() ? n.loading : void 0, i.class].filter((u) => !!u).join(" ");
|
|
174
|
+
};
|
|
175
|
+
return (() => {
|
|
176
|
+
var e = qi();
|
|
177
|
+
return oi((t) => {
|
|
178
|
+
o = t, typeof i.ref == "function" && i.ref(t);
|
|
179
|
+
}, e), ri(e, ai(r, {
|
|
180
|
+
get type() {
|
|
181
|
+
return i.type ?? "button";
|
|
182
|
+
},
|
|
183
|
+
get class() {
|
|
184
|
+
return ei();
|
|
185
|
+
},
|
|
186
|
+
get disabled() {
|
|
187
|
+
return i.disabled;
|
|
188
|
+
},
|
|
189
|
+
get "aria-disabled"() {
|
|
190
|
+
return P() && !i.disabled ? "true" : void 0;
|
|
191
|
+
},
|
|
192
|
+
get "aria-busy"() {
|
|
193
|
+
return P() ? "true" : "false";
|
|
194
|
+
},
|
|
195
|
+
get "aria-label"() {
|
|
196
|
+
return R();
|
|
197
|
+
},
|
|
198
|
+
get "aria-description"() {
|
|
199
|
+
return Y();
|
|
200
|
+
},
|
|
201
|
+
get title() {
|
|
202
|
+
return f(() => i.tooltip !== void 0)() ? void 0 : i.title;
|
|
203
|
+
},
|
|
204
|
+
onPointerEnter: (t) => {
|
|
205
|
+
M(), typeof i.onPointerEnter == "function" && i.onPointerEnter(t);
|
|
206
|
+
},
|
|
207
|
+
onPointerLeave: (t) => {
|
|
208
|
+
W(), typeof i.onPointerLeave == "function" && i.onPointerLeave(t);
|
|
209
|
+
},
|
|
210
|
+
onFocusIn: (t) => {
|
|
211
|
+
M(), typeof i.onFocusIn == "function" && i.onFocusIn(t);
|
|
212
|
+
},
|
|
213
|
+
onFocusOut: (t) => {
|
|
214
|
+
W(), typeof i.onFocusOut == "function" && i.onFocusOut(t);
|
|
215
|
+
},
|
|
216
|
+
onClick: (t) => {
|
|
217
|
+
if (i.disabled || P()) {
|
|
218
|
+
t.preventDefault();
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (ti(), typeof i.onClick == "function")
|
|
222
|
+
i.onClick(t);
|
|
223
|
+
else if (Array.isArray(i.onClick)) {
|
|
224
|
+
const [_, u] = i.onClick;
|
|
225
|
+
_(u, t);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}), !1, !0), l(e, p(h, {
|
|
229
|
+
get when() {
|
|
230
|
+
return f(() => i.leadingIcon !== void 0)() && !a();
|
|
231
|
+
},
|
|
232
|
+
get children() {
|
|
233
|
+
var t = L();
|
|
234
|
+
return l(t, () => i.leadingIcon), g(() => d(t, n.icon)), t;
|
|
235
|
+
}
|
|
236
|
+
}), null), l(e, p(h, {
|
|
237
|
+
get when() {
|
|
238
|
+
return f(() => !i.iconOnly)() && a();
|
|
239
|
+
},
|
|
240
|
+
get children() {
|
|
241
|
+
var t = L();
|
|
242
|
+
return l(t, p(X, {
|
|
243
|
+
get size() {
|
|
244
|
+
return K();
|
|
245
|
+
},
|
|
246
|
+
decorative: !0
|
|
247
|
+
})), g(() => d(t, n.inlineSpinner)), t;
|
|
248
|
+
}
|
|
249
|
+
}), null), l(e, p(h, {
|
|
250
|
+
get when() {
|
|
251
|
+
return f(() => !!(i.children !== void 0 || a() && i.loadingLabel !== void 0))() && !i.iconOnly;
|
|
252
|
+
},
|
|
253
|
+
get children() {
|
|
254
|
+
var t = ji();
|
|
255
|
+
return l(t, (() => {
|
|
256
|
+
var _ = f(() => !!a());
|
|
257
|
+
return () => _() ? (() => {
|
|
258
|
+
var u = Xi(), b = u.firstChild, ni = b.nextSibling;
|
|
259
|
+
return l(b, () => Ji(Z())), g((m) => {
|
|
260
|
+
var H = n.loadingLabelGroup, U = n.labelText, V = n.animatedDots;
|
|
261
|
+
return H !== m.e && d(u, m.e = H), U !== m.t && d(b, m.t = U), V !== m.a && d(ni, m.a = V), m;
|
|
262
|
+
}, {
|
|
263
|
+
e: void 0,
|
|
264
|
+
t: void 0,
|
|
265
|
+
a: void 0
|
|
266
|
+
}), u;
|
|
267
|
+
})() : f(() => !!(i.loading && k !== void 0))() ? k : i.children;
|
|
268
|
+
})()), g(() => d(t, n.label)), t;
|
|
269
|
+
}
|
|
270
|
+
}), null), l(e, p(h, {
|
|
271
|
+
get when() {
|
|
272
|
+
return f(() => !!i.iconOnly)() && i.children !== void 0;
|
|
273
|
+
},
|
|
274
|
+
get children() {
|
|
275
|
+
var t = L();
|
|
276
|
+
return l(t, () => i.children), g(() => d(t, `${n.icon} ${a() ? n.iconHidden : ""}`)), t;
|
|
277
|
+
}
|
|
278
|
+
}), null), l(e, p(h, {
|
|
279
|
+
get when() {
|
|
280
|
+
return f(() => i.trailingIcon !== void 0)() && !a();
|
|
281
|
+
},
|
|
282
|
+
get children() {
|
|
283
|
+
var t = L();
|
|
284
|
+
return l(t, () => i.trailingIcon), g(() => d(t, n.icon)), t;
|
|
285
|
+
}
|
|
286
|
+
}), null), l(e, p(h, {
|
|
287
|
+
get when() {
|
|
288
|
+
return f(() => !!i.iconOnly)() && a();
|
|
289
|
+
},
|
|
290
|
+
get children() {
|
|
291
|
+
var t = L();
|
|
292
|
+
return l(t, p(X, {
|
|
293
|
+
get size() {
|
|
294
|
+
return J();
|
|
295
|
+
},
|
|
296
|
+
decorative: !0
|
|
297
|
+
})), g(() => d(t, n.spinnerWrap)), t;
|
|
298
|
+
}
|
|
299
|
+
}), null), e;
|
|
300
|
+
})();
|
|
301
|
+
}
|
|
302
|
+
export {
|
|
303
|
+
tt as B,
|
|
304
|
+
X as S
|
|
305
|
+
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { insert as c, createComponent as o, effect as D, className as u, memo as ge, template as z, delegateEvents as Ee, use as xe, setAttribute as U, Portal as mt, mergeProps as Vt, setStyleProperty as Ae, addEventListener as qe, style as mn } from "solid-js/web";
|
|
2
2
|
import { createSignal as Z, onCleanup as ve, Show as R, createEffect as $e, on as yt, createUniqueId as _e, createComputed as vn, onMount as Mt, For as De, splitProps as hn, createMemo as fe, createRenderEffect as gn } from "solid-js";
|
|
3
3
|
import { K as qt } from "./Kbd-DF6Tvp8V.js";
|
|
4
|
-
import { s as fn, r as At, O as Je } from "./dialogFocusRestore
|
|
5
|
-
import { B as be } from "./Button-
|
|
4
|
+
import { s as fn, r as At, O as Je } from "./dialogFocusRestore--dH59ER2.js";
|
|
5
|
+
import { B as be } from "./Button-qtxB2SYf.js";
|
|
6
6
|
import { I as $t, P as Ve, F as bn } from "./Input-DkPhsdfk.js";
|
|
7
7
|
import { T as _n } from "./Textarea-B5QqqKnI.js";
|
|
8
|
-
import { A as Kt, r as vt, t as Ze } from "./Modal-
|
|
8
|
+
import { A as Kt, r as vt, t as Ze } from "./Modal-DJpQqqTJ.js";
|
|
9
9
|
import { O as Be } from "./OverlayScrollArea-c8Za77qs.js";
|
|
10
10
|
import { a as St, g as st } from "./window-CUK6x8Pj.js";
|
|
11
11
|
import { r as et, b as Xe, A as Dt, l as wn } from "./anchoredLayout-FC-qv8xm.js";
|
|
12
12
|
import { t as _, l as kn } from "./i18n-DW9kcu0G.js";
|
|
13
13
|
import { i as Se } from "./keys-B2nlkpqc.js";
|
|
14
|
-
import { b as re, P as Ke } from "./GuidedTour-
|
|
14
|
+
import { b as re, P as Ke } from "./GuidedTour-Dj41FCdE.js";
|
|
15
15
|
import { t as dt, c as Cn } from "./tooltipCoordinator-BzxEyKhA.js";
|
|
16
16
|
import { VpCheck as jt, VpChevronRight as yn, VpClose as xt, VpChevronDown as Yt, VpMinus as $n, VpArrowsMinimize as Sn, VpArrowsMaximize as xn, VpExternalLink as Ln, VpKeyboard as In } from "@vokril/icons";
|
|
17
17
|
import { u as Mn, D as An } from "./DesktopContextMenuContext-DJ3PnqAv.js";
|
|
18
18
|
import { o as je } from "./ownerWindow-9mx_LD47.js";
|
|
19
|
-
import { u as ht } from "./overlayStack-
|
|
20
|
-
import { P as Dn } from "./Popover-
|
|
21
|
-
import { s as gt, C as En, f as Tn } from "./createDialogShellFocus-
|
|
19
|
+
import { u as ht } from "./overlayStack-Bj6Lg1Rm.js";
|
|
20
|
+
import { P as Dn } from "./Popover-Cttb6NYT.js";
|
|
21
|
+
import { s as gt, C as En, f as Tn } from "./createDialogShellFocus-Vv3hhW-I.js";
|
|
22
22
|
import { n as Pn } from "./prefersReducedMotion-B2mMn01s.js";
|
|
23
23
|
import { c as Et } from "./errorHandler-BvPGW-Nm.js";
|
|
24
24
|
import { E as Fe } from "./EmptyState-Dph6HU74.js";
|