@nxgt/material 3.10.2 → 3.12.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.
Files changed (158) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +10 -11
  3. package/dist/{async-slice-DDjaJY_F.js → async-slice-4qbER86I.js} +1 -1
  4. package/dist/button-BNjw-pnE.js +327 -0
  5. package/dist/button-group-context-CaP0X5p_.js +5 -0
  6. package/dist/{button-tones-BgZJ1tkD.js → button-tones-BwuVvAmd.js} +9 -1
  7. package/dist/{callout-view-DdJPdFrP.js → callout-view-C6voDS00.js} +1 -1
  8. package/dist/charts.js +5 -5
  9. package/dist/{chip-DpySRqCy.js → chip-DLgQTJBZ.js} +4 -4
  10. package/dist/{code-editor-BiA14xua.js → code-editor-BZbaYLvo.js} +8 -8
  11. package/dist/code-editor.js +7 -7
  12. package/dist/{code-language-items-C_dJ6GVs.js → code-language-items-BT5BO5w6.js} +2 -2
  13. package/dist/components/base.css +21 -6
  14. package/dist/components/components.css +6 -2
  15. package/dist/components/type-scale.css +194 -0
  16. package/dist/components/ui/actions/button/button.css +156 -0
  17. package/dist/components/ui/actions/button-group/button-group-standard.css +131 -0
  18. package/dist/components/ui/actions/button-group/button-group.css +4 -1
  19. package/dist/components/ui/actions/icon-button/icon-button.css +115 -0
  20. package/dist/components/ui/actions/morph-fill.css +62 -0
  21. package/dist/components/ui/feedback/toast/toast-expressive.css +17 -0
  22. package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
  23. package/dist/components/ui/layout/app-shell/activity-backdrop.css +0 -17
  24. package/dist/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
  25. package/dist/{components-BkF9N-Yx.js → components-yx1t_5_P.js} +13740 -13422
  26. package/dist/components.js +24 -24
  27. package/dist/{dialog-CkIYpJXk.js → dialog-BQp5IdFl.js} +147 -147
  28. package/dist/dnd.js +1 -1
  29. package/dist/{dropdown-menu-BC5Tbhb9.js → dropdown-menu-BsH9W_3C.js} +3 -3
  30. package/dist/editor-viewer.js +1 -1
  31. package/dist/editor.js +13 -13
  32. package/dist/{empty-state-SeAg2TOX.js → empty-state-WaU4-T2c.js} +5 -5
  33. package/dist/escape-owner-C4W_sOAU.js +116 -0
  34. package/dist/{field-blur-DPLsMufs.js → field-blur-CJHzVSh9.js} +1 -1
  35. package/dist/{field-blur-context-1ZwJgsHE.js → field-blur-context-Cft9s7Hg.js} +2 -2
  36. package/dist/{hover-card-Cox-tPDz.js → hover-card-C0fw2kLK.js} +72 -71
  37. package/dist/i18n.js +12 -12
  38. package/dist/{icon-badge-q3Ve8gra.js → icon-badge-DUAq9f7H.js} +4 -4
  39. package/dist/icon-button-ifTpXt0A.js +355 -0
  40. package/dist/{illustration-BfHRpVzM.js → illustration-BmQmvW_4.js} +1 -1
  41. package/dist/illustrations.js +2 -2
  42. package/dist/lib/components/ui/actions/button/button-tones.d.ts +16 -0
  43. package/dist/lib/components/ui/actions/button/button.d.ts +13 -0
  44. package/dist/lib/components/ui/actions/button/button.variants.d.ts +4 -3
  45. package/dist/lib/components/ui/actions/button-group/button-group-context.d.ts +16 -0
  46. package/dist/lib/components/ui/actions/button-group/button-group-reset.d.ts +13 -0
  47. package/dist/lib/components/ui/actions/button-group/button-group.d.ts +19 -2
  48. package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +3 -2
  49. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +18 -4
  50. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +34 -4
  51. package/dist/lib/components/ui/display/badge/badge.d.ts +7 -2
  52. package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +9 -1
  53. package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +16 -0
  54. package/dist/lib/components/ui/display/entity-header/partials/entity-header-actions.d.ts +6 -0
  55. package/dist/lib/components/ui/display/entity-header/partials/entity-header-body.d.ts +14 -0
  56. package/dist/lib/components/ui/display/entity-header/partials/entity-header-icon.d.ts +6 -0
  57. package/dist/lib/components/ui/display/entity-header/partials/shown.d.ts +2 -0
  58. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +8 -1
  59. package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +2 -1
  60. package/dist/lib/components/ui/display/stat-card/index.d.ts +1 -1
  61. package/dist/lib/components/ui/display/stat-card/partials/stat-card-compact.d.ts +12 -0
  62. package/dist/lib/components/ui/display/stat-card/stat-card-classes.d.ts +3 -2
  63. package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +2 -2
  64. package/dist/lib/components/ui/display/stat-card/types.d.ts +9 -0
  65. package/dist/lib/components/ui/feedback/alert/alert-variants.d.ts +18 -0
  66. package/dist/lib/components/ui/feedback/alert/alert.d.ts +2 -6
  67. package/dist/lib/components/ui/feedback/typing-indicator/typing-indicator.d.ts +1 -1
  68. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +1 -1
  69. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +1 -1
  70. package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +17 -0
  71. package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +3 -106
  72. package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +113 -0
  73. package/dist/lib/components/ui/layout/app-shell/app-breadcrumb.d.ts +2 -1
  74. package/dist/lib/components/ui/layout/app-shell/app-sidebar-icon-item.d.ts +13 -0
  75. package/dist/lib/components/ui/layout/app-shell/app-sidebar-label-item.d.ts +11 -0
  76. package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +6 -0
  77. package/dist/lib/components/ui/layout/app-shell/observe-layout.d.ts +11 -0
  78. package/dist/lib/components/ui/layout/app-shell/shape-units.d.ts +16 -0
  79. package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +13 -0
  80. package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
  81. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +14 -0
  82. package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +19 -0
  83. package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +1 -1
  84. package/dist/lib/components/ui/primitives/toggle/toggle.d.ts +1 -1
  85. package/dist/lib/components/ui/primitives/typography/typography.d.ts +17 -7
  86. package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +55 -0
  87. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +2 -2
  88. package/dist/lib/components/ui/tones.d.ts +1 -1
  89. package/dist/lib/i18n/translator.d.ts +1 -1
  90. package/dist/lib.js +2 -2
  91. package/dist/{line-path-BQeLQZ-P.js → line-path-C5pZGC49.js} +1 -1
  92. package/dist/main.js +29 -29
  93. package/dist/map.js +9 -9
  94. package/dist/material.css +1 -1
  95. package/dist/pdf-reader.js +1 -1
  96. package/dist/print.js +1 -1
  97. package/dist/{public-CtpsxV4I.js → public-B0Nq_yYV.js} +524 -524
  98. package/dist/{render-json-DyFYFIkZ.js → render-json-BOhvPnSv.js} +1 -1
  99. package/dist/{rich-code-block-C2Fp_FDU.js → rich-code-block-v7WmeZp9.js} +5 -5
  100. package/dist/{rich-text-viewer-LO1IZCWs.js → rich-text-viewer-W15XIwah.js} +2 -2
  101. package/dist/{skeleton-Bmp4gWAH.js → skeleton-DSdtr2qc.js} +1 -1
  102. package/dist/{sortable-provider-pVaEZzty.js → sortable-provider-CgDTolQR.js} +3 -3
  103. package/dist/{spinner-CsHcmcpF.js → spinner-BtSIYVrC.js} +3 -3
  104. package/dist/{state-scenes-SGNyZjTz.js → state-scenes-BX03WmSu.js} +1 -1
  105. package/dist/styles.css +2 -0
  106. package/dist/theme-picker.js +3 -3
  107. package/dist/{theme-toggle-oU-fh6WE.js → theme-toggle-B2Pehdhn.js} +2 -2
  108. package/dist/{toggle-group-j8zaxEg1.js → toggle-group-BMJNcFAC.js} +1 -1
  109. package/dist/{toolbar-items-CqHvlTU8.js → toolbar-items-rUHdVqAq.js} +399 -398
  110. package/dist/{tooltip-rhbqNmr3.js → tooltip-CkttDIab.js} +1 -1
  111. package/dist/{translate-material-CGZljjp1.js → translate-material-Bd_KgfB8.js} +1 -1
  112. package/dist/{translator-DCYO4Ij3.js → translator-Dje8HrNz.js} +5 -5
  113. package/dist/{use-chat-composer-nWWfVyrK.js → use-chat-composer-B0_STpQN.js} +4173 -4173
  114. package/dist/{use-material-translation-DkxcLbLM.js → use-material-translation-B3V_bz-5.js} +1 -1
  115. package/dist/{utils-Bcd2Z3ea.js → utils-BLfntITJ.js} +14 -1
  116. package/docs/components/buttons-and-actions.md +64 -15
  117. package/docs/components/data-display.md +40 -9
  118. package/docs/components/feedback-and-status.md +12 -1
  119. package/docs/components/navigation-and-layout.md +4 -3
  120. package/docs/components/primitives.md +52 -10
  121. package/docs/guides/app-shell.md +52 -8
  122. package/docs/guides/backgrounds.md +2 -0
  123. package/docs/guides/theming.md +55 -3
  124. package/docs/previews/buttons-actions-button.webp +0 -0
  125. package/docs/previews/buttons-actions-iconbutton.webp +0 -0
  126. package/docs/previews/data-display-badge.webp +0 -0
  127. package/docs/previews/data-display-entityheader.webp +0 -0
  128. package/docs/previews/data-display-listtile.webp +0 -0
  129. package/docs/previews/data-display-statcard.webp +0 -0
  130. package/docs/previews/feedback-status-banner.webp +0 -0
  131. package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
  132. package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
  133. package/docs/previews/navigation-layout-appshell.webp +0 -0
  134. package/docs/previews/navigation-layout-sidebar.webp +0 -0
  135. package/docs/previews/primitives-typography.webp +0 -0
  136. package/docs/roadmap.md +53 -4
  137. package/docs/troubleshooting.md +75 -4
  138. package/lib/components/base.css +21 -6
  139. package/lib/components/components.css +6 -2
  140. package/lib/components/type-scale.css +194 -0
  141. package/lib/components/ui/actions/button/button.css +156 -0
  142. package/lib/components/ui/actions/button-group/button-group-standard.css +131 -0
  143. package/lib/components/ui/actions/button-group/button-group.css +4 -1
  144. package/lib/components/ui/actions/icon-button/icon-button.css +115 -0
  145. package/lib/components/ui/actions/morph-fill.css +62 -0
  146. package/lib/components/ui/feedback/toast/toast-expressive.css +17 -0
  147. package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
  148. package/lib/components/ui/layout/app-shell/activity-backdrop.css +0 -17
  149. package/lib/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
  150. package/lib/styles.css +2 -0
  151. package/package.json +2 -1
  152. package/dist/button-DbfdITBB.js +0 -322
  153. package/dist/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
  154. package/dist/components/ui/actions/icon-button/icon-button-morph.css +0 -152
  155. package/dist/escape-owner-CripBce_.js +0 -57
  156. package/dist/icon-button-DJcWpIhu.js +0 -319
  157. package/lib/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
  158. package/lib/components/ui/actions/icon-button/icon-button-morph.css +0 -152
