@viglet/viglet-design-system 2026.3.11 → 2026.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -12
- package/consumers.json +2 -2
- package/dist/badge-locale-1_BmNTro.cjs +1 -0
- package/dist/{badge-locale-DxDp8Q3S.js → badge-locale-Bx7m7tg2.js} +189 -85
- package/dist/bento/bento-calendar.d.ts +52 -0
- package/dist/bento/bento-calendar.d.ts.map +1 -0
- package/dist/bento/bento-change-mark.d.ts +21 -0
- package/dist/bento/bento-change-mark.d.ts.map +1 -0
- package/dist/bento/bento-data-table.d.ts +8 -1
- package/dist/bento/bento-data-table.d.ts.map +1 -1
- package/dist/bento/bento-diff.d.ts +10 -1
- package/dist/bento/bento-diff.d.ts.map +1 -1
- package/dist/bento/bento-split-page.d.ts +31 -0
- package/dist/bento/bento-split-page.d.ts.map +1 -0
- package/dist/bento/bento-version-rail.d.ts.map +1 -1
- package/dist/bento/index.d.ts +4 -1
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +4 -4
- package/dist/bento.es.js +1431 -788
- package/dist/catalogue.json +256 -2
- package/dist/components/ui/form.d.ts +1 -1
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/tree.d.ts +60 -0
- package/dist/components/ui/tree.d.ts.map +1 -0
- package/dist/components/ui/viglet-assistant.d.ts +7 -1
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -1
- package/dist/exports.json +20 -1
- package/dist/i18n/index.d.ts +44 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +22 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +22 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +40 -0
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +1365 -1230
- package/dist/{loading-provider-ClDkFPuv.js → loading-provider-D-_5G-08.js} +1 -1
- package/dist/{loading-provider-DGuCfsl9.cjs → loading-provider-E4tIG9BM.cjs} +1 -1
- package/dist/preset.css +1 -1
- package/dist/router.cjs +1 -1
- package/dist/router.es.js +1 -1
- package/dist/{user.context-Cr3GAQ_r.js → user.context-D3kmD3_y.js} +379 -210
- package/dist/user.context-gQvBxcwr.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/docs/BENTO-AUTHORING.md +13 -2
- package/docs/reference/README.md +2 -1
- package/docs/reference/canvas.json +10 -1
- package/docs/reference/split.dc.html +164 -0
- package/package.json +1 -1
- package/scripts/lib/contrast.mjs +29 -3
- package/scripts/page-reference.mjs +3 -3
- package/dist/badge-locale-CJkHDlPg.cjs +0 -1
- package/dist/user.context-hbdvmXOn.cjs +0 -1
package/README.md
CHANGED
|
@@ -155,7 +155,8 @@ viglet-ds-page-lint src --contrast src/index.css
|
|
|
155
155
|
It lays your stylesheet over the preset the way the two cascade and measures every
|
|
156
156
|
token pair your stylesheet changes on both grounds: each `--vg-X` with its
|
|
157
157
|
`--vg-X-foreground`, text and muted text on the page, the accented label on the
|
|
158
|
-
page
|
|
158
|
+
page and on the accent's two tints (read laid over the page), and the white label
|
|
159
|
+
on the accent fill. A pair under 4.5:1 on either ground
|
|
159
160
|
is a finding at the line that declares the token, with both grounds' ratios:
|
|
160
161
|
|
|
161
162
|
```
|
|
@@ -203,7 +204,9 @@ against the working tree, and denies a write that declares a component the
|
|
|
203
204
|
package already exports, naming the import to use instead.
|
|
204
205
|
|
|
205
206
|
The catalogue server is a bin of its own, `viglet-ds-mcp`, so any MCP client can
|
|
206
|
-
start it from a product's install.
|
|
207
|
+
start it from a product's install. The plugin finds that install below the
|
|
208
|
+
repository root, so a package installed in a workspace, such as a web client
|
|
209
|
+
beside a Java build, is served too. It has two tools: `find_component` ranks the
|
|
207
210
|
components that do a job, and `read_component` returns one component's purpose,
|
|
208
211
|
props, the contract sections that govern it and an import to start from. The
|
|
209
212
|
authoring contract, the boundary and the token reference are resources
|
|
@@ -530,7 +533,10 @@ import { VigletAssistant } from "@viglet/viglet-design-system";
|
|
|
530
533
|
contract — the endpoint, the prompt and the key stay in your product. Leaving
|
|
531
534
|
`onSend` off is how you turn the chat off: the composer is not rendered at all
|
|
532
535
|
and the dock becomes a place the system reports from, which is what a product
|
|
533
|
-
that only wants notification feedback should mount.
|
|
536
|
+
that only wants notification feedback should mount. Pass `paused` for a person
|
|
537
|
+
who asked for a quiet dock: the mascot holds still and the caption appears whole
|
|
538
|
+
instead of being typed, while it is still announced. `prefers-reduced-motion`
|
|
539
|
+
does the same system-wide.
|
|
534
540
|
|
|
535
541
|
A message may carry one `action`, so an answer can offer something to do with
|
|
536
542
|
it — the label is your copy, already translated:
|
|
@@ -688,9 +694,9 @@ import type {
|
|
|
688
694
|
|
|
689
695
|
## What's Included
|
|
690
696
|
|
|
691
|
-
### UI Primitives (
|
|
697
|
+
### UI Primitives (49 components)
|
|
692
698
|
|
|
693
|
-
Accordion, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Dialog, Drawer, DropdownMenu, FloatingFormulasBg, Form, FormActions, FormItemTwoColumns, GlassCard, GradientButton, GradientSwitch, HoverCard, IconPickerDialog, Input, Label, NavigationMenu, Pagination, Popover, Progress, PulseRing, Resizable, SectionCard, Select, Separator, Sheet, Sidebar, Skeleton, Slider, Stepper, StickySaveBar, Switch, Table, Tabs, Textarea, Toaster (sonner), Toggle, ToggleGroup, Tooltip, UserAvatar, UserMenu, VigletAssistant ([the dock](#the-assistant-dock)), VigletAvatar ([the mascot](#the-mascot))
|
|
699
|
+
Accordion, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Dialog, Drawer, DropdownMenu, FloatingFormulasBg, Form, FormActions, FormItemTwoColumns, GlassCard, GradientButton, GradientSwitch, HoverCard, IconPickerDialog, Input, Label, NavigationMenu, Pagination, Popover, Progress, PulseRing, Resizable, SectionCard, Select, Separator, Sheet, Sidebar, Skeleton, Slider, Stepper, StickySaveBar, Switch, Table, Tabs, Textarea, Toaster (sonner), Toggle, ToggleGroup, Tooltip, Tree, UserAvatar, UserMenu, VigletAssistant ([the dock](#the-assistant-dock)), VigletAvatar ([the mascot](#the-mascot))
|
|
694
700
|
|
|
695
701
|
### App Components (19 components)
|
|
696
702
|
|
|
@@ -698,9 +704,9 @@ AppFooter, AppSwitcher, BackendStatusBanner, BackendStatusProvider, BadgeColorfu
|
|
|
698
704
|
|
|
699
705
|
`DialogDelete`, `GradientButtonLink` and `LoadProvider` are imported from `@viglet/viglet-design-system/router`; every other name above comes from the package root. `Login` and `StartupFirst` are compounds — each is a root with named parts on it, the way `Card` is.
|
|
700
706
|
|
|
701
|
-
### Bento Layer (
|
|
707
|
+
### Bento Layer (34 components)
|
|
702
708
|
|
|
703
|
-
AdaptiveSectionCard, BentoActionsMenu, BentoBackLink, BentoBackToTop, BentoCommandPalette, BentoCountTile, BentoDataTable, BentoDiff, BentoEmptyState, BentoEntityShell, BentoEntityTile, BentoFilterBar, BentoFormHero, BentoFormSection, BentoHero, BentoHeroIconPicker, BentoInlineEdit, BentoListPage, BentoNavRail, BentoPaletteTrigger, BentoPanel, BentoSaveBar, BentoScrollSaveBar, BentoSection, BentoShell, BentoShortcutsDialog, BentoStatusMarker, BentoTile, BentoTileGrid, BentoUserMenu, BentoVersionRail
|
|
709
|
+
AdaptiveSectionCard, BentoActionsMenu, BentoBackLink, BentoBackToTop, BentoCalendar, BentoChangeMark, BentoCommandPalette, BentoCountTile, BentoDataTable, BentoDiff, BentoEmptyState, BentoEntityShell, BentoEntityTile, BentoFilterBar, BentoFormHero, BentoFormSection, BentoHero, BentoHeroIconPicker, BentoInlineEdit, BentoListPage, BentoNavRail, BentoPaletteTrigger, BentoPanel, BentoSaveBar, BentoScrollSaveBar, BentoSection, BentoShell, BentoShortcutsDialog, BentoSplitPage, BentoStatusMarker, BentoTile, BentoTileGrid, BentoUserMenu, BentoVersionRail
|
|
704
710
|
|
|
705
711
|
All from `@viglet/viglet-design-system/bento`, with `@viglet/viglet-design-system/bento.css` beside it. [The bento layer](#the-bento-layer) is what each one is for and how a page composes them; this is the inventory.
|
|
706
712
|
|
|
@@ -837,6 +843,9 @@ and optionally `rowActions` for a per-row menu and `selectionActions` for the ba
|
|
|
837
843
|
that appears over a selection. The arrows move between rows, Shift with an arrow
|
|
838
844
|
or a click extends a selection, and Enter calls `onRowOpen`. The column picker
|
|
839
845
|
reports `onLayoutChange`, and you store the layout, as you do for `BentoListPage`.
|
|
846
|
+
The selection works the same way: pass `selectedIds` beside `onSelectionChange` and
|
|
847
|
+
the table ticks exactly those rows. That lets your page select every row or invert
|
|
848
|
+
the selection with its own controls, without remounting the table.
|
|
840
849
|
|
|
841
850
|
```tsx
|
|
842
851
|
<BentoDataTable
|
|
@@ -900,12 +909,32 @@ change the rows:
|
|
|
900
909
|
revision history, a review of what an agent changed, or a translation against its
|
|
901
910
|
source. Pass `before`, `after` and the `fields` to compare. A field is `text`
|
|
902
911
|
(compared by word), `rich` (HTML, compared on the blocks it renders, so markup
|
|
903
|
-
alone is no change)
|
|
904
|
-
|
|
912
|
+
alone is no change), `lines` (a source file, compared by line and drawn in numbered
|
|
913
|
+
monospace rows, with the unchanged stretches between changes folded) or `value`
|
|
914
|
+
(compared whole). Unchanged fields collapse behind a count. `layout="split"` draws a
|
|
915
|
+
`lines` field with the original beside the change and unchanged lines level with
|
|
916
|
+
each other. Below 48rem of the comparison's own width it falls back to one column.
|
|
917
|
+
`BentoChangeMark` is the chip `BentoDiff` draws beside each field, for a list of
|
|
918
|
+
what changed: `state` is `added`, `removed`, `changed` or `unchanged`, and
|
|
919
|
+
`compact` draws git's letter (`A`, `D`, `M`) with the word as its accessible name
|
|
920
|
+
and tooltip. A side that is `null` renders the other whole, as a created or deleted
|
|
905
921
|
item. Every change is named in text as well as coloured. `BentoVersionRail` lists
|
|
906
922
|
the revisions (author, person or agent, time) as a listbox a reader picks two
|
|
907
923
|
from, by keyboard or pointer. Neither fetches anything.
|
|
908
924
|
|
|
925
|
+
`BentoCalendar` draws a month or a week of `entries` (`id`, `start`, `label`, an
|
|
926
|
+
optional `tone`) in the `timeZone` you pass. Given `onEntryMove(id, start)`, an
|
|
927
|
+
entry can be dragged onto another day and keeps its time of day. The same move
|
|
928
|
+
works from the keyboard: Enter enters a day, Space picks the entry up, the arrows
|
|
929
|
+
choose a day and Enter drops it. `onRangeChange` reports the period shown, so you
|
|
930
|
+
can load its entries, and `onEntrySelect` opens one. It fetches nothing.
|
|
931
|
+
|
|
932
|
+
`BentoSplitPage` is the two-pane page shape: a form beside its preview, or a source
|
|
933
|
+
beside its translation, under one hero. Pass `primary`, `secondary` and a label for
|
|
934
|
+
each. Each pane scrolls on its own, the reader drags the ratio, and `storageKey`
|
|
935
|
+
remembers it per viewer. At phone width it becomes one pane with a labelled switch,
|
|
936
|
+
and neither pane unmounts.
|
|
937
|
+
|
|
909
938
|
`BentoCommandPalette` takes a second group whose items the product supplies per
|
|
910
939
|
query, beside the nav items it matches itself. Pass `onQueryChange` to hear the
|
|
911
940
|
query as typed and `group` to answer it:
|
|
@@ -986,7 +1015,7 @@ something the bundle did not deliver; `scripts/externals.test.ts` now fails if
|
|
|
986
1015
|
anything externalised as a peer is declared a dependency again.
|
|
987
1016
|
|
|
988
1017
|
[docs/BENTO-AUTHORING.md](docs/BENTO-AUTHORING.md) is the contract for writing a
|
|
989
|
-
bento page: the
|
|
1018
|
+
bento page: the four page shapes, what the package will not hold for you, and
|
|
990
1019
|
the colour, i18n, accessibility and layout rules that keep two consoles looking
|
|
991
1020
|
like the same product. Read it before the first screen, not after the fifth.
|
|
992
1021
|
|
|
@@ -995,10 +1024,10 @@ of this package and which stay in the product, and why. Four of them are one
|
|
|
995
1024
|
product's commercial offer rendered as cards, and shipping those as chrome would
|
|
996
1025
|
put that offer in every console.
|
|
997
1026
|
|
|
998
|
-
[docs/reference/](docs/reference/) is the same contract drawn:
|
|
1027
|
+
[docs/reference/](docs/reference/) is the same contract drawn: ten artboards,
|
|
999
1028
|
one per decision that makes two products built from this package stop looking
|
|
1000
1029
|
like one — the header's set, who owns the reading column, what `--primary`
|
|
1001
|
-
reaches, the
|
|
1030
|
+
reaches, the four page shapes, the panel, and both grounds with their ratios.
|
|
1002
1031
|
The catalogue proves a component; these prove the arrangement.
|
|
1003
1032
|
|
|
1004
1033
|
## Contributing
|
package/consumers.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"chrome": "bento",
|
|
104
104
|
"accent": "cool",
|
|
105
105
|
"sourceRoots": ["src", "vite.config.ts"],
|
|
106
|
-
"entries": [".", "./bento", "./bento.css", "./router", "./styles", "./vite"]
|
|
106
|
+
"entries": [".", "./bento", "./bento.css", "./i18n", "./router", "./styles", "./vite"]
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"id": "dumont",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"chrome": "bento",
|
|
115
115
|
"accent": "cool",
|
|
116
116
|
"sourceRoots": ["src", "vite.config.ts"],
|
|
117
|
-
"entries": [".", "./bento", "./bento.css", "./router", "./styles", "./vite"]
|
|
117
|
+
"entries": [".", "./bento", "./bento.css", "./i18n", "./router", "./styles", "./vite"]
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"id": "cloud-console",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./utils-Oagwe_oa.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("@radix-ui/react-slot"),a=require("class-variance-authority"),o=require("react-i18next"),s=require("@radix-ui/react-dialog");s=e.t(s,1);var c=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function l(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:c(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var u=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},d=e=>{let t=u(e);return t.charAt(0).toUpperCase()+t.slice(1)},f=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),p={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function m(e){return e!=null}function h(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??p.width,a=e.size??e.height??p.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?f(...c):f(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??p[`stroke-width`])*Number(e.size??e.width??p.width)/Number(t.size??t.width??p.width):t.strokeWidth??p[`stroke-width`];return[`svg`,{...Object.entries(p).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&m(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&m(t.width)&&{[r(`width`)]:t.width},...`height`in t&&m(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function g(e,t={}){return h(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var _=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},v=(0,n.createContext)({}),y=()=>(0,n.useContext)(v),b=(0,n.forwardRef)(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...p},m)=>{let{size:h=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,nonScalingStroke:x=!1,color:S=`currentColor`,className:C=``}=y()??{},w=!!l||_(p),[T,E,D=[]]=g(d,{color:e??S,width:r??t??h,height:i??t??h,strokeWidth:a??v,absoluteStrokeWidth:o??b,nonScalingStroke:s??x,className:f(C,c),hasA11yProp:w,attributes:p});return(0,n.createElement)(T,{ref:m,...E},[...D.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function x(e,t=[],r=[]){let i=typeof e==`string`?l(e,t,r):e,a=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(b,{ref:r,icon:i,className:e,...t}));return i.name&&(a.displayName=d(i.name)),a}var S={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};S.node;var C=x(S),w={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};w.node;var T=x(w),E=(0,a.cva)(`inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function D({className:e,variant:n,asChild:a=!1,...o}){return(0,r.jsx)(a?i.Slot:`span`,{"data-slot":`badge`,className:t.t(E({variant:n}),e),...o})}function O(e,t,n){let r=e||t===!0||t===`true`;return{inert:r,props:{"aria-busy":e?`true`:void 0,"aria-disabled":r?`true`:void 0,onClick:e=>{if(r){e.preventDefault(),e.stopPropagation();return}n?.(e)}}}}function k(){return(0,r.jsxs)(`svg`,{"aria-hidden":`true`,className:`size-4 animate-spin`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]})}function A({...e}){return(0,r.jsx)(s.Root,{"data-slot":`dialog`,...e})}function j({...e}){return(0,r.jsx)(s.Trigger,{"data-slot":`dialog-trigger`,...e})}function M({...e}){return(0,r.jsx)(s.Portal,{"data-slot":`dialog-portal`,...e})}function N({...e}){return(0,r.jsx)(s.Close,{"data-slot":`dialog-close`,...e})}function P({className:e,...n}){return(0,r.jsx)(s.Overlay,{"data-slot":`dialog-overlay`,className:t.t(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...n})}function F({className:e,children:n,showCloseButton:i=!0,...a}){let{t:c}=(0,o.useTranslation)();return(0,r.jsxs)(M,{"data-slot":`dialog-portal`,children:[(0,r.jsx)(P,{}),(0,r.jsxs)(s.Content,{"data-slot":`dialog-content`,className:t.t(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,e),...a,children:[n,i&&(0,r.jsxs)(s.Close,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,r.jsx)(T,{}),(0,r.jsx)(`span`,{className:`sr-only`,children:c(`dialog.close`,{defaultValue:`Close`})})]})]})]})}function I({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`dialog-header`,className:t.t(`flex flex-col gap-2 text-center sm:text-left`,e),...n})}function L({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`dialog-footer`,className:t.t(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...n})}function R({className:e,...n}){return(0,r.jsx)(s.Title,{"data-slot":`dialog-title`,className:t.t(`text-lg leading-none font-semibold`,e),...n})}function z({className:e,...n}){return(0,r.jsx)(s.Description,{"data-slot":`dialog-description`,className:t.t(`text-muted-foreground text-sm`,e),...n})}var B=(0,a.cva)(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-[3px]`,{variants:{variant:{default:[`bg-gradient-to-r from-[var(--vg-accent-fill-from)] to-[var(--vg-accent-fill-to)] text-white`,`shadow-md shadow-[var(--vg-accent-shadow)]`,`hover:from-[var(--vg-accent-fill-from-hover)] hover:to-[var(--vg-accent-fill-to-hover)]`,`hover:shadow-lg hover:shadow-[var(--vg-accent-shadow-hover)]`,`focus-visible:ring-[var(--vg-accent-ring)]`].join(` `),secondary:[`bg-gradient-to-r from-slate-600 to-slate-700 text-white`,`shadow-md shadow-slate-500/25`,`hover:from-slate-700 hover:to-slate-800`,`hover:shadow-lg hover:shadow-slate-500/30`,`focus-visible:ring-slate-500/50`,`dark:from-slate-500 dark:to-slate-600`,`dark:shadow-slate-500/20`,`dark:hover:from-slate-600 dark:hover:to-slate-700`,`dark:hover:shadow-slate-500/25`,`dark:focus-visible:ring-slate-400/50`].join(` `),destructive:[`bg-gradient-to-r from-red-600 to-rose-600 text-white`,`shadow-md shadow-red-500/25`,`hover:from-red-700 hover:to-rose-700`,`hover:shadow-lg hover:shadow-red-500/30`,`focus-visible:ring-red-500/50`,`dark:from-red-500 dark:to-rose-500`,`dark:shadow-red-500/20`,`dark:hover:from-red-600 dark:hover:to-rose-600`,`dark:hover:shadow-red-500/25`,`dark:focus-visible:ring-red-400/50`].join(` `),success:[`bg-gradient-to-r from-emerald-600 to-teal-600 text-white`,`shadow-md shadow-emerald-500/25`,`hover:from-emerald-700 hover:to-teal-700`,`hover:shadow-lg hover:shadow-emerald-500/30`,`focus-visible:ring-emerald-500/50`,`dark:from-emerald-500 dark:to-teal-500`,`dark:shadow-emerald-500/20`,`dark:hover:from-emerald-600 dark:hover:to-teal-600`,`dark:hover:shadow-emerald-500/25`,`dark:focus-visible:ring-emerald-400/50`].join(` `),outline:[`border-2 border-[var(--vg-accent-fg)] text-[var(--vg-accent-fg)] bg-transparent`,`hover:bg-[var(--vg-accent-fill-from)] hover:text-white`,`shadow-sm hover:shadow-md hover:shadow-[var(--vg-accent-shadow)]`,`focus-visible:ring-[var(--vg-accent-ring)]`].join(` `),ghost:[`bg-transparent text-[var(--vg-accent-fg)]`,`hover:bg-[var(--vg-accent-surface)]`,`focus-visible:ring-[var(--vg-accent-ring)]`].join(` `)},size:{default:`h-11 px-5 py-2 has-[>svg]:px-4`,sm:`h-9 rounded-md gap-1.5 px-4 has-[>svg]:px-3 text-xs`,lg:`h-12 rounded-md px-8 has-[>svg]:px-6 text-base`,icon:`size-11`,"icon-sm":`size-9`,"icon-lg":`size-12`}},defaultVariants:{variant:`default`,size:`default`}});function V({className:e,variant:n,size:a,asChild:o=!1,loading:s=!1,onClick:c,children:l,...u}){let d=O(s,u[`aria-disabled`],c),f=t.t(B({variant:n,size:a,className:e}),d.inert&&(s?`cursor-progress`:`cursor-not-allowed opacity-50`));return(0,r.jsx)(o?i.Slot:`button`,{"data-slot":`gradient-button`,className:f,...u,...d.props,children:o?l:(0,r.jsxs)(r.Fragment,{children:[s&&(0,r.jsx)(k,{}),l]})})}function H({className:e,type:n,...i}){return(0,r.jsx)(`input`,{type:n,"data-slot":`input`,className:t.t(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent pl-3 pr-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...i})}function U({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`skeleton`,className:t.t(`bg-accent animate-pulse rounded-md`,e),...n})}var W=({text:e,href:n,onClick:i,className:a,prefix:o})=>{if(!e)return null;let s=t.r(e);return(0,r.jsxs)(D,{variant:`outline`,title:e,onClick:()=>n&&i?.(n),className:t.t(`vg-badge-colorful text-xs font-medium px-2 py-0.5 gap-1.5 cursor-pointer transition-all hover:opacity-80`,`dynamic-badge-${e.length}`,a),style:{"--badge-bg":s.light.bg,"--badge-text":s.light.text,"--badge-border":s.light.border,"--badge-dark-bg":s.dark.bg,"--badge-dark-text":s.dark.text,"--badge-dark-border":s.dark.border},children:[o,(0,r.jsx)(`span`,{children:e})]})},G={AR:`SA`,BN:`BD`,CA:`ES`,CS:`CZ`,DA:`DK`,DE:`DE`,EL:`GR`,EN:`US`,EU:`ES`,FA:`IR`,FI:`FI`,FIL:`PH`,FR:`FR`,GA:`IE`,GL:`ES`,GU:`IN`,HE:`IL`,HI:`IN`,HU:`HU`,ID:`ID`,IT:`IT`,JA:`JP`,KN:`IN`,KO:`KR`,MR:`IN`,MSA:`MY`,NL:`NL`,NO:`NO`,PL:`PL`,PT:`BR`,RO:`RO`,RU:`RU`,ES:`ES`,SV:`SE`,TA:`IN`,TH:`TH`,TR:`TR`,UK:`UA`,UR:`PK`,VI:`VN`,ZH:`CN`},K={UK:`GB`};function q(e){if(!e)return``;let{language:n,region:r}=t.i(e);if(r)return(K[r]||r).toLowerCase();let i=G[n];return i?i.toLowerCase():(K[n]||n).toLowerCase()}var J=({locale:e,className:i})=>{let a=q(e),[o,s]=(0,n.useState)(null),c=o===a;return(0,r.jsxs)(D,{variant:`secondary`,className:t.t(`font-mono gap-2 py-1 pl-1 pr-2 w-fit`,i),children:[!c&&a?(0,r.jsx)(`img`,{src:`https://flagcdn.com/w40/${a}.png`,alt:a,onError:()=>s(a),className:`w-5 h-3.5 object-cover rounded-sm shadow-sm`}):(0,r.jsx)(C,{className:`w-3.5 h-3.5 text-muted-foreground`}),(0,r.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-tight leading-none`,children:e})]})};Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return O}});
|
|
@@ -5,66 +5,170 @@ import { Slot as d } from "@radix-ui/react-slot";
|
|
|
5
5
|
import { cva as f } from "class-variance-authority";
|
|
6
6
|
import { useTranslation as p } from "react-i18next";
|
|
7
7
|
import * as m from "@radix-ui/react-dialog";
|
|
8
|
-
//#region node_modules/lucide-react/dist/esm/shared/src/utils/
|
|
9
|
-
var h = (
|
|
8
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
9
|
+
var h = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
12
|
+
function g(e, t, n = []) {
|
|
13
|
+
if (t == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
14
|
+
return {
|
|
15
|
+
name: h(e),
|
|
16
|
+
size: 24,
|
|
17
|
+
node: t,
|
|
18
|
+
...n.length > 0 ? { aliases: n } : {}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
23
|
+
var _ = (e) => {
|
|
24
|
+
let t = "", n = !1;
|
|
25
|
+
for (let r of e) {
|
|
26
|
+
if (r === "-" || r === "_" || r <= " ") {
|
|
27
|
+
n = t.length > 0;
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
}, v = (e) => {
|
|
10
34
|
let t = _(e);
|
|
11
35
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
12
|
-
}, y = {
|
|
36
|
+
}, y = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), b = {
|
|
13
37
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
38
|
width: 24,
|
|
15
39
|
height: 24,
|
|
16
40
|
viewBox: "0 0 24 24",
|
|
17
41
|
fill: "none",
|
|
18
42
|
stroke: "currentColor",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
43
|
+
"stroke-width": 2,
|
|
44
|
+
"stroke-linecap": "round",
|
|
45
|
+
"stroke-linejoin": "round"
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
49
|
+
function x(e) {
|
|
50
|
+
return e != null;
|
|
51
|
+
}
|
|
52
|
+
function S(e, t = {}) {
|
|
53
|
+
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ?? b.width, a = e.size ?? e.height ?? b.height, o = e.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], s = [...e.name ? [`lucide-${e.name}`] : [], ...o], c = t.className?.split(" ").filter(Boolean) ?? [], l = t.includeDefaultClasses === !1 ? y(...c) : y("lucide", ...s, ...c), u = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? b["stroke-width"]) * Number(e.size ?? e.width ?? b.width) / Number(t.size ?? t.width ?? b.width) : t.strokeWidth ?? b["stroke-width"];
|
|
54
|
+
return [
|
|
55
|
+
"svg",
|
|
56
|
+
{
|
|
57
|
+
...Object.entries(b).reduce((e, [t, n]) => (e[r(t)] = n, e), {}),
|
|
58
|
+
..."color" in t && t.color && { [r("stroke")]: t.color },
|
|
59
|
+
..."size" in t && x(t.size) && {
|
|
60
|
+
[r("width")]: t.size,
|
|
61
|
+
[r("height")]: t.size
|
|
62
|
+
},
|
|
63
|
+
..."width" in t && x(t.width) && { [r("width")]: t.width },
|
|
64
|
+
..."height" in t && x(t.height) && { [r("height")]: t.height },
|
|
65
|
+
[r("stroke-width")]: u,
|
|
66
|
+
...l && { [r("class")]: l },
|
|
67
|
+
[r("viewBox")]: `0 0 ${i} ${a}`,
|
|
68
|
+
...t.hasA11yProp === !1 ? { [r("aria-hidden")]: "true" } : {},
|
|
69
|
+
..."attributes" in t && t.attributes
|
|
70
|
+
},
|
|
71
|
+
e.node.map((e) => {
|
|
72
|
+
let [n, i, a] = e, o = t.nonScalingStroke ? {
|
|
73
|
+
[r("vector-effect")]: "non-scaling-stroke",
|
|
74
|
+
...i
|
|
75
|
+
} : i;
|
|
76
|
+
return a ? [
|
|
77
|
+
n,
|
|
78
|
+
o,
|
|
79
|
+
a
|
|
80
|
+
] : [n, o];
|
|
81
|
+
})
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
86
|
+
function C(e, t = {}) {
|
|
87
|
+
return S(e, {
|
|
88
|
+
...t,
|
|
89
|
+
attributeNames: {
|
|
90
|
+
...t.attributeNames,
|
|
91
|
+
class: "className",
|
|
92
|
+
"stroke-width": "strokeWidth",
|
|
93
|
+
"stroke-linecap": "strokeLinecap",
|
|
94
|
+
"stroke-linejoin": "strokeLinejoin",
|
|
95
|
+
"vector-effect": "vectorEffect"
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
101
|
+
var w = (e) => {
|
|
23
102
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
24
103
|
return !1;
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
...
|
|
104
|
+
}, T = r({}), E = () => o(T), D = a(({ color: e, size: t, width: n, height: r, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
105
|
+
node: u,
|
|
106
|
+
aliases: [],
|
|
107
|
+
size: 24
|
|
108
|
+
}, ...f }, p) => {
|
|
109
|
+
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: b = "" } = E() ?? {}, x = !!l || w(f), [S, T, D = []] = C(d, {
|
|
110
|
+
color: e ?? v,
|
|
111
|
+
width: n ?? t ?? m,
|
|
112
|
+
height: r ?? t ?? m,
|
|
113
|
+
strokeWidth: a ?? h,
|
|
114
|
+
absoluteStrokeWidth: o ?? g,
|
|
115
|
+
nonScalingStroke: s ?? _,
|
|
116
|
+
className: y(b, c),
|
|
117
|
+
hasA11yProp: x,
|
|
118
|
+
attributes: f
|
|
119
|
+
});
|
|
120
|
+
return i(S, {
|
|
121
|
+
ref: p,
|
|
122
|
+
...T
|
|
123
|
+
}, [...D.map(([e, t]) => i(e, t)), ...Array.isArray(l) ? l : [l]]);
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
127
|
+
function O(e, t = [], n = []) {
|
|
128
|
+
let r = typeof e == "string" ? g(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(D, {
|
|
129
|
+
ref: n,
|
|
130
|
+
icon: r,
|
|
131
|
+
className: e,
|
|
132
|
+
...t
|
|
44
133
|
}));
|
|
45
|
-
return
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
134
|
+
return r.name && (o.displayName = v(r.name)), o;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region node_modules/lucide-react/dist/esm/icons/globe.mjs
|
|
138
|
+
var k = {
|
|
139
|
+
name: "globe",
|
|
140
|
+
size: 24,
|
|
141
|
+
node: [
|
|
142
|
+
["circle", {
|
|
143
|
+
cx: "12",
|
|
144
|
+
cy: "12",
|
|
145
|
+
r: "10",
|
|
146
|
+
key: "1mglay"
|
|
147
|
+
}],
|
|
148
|
+
["path", {
|
|
149
|
+
d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",
|
|
150
|
+
key: "13o1zl"
|
|
151
|
+
}],
|
|
152
|
+
["path", {
|
|
153
|
+
d: "M2 12h20",
|
|
154
|
+
key: "9i4pu4"
|
|
155
|
+
}]
|
|
156
|
+
]
|
|
157
|
+
};
|
|
158
|
+
k.node;
|
|
159
|
+
var A = O(k), j = {
|
|
160
|
+
name: "x",
|
|
161
|
+
size: 24,
|
|
162
|
+
node: [["path", {
|
|
163
|
+
d: "M18 6 6 18",
|
|
164
|
+
key: "1bl5f8"
|
|
165
|
+
}], ["path", {
|
|
166
|
+
d: "m6 6 12 12",
|
|
167
|
+
key: "d8bk6v"
|
|
168
|
+
}]]
|
|
169
|
+
};
|
|
170
|
+
j.node;
|
|
171
|
+
var M = O(j), N = f("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
68
172
|
variants: { variant: {
|
|
69
173
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
70
174
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
@@ -73,16 +177,16 @@ var h = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) =
|
|
|
73
177
|
} },
|
|
74
178
|
defaultVariants: { variant: "default" }
|
|
75
179
|
});
|
|
76
|
-
function
|
|
180
|
+
function P({ className: e, variant: t, asChild: r = !1, ...i }) {
|
|
77
181
|
return /* @__PURE__ */ l(r ? d : "span", {
|
|
78
182
|
"data-slot": "badge",
|
|
79
|
-
className: n(
|
|
183
|
+
className: n(N({ variant: t }), e),
|
|
80
184
|
...i
|
|
81
185
|
});
|
|
82
186
|
}
|
|
83
187
|
//#endregion
|
|
84
188
|
//#region src/lib/busy.tsx
|
|
85
|
-
function
|
|
189
|
+
function F(e, t, n) {
|
|
86
190
|
let r = e || t === !0 || t === "true";
|
|
87
191
|
return {
|
|
88
192
|
inert: r,
|
|
@@ -99,7 +203,7 @@ function k(e, t, n) {
|
|
|
99
203
|
}
|
|
100
204
|
};
|
|
101
205
|
}
|
|
102
|
-
function
|
|
206
|
+
function I() {
|
|
103
207
|
return /* @__PURE__ */ u("svg", {
|
|
104
208
|
"aria-hidden": "true",
|
|
105
209
|
className: "size-4 animate-spin",
|
|
@@ -122,49 +226,49 @@ function A() {
|
|
|
122
226
|
}
|
|
123
227
|
//#endregion
|
|
124
228
|
//#region src/components/ui/dialog.tsx
|
|
125
|
-
function
|
|
229
|
+
function L({ ...e }) {
|
|
126
230
|
return /* @__PURE__ */ l(m.Root, {
|
|
127
231
|
"data-slot": "dialog",
|
|
128
232
|
...e
|
|
129
233
|
});
|
|
130
234
|
}
|
|
131
|
-
function
|
|
235
|
+
function ee({ ...e }) {
|
|
132
236
|
return /* @__PURE__ */ l(m.Trigger, {
|
|
133
237
|
"data-slot": "dialog-trigger",
|
|
134
238
|
...e
|
|
135
239
|
});
|
|
136
240
|
}
|
|
137
|
-
function
|
|
241
|
+
function R({ ...e }) {
|
|
138
242
|
return /* @__PURE__ */ l(m.Portal, {
|
|
139
243
|
"data-slot": "dialog-portal",
|
|
140
244
|
...e
|
|
141
245
|
});
|
|
142
246
|
}
|
|
143
|
-
function
|
|
247
|
+
function z({ ...e }) {
|
|
144
248
|
return /* @__PURE__ */ l(m.Close, {
|
|
145
249
|
"data-slot": "dialog-close",
|
|
146
250
|
...e
|
|
147
251
|
});
|
|
148
252
|
}
|
|
149
|
-
function
|
|
253
|
+
function B({ className: e, ...t }) {
|
|
150
254
|
return /* @__PURE__ */ l(m.Overlay, {
|
|
151
255
|
"data-slot": "dialog-overlay",
|
|
152
256
|
className: n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
153
257
|
...t
|
|
154
258
|
});
|
|
155
259
|
}
|
|
156
|
-
function
|
|
260
|
+
function V({ className: e, children: t, showCloseButton: r = !0, ...i }) {
|
|
157
261
|
let { t: a } = p();
|
|
158
|
-
return /* @__PURE__ */ u(
|
|
262
|
+
return /* @__PURE__ */ u(R, {
|
|
159
263
|
"data-slot": "dialog-portal",
|
|
160
|
-
children: [/* @__PURE__ */ l(
|
|
264
|
+
children: [/* @__PURE__ */ l(B, {}), /* @__PURE__ */ u(m.Content, {
|
|
161
265
|
"data-slot": "dialog-content",
|
|
162
266
|
className: n("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", e),
|
|
163
267
|
...i,
|
|
164
268
|
children: [t, r && /* @__PURE__ */ u(m.Close, {
|
|
165
269
|
"data-slot": "dialog-close",
|
|
166
270
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
167
|
-
children: [/* @__PURE__ */ l(
|
|
271
|
+
children: [/* @__PURE__ */ l(M, {}), /* @__PURE__ */ l("span", {
|
|
168
272
|
className: "sr-only",
|
|
169
273
|
children: a("dialog.close", { defaultValue: "Close" })
|
|
170
274
|
})]
|
|
@@ -172,28 +276,28 @@ function I({ className: e, children: t, showCloseButton: r = !0, ...i }) {
|
|
|
172
276
|
})]
|
|
173
277
|
});
|
|
174
278
|
}
|
|
175
|
-
function
|
|
279
|
+
function H({ className: e, ...t }) {
|
|
176
280
|
return /* @__PURE__ */ l("div", {
|
|
177
281
|
"data-slot": "dialog-header",
|
|
178
282
|
className: n("flex flex-col gap-2 text-center sm:text-left", e),
|
|
179
283
|
...t
|
|
180
284
|
});
|
|
181
285
|
}
|
|
182
|
-
function
|
|
286
|
+
function U({ className: e, ...t }) {
|
|
183
287
|
return /* @__PURE__ */ l("div", {
|
|
184
288
|
"data-slot": "dialog-footer",
|
|
185
289
|
className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
186
290
|
...t
|
|
187
291
|
});
|
|
188
292
|
}
|
|
189
|
-
function
|
|
293
|
+
function W({ className: e, ...t }) {
|
|
190
294
|
return /* @__PURE__ */ l(m.Title, {
|
|
191
295
|
"data-slot": "dialog-title",
|
|
192
296
|
className: n("text-lg leading-none font-semibold", e),
|
|
193
297
|
...t
|
|
194
298
|
});
|
|
195
299
|
}
|
|
196
|
-
function
|
|
300
|
+
function G({ className: e, ...t }) {
|
|
197
301
|
return /* @__PURE__ */ l(m.Description, {
|
|
198
302
|
"data-slot": "dialog-description",
|
|
199
303
|
className: n("text-muted-foreground text-sm", e),
|
|
@@ -202,7 +306,7 @@ function B({ className: e, ...t }) {
|
|
|
202
306
|
}
|
|
203
307
|
//#endregion
|
|
204
308
|
//#region src/components/ui/gradient-button.tsx
|
|
205
|
-
var
|
|
309
|
+
var K = f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-[3px]", {
|
|
206
310
|
variants: {
|
|
207
311
|
variant: {
|
|
208
312
|
default: [
|
|
@@ -274,8 +378,8 @@ var V = f("inline-flex items-center justify-center gap-2 whitespace-nowrap round
|
|
|
274
378
|
size: "default"
|
|
275
379
|
}
|
|
276
380
|
});
|
|
277
|
-
function
|
|
278
|
-
let p =
|
|
381
|
+
function q({ className: e, variant: t, size: r, asChild: i = !1, loading: a = !1, onClick: o, children: s, ...f }) {
|
|
382
|
+
let p = F(a, f["aria-disabled"], o), m = n(K({
|
|
279
383
|
variant: t,
|
|
280
384
|
size: r,
|
|
281
385
|
className: e
|
|
@@ -285,12 +389,12 @@ function H({ className: e, variant: t, size: r, asChild: i = !1, loading: a = !1
|
|
|
285
389
|
className: m,
|
|
286
390
|
...f,
|
|
287
391
|
...p.props,
|
|
288
|
-
children: i ? s : /* @__PURE__ */ u(c, { children: [a && /* @__PURE__ */ l(
|
|
392
|
+
children: i ? s : /* @__PURE__ */ u(c, { children: [a && /* @__PURE__ */ l(I, {}), s] })
|
|
289
393
|
});
|
|
290
394
|
}
|
|
291
395
|
//#endregion
|
|
292
396
|
//#region src/components/ui/input.tsx
|
|
293
|
-
function
|
|
397
|
+
function J({ className: e, type: t, ...r }) {
|
|
294
398
|
return /* @__PURE__ */ l("input", {
|
|
295
399
|
type: t,
|
|
296
400
|
"data-slot": "input",
|
|
@@ -300,7 +404,7 @@ function U({ className: e, type: t, ...r }) {
|
|
|
300
404
|
}
|
|
301
405
|
//#endregion
|
|
302
406
|
//#region src/components/ui/skeleton.tsx
|
|
303
|
-
function
|
|
407
|
+
function Y({ className: e, ...t }) {
|
|
304
408
|
return /* @__PURE__ */ l("div", {
|
|
305
409
|
"data-slot": "skeleton",
|
|
306
410
|
className: n("bg-accent animate-pulse rounded-md", e),
|
|
@@ -309,10 +413,10 @@ function W({ className: e, ...t }) {
|
|
|
309
413
|
}
|
|
310
414
|
//#endregion
|
|
311
415
|
//#region src/components/badge-colorful.tsx
|
|
312
|
-
var
|
|
416
|
+
var X = ({ text: e, href: r, onClick: i, className: a, prefix: o }) => {
|
|
313
417
|
if (!e) return null;
|
|
314
418
|
let s = t(e);
|
|
315
|
-
return /* @__PURE__ */ u(
|
|
419
|
+
return /* @__PURE__ */ u(P, {
|
|
316
420
|
variant: "outline",
|
|
317
421
|
title: e,
|
|
318
422
|
onClick: () => r && i?.(r),
|
|
@@ -327,7 +431,7 @@ var G = ({ text: e, href: r, onClick: i, className: a, prefix: o }) => {
|
|
|
327
431
|
},
|
|
328
432
|
children: [o, /* @__PURE__ */ l("span", { children: e })]
|
|
329
433
|
});
|
|
330
|
-
},
|
|
434
|
+
}, Z = {
|
|
331
435
|
AR: "SA",
|
|
332
436
|
BN: "BD",
|
|
333
437
|
CA: "ES",
|
|
@@ -369,17 +473,17 @@ var G = ({ text: e, href: r, onClick: i, className: a, prefix: o }) => {
|
|
|
369
473
|
UR: "PK",
|
|
370
474
|
VI: "VN",
|
|
371
475
|
ZH: "CN"
|
|
372
|
-
},
|
|
373
|
-
function
|
|
476
|
+
}, Q = { UK: "GB" };
|
|
477
|
+
function $(t) {
|
|
374
478
|
if (!t) return "";
|
|
375
479
|
let { language: n, region: r } = e(t);
|
|
376
|
-
if (r) return (
|
|
377
|
-
let i =
|
|
378
|
-
return i ? i.toLowerCase() : (
|
|
480
|
+
if (r) return (Q[r] || r).toLowerCase();
|
|
481
|
+
let i = Z[n];
|
|
482
|
+
return i ? i.toLowerCase() : (Q[n] || n).toLowerCase();
|
|
379
483
|
}
|
|
380
|
-
var
|
|
381
|
-
let r =
|
|
382
|
-
return /* @__PURE__ */ u(
|
|
484
|
+
var te = ({ locale: e, className: t }) => {
|
|
485
|
+
let r = $(e), [i, a] = s(null), o = i === r;
|
|
486
|
+
return /* @__PURE__ */ u(P, {
|
|
383
487
|
variant: "secondary",
|
|
384
488
|
className: n("font-mono gap-2 py-1 pl-1 pr-2 w-fit", t),
|
|
385
489
|
children: [!o && r ? /* @__PURE__ */ l("img", {
|
|
@@ -387,11 +491,11 @@ var Y = ({ locale: e, className: t }) => {
|
|
|
387
491
|
alt: r,
|
|
388
492
|
onError: () => a(r),
|
|
389
493
|
className: "w-5 h-3.5 object-cover rounded-sm shadow-sm"
|
|
390
|
-
}) : /* @__PURE__ */ l(
|
|
494
|
+
}) : /* @__PURE__ */ l(A, { className: "w-3.5 h-3.5 text-muted-foreground" }), /* @__PURE__ */ l("span", {
|
|
391
495
|
className: "text-xs font-bold uppercase tracking-tight leading-none",
|
|
392
496
|
children: e
|
|
393
497
|
})]
|
|
394
498
|
});
|
|
395
499
|
};
|
|
396
500
|
//#endregion
|
|
397
|
-
export {
|
|
501
|
+
export { O as C, M as S, ee as _, J as a, P as b, L as c, G as d, U as f, W as g, R as h, Y as i, z as l, B as m, $ as n, q as o, H as p, X as r, K as s, te as t, V as u, I as v, N as x, F as y };
|