@viglet/viglet-design-system 2026.3.2 → 2026.3.3

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.
Files changed (177) hide show
  1. package/README.md +277 -7
  2. package/dist/assets.cjs +1 -0
  3. package/dist/assets.es.js +2 -0
  4. package/dist/badge-locale-BxI9TwkE.js +579 -0
  5. package/dist/badge-locale-sIsBdP_e.cjs +7 -0
  6. package/dist/bento/bento-actions-menu.d.ts +42 -0
  7. package/dist/bento/bento-actions-menu.d.ts.map +1 -0
  8. package/dist/bento/bento-back-to-top.d.ts +11 -0
  9. package/dist/bento/bento-back-to-top.d.ts.map +1 -0
  10. package/dist/bento/bento-command-palette.d.ts +28 -0
  11. package/dist/bento/bento-command-palette.d.ts.map +1 -0
  12. package/dist/bento/bento-count-tile.d.ts +18 -0
  13. package/dist/bento/bento-count-tile.d.ts.map +1 -0
  14. package/dist/bento/bento-empty-state.d.ts +35 -0
  15. package/dist/bento/bento-empty-state.d.ts.map +1 -0
  16. package/dist/bento/bento-entity-shell.d.ts +123 -0
  17. package/dist/bento/bento-entity-shell.d.ts.map +1 -0
  18. package/dist/bento/bento-entity-tile.d.ts +40 -0
  19. package/dist/bento/bento-entity-tile.d.ts.map +1 -0
  20. package/dist/bento/bento-form-hero.d.ts +91 -0
  21. package/dist/bento/bento-form-hero.d.ts.map +1 -0
  22. package/dist/bento/bento-form-section.d.ts +31 -0
  23. package/dist/bento/bento-form-section.d.ts.map +1 -0
  24. package/dist/bento/bento-hero-icon-picker.d.ts +35 -0
  25. package/dist/bento/bento-hero-icon-picker.d.ts.map +1 -0
  26. package/dist/bento/bento-hero.d.ts +62 -0
  27. package/dist/bento/bento-hero.d.ts.map +1 -0
  28. package/dist/bento/bento-inline-edit.d.ts +52 -0
  29. package/dist/bento/bento-inline-edit.d.ts.map +1 -0
  30. package/dist/bento/bento-layout.d.ts +52 -0
  31. package/dist/bento/bento-layout.d.ts.map +1 -0
  32. package/dist/bento/bento-list-page.d.ts +124 -0
  33. package/dist/bento/bento-list-page.d.ts.map +1 -0
  34. package/dist/bento/bento-nav-rail.d.ts +32 -0
  35. package/dist/bento/bento-nav-rail.d.ts.map +1 -0
  36. package/dist/bento/bento-nav.d.ts +69 -0
  37. package/dist/bento/bento-nav.d.ts.map +1 -0
  38. package/dist/bento/bento-save-bar.d.ts +36 -0
  39. package/dist/bento/bento-save-bar.d.ts.map +1 -0
  40. package/dist/bento/bento-scroll-fade.d.ts +20 -0
  41. package/dist/bento/bento-scroll-fade.d.ts.map +1 -0
  42. package/dist/bento/bento-scroll-save-bar.d.ts +22 -0
  43. package/dist/bento/bento-scroll-save-bar.d.ts.map +1 -0
  44. package/dist/bento/bento-section-chrome.d.ts +60 -0
  45. package/dist/bento/bento-section-chrome.d.ts.map +1 -0
  46. package/dist/bento/bento-section.d.ts +27 -0
  47. package/dist/bento/bento-section.d.ts.map +1 -0
  48. package/dist/bento/bento-shortcuts-dialog.d.ts +15 -0
  49. package/dist/bento/bento-shortcuts-dialog.d.ts.map +1 -0
  50. package/dist/bento/bento-status-marker.d.ts +26 -0
  51. package/dist/bento/bento-status-marker.d.ts.map +1 -0
  52. package/dist/bento/bento-tile.d.ts +42 -0
  53. package/dist/bento/bento-tile.d.ts.map +1 -0
  54. package/dist/bento/bento-tones.d.ts +33 -0
  55. package/dist/bento/bento-tones.d.ts.map +1 -0
  56. package/dist/bento/bento-user-menu.d.ts +31 -0
  57. package/dist/bento/bento-user-menu.d.ts.map +1 -0
  58. package/dist/bento/index.d.ts +59 -0
  59. package/dist/bento/index.d.ts.map +1 -0
  60. package/dist/bento.cjs +1 -0
  61. package/dist/bento.css +442 -0
  62. package/dist/bento.es.js +1501 -0
  63. package/dist/breadcrumb.context-CTnZ4rD0.cjs +1 -0
  64. package/dist/breadcrumb.context-h2A2IEJ_.js +928 -0
  65. package/dist/components/badge-locale.d.ts.map +1 -1
  66. package/dist/components/error-boundary.d.ts.map +1 -1
  67. package/dist/components/language-select.d.ts.map +1 -1
  68. package/dist/components/router/blank-slate.d.ts +10 -0
  69. package/dist/components/router/blank-slate.d.ts.map +1 -1
  70. package/dist/components/router/grid.list.d.ts +13 -0
  71. package/dist/components/router/grid.list.d.ts.map +1 -1
  72. package/dist/components/router/internal.sidebar.d.ts +27 -2
  73. package/dist/components/router/internal.sidebar.d.ts.map +1 -1
  74. package/dist/components/router/loading-provider.d.ts +6 -1
  75. package/dist/components/router/loading-provider.d.ts.map +1 -1
  76. package/dist/components/router/nav-main.d.ts +10 -0
  77. package/dist/components/router/nav-main.d.ts.map +1 -1
  78. package/dist/components/router/nav-user.d.ts +13 -0
  79. package/dist/components/router/nav-user.d.ts.map +1 -1
  80. package/dist/components/router/page-content.d.ts +10 -0
  81. package/dist/components/router/page-content.d.ts.map +1 -1
  82. package/dist/components/router/page-header.d.ts +13 -0
  83. package/dist/components/router/page-header.d.ts.map +1 -1
  84. package/dist/components/router/page.d.ts +13 -0
  85. package/dist/components/router/page.d.ts.map +1 -1
  86. package/dist/components/router/sticky.page.header.d.ts +14 -0
  87. package/dist/components/router/sticky.page.header.d.ts.map +1 -1
  88. package/dist/components/router/sub.page.d.ts +15 -11
  89. package/dist/components/router/sub.page.d.ts.map +1 -1
  90. package/dist/components/router/sub.page.header.d.ts +13 -0
  91. package/dist/components/router/sub.page.header.d.ts.map +1 -1
  92. package/dist/components/startup-first/startup-first.d.ts.map +1 -1
  93. package/dist/components/ui/floating-formulas-bg.d.ts +8 -1
  94. package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
  95. package/dist/components/ui/form.d.ts +2 -2
  96. package/dist/components/ui/form.d.ts.map +1 -1
  97. package/dist/components/ui/gradient-button.d.ts.map +1 -1
  98. package/dist/components/ui/gradient-switch.d.ts.map +1 -1
  99. package/dist/components/ui/icon-picker-dialog.d.ts +35 -0
  100. package/dist/components/ui/icon-picker-dialog.d.ts.map +1 -0
  101. package/dist/components/ui/index.d.ts +1 -0
  102. package/dist/components/ui/index.d.ts.map +1 -1
  103. package/dist/components/ui/section-card.d.ts +3 -3
  104. package/dist/components/ui/section-card.d.ts.map +1 -1
  105. package/dist/components/ui/sidebar.d.ts.map +1 -1
  106. package/dist/components/ui/slider.d.ts +1 -1
  107. package/dist/components/ui/slider.d.ts.map +1 -1
  108. package/dist/contexts/user.context.d.ts +24 -0
  109. package/dist/contexts/user.context.d.ts.map +1 -1
  110. package/dist/exports.json +404 -0
  111. package/dist/floating-formulas-bg.cjs +1 -0
  112. package/dist/floating-formulas-bg.css +21 -0
  113. package/dist/floating-formulas-bg.es.js +83 -56
  114. package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  115. package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
  116. package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
  117. package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
  118. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  119. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  120. package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
  121. package/dist/fonts/plus-jakarta-sans-cyrillic-ext-wght-normal.woff2 +0 -0
  122. package/dist/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2 +0 -0
  123. package/dist/fonts/plus-jakarta-sans-latin-wght-normal.woff2 +0 -0
  124. package/dist/fonts/plus-jakarta-sans-vietnamese-wght-normal.woff2 +0 -0
  125. package/dist/fonts.css +126 -0
  126. package/dist/hooks/use-grid-adapter.d.ts.map +1 -1
  127. package/dist/hooks/use-mobile.d.ts +10 -0
  128. package/dist/hooks/use-mobile.d.ts.map +1 -1
  129. package/dist/hooks/use-sub-page-breadcrumb.d.ts.map +1 -1
  130. package/dist/i18n/index.d.ts +136 -0
  131. package/dist/i18n/index.d.ts.map +1 -1
  132. package/dist/i18n/locales/en/bento.json.d.ts +51 -0
  133. package/dist/i18n/locales/en/common.json.d.ts +7 -1
  134. package/dist/i18n/locales/en/forms.json.d.ts +15 -1
  135. package/dist/i18n/locales/en/nav.json.d.ts +3 -1
  136. package/dist/i18n/locales/pt/bento.json.d.ts +51 -0
  137. package/dist/i18n/locales/pt/common.json.d.ts +7 -1
  138. package/dist/i18n/locales/pt/forms.json.d.ts +15 -1
  139. package/dist/i18n/locales/pt/nav.json.d.ts +3 -1
  140. package/dist/i18n-DoNdMLEd.cjs +1 -0
  141. package/dist/{i18n-C94rDRaM.js → i18n-DuNITbWa.js} +155 -27
  142. package/dist/{i18n.cjs.js → i18n.cjs} +1 -1
  143. package/dist/i18n.es.js +1 -1
  144. package/dist/index.cjs +1 -0
  145. package/dist/index.d.ts +0 -1
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.es.js +492 -750
  148. package/dist/lib/axios.d.ts.map +1 -1
  149. package/dist/lib/export-xlsx.d.ts +7 -1
  150. package/dist/lib/export-xlsx.d.ts.map +1 -1
  151. package/dist/lib/react-markers.d.ts +17 -0
  152. package/dist/lib/react-markers.d.ts.map +1 -0
  153. package/dist/lib/utils.d.ts +22 -0
  154. package/dist/lib/utils.d.ts.map +1 -1
  155. package/dist/loading-provider-1mgM91iY.cjs +1 -0
  156. package/dist/loading-provider-CMnOuvdR.js +224 -0
  157. package/dist/preset.css +103 -3
  158. package/dist/products-DL_YYXkV.cjs +1 -0
  159. package/dist/products-Du9KB6Xl.js +9 -0
  160. package/dist/{rolldown-runtime-CMqjfN_6.cjs → rolldown-runtime-BocRIvOZ.cjs} +1 -1
  161. package/dist/router.cjs +1 -0
  162. package/dist/router.es.js +358 -555
  163. package/dist/user.context-kPAqKN4o.js +512 -0
  164. package/dist/user.context-r50nSWER.cjs +1 -0
  165. package/dist/viglet-design-system.css +1 -1
  166. package/dist/vite/boot-loader.d.ts +14 -4
  167. package/dist/vite/boot-loader.d.ts.map +1 -1
  168. package/dist/{vite.cjs.js → vite.cjs} +8 -8
  169. package/dist/vite.es.js +29 -16
  170. package/package.json +66 -22
  171. package/scripts/check-duplicates.mjs +198 -0
  172. package/dist/breadcrumb.context-C7VCfh49.js +0 -1501
  173. package/dist/breadcrumb.context-Td6Tjc_z.cjs +0 -7
  174. package/dist/floating-formulas-bg.cjs.js +0 -1
  175. package/dist/i18n-DN_2YzjB.cjs +0 -1
  176. package/dist/index.cjs.js +0 -1
  177. package/dist/router.cjs.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../src/lib/axios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAqFvD,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,iBAAsB,QA0FrE;AAED,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../src/lib/axios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAwHxE,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,iBAAsB,QA0FrE;AAED,eAAe,KAAK,CAAC"}