@@ -1,322 +0,0 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { n as t, t as n } from "./dist-DVRQkaTK.js";
3
- import { o as r, t as i } from "./tooltip-rhbqNmr3.js";
4
- import { t as a } from "./spinner-CsHcmcpF.js";
5
- import { i as o, r as s, t as c } from "./button-tones-BgZJ1tkD.js";
6
- import { t as l } from "./has-text-content-Ds2dkHX_.js";
7
- import { Children as u, Fragment as d, cloneElement as f, isValidElement as p, useCallback as m, useContext as h, useEffect as g, useRef as _, useState as v } from "react";
8
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
- //#region lib/components/ui/actions/button/busy-click-capture.ts
10
- function x(e, t, n) {
11
- return (r) => {
12
- if (e || t.isLocked()) {
13
- r.preventDefault(), r.stopPropagation();
14
- return;
15
- }
16
- t.lock(), n?.(r);
17
- };
18
- }
19
- //#endregion
20
- //#region lib/components/ui/actions/button/button.variants.ts
21
- var S = r("inline-flex center truncate **:truncate gap-2 h-min cursor-pointer whitespace-nowrap rounded-full text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 aria-busy:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error px-4 py-2 has-[>svg]:px-3", {
22
- variants: {
23
- variant: {
24
- filled: "shadow-xs",
25
- tonal: "shadow-xs",
26
- ghost: "",
27
- outlined: "border shadow-xs",
28
- link: "focus:underline underline-offset-4 hover:underline"
29
- },
30
- color: {
31
- primary: null,
32
- secondary: null,
33
- info: null,
34
- warning: null,
35
- default: null,
36
- error: null,
37
- success: null
38
- },
39
- size: {
40
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
41
- xs: "h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
42
- sm: "h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5",
43
- lg: "h-10 rounded-full px-6 has-[>svg]:px-4",
44
- icon: "size-9 px-0 py-0 has-[>svg]:px-0",
45
- "icon-xs": "size-6 rounded-full px-0 py-0 has-[>svg]:px-0 [&_svg:not([class*='size-'])]:size-3",
46
- "icon-sm": "size-8 px-0 py-0 has-[>svg]:px-0",
47
- "icon-lg": "size-10 px-0 py-0 has-[>svg]:px-0"
48
- }
49
- },
50
- defaultVariants: {
51
- variant: "filled",
52
- color: "primary"
53
- },
54
- compoundVariants: [
55
- {
56
- variant: "filled",
57
- color: "primary",
58
- class: "bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--color-primary)_90%,black)] [&_svg]:data-[slot=icon]:text-primary-foreground active:bg-[color-mix(in_oklab,var(--color-primary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-primary)_85%,black)]"
59
- },
60
- {
61
- variant: "filled",
62
- color: "secondary",
63
- class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-secondary)_50%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))]"
64
- },
65
- {
66
- variant: "filled",
67
- color: "success",
68
- class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-success)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-success)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))]"
69
- },
70
- {
71
- variant: "filled",
72
- color: "info",
73
- class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-info)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-info)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))]"
74
- },
75
- {
76
- variant: "filled",
77
- color: "warning",
78
- class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-warning)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))]"
79
- },
80
- {
81
- variant: "filled",
82
- color: "error",
83
- class: "bg-error text-error-foreground hover:bg-[color-mix(in_oklab,var(--color-error)_90%,black)] [&_svg]:data-[slot=icon]:text-error-foreground active:bg-[color-mix(in_oklab,var(--color-error)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-error)_85%,black)]"
84
- },
85
- {
86
- variant: "filled",
87
- color: "default",
88
- class: "bg-foreground text-background hover:bg-[color-mix(in_oklab,var(--color-foreground)_90%,var(--color-background))] [&_svg]:data-[slot=icon]:text-foreground active:bg-[color-mix(in_oklab,var(--color-foreground)_70%,var(--color-background))] focus:bg-[color-mix(in_oklab,var(--color-foreground)_80%,var(--color-background))]"
89
- },
90
- {
91
- variant: "tonal",
92
- color: "primary",
93
- class: `${s.primary} ${c.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
94
- },
95
- {
96
- variant: "tonal",
97
- color: "secondary",
98
- class: `${s.secondary} ${c.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
99
- },
100
- {
101
- variant: "tonal",
102
- color: "info",
103
- class: `${s.info} ${c.info} bg-info/15 hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
104
- },
105
- {
106
- variant: "tonal",
107
- color: "success",
108
- class: `${s.success} ${c.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
109
- },
110
- {
111
- variant: "tonal",
112
- color: "warning",
113
- class: `${s.warning} ${c.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
114
- },
115
- {
116
- variant: "tonal",
117
- color: "error",
118
- class: `${s.error} ${c.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
119
- },
120
- {
121
- variant: "tonal",
122
- color: "default",
123
- class: `${s.default} ${c.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
124
- },
125
- {
126
- variant: "ghost",
127
- color: "primary",
128
- class: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50"
129
- },
130
- {
131
- variant: "ghost",
132
- color: "default",
133
- class: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50"
134
- },
135
- {
136
- variant: "ghost",
137
- color: "secondary",
138
- class: `${s.secondary} ${c.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
139
- },
140
- {
141
- variant: "ghost",
142
- color: "success",
143
- class: `${s.success} ${c.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
144
- },
145
- {
146
- variant: "ghost",
147
- color: "info",
148
- class: `${s.info} ${c.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
149
- },
150
- {
151
- variant: "ghost",
152
- color: "warning",
153
- class: `${s.warning} ${c.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
154
- },
155
- {
156
- variant: "ghost",
157
- color: "error",
158
- class: `${s.error} ${c.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
159
- },
160
- {
161
- variant: "outlined",
162
- color: "primary",
163
- class: `${s.primary} ${c.primary} border-primary/50 focus:bg-primary/10 hover:bg-primary/10`
164
- },
165
- {
166
- variant: "outlined",
167
- color: "secondary",
168
- class: `${s.secondary} ${c.secondary} border-secondary/50 focus:bg-secondary/10 hover:bg-secondary/10`
169
- },
170
- {
171
- variant: "outlined",
172
- color: "info",
173
- class: `${s.info} ${c.info} border-info/50 focus:bg-info/10 hover:bg-info/10`
174
- },
175
- {
176
- variant: "outlined",
177
- color: "success",
178
- class: `${s.success} ${c.success} border-success/50 focus:bg-success/10 hover:bg-success/10`
179
- },
180
- {
181
- variant: "outlined",
182
- color: "warning",
183
- class: `${s.warning} ${c.warning} border-warning/50 focus:bg-warning/10 hover:bg-warning/10`
184
- },
185
- {
186
- variant: "outlined",
187
- color: "error",
188
- class: `${s.error} ${c.error} border-error/50 focus:bg-error/10 hover:bg-error/10`
189
- },
190
- {
191
- variant: "outlined",
192
- color: "default",
193
- class: `${s.default} ${c.default} border-foreground/50 focus:bg-foreground/10 hover:bg-foreground/10`
194
- },
195
- {
196
- variant: "link",
197
- color: "primary",
198
- class: `${s.primary} ${c.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
199
- },
200
- {
201
- variant: "link",
202
- color: "secondary",
203
- class: `${s.secondary} ${c.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
204
- },
205
- {
206
- variant: "link",
207
- color: "success",
208
- class: `${s.success} ${c.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
209
- },
210
- {
211
- variant: "link",
212
- color: "info",
213
- class: `${s.info} ${c.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
214
- },
215
- {
216
- variant: "link",
217
- color: "warning",
218
- class: `${s.warning} ${c.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
219
- },
220
- {
221
- variant: "link",
222
- color: "error",
223
- class: `${s.error} ${c.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
224
- },
225
- {
226
- variant: "link",
227
- color: "default",
228
- class: `${s.default} ${c.default} hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
229
- }
230
- ]
231
- }), C = ((e) => S(e?.variant === "ghost" && e.color === null ? {
232
- ...e,
233
- color: void 0
234
- } : e)), w = {
235
- xs: "min-h-6",
236
- sm: "min-h-8",
237
- default: "min-h-9",
238
- lg: "min-h-10"
239
- };
240
- function T(e, t) {
241
- return !e || t?.startsWith("icon") ? !1 : `h-auto ${t ? w[t] : ""} whitespace-normal **:whitespace-normal text-center`;
242
- }
243
- //#endregion
244
- //#region lib/components/ui/actions/button/label-text.tsx
245
- function E(e) {
246
- let t = [], n = 0, r = [], i = () => {
247
- if (r.length === 0) return;
248
- let e = r.join("");
249
- r = [], e.trim() === "" ? t.push(e) : t.push(/* @__PURE__ */ y("span", {
250
- "data-slot": "button-label",
251
- children: e
252
- }, `label-${n++}`));
253
- };
254
- for (let n of u.toArray(e)) {
255
- if (typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
256
- r.push(n);
257
- continue;
258
- }
259
- i(), t.push(D(n));
260
- }
261
- return i(), t;
262
- }
263
- function D(e) {
264
- return p(e) && e.type === d ? f(e, void 0, E(e.props.children)) : e;
265
- }
266
- //#endregion
267
- //#region lib/components/ui/actions/button/use-click-lock.ts
268
- var O = 1e3;
269
- function k(e, t) {
270
- let n = _(!1), r = _(!1), i = _(void 0), [a, o] = v(!1), s = m(() => {
271
- n.current = !1, r.current = !1, clearTimeout(i.current), o(!1);
272
- }, []), c = m(() => {
273
- e && (n.current = !0, o(!0), clearTimeout(i.current), i.current = setTimeout(() => {
274
- r.current || s();
275
- }, O));
276
- }, [e, s]);
277
- return g(() => {
278
- n.current && (t ? r.current = !0 : r.current && s());
279
- }, [t, s]), g(() => () => clearTimeout(i.current), []), {
280
- locked: a,
281
- lock: c,
282
- isLocked: m(() => n.current, [])
283
- };
284
- }
285
- //#endregion
286
- //#region lib/components/ui/actions/button/button.tsx
287
- function A({ className: r, variant: i = "filled", asChild: s = !1, children: c, color: u, size: d, loading: f = !1, lockOnClick: p, spinnerVariant: m = "2", wrap: g, disabled: _, onClickCapture: v, type: S = "button", ...w }) {
288
- let D = s ? n : "button", O = h(o) || !!(w["aria-label"] || w["aria-labelledby"]) || l(c), A = k(p, f), j = f || A.locked, M = x(j, A, v);
289
- return /* @__PURE__ */ y(o, {
290
- value: O,
291
- children: /* @__PURE__ */ b(D, {
292
- "data-slot": "button",
293
- "data-variant": i,
294
- "data-color": u,
295
- "data-size": d,
296
- className: e("w-fit max-w-full truncate justify-center line-clamp-1 text-ellipsis duration-500", C({
297
- variant: i,
298
- color: u,
299
- size: d
300
- }), T(g, d), r),
301
- type: s ? void 0 : S,
302
- disabled: _,
303
- ...w,
304
- "aria-disabled": j || w["aria-disabled"],
305
- "aria-busy": j || w["aria-busy"],
306
- onClickCapture: M,
307
- children: [j && /* @__PURE__ */ y(a, {
308
- variant: m,
309
- color: i === "filled" ? "light" : u,
310
- className: e("starting:scale-0 duration-500", m === "4" ? "size-7.5" : "size-4.5")
311
- }), /* @__PURE__ */ y(t, { children: s ? c : E(c) })]
312
- })
313
- });
314
- }
315
- function j({ tooltip: e, ...t }) {
316
- return e ? /* @__PURE__ */ y(i, {
317
- content: e,
318
- children: /* @__PURE__ */ y(A, { ...t })
319
- }) : /* @__PURE__ */ y(A, { ...t });
320
- }
321
- //#endregion
322
- export { x as a, C as i, k as n, E as r, j as t };
@@ -1,65 +0,0 @@
1
- /* A morph `IconButton` toggle (icon-button-morph.css) by medium: the 14px
2
- * widening from 600px wide, the colour change only under reduced motion,
3
- * `SelectedItem` in forced colours. */
4
- @layer utilities {
5
- @media (min-width: 600px) {
6
- [data-icon-button][data-morph]:not(
7
- [data-shape],
8
- .nxgt-toolbar-item,
9
- [data-toolbar-item]
10
- ) {
11
- --ib-morph: 14px;
12
- }
13
- }
14
- @media (prefers-reduced-motion: reduce) {
15
- [data-icon-button][data-morph]:not(
16
- [data-shape],
17
- .nxgt-toolbar-item,
18
- [data-toolbar-item]
19
- ),
20
- [data-icon-button][data-morph]:not(
21
- [data-shape],
22
- .nxgt-toolbar-item,
23
- [data-toolbar-item]
24
- )::before {
25
- transition:
26
- background-color 180ms var(--nxgt-ease-effects),
27
- color 180ms var(--nxgt-ease-effects);
28
- }
29
- }
30
- @media (forced-colors: active) {
31
- [data-icon-button][data-morph][aria-pressed="true"]:not(
32
- [data-shape],
33
- .nxgt-toolbar-item,
34
- [data-toolbar-item]
35
- ) {
36
- color: SelectedItemText;
37
- forced-color-adjust: none;
38
- }
39
- [data-icon-button][data-morph][aria-pressed="true"]:not(
40
- [data-shape],
41
- .nxgt-toolbar-item,
42
- [data-toolbar-item]
43
- )::before {
44
- background: SelectedItem;
45
- }
46
- [data-icon-button][data-morph][aria-pressed="true"]:not(
47
- [data-shape],
48
- .nxgt-toolbar-item,
49
- [data-toolbar-item]
50
- )
51
- svg {
52
- color: SelectedItemText;
53
- stroke: SelectedItemText;
54
- }
55
- [data-icon-button][data-morph][aria-pressed="true"]:not(
56
- [data-shape],
57
- .nxgt-toolbar-item,
58
- [data-toolbar-item]
59
- ):focus-visible::before {
60
- box-shadow: none;
61
- outline: 2px solid Highlight;
62
- outline-offset: 2px;
63
- }
64
- }
65
- }
@@ -1,152 +0,0 @@
1
- /* A toggle `IconButton` (`aria-pressed`, no `shape`): pressed, it is filled
2
- * with its colour. `data-morph="pill"` also widens it by `--ib-morph` (14px;
3
- * 0 below 600px, where only the colour changes), `round` stays a circle. The
4
- * pill is the button's `::before`, `--ib-morph` / 2 wider on each side, and the
5
- * same amount of margin makes room for it, so any size class works. The
6
- * motion and the tokens are Toolbar morph's (`--nxgt-spring-fast`).
7
- * Toolbar items keep the Toolbar's own look. */
8
- @layer utilities {
9
- [data-icon-button][data-morph]:not(
10
- [data-shape],
11
- .nxgt-toolbar-item,
12
- [data-toolbar-item]
13
- ) {
14
- --ib-morph: 0px;
15
- --ib-on: var(--color-primary);
16
- --ib-on-fg: var(--color-primary-foreground);
17
- isolation: isolate;
18
- transition:
19
- margin var(--nxgt-spring-fast-duration) var(--nxgt-spring-fast),
20
- color 180ms var(--nxgt-ease-effects),
21
- border-color 180ms var(--nxgt-ease-effects),
22
- box-shadow 180ms var(--nxgt-ease-effects),
23
- background-color 180ms var(--nxgt-ease-effects),
24
- opacity 180ms var(--nxgt-ease-effects);
25
- }
26
- [data-icon-button][data-morph]:not(
27
- [data-shape],
28
- .nxgt-toolbar-item,
29
- [data-toolbar-item]
30
- )::before {
31
- content: "";
32
- position: absolute;
33
- inset-block: calc(-1 * var(--ib-bw, 0px));
34
- inset-inline: calc(
35
- var(--ib-morph) /
36
- -2 *
37
- var(--ib-grow, 0) -
38
- var(--ib-bw, 0px)
39
- );
40
- z-index: -1;
41
- border-radius: 999px;
42
- background: transparent;
43
- transition:
44
- inset var(--nxgt-spring-fast-duration) var(--nxgt-spring-fast),
45
- border-radius var(--nxgt-spring-fast-duration) var(--nxgt-spring-fast),
46
- background-color 180ms var(--nxgt-ease-effects);
47
- }
48
- /* `position` has no specificity, so a utility (PasswordField's `absolute`) wins. */
49
- :where(
50
- [data-icon-button][data-morph]:not(
51
- [data-shape],
52
- .nxgt-toolbar-item,
53
- [data-toolbar-item]
54
- )
55
- ) {
56
- position: relative;
57
- }
58
- /* The outlined variant's 1px border sits outside the padding box the pill is placed in. */
59
- [data-icon-button][data-morph][data-variant="outlined"] {
60
- --ib-bw: 1px;
61
- }
62
- [data-icon-button][data-morph][data-color="secondary"] {
63
- --ib-on: var(--color-secondary);
64
- --ib-on-fg: var(--color-secondary-foreground);
65
- }
66
- [data-icon-button][data-morph][data-color="success"] {
67
- --ib-on: var(--color-success);
68
- --ib-on-fg: var(--color-success-foreground);
69
- }
70
- [data-icon-button][data-morph][data-color="info"] {
71
- --ib-on: var(--color-info);
72
- --ib-on-fg: var(--color-info-foreground);
73
- }
74
- [data-icon-button][data-morph][data-color="warning"] {
75
- --ib-on: var(--color-warning);
76
- --ib-on-fg: var(--color-warning-foreground);
77
- }
78
- [data-icon-button][data-morph][data-color="error"] {
79
- --ib-on: var(--color-error);
80
- --ib-on-fg: var(--color-error-foreground);
81
- }
82
- [data-icon-button][data-morph][data-color="default"] {
83
- --ib-on: var(--color-foreground);
84
- --ib-on-fg: var(--color-background);
85
- }
86
- /* Pressed: the button's own surface gives way to the pill. */
87
- [data-icon-button][data-morph][aria-pressed="true"]:not(
88
- [data-shape],
89
- .nxgt-toolbar-item,
90
- [data-toolbar-item]
91
- ) {
92
- background: transparent;
93
- border-color: transparent;
94
- box-shadow: none;
95
- color: var(--ib-on-fg);
96
- }
97
- [data-icon-button][data-morph][aria-pressed="true"]:not(
98
- [data-shape],
99
- .nxgt-toolbar-item,
100
- [data-toolbar-item]
101
- )
102
- svg {
103
- color: var(--ib-on-fg);
104
- stroke: var(--ib-on-fg);
105
- }
106
- [data-icon-button][data-morph][aria-pressed="true"]:not(
107
- [data-shape],
108
- .nxgt-toolbar-item,
109
- [data-toolbar-item]
110
- )::before {
111
- background: var(--ib-on);
112
- }
113
- [data-icon-button][data-morph="pill"][aria-pressed="true"]:not(
114
- [data-shape],
115
- .nxgt-toolbar-item,
116
- [data-toolbar-item]
117
- ) {
118
- --ib-grow: 1;
119
- margin-inline: calc(var(--ib-morph) / 2);
120
- }
121
- [data-icon-button][data-morph][aria-pressed="true"]:not(
122
- [data-shape],
123
- .nxgt-toolbar-item,
124
- [data-toolbar-item]
125
- ):hover:not(:disabled)::before {
126
- background: color-mix(in oklab, var(--ib-on-fg) 10%, var(--ib-on));
127
- }
128
- /* Pointer down: the corners squeeze. */
129
- [data-icon-button][data-morph]:not(
130
- [data-shape],
131
- .nxgt-toolbar-item,
132
- [data-toolbar-item]
133
- ):active:not(:disabled)::before {
134
- border-radius: 30%;
135
- }
136
- /* The ring follows the pill. */
137
- [data-icon-button][data-morph][aria-pressed="true"]:not(
138
- [data-shape],
139
- .nxgt-toolbar-item,
140
- [data-toolbar-item]
141
- ):focus-visible {
142
- box-shadow: none;
143
- }
144
- [data-icon-button][data-morph][aria-pressed="true"]:not(
145
- [data-shape],
146
- .nxgt-toolbar-item,
147
- [data-toolbar-item]
148
- ):focus-visible::before {
149
- box-shadow: 0 0 0 3px
150
- color-mix(in oklab, var(--color-ring) 50%, transparent);
151
- }
152
- }
@@ -1,57 +0,0 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { t } from "./dist-DVRQkaTK.js";
3
- import { o as n } from "./tooltip-rhbqNmr3.js";
4
- import { jsx as r } from "react/jsx-runtime";
5
- //#region lib/components/ui/primitives/typography/typography.tsx
6
- var i = n("", {
7
- variants: {
8
- variant: {
9
- normal: "text-sm",
10
- "huge-larger": "text-8xl font-semibold",
11
- "huge-large": "text-8xl font-semibold",
12
- "huge-medium": "text-7xl font-semibold",
13
- "huge-small": "text-6xl font-semibold",
14
- "headline-larger": "text-5xl font-semibold",
15
- "headline-large": "text-4xl font-semibold",
16
- "headline-medium": "text-3xl font-semibold",
17
- "headline-small": "text-2xl font-semibold",
18
- "title-large": "text-xl font-semibold",
19
- "title-medium": "text-lg font-semibold",
20
- "title-small": "text-base font-semibold",
21
- "body-medium": "text-sm",
22
- "body-small": "text-xs",
23
- caption: "text-[10px] text-muted-foreground"
24
- },
25
- tone: {
26
- default: "",
27
- muted: "text-muted-foreground",
28
- primary: "text-primary-text",
29
- error: "text-error-text"
30
- }
31
- },
32
- defaultVariants: {
33
- variant: "normal",
34
- tone: "default"
35
- }
36
- });
37
- function a({ className: n, variant: a, tone: o, as: s = "div", asChild: c = !1, ...l }) {
38
- return /* @__PURE__ */ r(c ? t : s, {
39
- "data-test": "typography",
40
- className: e(i({
41
- variant: a,
42
- tone: o,
43
- className: n
44
- })),
45
- ...l
46
- });
47
- }
48
- //#endregion
49
- //#region lib/components/ui/overlays/dialog/escape-owner.ts
50
- var o = /* @__PURE__ */ new WeakSet(), s = "data-escape-owner";
51
- function c(e, t) {
52
- let n = e.target?.closest?.(`[${s}]`);
53
- !n || n === t || !t?.contains(n) || (o.add(e), e.preventDefault());
54
- }
55
- var l = (e) => o.has(e);
56
- //#endregion
57
- export { i as a, a as i, l as n, c as r, s as t };