@@ -1,5 +1,11 @@
1
+ /**
2
+ * Write `data` to an .xlsx download, one column per entry in `headers`.
3
+ *
4
+ * @param sheetName Names the sheet. Defaults to `filename`, cleaned of the
5
+ * characters Excel refuses and cut to the 31 it allows.
6
+ */
1
7
  export declare function exportToXlsx<T extends Record<string, unknown>>(data: T[], headers: {
2
8
  key: string;
3
9
  label: string;
4
- }[], filename: string): void;
10
+ }[], filename: string, sheetName?: string): void;
5
11
  //# sourceMappingURL=export-xlsx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-xlsx.d.ts","sourceRoot":"","sources":["../../src/lib/export-xlsx.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5D,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,EACzC,QAAQ,EAAE,MAAM,QAiCjB"}
1
+ {"version":3,"file":"export-xlsx.d.ts","sourceRoot":"","sources":["../../src/lib/export-xlsx.ts"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5D,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,EACzC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,QAyBnB"}
@@ -0,0 +1,17 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * The `displayName` of a child element's component, or `undefined` when the
4
+ * child is a host tag.
5
+ *
6
+ * Several components in this package take configuration as marker children —
7
+ * `GridListNewButton`, `SubPageHeaderAction` — that render nothing and exist to
8
+ * be recognised by name. `child.type` is `string | JSXElementConstructor`, and
9
+ * only the second has a `displayName`, which is why reading it directly needs
10
+ * the narrowing this does once instead of a cast at every call site.
11
+ *
12
+ * Internal: not re-exported from `lib/index.ts`, because a marker protocol is a
13
+ * detail of the components that use it rather than something a product composes
14
+ * against.
15
+ */
16
+ export declare function markerName(child: ReactElement): string | undefined;
17
+ //# sourceMappingURL=react-markers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-markers.d.ts","sourceRoot":"","sources":["../../src/lib/react-markers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAIlE"}
@@ -1,6 +1,28 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
+ /**
4
+ * The language and region of a locale, in either spelling anything writes it.
5
+ *
6
+ * `pt_BR` is the Java and POSIX form; `pt-BR` is what BCP 47, `Intl`,
7
+ * `navigator.language`, i18next and this package's own `i18n.language` produce.
8
+ * Reading only the first was why `getFlagEmoji("pt-BR")` answered with a globe.
9
+ *
10
+ * Kept here rather than in `badge-locale.tsx`, where the other half of this
11
+ * lived: that file carries the language-to-country and country-override maps and
12
+ * pulls in React, and neither belongs on the path of a string utility.
13
+ */
14
+ export declare function parseLocale(locale: string): {
15
+ language: string;
16
+ region: string | null;
17
+ };
3
18
  export declare const truncateMiddle: (text: string, maxLength?: number) => string;
19
+ /**
20
+ * The flag for a locale's region, or 🌐 when it names none.
21
+ *
22
+ * A locale with no region — `pt` — still answers 🌐 rather than guessing a
23
+ * country from the language. `BadgeLocale` does make that guess, deliberately,
24
+ * from a table of its own; this is the strict reading and stays one.
25
+ */
4
26
  export declare const getFlagEmoji: (locale: string) => string;
5
27
  export declare const getHashedColor: (str: string) => {
6
28
  h: number;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,EACZ,YAAW,MAAW,KACrB,MAaF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,WAS1C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM;;;;;;;;;;;;CAmBzC,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAWA;AAED,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,EACZ,YAAW,MAAW,KACrB,MAkBF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,WAS1C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM;;;;;;;;;;;;CAmBzC,CAAC"}
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-sIsBdP_e.cjs");let n=require("react");n=e.t(n,1);let r=require("react/jsx-runtime"),i=require("@tabler/icons-react"),a=require("react-i18next"),o=require("react-router-dom");var s=({feature:e,name:s,onDelete:c,open:l,setOpen:u,trigger:d,blockedBy:f,title:p,description:m,confirmLabel:h})=>{let g=f&&f.length>0,_=(0,o.useNavigate)(),{t:v}=(0,a.useTranslation)(),[y,b]=(0,n.useState)(``),x=y===s;function S(e){u(e),e||b(``)}return(0,r.jsxs)(t.D,{open:l,onOpenChange:S,children:[d!==null&&(0,r.jsx)(t.I,{asChild:!0,children:d??(0,r.jsx)(t.u,{variant:`ghost`,size:`icon-sm`,children:(0,r.jsx)(i.IconTrash,{className:`size-5!`})})}),(0,r.jsx)(t.k,{className:`sm:max-w-md`,children:g?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.M,{children:[(0,r.jsx)(`div`,{className:`mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-amber-500/10 ring-1 ring-amber-500/20 mb-2`,children:(0,r.jsx)(i.IconAlertTriangle,{className:`size-6 text-amber-500`})}),(0,r.jsx)(t.F,{className:`text-center`,children:v(`dialog.cannotDelete`,{feature:e})}),(0,r.jsx)(t.A,{className:`text-center`,children:v(`dialog.inUse`,{name:s})})]}),(0,r.jsxs)(`div`,{className:`space-y-3`,children:[(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:v(`dialog.dependingSites`,{feature:e})}),(0,r.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:f.map(e=>{let n=e.language?t.n(e.language):void 0;return(0,r.jsx)(t.r,{text:e.name,href:e.href,onClick:e=>{u(!1),e&&_(e)},prefix:n?(0,r.jsx)(`img`,{src:`https://flagcdn.com/w40/${n}.png`,alt:e.language,className:`w-4 h-3 object-cover rounded-sm`}):void 0},e.id)})}),(0,r.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v(`dialog.removeDependencies`,{feature:e})})]}),(0,r.jsx)(t.j,{children:(0,r.jsx)(t.u,{onClick:()=>u(!1),variant:`outline`,className:`w-full`,children:v(`dialog.understood`)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.M,{children:[(0,r.jsx)(`div`,{className:`mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 ring-1 ring-red-500/20 mb-2`,children:(0,r.jsx)(i.IconTrash,{className:`size-6 text-red-500`})}),(0,r.jsx)(t.F,{className:`text-center`,children:p??v(`dialog.deleteFeature`,{feature:e})}),(0,r.jsx)(t.A,{className:`text-center`,children:m??v(`dialog.permanentDelete`,{name:s})})]}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`label`,{className:`text-sm text-muted-foreground`,children:[v(`dialog.typeToConfirm`),` `,(0,r.jsx)(`span`,{className:`font-mono font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded`,children:s}),` `,v(`dialog.toConfirm`)]}),(0,r.jsx)(t.l,{value:y,onChange:e=>b(e.target.value),placeholder:s,className:`font-mono text-sm`,autoFocus:!0})]}),(0,r.jsxs)(t.j,{className:`flex-col gap-2 sm:flex-col`,children:[(0,r.jsxs)(t.u,{onClick:c,variant:`destructive`,disabled:!x,className:`w-full`,children:[(0,r.jsx)(i.IconTrash,{className:`size-4`}),h??v(`dialog.deleteFeature`,{feature:e})]}),(0,r.jsx)(t.u,{onClick:()=>S(!1),variant:`ghost`,className:`w-full`,children:v(`common.cancel`)})]})]})})]})};function c({className:e,variant:n,size:i,to:a,onClick:s,children:c}){let l=t.U(t.d({variant:n,size:i,className:e}));return(0,r.jsx)(o.NavLink,{to:a,"data-slot":`gradient-button`,className:l,onClick:e=>{let t=typeof a==`string`?a:a.pathname;t&&globalThis.location.pathname===t&&globalThis.location.reload(),s&&s(e)},children:c})}var l=({icon:e,title:t,description:n,urlNew:i,buttonText:a})=>(0,r.jsx)(`div`,{className:`flex items-center justify-center px-6 py-16`,children:(0,r.jsx)(`div`,{className:`relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl`,children:(0,r.jsxs)(`div`,{className:`relative flex flex-col items-center text-center px-8 py-12 space-y-6`,children:[(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-2xl bg-gradient-to-br from-[var(--vg-accent-surface-strong)] to-[var(--vg-accent-surface-strong)] blur-xl animate-pulse`}),(0,r.jsx)(`div`,{className:`relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br vg-accent-solid shadow-lg shadow-[var(--vg-accent-line)] ring-4 ring-[var(--vg-accent-surface)]`,children:(0,r.jsx)(e,{className:`text-white`,size:30})})]}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:t}),(0,r.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto`,children:n})]}),i&&(0,r.jsx)(c,{size:`lg`,to:i,children:a})]})})}),u=({checkIsNotUndefined:e,error:n,tryAgainUrl:o,children:s})=>{let{t:c}=(0,a.useTranslation)();return n?(0,r.jsx)(l,{icon:i.IconAlertTriangleFilled,title:c(`common.errorLoading`),description:n,buttonText:c(`common.tryAgain`),urlNew:o}):e===void 0&&!n?(0,r.jsxs)(`div`,{className:`space-y-6 py-8 px-6 animate-pulse`,children:[(0,r.jsx)(t.c,{className:`h-8 w-1/3 rounded-md`}),(0,r.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:[`skeleton-1`,`skeleton-2`,`skeleton-3`].map(e=>(0,r.jsxs)(`div`,{className:`space-y-3 p-4 border rounded-xl bg-slate-50/50 dark:bg-slate-900/20`,children:[(0,r.jsx)(t.c,{className:`h-5 w-2/3`}),(0,r.jsx)(t.c,{className:`h-12 w-full`}),(0,r.jsx)(t.c,{className:`h-4 w-5/6`})]},e))}),(0,r.jsx)(`div`,{className:`pt-4`,children:(0,r.jsx)(t.c,{className:`h-10 w-32 rounded-lg`})})]}):(0,r.jsx)(r.Fragment,{children:s})};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
@@ -0,0 +1,224 @@
1
+ import { A as e, D as t, F as n, I as r, M as i, U as a, c as o, d as s, j as c, k as l, l as u, n as d, r as f, u as p } from "./badge-locale-BxI9TwkE.js";
2
+ import { useState as m } from "react";
3
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
4
+ import { IconAlertTriangle as v, IconAlertTriangleFilled as y, IconTrash as b } from "@tabler/icons-react";
5
+ import { useTranslation as x } from "react-i18next";
6
+ import { NavLink as S, useNavigate as C } from "react-router-dom";
7
+ //#region src/components/router/dialog.delete.tsx
8
+ var w = ({ feature: a, name: o, onDelete: s, open: y, setOpen: S, trigger: w, blockedBy: T, title: E, description: D, confirmLabel: O }) => {
9
+ let k = T && T.length > 0, A = C(), { t: j } = x(), [M, N] = m(""), P = M === o;
10
+ function F(e) {
11
+ S(e), e || N("");
12
+ }
13
+ return /* @__PURE__ */ _(t, {
14
+ open: y,
15
+ onOpenChange: F,
16
+ children: [w !== null && /* @__PURE__ */ g(r, {
17
+ asChild: !0,
18
+ children: w ?? /* @__PURE__ */ g(p, {
19
+ variant: "ghost",
20
+ size: "icon-sm",
21
+ children: /* @__PURE__ */ g(b, { className: "size-5!" })
22
+ })
23
+ }), /* @__PURE__ */ g(l, {
24
+ className: "sm:max-w-md",
25
+ children: k ? /* @__PURE__ */ _(h, { children: [
26
+ /* @__PURE__ */ _(i, { children: [
27
+ /* @__PURE__ */ g("div", {
28
+ className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-amber-500/10 ring-1 ring-amber-500/20 mb-2",
29
+ children: /* @__PURE__ */ g(v, { className: "size-6 text-amber-500" })
30
+ }),
31
+ /* @__PURE__ */ g(n, {
32
+ className: "text-center",
33
+ children: j("dialog.cannotDelete", { feature: a })
34
+ }),
35
+ /* @__PURE__ */ g(e, {
36
+ className: "text-center",
37
+ children: j("dialog.inUse", { name: o })
38
+ })
39
+ ] }),
40
+ /* @__PURE__ */ _("div", {
41
+ className: "space-y-3",
42
+ children: [
43
+ /* @__PURE__ */ g("p", {
44
+ className: "text-sm text-muted-foreground",
45
+ children: j("dialog.dependingSites", { feature: a })
46
+ }),
47
+ /* @__PURE__ */ g("div", {
48
+ className: "flex flex-wrap gap-2",
49
+ children: T.map((e) => {
50
+ let t = e.language ? d(e.language) : void 0;
51
+ return /* @__PURE__ */ g(f, {
52
+ text: e.name,
53
+ href: e.href,
54
+ onClick: (e) => {
55
+ S(!1), e && A(e);
56
+ },
57
+ prefix: t ? /* @__PURE__ */ g("img", {
58
+ src: `https://flagcdn.com/w40/${t}.png`,
59
+ alt: e.language,
60
+ className: "w-4 h-3 object-cover rounded-sm"
61
+ }) : void 0
62
+ }, e.id);
63
+ })
64
+ }),
65
+ /* @__PURE__ */ g("p", {
66
+ className: "text-xs text-muted-foreground",
67
+ children: j("dialog.removeDependencies", { feature: a })
68
+ })
69
+ ]
70
+ }),
71
+ /* @__PURE__ */ g(c, { children: /* @__PURE__ */ g(p, {
72
+ onClick: () => S(!1),
73
+ variant: "outline",
74
+ className: "w-full",
75
+ children: j("dialog.understood")
76
+ }) })
77
+ ] }) : /* @__PURE__ */ _(h, { children: [
78
+ /* @__PURE__ */ _(i, { children: [
79
+ /* @__PURE__ */ g("div", {
80
+ className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 ring-1 ring-red-500/20 mb-2",
81
+ children: /* @__PURE__ */ g(b, { className: "size-6 text-red-500" })
82
+ }),
83
+ /* @__PURE__ */ g(n, {
84
+ className: "text-center",
85
+ children: E ?? j("dialog.deleteFeature", { feature: a })
86
+ }),
87
+ /* @__PURE__ */ g(e, {
88
+ className: "text-center",
89
+ children: D ?? j("dialog.permanentDelete", { name: o })
90
+ })
91
+ ] }),
92
+ /* @__PURE__ */ _("div", {
93
+ className: "space-y-2",
94
+ children: [/* @__PURE__ */ _("label", {
95
+ className: "text-sm text-muted-foreground",
96
+ children: [
97
+ j("dialog.typeToConfirm"),
98
+ " ",
99
+ /* @__PURE__ */ g("span", {
100
+ className: "font-mono font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded",
101
+ children: o
102
+ }),
103
+ " ",
104
+ j("dialog.toConfirm")
105
+ ]
106
+ }), /* @__PURE__ */ g(u, {
107
+ value: M,
108
+ onChange: (e) => N(e.target.value),
109
+ placeholder: o,
110
+ className: "font-mono text-sm",
111
+ autoFocus: !0
112
+ })]
113
+ }),
114
+ /* @__PURE__ */ _(c, {
115
+ className: "flex-col gap-2 sm:flex-col",
116
+ children: [/* @__PURE__ */ _(p, {
117
+ onClick: s,
118
+ variant: "destructive",
119
+ disabled: !P,
120
+ className: "w-full",
121
+ children: [/* @__PURE__ */ g(b, { className: "size-4" }), O ?? j("dialog.deleteFeature", { feature: a })]
122
+ }), /* @__PURE__ */ g(p, {
123
+ onClick: () => F(!1),
124
+ variant: "ghost",
125
+ className: "w-full",
126
+ children: j("common.cancel")
127
+ })]
128
+ })
129
+ ] })
130
+ })]
131
+ });
132
+ };
133
+ //#endregion
134
+ //#region src/components/router/gradient-button-link.tsx
135
+ function T({ className: e, variant: t, size: n, to: r, onClick: i, children: o }) {
136
+ let c = a(s({
137
+ variant: t,
138
+ size: n,
139
+ className: e
140
+ }));
141
+ return /* @__PURE__ */ g(S, {
142
+ to: r,
143
+ "data-slot": "gradient-button",
144
+ className: c,
145
+ onClick: (e) => {
146
+ let t = typeof r == "string" ? r : r.pathname;
147
+ t && globalThis.location.pathname === t && globalThis.location.reload(), i && i(e);
148
+ },
149
+ children: o
150
+ });
151
+ }
152
+ //#endregion
153
+ //#region src/components/router/blank-slate.tsx
154
+ var E = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /* @__PURE__ */ g("div", {
155
+ className: "flex items-center justify-center px-6 py-16",
156
+ children: /* @__PURE__ */ g("div", {
157
+ className: "relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl",
158
+ children: /* @__PURE__ */ _("div", {
159
+ className: "relative flex flex-col items-center text-center px-8 py-12 space-y-6",
160
+ children: [
161
+ /* @__PURE__ */ _("div", {
162
+ className: "relative",
163
+ children: [/* @__PURE__ */ g("div", { className: "absolute inset-0 rounded-2xl bg-gradient-to-br from-[var(--vg-accent-surface-strong)] to-[var(--vg-accent-surface-strong)] blur-xl animate-pulse" }), /* @__PURE__ */ g("div", {
164
+ className: "relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br vg-accent-solid shadow-lg shadow-[var(--vg-accent-line)] ring-4 ring-[var(--vg-accent-surface)]",
165
+ children: /* @__PURE__ */ g(e, {
166
+ className: "text-white",
167
+ size: 30
168
+ })
169
+ })]
170
+ }),
171
+ /* @__PURE__ */ _("div", {
172
+ className: "space-y-2",
173
+ children: [/* @__PURE__ */ g("h2", {
174
+ className: "text-xl font-semibold tracking-tight",
175
+ children: t
176
+ }), /* @__PURE__ */ g("p", {
177
+ className: "text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto",
178
+ children: n
179
+ })]
180
+ }),
181
+ r && /* @__PURE__ */ g(T, {
182
+ size: "lg",
183
+ to: r,
184
+ children: i
185
+ })
186
+ ]
187
+ })
188
+ })
189
+ }), D = ({ checkIsNotUndefined: e, error: t, tryAgainUrl: n, children: r }) => {
190
+ let { t: i } = x();
191
+ return t ? /* @__PURE__ */ g(E, {
192
+ icon: y,
193
+ title: i("common.errorLoading"),
194
+ description: t,
195
+ buttonText: i("common.tryAgain"),
196
+ urlNew: n
197
+ }) : e === void 0 && !t ? /* @__PURE__ */ _("div", {
198
+ className: "space-y-6 py-8 px-6 animate-pulse",
199
+ children: [
200
+ /* @__PURE__ */ g(o, { className: "h-8 w-1/3 rounded-md" }),
201
+ /* @__PURE__ */ g("div", {
202
+ className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
203
+ children: [
204
+ "skeleton-1",
205
+ "skeleton-2",
206
+ "skeleton-3"
207
+ ].map((e) => /* @__PURE__ */ _("div", {
208
+ className: "space-y-3 p-4 border rounded-xl bg-slate-50/50 dark:bg-slate-900/20",
209
+ children: [
210
+ /* @__PURE__ */ g(o, { className: "h-5 w-2/3" }),
211
+ /* @__PURE__ */ g(o, { className: "h-12 w-full" }),
212
+ /* @__PURE__ */ g(o, { className: "h-4 w-5/6" })
213
+ ]
214
+ }, e))
215
+ }),
216
+ /* @__PURE__ */ g("div", {
217
+ className: "pt-4",
218
+ children: /* @__PURE__ */ g(o, { className: "h-10 w-32 rounded-lg" })
219
+ })
220
+ ]
221
+ }) : /* @__PURE__ */ g(h, { children: r });
222
+ };
223
+ //#endregion
224
+ export { w as i, E as n, T as r, D as t };
package/dist/preset.css CHANGED
@@ -17,9 +17,8 @@
17
17
  `--border`, etc.
18
18
  ============================================================= */
19
19
 
20
- /* Fonts referenced by `--font-sans` / `--font-brand` below. */
21
- @import "@fontsource-variable/inter";
22
- @import "@fontsource-variable/plus-jakarta-sans";
20
+ /* The faces `--font-sans` / `--font-brand` name are `./fonts`, imported
21
+ separately so a preset consumer carries tokens and not 741KB of woff2. */
23
22
 
24
23
  @custom-variant dark (&:is(.dark *, [data-theme="dark"] *));
25
24
 
@@ -105,6 +104,96 @@
105
104
  --vg-sidebar-border: oklch(0.922 0 0);
106
105
  --vg-sidebar-ring: oklch(0.708 0 0);
107
106
 
107
+ /* Bento tones — the two gradient stops of the tonal icon chip, which is the
108
+ most repeated visual in the bento layer: every hero, every form section,
109
+ every tile. A product re-keys a tone by redefining these two properties,
110
+ not by forking the component that renders it.
111
+
112
+ The values are the OKLCH the layer shipped with, so re-keying is a choice
113
+ rather than something that happened on the way here. Fixed across light and
114
+ dark on purpose: the chip carries the colour and the surface stays frosted,
115
+ so the two never compete. */
116
+ --vg-bento-tone-blue-from: oklch(54.6% 0.245 262.881);
117
+ --vg-bento-tone-blue-to: oklch(51.1% 0.262 276.966);
118
+ --vg-bento-tone-indigo-from: oklch(51.1% 0.262 276.966);
119
+ --vg-bento-tone-indigo-to: oklch(59.1% 0.293 322.896);
120
+ --vg-bento-tone-violet-from: oklch(54.1% 0.281 293.009);
121
+ --vg-bento-tone-violet-to: oklch(55.8% 0.288 302.321);
122
+ --vg-bento-tone-emerald-from: oklch(59.6% 0.145 163.225);
123
+ --vg-bento-tone-emerald-to: oklch(60% 0.118 184.704);
124
+ --vg-bento-tone-amber-from: oklch(76.9% 0.188 70.08);
125
+ --vg-bento-tone-amber-to: oklch(70.5% 0.213 47.604);
126
+ --vg-bento-tone-rose-from: oklch(58.6% 0.253 17.585);
127
+ --vg-bento-tone-rose-to: oklch(59.2% 0.249 0.584);
128
+ --vg-bento-tone-slate-from: oklch(44.6% 0.043 257.281);
129
+ --vg-bento-tone-slate-to: oklch(37.2% 0.044 257.287);
130
+
131
+ /* Bento status intents — the pills and the destructive menu item. Same reason
132
+ the tones are tokens: a shared component that names its own colours makes
133
+ one product look wrong. `-mark` is the dot and the border/background tint;
134
+ `-text` is the label, with a lighter value on dark where the tinted surface
135
+ is darker. Values are the OKLCH the layer shipped with. */
136
+ --vg-bento-on-mark: oklch(69.6% 0.17 162.48);
137
+ --vg-bento-on-text: oklch(50.8% 0.118 165.612);
138
+ --vg-bento-on-text-dark: oklch(76.5% 0.177 163.223);
139
+ --vg-bento-warn-mark: oklch(76.9% 0.188 70.08);
140
+ --vg-bento-warn-text: oklch(47.3% 0.137 46.201);
141
+ --vg-bento-warn-text-dark: oklch(82.8% 0.189 84.429);
142
+ --vg-bento-error-mark: oklch(63.7% 0.237 25.331);
143
+ --vg-bento-error-text: oklch(50.5% 0.213 27.518);
144
+ --vg-bento-error-text-dark: oklch(70.4% 0.191 22.216);
145
+ --vg-bento-danger-mark: oklch(64.5% 0.246 16.439);
146
+ --vg-bento-danger-text: oklch(51.4% 0.222 16.935);
147
+ --vg-bento-danger-text-dark: oklch(71.2% 0.194 13.428);
148
+ --vg-bento-danger-text-dark-hover: oklch(81% 0.117 11.638);
149
+ /* The pulse glow behind a live indicator. It shipped as a raw indigo inside a
150
+ keyframe, where the check that reads Tailwind class names could not see it. */
151
+ --vg-bento-pulse: oklch(58.5% 0.233 277.117);
152
+
153
+ /* The brand accent — the tinted icon chip, the ring around it, the accented
154
+ label, the solid primary fill. It shipped as a literal blue/indigo pair
155
+ spelled out in every page header, sidebar and empty state, which is why the
156
+ two products could not differ where they should and had to fork a header to
157
+ differ at all.
158
+
159
+ A product sets --vg-accent-from / -to / -text / -text-dark once, at the
160
+ root, and every shared component follows. The values here are the blue the
161
+ console shipped with, so re-keying is a choice rather than something that
162
+ happened on the way here. */
163
+ --vg-accent-from: oklch(62.3% 0.214 259.815);
164
+ --vg-accent-to: oklch(58.5% 0.233 277.117);
165
+ --vg-accent-text: oklch(54.6% 0.245 262.881);
166
+ --vg-accent-text-dark: oklch(70.7% 0.165 254.624);
167
+
168
+ /* Derived, and already resolved for the current theme — the .dark block below
169
+ re-points -fg, so a component writes text-[var(--vg-accent-fg)] once and
170
+ needs no dark: twin. The three surfaces are the tint, the strong tint and
171
+ the line, in the proportions the chip already uses.
172
+
173
+ Set the four source tokens on :root, not on a wrapper. A custom property
174
+ substitutes its var() references where it is *declared*, so everything
175
+ below is mixed against the --vg-accent-from declared here. Re-keying a
176
+ subtree changes what a utility class mixes inline — the chip, the solid
177
+ fill — and leaves these at the root's value, which looks like a partial
178
+ re-key and reads as a bug in the component. */
179
+ --vg-accent-fg: var(--vg-accent-text);
180
+ --vg-accent-surface: color-mix(in oklab, var(--vg-accent-from) 10%, transparent);
181
+ --vg-accent-surface-strong: color-mix(in oklab, var(--vg-accent-from) 20%, transparent);
182
+ --vg-accent-line: color-mix(in oklab, var(--vg-accent-from) 35%, transparent);
183
+
184
+ /* The accent as an interactive surface — the primary button, the checked
185
+ switch. On light the fill sits a step darker than the stops so white text
186
+ clears contrast; on dark the stops themselves are the fill and the hover
187
+ darkens instead. That asymmetry is why these are stated per theme rather
188
+ than mixed at the call site. */
189
+ --vg-accent-fill-from: color-mix(in oklab, var(--vg-accent-from) 88%, black);
190
+ --vg-accent-fill-to: color-mix(in oklab, var(--vg-accent-to) 88%, black);
191
+ --vg-accent-fill-from-hover: color-mix(in oklab, var(--vg-accent-from) 76%, black);
192
+ --vg-accent-fill-to-hover: color-mix(in oklab, var(--vg-accent-to) 76%, black);
193
+ --vg-accent-ring: color-mix(in oklab, var(--vg-accent-from) 50%, transparent);
194
+ --vg-accent-shadow: color-mix(in oklab, var(--vg-accent-from) 25%, transparent);
195
+ --vg-accent-shadow-hover: color-mix(in oklab, var(--vg-accent-from) 30%, transparent);
196
+
108
197
  /* Brand palette */
109
198
  --vg-brand: #c2410c;
110
199
  --vg-brand-dark: #9a3412;
@@ -183,6 +272,17 @@
183
272
  --vg-muted-foreground: oklch(0.708 0 0);
184
273
  --vg-accent: oklch(0.269 0 0);
185
274
  --vg-accent-foreground: oklch(0.985 0 0);
275
+ /* The brand accent's dark twin. The tint surfaces are color-mix over the same
276
+ stop and read correctly on either ground, so only the foreground and the
277
+ interactive fill re-point here. */
278
+ --vg-accent-fg: var(--vg-accent-text-dark);
279
+ --vg-accent-fill-from: var(--vg-accent-from);
280
+ --vg-accent-fill-to: var(--vg-accent-to);
281
+ --vg-accent-fill-from-hover: color-mix(in oklab, var(--vg-accent-from) 88%, black);
282
+ --vg-accent-fill-to-hover: color-mix(in oklab, var(--vg-accent-to) 88%, black);
283
+ --vg-accent-ring: color-mix(in oklab, var(--vg-accent-text-dark) 50%, transparent);
284
+ --vg-accent-shadow: color-mix(in oklab, var(--vg-accent-from) 20%, transparent);
285
+ --vg-accent-shadow-hover: color-mix(in oklab, var(--vg-accent-from) 25%, transparent);
186
286
  --vg-destructive: oklch(0.704 0.191 22.216);
187
287
  --vg-border: oklch(1 0 0 / 10%);
188
288
  --vg-input: oklch(1 0 0 / 15%);