@linyao.tw/ui 1.0.0 → 1.1.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 (175) hide show
  1. package/README.md +9 -1
  2. package/dist/components/date-time/calendar.js +7 -6
  3. package/dist/components/date-time/calendar.js.map +1 -1
  4. package/dist/components/date-time/date-field.js +9 -8
  5. package/dist/components/date-time/date-field.js.map +1 -1
  6. package/dist/components/date-time/date-picker.js +7 -6
  7. package/dist/components/date-time/date-picker.js.map +1 -1
  8. package/dist/components/date-time/date-range-picker.js +7 -6
  9. package/dist/components/date-time/date-range-picker.js.map +1 -1
  10. package/dist/components/date-time/index.js +0 -1
  11. package/dist/components/date-time/shared.d.ts +0 -1
  12. package/dist/components/date-time/shared.js +6 -9
  13. package/dist/components/date-time/shared.js.map +1 -1
  14. package/dist/components/date-time/time-field.js +7 -6
  15. package/dist/components/date-time/time-field.js.map +1 -1
  16. package/dist/components/feedback/alert.js +34 -34
  17. package/dist/components/feedback/alert.js.map +1 -1
  18. package/dist/components/feedback/banner.js +14 -14
  19. package/dist/components/feedback/banner.js.map +1 -1
  20. package/dist/components/feedback/empty-state.d.ts +2 -1
  21. package/dist/components/feedback/empty-state.js +30 -31
  22. package/dist/components/feedback/empty-state.js.map +1 -1
  23. package/dist/components/feedback/feedback.types.d.ts +0 -1
  24. package/dist/components/feedback/feedback.types.js +2 -5
  25. package/dist/components/feedback/feedback.types.js.map +1 -1
  26. package/dist/components/feedback/index.d.ts +8 -8
  27. package/dist/components/feedback/meter.js +20 -21
  28. package/dist/components/feedback/meter.js.map +1 -1
  29. package/dist/components/feedback/progress.js +20 -21
  30. package/dist/components/feedback/progress.js.map +1 -1
  31. package/dist/components/feedback/skeleton.js +10 -11
  32. package/dist/components/feedback/skeleton.js.map +1 -1
  33. package/dist/components/feedback/spinner.js +24 -25
  34. package/dist/components/feedback/spinner.js.map +1 -1
  35. package/dist/components/feedback/toast.js +22 -21
  36. package/dist/components/feedback/toast.js.map +1 -1
  37. package/dist/components/forms/{CodeField.d.ts → code-field.d.ts} +1 -1
  38. package/dist/components/forms/code-field.js +65 -0
  39. package/dist/components/forms/code-field.js.map +1 -0
  40. package/dist/components/forms/{FileUpload.d.ts → file-upload.d.ts} +1 -1
  41. package/dist/components/forms/{FileUpload.js → file-upload.js} +127 -111
  42. package/dist/components/forms/file-upload.js.map +1 -0
  43. package/dist/components/forms/index.d.ts +6 -6
  44. package/dist/components/forms/{Input.js → input.js} +3 -3
  45. package/dist/components/forms/input.js.map +1 -0
  46. package/dist/components/forms/internal.d.ts +0 -2
  47. package/dist/components/forms/internal.js +12 -17
  48. package/dist/components/forms/internal.js.map +1 -1
  49. package/dist/components/forms/number-field.js +73 -0
  50. package/dist/components/forms/number-field.js.map +1 -0
  51. package/dist/components/forms/otp-field.js +57 -0
  52. package/dist/components/forms/otp-field.js.map +1 -0
  53. package/dist/components/forms/{TextField.d.ts → text-field.d.ts} +5 -0
  54. package/dist/components/forms/text-field.js +200 -0
  55. package/dist/components/forms/text-field.js.map +1 -0
  56. package/dist/components/foundations/{Avatar.js → avatar.js} +3 -3
  57. package/dist/components/foundations/avatar.js.map +1 -0
  58. package/dist/components/foundations/{Badge.d.ts → badge.d.ts} +1 -1
  59. package/dist/components/foundations/{Badge.js → badge.js} +3 -3
  60. package/dist/components/foundations/badge.js.map +1 -0
  61. package/dist/components/foundations/{Button.js → button.js} +3 -3
  62. package/dist/components/foundations/button.js.map +1 -0
  63. package/dist/components/foundations/{Card.d.ts → card.d.ts} +9 -2
  64. package/dist/components/foundations/{Card.js → card.js} +5 -5
  65. package/dist/components/foundations/card.js.map +1 -0
  66. package/dist/components/foundations/{IconButton.d.ts → icon-button.d.ts} +2 -8
  67. package/dist/components/foundations/{IconButton.js → icon-button.js} +4 -4
  68. package/dist/components/foundations/icon-button.js.map +1 -0
  69. package/dist/components/foundations/index.d.ts +9 -9
  70. package/dist/components/foundations/{Link.d.ts → link.d.ts} +1 -1
  71. package/dist/components/foundations/link.js +46 -0
  72. package/dist/components/foundations/link.js.map +1 -0
  73. package/dist/components/foundations/{ListCell.d.ts → list-cell.d.ts} +1 -8
  74. package/dist/components/foundations/{ListCell.js → list-cell.js} +3 -3
  75. package/dist/components/foundations/list-cell.js.map +1 -0
  76. package/dist/components/foundations/{SectionHeading.d.ts → section-heading.d.ts} +5 -2
  77. package/dist/components/foundations/{SectionHeading.js → section-heading.js} +3 -3
  78. package/dist/components/foundations/section-heading.js.map +1 -0
  79. package/dist/components/foundations/{Separator.js → separator.js} +3 -3
  80. package/dist/components/foundations/separator.js.map +1 -0
  81. package/dist/components/navigation-data/breadcrumb-pagination.js +88 -81
  82. package/dist/components/navigation-data/breadcrumb-pagination.js.map +1 -1
  83. package/dist/components/navigation-data/command-palette.d.ts +26 -0
  84. package/dist/components/navigation-data/command-palette.js +100 -72
  85. package/dist/components/navigation-data/command-palette.js.map +1 -1
  86. package/dist/components/navigation-data/header-tab-bar.js +49 -46
  87. package/dist/components/navigation-data/header-tab-bar.js.map +1 -1
  88. package/dist/components/navigation-data/index.d.ts +7 -7
  89. package/dist/components/navigation-data/menubar-toolbar.js +1 -1
  90. package/dist/components/navigation-data/menubar-toolbar.js.map +1 -1
  91. package/dist/components/navigation-data/navigation-menu.js +1 -1
  92. package/dist/components/navigation-data/navigation-menu.js.map +1 -1
  93. package/dist/components/navigation-data/scroll-area.js +1 -1
  94. package/dist/components/navigation-data/scroll-area.js.map +1 -1
  95. package/dist/components/navigation-data/table-collection.d.ts +12 -3
  96. package/dist/components/navigation-data/table-collection.js +11 -9
  97. package/dist/components/navigation-data/table-collection.js.map +1 -1
  98. package/dist/components/overlays/dialog.d.ts +13 -2
  99. package/dist/components/overlays/dialog.js +136 -131
  100. package/dist/components/overlays/dialog.js.map +1 -1
  101. package/dist/components/overlays/disclosure.js +1 -1
  102. package/dist/components/overlays/disclosure.js.map +1 -1
  103. package/dist/components/overlays/drawer.d.ts +5 -1
  104. package/dist/components/overlays/drawer.js +156 -152
  105. package/dist/components/overlays/drawer.js.map +1 -1
  106. package/dist/components/overlays/floating.js +115 -113
  107. package/dist/components/overlays/floating.js.map +1 -1
  108. package/dist/components/overlays/index.d.ts +4 -4
  109. package/dist/components/selection/combobox.js +93 -93
  110. package/dist/components/selection/combobox.js.map +1 -1
  111. package/dist/components/selection/controls.d.ts +4 -1
  112. package/dist/components/selection/controls.js +140 -118
  113. package/dist/components/selection/controls.js.map +1 -1
  114. package/dist/components/selection/menu.js +120 -121
  115. package/dist/components/selection/menu.js.map +1 -1
  116. package/dist/components/selection/select.js +107 -107
  117. package/dist/components/selection/select.js.map +1 -1
  118. package/dist/fonts.css +13 -0
  119. package/dist/index.d.ts +1 -0
  120. package/dist/index.js +37 -33
  121. package/dist/internal/accessible-name.d.ts +12 -0
  122. package/dist/internal/class-names.d.ts +12 -0
  123. package/dist/{components/selection/classnames.js → internal/class-names.js} +3 -3
  124. package/dist/internal/class-names.js.map +1 -0
  125. package/dist/internal/index.d.ts +3 -0
  126. package/dist/{components/foundations/shared.d.ts → internal/render.d.ts} +2 -1
  127. package/dist/intl/index.d.ts +2 -0
  128. package/dist/intl/messages.d.ts +48 -0
  129. package/dist/intl/messages.js +80 -0
  130. package/dist/intl/messages.js.map +1 -0
  131. package/dist/intl/provider.d.ts +18 -0
  132. package/dist/intl/provider.js +22 -0
  133. package/dist/intl/provider.js.map +1 -0
  134. package/dist/styles.css +1 -1
  135. package/package.json +6 -4
  136. package/dist/components/feedback/feedback.module.js +0 -42
  137. package/dist/components/feedback/feedback.module.js.map +0 -1
  138. package/dist/components/forms/CodeField.js +0 -63
  139. package/dist/components/forms/CodeField.js.map +0 -1
  140. package/dist/components/forms/FileUpload.js.map +0 -1
  141. package/dist/components/forms/Input.js.map +0 -1
  142. package/dist/components/forms/NumberField.js +0 -71
  143. package/dist/components/forms/NumberField.js.map +0 -1
  144. package/dist/components/forms/OTPField.js +0 -54
  145. package/dist/components/forms/OTPField.js.map +0 -1
  146. package/dist/components/forms/TextField.js +0 -199
  147. package/dist/components/forms/TextField.js.map +0 -1
  148. package/dist/components/foundations/Avatar.js.map +0 -1
  149. package/dist/components/foundations/Badge.js.map +0 -1
  150. package/dist/components/foundations/Button.js.map +0 -1
  151. package/dist/components/foundations/Card.js.map +0 -1
  152. package/dist/components/foundations/IconButton.js.map +0 -1
  153. package/dist/components/foundations/Link.js +0 -40
  154. package/dist/components/foundations/Link.js.map +0 -1
  155. package/dist/components/foundations/ListCell.js.map +0 -1
  156. package/dist/components/foundations/SectionHeading.js.map +0 -1
  157. package/dist/components/foundations/Separator.js.map +0 -1
  158. package/dist/components/foundations/shared.js +0 -8
  159. package/dist/components/foundations/shared.js.map +0 -1
  160. package/dist/components/navigation-data/utils.d.ts +0 -2
  161. package/dist/components/navigation-data/utils.js +0 -11
  162. package/dist/components/navigation-data/utils.js.map +0 -1
  163. package/dist/components/overlays/class-names.d.ts +0 -6
  164. package/dist/components/overlays/class-names.js +0 -11
  165. package/dist/components/overlays/class-names.js.map +0 -1
  166. package/dist/components/selection/classnames.d.ts +0 -4
  167. package/dist/components/selection/classnames.js.map +0 -1
  168. package/dist/components/selection/selection.module.js +0 -51
  169. package/dist/components/selection/selection.module.js.map +0 -1
  170. /package/dist/components/forms/{Input.d.ts → input.d.ts} +0 -0
  171. /package/dist/components/forms/{NumberField.d.ts → number-field.d.ts} +0 -0
  172. /package/dist/components/forms/{OTPField.d.ts → otp-field.d.ts} +0 -0
  173. /package/dist/components/foundations/{Avatar.d.ts → avatar.d.ts} +0 -0
  174. /package/dist/components/foundations/{Button.d.ts → button.d.ts} +0 -0
  175. /package/dist/components/foundations/{Separator.d.ts → separator.d.ts} +0 -0
@@ -1,151 +1,179 @@
1
- import { cx as e, withBaseClass as t } from "./utils.js";
2
- import { forwardRef as n, useCallback as r, useImperativeHandle as i, useRef as a, useState as o } from "react";
3
- import { jsx as s } from "react/jsx-runtime";
4
- import { Combobox as c } from "@base-ui/react/combobox";
5
- import { Dialog as l } from "@base-ui/react/dialog";
6
- import { CheckIcon as u } from "@phosphor-icons/react/dist/csr/Check";
1
+ import { cx as e, withStateClassName as t } from "../../internal/class-names.js";
2
+ import { useMessages as n } from "../../intl/provider.js";
3
+ import { createContext as r, forwardRef as i, useCallback as a, useContext as o, useRef as s, useState as c } from "react";
4
+ import { jsx as l } from "react/jsx-runtime";
5
+ import { Combobox as u } from "@base-ui/react/combobox";
6
+ import { Dialog as d } from "@base-ui/react/dialog";
7
+ import { CheckIcon as f } from "@phosphor-icons/react/dist/csr/Check";
7
8
  //#region src/components/navigation-data/command-palette.tsx
8
- function d({ children: e, defaultOpen: t = !1, modal: n = !0, onOpenChange: i, open: a, ...u }) {
9
- let [d, f] = o(t), p = a !== void 0, m = p ? a : d, h = r((e, t) => {
10
- i?.(e, t), !t.isCanceled && (p || f(e));
11
- }, [p, i]);
12
- return /* @__PURE__ */ s(l.Root, {
13
- modal: n,
14
- open: m,
15
- onOpenChange: h,
16
- children: /* @__PURE__ */ s(c.Root, {
17
- ...u,
18
- autoComplete: "none",
19
- inline: !0,
20
- open: m,
21
- onOpenChange: (e, t) => {
22
- e !== m && h(e, t);
23
- },
24
- children: e
9
+ var p = r(null);
10
+ function m({ children: e, defaultOpen: t = !1, modal: n = !0, onOpenChange: r, open: i, ...o }) {
11
+ let [f, m] = c(t), h = i !== void 0, g = h ? i : f, _ = a((e, t) => {
12
+ r?.(e, t), !t.isCanceled && (h || m(e));
13
+ }, [h, r]), v = s(null);
14
+ return /* @__PURE__ */ l(p, {
15
+ value: v,
16
+ children: /* @__PURE__ */ l(d.Root, {
17
+ modal: n,
18
+ open: g,
19
+ onOpenChange: _,
20
+ children: /* @__PURE__ */ l(u.Root, {
21
+ ...o,
22
+ autoComplete: "none",
23
+ inline: !0,
24
+ open: g,
25
+ onOpenChange: (e, t) => {
26
+ e !== g && _(e, t);
27
+ },
28
+ children: e
29
+ })
25
30
  })
26
31
  });
27
32
  }
28
- var f = n(function(e, n) {
33
+ var h = i(function(e, n) {
29
34
  let { className: r, ...i } = e;
30
- return /* @__PURE__ */ s(l.Trigger, {
35
+ return /* @__PURE__ */ l(d.Trigger, {
31
36
  ref: n,
32
37
  className: t("lyds-command-palette__trigger", r),
33
38
  ...i
34
39
  });
35
- }), p = l.Portal, m = n(function(e, n) {
40
+ }), g = d.Portal, _ = i(function(e, n) {
36
41
  let { className: r, ...i } = e;
37
- return /* @__PURE__ */ s(l.Backdrop, {
42
+ return /* @__PURE__ */ l(d.Backdrop, {
38
43
  ref: n,
39
44
  className: t("lyds-command-palette__backdrop", r),
40
45
  ...i
41
46
  });
42
- }), h = n(function(e, n) {
47
+ }), v = i(function(e, n) {
43
48
  let { className: r, ...i } = e;
44
- return /* @__PURE__ */ s(l.Viewport, {
49
+ return /* @__PURE__ */ l(d.Viewport, {
45
50
  ref: n,
46
51
  className: t("lyds-command-palette__viewport", r),
47
52
  ...i
48
53
  });
49
- }), g = n(function(e, n) {
50
- let { className: r, initialFocus: o, ...c } = e, u = a(null);
51
- return i(n, () => u.current), /* @__PURE__ */ s(l.Popup, {
52
- ref: u,
54
+ }), y = i(function(e, n) {
55
+ let { className: r, initialFocus: i, ...s } = e, c = o(p), u = a((e) => e === "touch" ? !0 : c?.current ?? !0, [c]);
56
+ return /* @__PURE__ */ l(d.Popup, {
57
+ ref: n,
53
58
  className: t("lyds-command-palette__popup", r),
54
- initialFocus: o ?? ((e) => e === "touch" ? !0 : u.current?.querySelector(".lyds-command-palette__input") ?? !0),
55
- ...c
59
+ initialFocus: i ?? u,
60
+ ...s
56
61
  });
57
- }), _ = n(function(e, n) {
62
+ }), b = i(function(e, n) {
58
63
  let { className: r, ...i } = e;
59
- return /* @__PURE__ */ s(l.Title, {
64
+ return /* @__PURE__ */ l(d.Title, {
60
65
  ref: n,
61
66
  className: t("lyds-command-palette__title", r),
62
67
  ...i
63
68
  });
64
- }), v = n(function(e, n) {
69
+ }), x = i(function(e, n) {
65
70
  let { className: r, ...i } = e;
66
- return /* @__PURE__ */ s(l.Description, {
71
+ return /* @__PURE__ */ l(d.Description, {
67
72
  ref: n,
68
73
  className: t("lyds-command-palette__description", r),
69
74
  ...i
70
75
  });
71
- }), y = n(function(e, n) {
72
- let { className: r, children: i = "關閉", ...a } = e;
73
- return /* @__PURE__ */ s(l.Close, {
74
- ref: n,
75
- className: t("lyds-command-palette__close", r),
76
- ...a,
77
- children: i
76
+ }), S = i(function(e, r) {
77
+ let i = n(), { className: a, children: o = i.commandPaletteClose, ...s } = e;
78
+ return /* @__PURE__ */ l(d.Close, {
79
+ ref: r,
80
+ className: t("lyds-command-palette__close", a),
81
+ ...s,
82
+ children: o
78
83
  });
79
- }), b = n(function(e, n) {
84
+ }), C = i(function(e, n) {
80
85
  let { className: r, ...i } = e;
81
- return /* @__PURE__ */ s(c.Label, {
86
+ return /* @__PURE__ */ l(u.Label, {
82
87
  ref: n,
83
88
  className: t("lyds-command-palette__label", r),
84
89
  ...i
85
90
  });
86
- }), x = n(function(e, n) {
87
- let { className: r, placeholder: i = "輸入指令…", ...a } = e;
88
- return /* @__PURE__ */ s(c.Input, {
89
- ref: n,
90
- className: t("lyds-command-palette__input", r),
91
- placeholder: i,
92
- ...a
93
- });
94
- }), S = n(function(e, n) {
91
+ }), w = i(function(e, r) {
92
+ let i = n(), s = o(p), { className: c, placeholder: d = i.commandPalettePlaceholder, ...f } = e, m = a((e) => {
93
+ s && (s.current = e), typeof r == "function" ? r(e) : r && (r.current = e);
94
+ }, [s, r]);
95
+ return /* @__PURE__ */ l(u.Input, {
96
+ ref: m,
97
+ className: t("lyds-command-palette__input", c),
98
+ placeholder: d,
99
+ ...f
100
+ });
101
+ }), T = i(function(e, n) {
95
102
  let { className: r, ...i } = e;
96
- return /* @__PURE__ */ s(c.List, {
103
+ return /* @__PURE__ */ l(u.List, {
97
104
  ref: n,
98
105
  className: t("lyds-command-palette__list", r),
99
106
  ...i
100
107
  });
101
- }), C = n(function(e, n) {
108
+ }), E = i(function(e, n) {
102
109
  let { className: r, ...i } = e;
103
- return /* @__PURE__ */ s(c.Item, {
110
+ return /* @__PURE__ */ l(u.Item, {
104
111
  ref: n,
105
112
  className: t("lyds-command-palette__item", r),
106
113
  ...i
107
114
  });
108
- }), w = n(function(e, n) {
115
+ }), D = i(function(e, n) {
109
116
  let { className: r, children: i, ...a } = e;
110
- return /* @__PURE__ */ s(c.ItemIndicator, {
117
+ return /* @__PURE__ */ l(u.ItemIndicator, {
111
118
  ref: n,
112
119
  className: t("lyds-command-palette__indicator", r),
113
120
  ...a,
114
- children: i ?? /* @__PURE__ */ s(u, {
121
+ children: i ?? /* @__PURE__ */ l(f, {
115
122
  "aria-hidden": "true",
116
123
  weight: "bold"
117
124
  })
118
125
  });
119
- }), T = c.Group, E = n(function(e, n) {
126
+ }), O = u.Group, k = i(function(e, n) {
120
127
  let { className: r, ...i } = e;
121
- return /* @__PURE__ */ s(c.GroupLabel, {
128
+ return /* @__PURE__ */ l(u.GroupLabel, {
122
129
  ref: n,
123
130
  className: t("lyds-command-palette__group-label", r),
124
131
  ...i
125
132
  });
126
- }), D = n(function(e, n) {
133
+ }), A = i(function(e, n) {
127
134
  let { className: r, ...i } = e;
128
- return /* @__PURE__ */ s(c.Empty, {
135
+ return /* @__PURE__ */ l(u.Empty, {
129
136
  ref: n,
130
137
  className: t("lyds-command-palette__empty", r),
131
138
  ...i
132
139
  });
133
- }), O = n(function(e, n) {
140
+ }), j = i(function(e, n) {
134
141
  let { className: r, ...i } = e;
135
- return /* @__PURE__ */ s(c.Separator, {
142
+ return /* @__PURE__ */ l(u.Separator, {
136
143
  ref: n,
137
144
  className: t("lyds-command-palette__separator", r),
138
145
  ...i
139
146
  });
140
- }), k = c.Status, A = n(function(t, n) {
147
+ }), M = u.Status, N = i(function(t, n) {
141
148
  let { className: r, ...i } = t;
142
- return /* @__PURE__ */ s("kbd", {
149
+ return /* @__PURE__ */ l("kbd", {
143
150
  ref: n,
144
151
  className: e("lyds-command-palette__shortcut", r),
145
152
  ...i
146
153
  });
154
+ }), P = Object.assign(m, {
155
+ Backdrop: _,
156
+ Close: S,
157
+ Description: x,
158
+ Empty: A,
159
+ Group: O,
160
+ GroupLabel: k,
161
+ Input: w,
162
+ Item: E,
163
+ ItemIndicator: D,
164
+ Label: C,
165
+ List: T,
166
+ Popup: y,
167
+ Portal: g,
168
+ Root: m,
169
+ Separator: j,
170
+ Shortcut: N,
171
+ Status: M,
172
+ Title: b,
173
+ Trigger: h,
174
+ Viewport: v
147
175
  });
148
176
  //#endregion
149
- export { d as CommandPalette, m as CommandPaletteBackdrop, y as CommandPaletteClose, v as CommandPaletteDescription, D as CommandPaletteEmpty, T as CommandPaletteGroup, E as CommandPaletteGroupLabel, x as CommandPaletteInput, C as CommandPaletteItem, w as CommandPaletteItemIndicator, b as CommandPaletteLabel, S as CommandPaletteList, g as CommandPalettePopup, p as CommandPalettePortal, O as CommandPaletteSeparator, A as CommandPaletteShortcut, k as CommandPaletteStatus, _ as CommandPaletteTitle, f as CommandPaletteTrigger, h as CommandPaletteViewport };
177
+ export { m as CommandPalette, _ as CommandPaletteBackdrop, S as CommandPaletteClose, x as CommandPaletteDescription, A as CommandPaletteEmpty, O as CommandPaletteGroup, k as CommandPaletteGroupLabel, w as CommandPaletteInput, E as CommandPaletteItem, D as CommandPaletteItemIndicator, C as CommandPaletteLabel, T as CommandPaletteList, P as CommandPaletteNamespace, y as CommandPalettePopup, g as CommandPalettePortal, j as CommandPaletteSeparator, N as CommandPaletteShortcut, M as CommandPaletteStatus, b as CommandPaletteTitle, h as CommandPaletteTrigger, v as CommandPaletteViewport };
150
178
 
151
179
  //# sourceMappingURL=command-palette.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.js","names":[],"sources":["../../../src/components/navigation-data/command-palette.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentRef, type HTMLAttributes, type ReactNode } from \"react\";\n\nimport { cx, withBaseClass } from \"./utils.js\";\n\nexport interface CommandPaletteProps<Value> extends Omit<BaseCombobox.Root.Props<Value, false>, \"autoComplete\" | \"children\" | \"defaultOpen\" | \"inline\" | \"modal\" | \"onOpenChange\" | \"open\"> {\n\tchildren: ReactNode;\n\tdefaultOpen?: boolean;\n\tmodal?: BaseDialog.Root.Props[\"modal\"];\n\tonOpenChange?: (open: boolean, eventDetails: CommandPaletteOpenChangeDetails) => void;\n\topen?: boolean;\n}\n\nexport type CommandPaletteOpenChangeDetails = BaseDialog.Root.ChangeEventDetails | BaseCombobox.Root.ChangeEventDetails;\n\n/**\n * 用於指令介面的 Dialog 與行內 Combobox 組合。\n * Linyao Design System 僅管理焦點與開啟狀態;指令資料、篩選及執行由使用端負責。\n */\nexport function CommandPalette<Value>({ children, defaultOpen = false, modal = true, onOpenChange, open, ...comboboxProps }: CommandPaletteProps<Value>) {\n\tconst [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n\tconst isControlled = open !== undefined;\n\tconst resolvedOpen = isControlled ? open : uncontrolledOpen;\n\tconst changeOpen = useCallback(\n\t\t(nextOpen: boolean, eventDetails: CommandPaletteOpenChangeDetails) => {\n\t\t\tonOpenChange?.(nextOpen, eventDetails);\n\t\t\tif (eventDetails.isCanceled) return;\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledOpen(nextOpen);\n\t\t\t}\n\t\t},\n\t\t[isControlled, onOpenChange]\n\t);\n\n\treturn (\n\t\t<BaseDialog.Root modal={modal} open={resolvedOpen} onOpenChange={changeOpen}>\n\t\t\t<BaseCombobox.Root\n\t\t\t\t{...comboboxProps}\n\t\t\t\tautoComplete=\"none\"\n\t\t\t\tinline\n\t\t\t\topen={resolvedOpen}\n\t\t\t\tonOpenChange={(nextOpen, eventDetails) => {\n\t\t\t\t\tif (nextOpen !== resolvedOpen) {\n\t\t\t\t\t\tchangeOpen(nextOpen, eventDetails);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</BaseCombobox.Root>\n\t\t</BaseDialog.Root>\n\t);\n}\n\nexport const CommandPaletteTrigger = forwardRef<HTMLButtonElement, BaseDialog.Trigger.Props>(function CommandPaletteTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseDialog.Trigger ref={ref} className={withBaseClass<BaseDialog.Trigger.State>(\"lyds-command-palette__trigger\", className)} {...triggerProps} />;\n});\n\nexport const CommandPalettePortal = BaseDialog.Portal;\n\nexport const CommandPaletteBackdrop = forwardRef<ComponentRef<typeof BaseDialog.Backdrop>, BaseDialog.Backdrop.Props>(function CommandPaletteBackdrop(props, ref) {\n\tconst { className, ...backdropProps } = props;\n\treturn <BaseDialog.Backdrop ref={ref} className={withBaseClass<BaseDialog.Backdrop.State>(\"lyds-command-palette__backdrop\", className)} {...backdropProps} />;\n});\n\nexport const CommandPaletteViewport = forwardRef<ComponentRef<typeof BaseDialog.Viewport>, BaseDialog.Viewport.Props>(function CommandPaletteViewport(props, ref) {\n\tconst { className, ...viewportProps } = props;\n\treturn <BaseDialog.Viewport ref={ref} className={withBaseClass<BaseDialog.Viewport.State>(\"lyds-command-palette__viewport\", className)} {...viewportProps} />;\n});\n\nexport const CommandPalettePopup = forwardRef<ComponentRef<typeof BaseDialog.Popup>, BaseDialog.Popup.Props>(function CommandPalettePopup(props, ref) {\n\tconst { className, initialFocus, ...popupProps } = props;\n\tconst popupRef = useRef<ComponentRef<typeof BaseDialog.Popup>>(null);\n\tuseImperativeHandle(ref, () => popupRef.current as ComponentRef<typeof BaseDialog.Popup>);\n\n\treturn (\n\t\t<BaseDialog.Popup\n\t\t\tref={popupRef}\n\t\t\tclassName={withBaseClass<BaseDialog.Popup.State>(\"lyds-command-palette__popup\", className)}\n\t\t\tinitialFocus={\n\t\t\t\tinitialFocus ??\n\t\t\t\t(openType => {\n\t\t\t\t\tif (openType === \"touch\") return true;\n\t\t\t\t\treturn popupRef.current?.querySelector<HTMLElement>(\".lyds-command-palette__input\") ?? true;\n\t\t\t\t})\n\t\t\t}\n\t\t\t{...popupProps}\n\t\t/>\n\t);\n});\n\nexport const CommandPaletteTitle = forwardRef<ComponentRef<typeof BaseDialog.Title>, BaseDialog.Title.Props>(function CommandPaletteTitle(props, ref) {\n\tconst { className, ...titleProps } = props;\n\treturn <BaseDialog.Title ref={ref} className={withBaseClass<BaseDialog.Title.State>(\"lyds-command-palette__title\", className)} {...titleProps} />;\n});\n\nexport const CommandPaletteDescription = forwardRef<ComponentRef<typeof BaseDialog.Description>, BaseDialog.Description.Props>(function CommandPaletteDescription(props, ref) {\n\tconst { className, ...descriptionProps } = props;\n\treturn <BaseDialog.Description ref={ref} className={withBaseClass<BaseDialog.Description.State>(\"lyds-command-palette__description\", className)} {...descriptionProps} />;\n});\n\nexport const CommandPaletteClose = forwardRef<ComponentRef<typeof BaseDialog.Close>, BaseDialog.Close.Props>(function CommandPaletteClose(props, ref) {\n\tconst { className, children = \"關閉\", ...closeProps } = props;\n\treturn (\n\t\t<BaseDialog.Close ref={ref} className={withBaseClass<BaseDialog.Close.State>(\"lyds-command-palette__close\", className)} {...closeProps}>\n\t\t\t{children}\n\t\t</BaseDialog.Close>\n\t);\n});\n\nexport const CommandPaletteLabel = forwardRef<ComponentRef<typeof BaseCombobox.Label>, BaseCombobox.Label.Props>(function CommandPaletteLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseCombobox.Label ref={ref} className={withBaseClass<BaseCombobox.Label.State>(\"lyds-command-palette__label\", className)} {...labelProps} />;\n});\n\nexport const CommandPaletteInput = forwardRef<ComponentRef<typeof BaseCombobox.Input>, BaseCombobox.Input.Props>(function CommandPaletteInput(props, ref) {\n\tconst { className, placeholder = \"輸入指令…\", ...inputProps } = props;\n\treturn <BaseCombobox.Input ref={ref} className={withBaseClass<BaseCombobox.Input.State>(\"lyds-command-palette__input\", className)} placeholder={placeholder} {...inputProps} />;\n});\n\nexport const CommandPaletteList = forwardRef<ComponentRef<typeof BaseCombobox.List>, BaseCombobox.List.Props>(function CommandPaletteList(props, ref) {\n\tconst { className, ...listProps } = props;\n\treturn <BaseCombobox.List ref={ref} className={withBaseClass<BaseCombobox.List.State>(\"lyds-command-palette__list\", className)} {...listProps} />;\n});\n\nexport const CommandPaletteItem = forwardRef<ComponentRef<typeof BaseCombobox.Item>, BaseCombobox.Item.Props>(function CommandPaletteItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseCombobox.Item ref={ref} className={withBaseClass<BaseCombobox.Item.State>(\"lyds-command-palette__item\", className)} {...itemProps} />;\n});\n\nexport const CommandPaletteItemIndicator = forwardRef<ComponentRef<typeof BaseCombobox.ItemIndicator>, BaseCombobox.ItemIndicator.Props>(function CommandPaletteItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseCombobox.ItemIndicator ref={ref} className={withBaseClass<BaseCombobox.ItemIndicator.State>(\"lyds-command-palette__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseCombobox.ItemIndicator>\n\t);\n});\n\nexport const CommandPaletteGroup = BaseCombobox.Group;\n\nexport const CommandPaletteGroupLabel = forwardRef<ComponentRef<typeof BaseCombobox.GroupLabel>, BaseCombobox.GroupLabel.Props>(function CommandPaletteGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseCombobox.GroupLabel ref={ref} className={withBaseClass<BaseCombobox.GroupLabel.State>(\"lyds-command-palette__group-label\", className)} {...labelProps} />;\n});\n\nexport const CommandPaletteEmpty = forwardRef<ComponentRef<typeof BaseCombobox.Empty>, BaseCombobox.Empty.Props>(function CommandPaletteEmpty(props, ref) {\n\tconst { className, ...emptyProps } = props;\n\treturn <BaseCombobox.Empty ref={ref} className={withBaseClass<BaseCombobox.Empty.State>(\"lyds-command-palette__empty\", className)} {...emptyProps} />;\n});\n\nexport const CommandPaletteSeparator = forwardRef<ComponentRef<typeof BaseCombobox.Separator>, BaseCombobox.Separator.Props>(function CommandPaletteSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseCombobox.Separator ref={ref} className={withBaseClass<BaseCombobox.Separator.State>(\"lyds-command-palette__separator\", className)} {...separatorProps} />;\n});\n\nexport const CommandPaletteStatus = BaseCombobox.Status;\n\nexport const CommandPaletteShortcut = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function CommandPaletteShortcut(props, ref) {\n\tconst { className, ...shortcutProps } = props;\n\treturn <kbd ref={ref} className={cx(\"lyds-command-palette__shortcut\", className)} {...shortcutProps} />;\n});\n"],"mappings":";;;;;;;AAqBA,SAAgB,EAAsB,EAAE,aAAU,iBAAc,IAAO,WAAQ,IAAM,iBAAc,SAAM,GAAG,KAA6C;CACxJ,IAAM,CAAC,GAAkB,KAAuB,EAAS,CAAW,GAC9D,IAAe,MAAS,KAAA,GACxB,IAAe,IAAe,IAAO,GACrC,IAAa,GACjB,GAAmB,MAAkD;EACrE,IAAe,GAAU,CAAY,GACjC,GAAa,eACZ,KACJ,EAAoB,CAAQ;CAE9B,GACA,CAAC,GAAc,CAAY,CAC5B;CAEA,OACC,kBAAC,EAAW,MAAZ;EAAwB;EAAO,MAAM;EAAc,cAAc;EAChE,UAAA,kBAAC,EAAa,MAAd;GACC,GAAI;GACJ,cAAa;GACb,QAAA;GACA,MAAM;GACN,eAAe,GAAU,MAAiB;IACzC,AAAI,MAAa,KAChB,EAAW,GAAU,CAAY;GAEnC;GAEC;EACiB,CAAA;CACH,CAAA;AAEnB;AAEA,IAAa,IAAwB,EAAwD,SAA+B,GAAO,GAAK;CACvI,IAAM,EAAE,cAAW,GAAG,MAAiB;CACvC,OAAO,kBAAC,EAAW,SAAZ;EAAyB;EAAK,WAAW,EAAwC,iCAAiC,CAAS;EAAG,GAAI;CAAe,CAAA;AACzJ,CAAC,GAEY,IAAuB,EAAW,QAElC,I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,EAA6C,qCAAqC,CAAS;EAAG,GAAI;CAAa,CAAA;AACrK,CAAC,GAEY,IAAsB,EAA8E,SAA6B,GAAO,GAAK;CACzJ,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAa,OAAd;EAAyB;EAAK,WAAW,EAAwC,+BAA+B,CAAS;EAAG,GAAI;CAAa,CAAA;AACrJ,CAAC,GAEY,IAA0B,EAAsF,SAAiC,GAAO,GAAK;CACzK,IAAM,EAAE,cAAW,GAAG,MAAmB;CACzC,OAAO,kBAAC,EAAa,WAAd;EAA6B;EAAK,WAAW,EAA4C,mCAAmC,CAAS;EAAG,GAAI;CAAiB,CAAA;AACrK,CAAC,GAEY,IAAuB,EAAa,QAEpC,IAAyB,EAAqD,SAAgC,GAAO,GAAK;CACtI,IAAM,EAAE,cAAW,GAAG,MAAkB;CACxC,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,kCAAkC,CAAS;EAAG,GAAI;CAAgB,CAAA;AACvG,CAAC"}
1
+ {"version":3,"file":"command-palette.js","names":[],"sources":["../../../src/components/navigation-data/command-palette.tsx"],"sourcesContent":["import { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { createContext, forwardRef, useCallback, useContext, useRef, useState, type ComponentRef, type HTMLAttributes, type ReactNode, type RefObject } from \"react\";\n\nimport { cx, withStateClassName } from \"@/internal\";\nimport { useMessages } from \"@/intl\";\n/**\n * The popup moves focus to the search input when the palette opens. Sharing a ref beats looking the\n * input up by class name: a consumer can render a different input, and a class name that focus\n * management depends on becomes public API by accident.\n */\nconst CommandPaletteInputContext = createContext<RefObject<HTMLInputElement | null> | null>(null);\n\nexport interface CommandPaletteProps<Value> extends Omit<BaseCombobox.Root.Props<Value, false>, \"autoComplete\" | \"children\" | \"defaultOpen\" | \"inline\" | \"modal\" | \"onOpenChange\" | \"open\"> {\n\tchildren: ReactNode;\n\tdefaultOpen?: boolean;\n\tmodal?: BaseDialog.Root.Props[\"modal\"];\n\tonOpenChange?: (open: boolean, eventDetails: CommandPaletteOpenChangeDetails) => void;\n\topen?: boolean;\n}\n\nexport type CommandPaletteOpenChangeDetails = BaseDialog.Root.ChangeEventDetails | BaseCombobox.Root.ChangeEventDetails;\n\n/**\n * 用於指令介面的 Dialog 與行內 Combobox 組合。\n * Linyao Design System 僅管理焦點與開啟狀態;指令資料、篩選及執行由使用端負責。\n */\nexport function CommandPalette<Value>({ children, defaultOpen = false, modal = true, onOpenChange, open, ...comboboxProps }: CommandPaletteProps<Value>) {\n\tconst [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n\tconst isControlled = open !== undefined;\n\tconst resolvedOpen = isControlled ? open : uncontrolledOpen;\n\tconst changeOpen = useCallback(\n\t\t(nextOpen: boolean, eventDetails: CommandPaletteOpenChangeDetails) => {\n\t\t\tonOpenChange?.(nextOpen, eventDetails);\n\t\t\tif (eventDetails.isCanceled) return;\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledOpen(nextOpen);\n\t\t\t}\n\t\t},\n\t\t[isControlled, onOpenChange]\n\t);\n\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\n\treturn (\n\t\t<CommandPaletteInputContext value={inputRef}>\n\t\t\t<BaseDialog.Root modal={modal} open={resolvedOpen} onOpenChange={changeOpen}>\n\t\t\t\t<BaseCombobox.Root\n\t\t\t\t\t{...comboboxProps}\n\t\t\t\t\tautoComplete=\"none\"\n\t\t\t\t\tinline\n\t\t\t\t\topen={resolvedOpen}\n\t\t\t\t\tonOpenChange={(nextOpen, eventDetails) => {\n\t\t\t\t\t\tif (nextOpen !== resolvedOpen) {\n\t\t\t\t\t\t\tchangeOpen(nextOpen, eventDetails);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</BaseCombobox.Root>\n\t\t\t</BaseDialog.Root>\n\t\t</CommandPaletteInputContext>\n\t);\n}\n\nexport const CommandPaletteTrigger = forwardRef<HTMLButtonElement, BaseDialog.Trigger.Props>(function CommandPaletteTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseDialog.Trigger ref={ref} className={withStateClassName<BaseDialog.Trigger.State>(\"lyds-command-palette__trigger\", className)} {...triggerProps} />;\n});\n\nexport const CommandPalettePortal = BaseDialog.Portal;\n\nexport const CommandPaletteBackdrop = forwardRef<ComponentRef<typeof BaseDialog.Backdrop>, BaseDialog.Backdrop.Props>(function CommandPaletteBackdrop(props, ref) {\n\tconst { className, ...backdropProps } = props;\n\treturn <BaseDialog.Backdrop ref={ref} className={withStateClassName<BaseDialog.Backdrop.State>(\"lyds-command-palette__backdrop\", className)} {...backdropProps} />;\n});\n\nexport const CommandPaletteViewport = forwardRef<ComponentRef<typeof BaseDialog.Viewport>, BaseDialog.Viewport.Props>(function CommandPaletteViewport(props, ref) {\n\tconst { className, ...viewportProps } = props;\n\treturn <BaseDialog.Viewport ref={ref} className={withStateClassName<BaseDialog.Viewport.State>(\"lyds-command-palette__viewport\", className)} {...viewportProps} />;\n});\n\nexport const CommandPalettePopup = forwardRef<ComponentRef<typeof BaseDialog.Popup>, BaseDialog.Popup.Props>(function CommandPalettePopup(props, ref) {\n\tconst { className, initialFocus, ...popupProps } = props;\n\tconst inputRef = useContext(CommandPaletteInputContext);\n\tconst focusSearchInput = useCallback((openType: string) => (openType === \"touch\" ? true : (inputRef?.current ?? true)), [inputRef]);\n\n\treturn (\n\t\t<BaseDialog.Popup ref={ref} className={withStateClassName<BaseDialog.Popup.State>(\"lyds-command-palette__popup\", className)} initialFocus={initialFocus ?? focusSearchInput} {...popupProps} />\n\t);\n});\n\nexport const CommandPaletteTitle = forwardRef<ComponentRef<typeof BaseDialog.Title>, BaseDialog.Title.Props>(function CommandPaletteTitle(props, ref) {\n\tconst { className, ...titleProps } = props;\n\treturn <BaseDialog.Title ref={ref} className={withStateClassName<BaseDialog.Title.State>(\"lyds-command-palette__title\", className)} {...titleProps} />;\n});\n\nexport const CommandPaletteDescription = forwardRef<ComponentRef<typeof BaseDialog.Description>, BaseDialog.Description.Props>(function CommandPaletteDescription(props, ref) {\n\tconst { className, ...descriptionProps } = props;\n\treturn <BaseDialog.Description ref={ref} className={withStateClassName<BaseDialog.Description.State>(\"lyds-command-palette__description\", className)} {...descriptionProps} />;\n});\n\nexport const CommandPaletteClose = forwardRef<ComponentRef<typeof BaseDialog.Close>, BaseDialog.Close.Props>(function CommandPaletteClose(props, ref) {\n\tconst messages = useMessages();\n\tconst { className, children = messages.commandPaletteClose, ...closeProps } = props;\n\treturn (\n\t\t<BaseDialog.Close ref={ref} className={withStateClassName<BaseDialog.Close.State>(\"lyds-command-palette__close\", className)} {...closeProps}>\n\t\t\t{children}\n\t\t</BaseDialog.Close>\n\t);\n});\n\nexport const CommandPaletteLabel = forwardRef<ComponentRef<typeof BaseCombobox.Label>, BaseCombobox.Label.Props>(function CommandPaletteLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseCombobox.Label ref={ref} className={withStateClassName<BaseCombobox.Label.State>(\"lyds-command-palette__label\", className)} {...labelProps} />;\n});\n\nexport const CommandPaletteInput = forwardRef<ComponentRef<typeof BaseCombobox.Input>, BaseCombobox.Input.Props>(function CommandPaletteInput(props, ref) {\n\tconst messages = useMessages();\n\tconst paletteInputRef = useContext(CommandPaletteInputContext);\n\tconst { className, placeholder = messages.commandPalettePlaceholder, ...inputProps } = props;\n\tconst setInput = useCallback(\n\t\t(node: HTMLInputElement | null) => {\n\t\t\tif (paletteInputRef) paletteInputRef.current = node;\n\t\t\tif (typeof ref === \"function\") ref(node);\n\t\t\telse if (ref) ref.current = node;\n\t\t},\n\t\t[paletteInputRef, ref]\n\t);\n\n\treturn <BaseCombobox.Input ref={setInput} className={withStateClassName<BaseCombobox.Input.State>(\"lyds-command-palette__input\", className)} placeholder={placeholder} {...inputProps} />;\n});\n\nexport const CommandPaletteList = forwardRef<ComponentRef<typeof BaseCombobox.List>, BaseCombobox.List.Props>(function CommandPaletteList(props, ref) {\n\tconst { className, ...listProps } = props;\n\treturn <BaseCombobox.List ref={ref} className={withStateClassName<BaseCombobox.List.State>(\"lyds-command-palette__list\", className)} {...listProps} />;\n});\n\nexport const CommandPaletteItem = forwardRef<ComponentRef<typeof BaseCombobox.Item>, BaseCombobox.Item.Props>(function CommandPaletteItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseCombobox.Item ref={ref} className={withStateClassName<BaseCombobox.Item.State>(\"lyds-command-palette__item\", className)} {...itemProps} />;\n});\n\nexport const CommandPaletteItemIndicator = forwardRef<ComponentRef<typeof BaseCombobox.ItemIndicator>, BaseCombobox.ItemIndicator.Props>(function CommandPaletteItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseCombobox.ItemIndicator ref={ref} className={withStateClassName<BaseCombobox.ItemIndicator.State>(\"lyds-command-palette__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseCombobox.ItemIndicator>\n\t);\n});\n\nexport const CommandPaletteGroup = BaseCombobox.Group;\n\nexport const CommandPaletteGroupLabel = forwardRef<ComponentRef<typeof BaseCombobox.GroupLabel>, BaseCombobox.GroupLabel.Props>(function CommandPaletteGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseCombobox.GroupLabel ref={ref} className={withStateClassName<BaseCombobox.GroupLabel.State>(\"lyds-command-palette__group-label\", className)} {...labelProps} />;\n});\n\nexport const CommandPaletteEmpty = forwardRef<ComponentRef<typeof BaseCombobox.Empty>, BaseCombobox.Empty.Props>(function CommandPaletteEmpty(props, ref) {\n\tconst { className, ...emptyProps } = props;\n\treturn <BaseCombobox.Empty ref={ref} className={withStateClassName<BaseCombobox.Empty.State>(\"lyds-command-palette__empty\", className)} {...emptyProps} />;\n});\n\nexport const CommandPaletteSeparator = forwardRef<ComponentRef<typeof BaseCombobox.Separator>, BaseCombobox.Separator.Props>(function CommandPaletteSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseCombobox.Separator ref={ref} className={withStateClassName<BaseCombobox.Separator.State>(\"lyds-command-palette__separator\", className)} {...separatorProps} />;\n});\n\nexport const CommandPaletteStatus = BaseCombobox.Status;\n\nexport const CommandPaletteShortcut = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function CommandPaletteShortcut(props, ref) {\n\tconst { className, ...shortcutProps } = props;\n\treturn <kbd ref={ref} className={cx(\"lyds-command-palette__shortcut\", className)} {...shortcutProps} />;\n});\n\n/**\n * Every component built on a context root also exposes its parts as a namespace, so composing one\n * reads the same way as composing a Dialog or a Select.\n */\nexport const CommandPaletteNamespace = Object.assign(CommandPalette, {\n\tBackdrop: CommandPaletteBackdrop,\n\tClose: CommandPaletteClose,\n\tDescription: CommandPaletteDescription,\n\tEmpty: CommandPaletteEmpty,\n\tGroup: CommandPaletteGroup,\n\tGroupLabel: CommandPaletteGroupLabel,\n\tInput: CommandPaletteInput,\n\tItem: CommandPaletteItem,\n\tItemIndicator: CommandPaletteItemIndicator,\n\tLabel: CommandPaletteLabel,\n\tList: CommandPaletteList,\n\tPopup: CommandPalettePopup,\n\tPortal: CommandPalettePortal,\n\tRoot: CommandPalette,\n\tSeparator: CommandPaletteSeparator,\n\tShortcut: CommandPaletteShortcut,\n\tStatus: CommandPaletteStatus,\n\tTitle: CommandPaletteTitle,\n\tTrigger: CommandPaletteTrigger,\n\tViewport: CommandPaletteViewport\n});\n"],"mappings":";;;;;;;;AAYA,IAAM,IAA6B,EAAyD,IAAI;AAgBhG,SAAgB,EAAsB,EAAE,aAAU,iBAAc,IAAO,WAAQ,IAAM,iBAAc,SAAM,GAAG,KAA6C;CACxJ,IAAM,CAAC,GAAkB,KAAuB,EAAS,CAAW,GAC9D,IAAe,MAAS,KAAA,GACxB,IAA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AAG,MAAmB;CACzC,OAAO,kBAAC,EAAa,WAAd;EAA6B;EAAK,WAAW,EAAiD,mCAAmC,CAAS;EAAG,GAAI;CAAiB,CAAA;AAC1K,CAAC,GAEY,IAAuB,EAAa,QAEpC,IAAyB,EAAqD,SAAgC,GAAO,GAAK;CACtI,IAAM,EAAE,cAAW,GAAG,MAAkB;CACxC,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,kCAAkC,CAAS;EAAG,GAAI;CAAgB,CAAA;AACvG,CAAC,GAMY,IAA0B,OAAO,OAAO,GAAgB;CACpE,UAAU;CACV,OAAO;CACP,aAAa;CACb,OAAO;CACP,OAAO;CACP,YAAY;CACZ,OAAO;CACP,MAAM;CACN,eAAe;CACf,OAAO;CACP,MAAM;CACN,OAAO;CACP,QAAQ;CACR,MAAM;CACN,WAAW;CACX,UAAU;CACV,QAAQ;CACR,OAAO;CACP,SAAS;CACT,UAAU;AACX,CAAC"}
@@ -1,65 +1,68 @@
1
- import { cx as e } from "./utils.js";
2
- import { forwardRef as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
1
+ import { cx as e } from "../../internal/class-names.js";
2
+ import { useMessages as t } from "../../intl/provider.js";
3
+ import { forwardRef as n } from "react";
4
+ import { jsx as r } from "react/jsx-runtime";
4
5
  //#region src/components/navigation-data/header-tab-bar.tsx
5
- var r = t(function({ className: t, ...r }, i) {
6
- return /* @__PURE__ */ n("header", {
6
+ var i = n(function({ className: t, ...n }, i) {
7
+ return /* @__PURE__ */ r("header", {
7
8
  ref: i,
8
9
  className: e("lyds-header", t),
9
- ...r
10
+ ...n
10
11
  });
11
- }), i = t(function({ className: t, ...r }, i) {
12
- return /* @__PURE__ */ n("div", {
12
+ }), a = n(function({ className: t, ...n }, i) {
13
+ return /* @__PURE__ */ r("div", {
13
14
  ref: i,
14
15
  className: e("lyds-header__rail", t),
15
- ...r
16
+ ...n
16
17
  });
17
- }), a = t(function({ children: t, className: r, ...i }, a) {
18
- return /* @__PURE__ */ n("a", {
18
+ }), o = n(function({ children: t, className: n, ...i }, a) {
19
+ return /* @__PURE__ */ r("a", {
19
20
  ref: a,
20
- className: e("lyds-header__brand", r),
21
+ className: e("lyds-header__brand", n),
21
22
  ...i,
22
23
  children: t
23
24
  });
24
- }), o = t(function({ className: t, label: r = "主要導覽", ...i }, a) {
25
- return /* @__PURE__ */ n("nav", {
26
- ref: a,
27
- "aria-label": r,
28
- className: e("lyds-header__nav", t),
29
- ...i
25
+ }), s = n(function({ className: n, label: i, ...a }, o) {
26
+ let s = t();
27
+ return /* @__PURE__ */ r("nav", {
28
+ ref: o,
29
+ "aria-label": i ?? s.headerNavLabel,
30
+ className: e("lyds-header__nav", n),
31
+ ...a
30
32
  });
31
- }), s = t(function({ className: t, ...r }, i) {
32
- return /* @__PURE__ */ n("div", {
33
+ }), c = n(function({ className: t, ...n }, i) {
34
+ return /* @__PURE__ */ r("div", {
33
35
  ref: i,
34
36
  className: e("lyds-header__actions", t),
35
- ...r
37
+ ...n
36
38
  });
37
- }), c = t(function({ className: t, ...r }, i) {
38
- return /* @__PURE__ */ n("div", {
39
+ }), l = n(function({ className: t, ...n }, i) {
40
+ return /* @__PURE__ */ r("div", {
39
41
  ref: i,
40
42
  className: e("lyds-header__status", t),
41
- ...r
43
+ ...n
42
44
  });
43
- }), l = t(function({ className: t, label: r = "應用程式區段", ...i }, a) {
44
- return /* @__PURE__ */ n("nav", {
45
- ref: a,
46
- "aria-label": r,
47
- className: e("lyds-tab-bar", t),
48
- ...i
45
+ }), u = n(function({ className: n, label: i, ...a }, o) {
46
+ let s = t();
47
+ return /* @__PURE__ */ r("nav", {
48
+ ref: o,
49
+ "aria-label": i ?? s.tabBarLabel,
50
+ className: e("lyds-tab-bar", n),
51
+ ...a
49
52
  });
50
- }), u = t(function({ className: t, ...r }, i) {
51
- return /* @__PURE__ */ n("ul", {
53
+ }), d = n(function({ className: t, ...n }, i) {
54
+ return /* @__PURE__ */ r("ul", {
52
55
  ref: i,
53
56
  className: e("lyds-tab-bar__list", t),
54
- ...r
57
+ ...n
55
58
  });
56
- }), d = t(function({ className: t, ...r }, i) {
57
- return /* @__PURE__ */ n("li", {
59
+ }), f = n(function({ className: t, ...n }, i) {
60
+ return /* @__PURE__ */ r("li", {
58
61
  ref: i,
59
62
  className: e("lyds-tab-bar__item", t),
60
- ...r
63
+ ...n
61
64
  });
62
- }), f = t(function({ children: t, className: r, selected: i = !1, disabled: a = !1, href: o, onClick: s, tabIndex: c, ...l }, u) {
65
+ }), p = n(function({ children: t, className: n, selected: i = !1, disabled: a = !1, href: o, onClick: s, tabIndex: c, ...l }, u) {
63
66
  let d = {
64
67
  onClick: (e) => {
65
68
  if (a) {
@@ -70,33 +73,33 @@ var r = t(function({ className: t, ...r }, i) {
70
73
  },
71
74
  tabIndex: a ? -1 : c
72
75
  };
73
- return /* @__PURE__ */ n("a", {
76
+ return /* @__PURE__ */ r("a", {
74
77
  ...l,
75
78
  ref: u,
76
79
  "aria-current": i ? "page" : void 0,
77
80
  "aria-disabled": a || void 0,
78
- className: e("lyds-tab-bar__link", r),
81
+ className: e("lyds-tab-bar__link", n),
79
82
  "data-disabled": a ? "" : void 0,
80
83
  "data-selected": i ? "" : void 0,
81
84
  href: a ? void 0 : o,
82
85
  ...d,
83
86
  children: t
84
87
  });
85
- }), p = t(function({ className: t, ...r }, i) {
86
- return /* @__PURE__ */ n("span", {
88
+ }), m = n(function({ className: t, ...n }, i) {
89
+ return /* @__PURE__ */ r("span", {
87
90
  ref: i,
88
91
  "aria-hidden": "true",
89
92
  className: e("lyds-tab-bar__icon", t),
90
- ...r
93
+ ...n
91
94
  });
92
- }), m = t(function({ className: t, ...r }, i) {
93
- return /* @__PURE__ */ n("span", {
95
+ }), h = n(function({ className: t, ...n }, i) {
96
+ return /* @__PURE__ */ r("span", {
94
97
  ref: i,
95
98
  className: e("lyds-tab-bar__label", t),
96
- ...r
99
+ ...n
97
100
  });
98
101
  });
99
102
  //#endregion
100
- export { r as Header, s as HeaderActions, a as HeaderBrand, o as HeaderNav, i as HeaderRail, c as HeaderStatus, l as TabBar, p as TabBarIcon, d as TabBarItem, m as TabBarLabel, f as TabBarLink, u as TabBarList };
103
+ export { i as Header, c as HeaderActions, o as HeaderBrand, s as HeaderNav, a as HeaderRail, l as HeaderStatus, u as TabBar, m as TabBarIcon, f as TabBarItem, h as TabBarLabel, p as TabBarLink, d as TabBarList };
101
104
 
102
105
  //# sourceMappingURL=header-tab-bar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-tab-bar.js","names":[],"sources":["../../../src/components/navigation-data/header-tab-bar.tsx"],"sourcesContent":["import { forwardRef, type AnchorHTMLAttributes, type HTMLAttributes, type LiHTMLAttributes, type MouseEvent } from \"react\";\n\nimport { cx } from \"./utils.js\";\n\nexport const Header = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function Header({ className, ...props }, ref) {\n\treturn <header ref={ref} className={cx(\"lyds-header\", className)} {...props} />;\n});\n\nexport const HeaderRail = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderRail({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__rail\", className)} {...props} />;\n});\n\nexport const HeaderBrand = forwardRef<HTMLAnchorElement, AnchorHTMLAttributes<HTMLAnchorElement>>(function HeaderBrand({ children, className, ...props }, ref) {\n\treturn (\n\t\t<a ref={ref} className={cx(\"lyds-header__brand\", className)} {...props}>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport interface HeaderNavProps extends HTMLAttributes<HTMLElement> {\n\tlabel?: string;\n}\n\nexport const HeaderNav = forwardRef<HTMLElement, HeaderNavProps>(function HeaderNav({ className, label = \"主要導覽\", ...props }, ref) {\n\treturn <nav ref={ref} aria-label={label} className={cx(\"lyds-header__nav\", className)} {...props} />;\n});\n\nexport const HeaderActions = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderActions({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__actions\", className)} {...props} />;\n});\n\nexport const HeaderStatus = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderStatus({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__status\", className)} {...props} />;\n});\n\nexport interface TabBarProps extends HTMLAttributes<HTMLElement> {\n\tlabel?: string;\n}\n\nexport const TabBar = forwardRef<HTMLElement, TabBarProps>(function TabBar({ className, label = \"應用程式區段\", ...props }, ref) {\n\treturn <nav ref={ref} aria-label={label} className={cx(\"lyds-tab-bar\", className)} {...props} />;\n});\n\nexport const TabBarList = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(function TabBarList({ className, ...props }, ref) {\n\treturn <ul ref={ref} className={cx(\"lyds-tab-bar__list\", className)} {...props} />;\n});\n\nexport const TabBarItem = forwardRef<HTMLLIElement, LiHTMLAttributes<HTMLLIElement>>(function TabBarItem({ className, ...props }, ref) {\n\treturn <li ref={ref} className={cx(\"lyds-tab-bar__item\", className)} {...props} />;\n});\n\nexport interface TabBarLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tselected?: boolean;\n\tdisabled?: boolean;\n}\n\nexport const TabBarLink = forwardRef<HTMLAnchorElement, TabBarLinkProps>(function TabBarLink({ children, className, selected = false, disabled = false, href, onClick, tabIndex, ...props }, ref) {\n\tconst interactionProps = {\n\t\tonClick: (event: MouseEvent<HTMLAnchorElement>) => {\n\t\t\tif (disabled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonClick?.(event);\n\t\t},\n\t\ttabIndex: disabled ? -1 : tabIndex\n\t};\n\n\treturn (\n\t\t<a\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\taria-current={selected ? \"page\" : undefined}\n\t\t\taria-disabled={disabled || undefined}\n\t\t\tclassName={cx(\"lyds-tab-bar__link\", className)}\n\t\t\tdata-disabled={disabled ? \"\" : undefined}\n\t\t\tdata-selected={selected ? \"\" : undefined}\n\t\t\thref={disabled ? undefined : href}\n\t\t\t{...interactionProps}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport const TabBarIcon = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(function TabBarIcon({ className, ...props }, ref) {\n\treturn <span ref={ref} aria-hidden=\"true\" className={cx(\"lyds-tab-bar__icon\", className)} {...props} />;\n});\n\nexport const TabBarLabel = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(function TabBarLabel({ className, ...props }, ref) {\n\treturn <span ref={ref} className={cx(\"lyds-tab-bar__label\", className)} {...props} />;\n});\n"],"mappings":";;;;AAIA,IAAa,IAAS,EAAqD,SAAgB,EAAE,cAAW,GAAG,KAAS,GAAK;CACxH,OAAO,kBAAC,UAAD;EAAa;EAAK,WAAW,EAAG,eAAe,CAAS;EAAG,GAAI;CAAQ,CAAA;AAC/E,CAAC,GAEY,IAAa,EAA2D,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACtI,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,qBAAqB,CAAS;EAAG,GAAI;CAAQ,CAAA;AAClF,CAAC,GAEY,IAAc,EAAuE,SAAqB,EAAE,aAAU,cAAW,GAAG,KAAS,GAAK;CAC9J,OACC,kBAAC,KAAD;EAAQ;EAAK,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;EAC/D;CACC,CAAA;AAEL,CAAC,GAMY,IAAY,EAAwC,SAAmB,EAAE,cAAW,WAAQ,QAAQ,GAAG,KAAS,GAAK;CACjI,OAAO,kBAAC,OAAD;EAAU;EAAK,cAAY;EAAO,WAAW,EAAG,oBAAoB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACpG,CAAC,GAEY,IAAgB,EAA2D,SAAuB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC5I,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,wBAAwB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACrF,CAAC,GA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O,kBAAC,QAAD;EAAW;EAAK,eAAY;EAAO,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACvG,CAAC,GAEY,IAAc,EAA6D,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC1I,OAAO,kBAAC,QAAD;EAAW;EAAK,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACrF,CAAC"}
1
+ {"version":3,"file":"header-tab-bar.js","names":[],"sources":["../../../src/components/navigation-data/header-tab-bar.tsx"],"sourcesContent":["import { forwardRef, type AnchorHTMLAttributes, type HTMLAttributes, type LiHTMLAttributes, type MouseEvent } from \"react\";\n\nimport { cx } from \"@/internal\";\nimport { useMessages } from \"@/intl\";\nexport const Header = forwardRef<HTMLElement, HTMLAttributes<HTMLElement>>(function Header({ className, ...props }, ref) {\n\treturn <header ref={ref} className={cx(\"lyds-header\", className)} {...props} />;\n});\n\nexport const HeaderRail = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderRail({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__rail\", className)} {...props} />;\n});\n\nexport const HeaderBrand = forwardRef<HTMLAnchorElement, AnchorHTMLAttributes<HTMLAnchorElement>>(function HeaderBrand({ children, className, ...props }, ref) {\n\treturn (\n\t\t<a ref={ref} className={cx(\"lyds-header__brand\", className)} {...props}>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport interface HeaderNavProps extends HTMLAttributes<HTMLElement> {\n\tlabel?: string;\n}\n\nexport const HeaderNav = forwardRef<HTMLElement, HeaderNavProps>(function HeaderNav({ className, label, ...props }, ref) {\n\tconst messages = useMessages();\n\treturn <nav ref={ref} aria-label={label ?? messages.headerNavLabel} className={cx(\"lyds-header__nav\", className)} {...props} />;\n});\n\nexport const HeaderActions = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderActions({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__actions\", className)} {...props} />;\n});\n\nexport const HeaderStatus = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(function HeaderStatus({ className, ...props }, ref) {\n\treturn <div ref={ref} className={cx(\"lyds-header__status\", className)} {...props} />;\n});\n\nexport interface TabBarProps extends HTMLAttributes<HTMLElement> {\n\tlabel?: string;\n}\n\nexport const TabBar = forwardRef<HTMLElement, TabBarProps>(function TabBar({ className, label, ...props }, ref) {\n\tconst messages = useMessages();\n\treturn <nav ref={ref} aria-label={label ?? messages.tabBarLabel} className={cx(\"lyds-tab-bar\", className)} {...props} />;\n});\n\nexport const TabBarList = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(function TabBarList({ className, ...props }, ref) {\n\treturn <ul ref={ref} className={cx(\"lyds-tab-bar__list\", className)} {...props} />;\n});\n\nexport const TabBarItem = forwardRef<HTMLLIElement, LiHTMLAttributes<HTMLLIElement>>(function TabBarItem({ className, ...props }, ref) {\n\treturn <li ref={ref} className={cx(\"lyds-tab-bar__item\", className)} {...props} />;\n});\n\nexport interface TabBarLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n\tselected?: boolean;\n\tdisabled?: boolean;\n}\n\nexport const TabBarLink = forwardRef<HTMLAnchorElement, TabBarLinkProps>(function TabBarLink({ children, className, selected = false, disabled = false, href, onClick, tabIndex, ...props }, ref) {\n\tconst interactionProps = {\n\t\tonClick: (event: MouseEvent<HTMLAnchorElement>) => {\n\t\t\tif (disabled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonClick?.(event);\n\t\t},\n\t\ttabIndex: disabled ? -1 : tabIndex\n\t};\n\n\treturn (\n\t\t<a\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t\taria-current={selected ? \"page\" : undefined}\n\t\t\taria-disabled={disabled || undefined}\n\t\t\tclassName={cx(\"lyds-tab-bar__link\", className)}\n\t\t\tdata-disabled={disabled ? \"\" : undefined}\n\t\t\tdata-selected={selected ? \"\" : undefined}\n\t\t\thref={disabled ? undefined : href}\n\t\t\t{...interactionProps}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n});\n\nexport const TabBarIcon = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(function TabBarIcon({ className, ...props }, ref) {\n\treturn <span ref={ref} aria-hidden=\"true\" className={cx(\"lyds-tab-bar__icon\", className)} {...props} />;\n});\n\nexport const TabBarLabel = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(function TabBarLabel({ className, ...props }, ref) {\n\treturn <span ref={ref} className={cx(\"lyds-tab-bar__label\", className)} {...props} />;\n});\n"],"mappings":";;;;;AAIA,IAAa,IAAS,EAAqD,SAAgB,EAAE,cAAW,GAAG,KAAS,GAAK;CACxH,OAAO,kBAAC,UAAD;EAAa;EAAK,WAAW,EAAG,eAAe,CAAS;EAAG,GAAI;CAAQ,CAAA;AAC/E,CAAC,GAEY,IAAa,EAA2D,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACtI,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,EAAG,qBAAqB,CAAS;EAAG,GAAI;CAAQ,CAAA;AAClF,CAAC,GAEY,IAAc,EAAuE,SAAqB,EAAE,aAAU,cAAW,GAAG,KAAS,GAAK;CAC9J,OACC,kBAAC,KAAD;EAAQ;EAAK,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;EAC/D;CACC,CAAA;AAEL,CAAC,GAMY,IAAY,EAAwC,SAAmB,EAAE,cAAW,UAAO,GAAG,KAAS,GAAK;CACxH,IAAM,IAAW,EAAY;CAC7B,OAAO,kBAAC,OAAD;EAAU;EAAK,cAAY,KAAS,EAAS;EAAgB,WAAW,EAAG,oBAAoB,CAAS;EAAG,GAAI;CAAQ,CAAA;AAC/H,CAAC,GAEY,IAAgB,EAA2D,SAAuB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC5I,OAAO,kBAAC,OAAD;EAAU;EAAK,WAAW,E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CACC,CAAA;AAEL,CAAC,GAEY,IAAa,EAA6D,SAAoB,EAAE,cAAW,GAAG,KAAS,GAAK;CACxI,OAAO,kBAAC,QAAD;EAAW;EAAK,eAAY;EAAO,WAAW,EAAG,sBAAsB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACvG,CAAC,GAEY,IAAc,EAA6D,SAAqB,EAAE,cAAW,GAAG,KAAS,GAAK;CAC1I,OAAO,kBAAC,QAAD;EAAW;EAAK,WAAW,EAAG,uBAAuB,CAAS;EAAG,GAAI;CAAQ,CAAA;AACrF,CAAC"}
@@ -1,7 +1,7 @@
1
- export * from './breadcrumb-pagination.js';
2
- export * from './command-palette.js';
3
- export * from './header-tab-bar.js';
4
- export * from './menubar-toolbar.js';
5
- export * from './navigation-menu.js';
6
- export * from './scroll-area.js';
7
- export * from './table-collection.js';
1
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, type BreadcrumbProps, type BreadcrumbSeparatorProps, type PaginationButtonProps, type PaginationLinkProps, type PaginationProps } from './breadcrumb-pagination.js';
2
+ export { CommandPaletteNamespace as CommandPalette, CommandPaletteBackdrop, CommandPaletteClose, CommandPaletteDescription, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteGroupLabel, CommandPaletteInput, CommandPaletteItem, CommandPaletteItemIndicator, CommandPaletteLabel, CommandPaletteList, CommandPalettePopup, CommandPalettePortal, CommandPaletteSeparator, CommandPaletteShortcut, CommandPaletteStatus, CommandPaletteTitle, CommandPaletteTrigger, CommandPaletteViewport, type CommandPaletteOpenChangeDetails, type CommandPaletteProps } from './command-palette.js';
3
+ export { Header, HeaderActions, HeaderBrand, HeaderNav, HeaderRail, HeaderStatus, TabBar, TabBarIcon, TabBarItem, TabBarLabel, TabBarLink, TabBarList, type HeaderNavProps, type TabBarLinkProps, type TabBarProps } from './header-tab-bar.js';
4
+ export { Menubar, MenubarCheckboxItem, MenubarCheckboxItemIndicator, MenubarGroup, MenubarGroupLabel, MenubarItem, MenubarLinkItem, MenubarMenu, MenubarPopup, MenubarPortal, MenubarPositioner, MenubarRadioGroup, MenubarRadioItem, MenubarRadioItemIndicator, MenubarSeparator, MenubarSubmenu, MenubarSubmenuTrigger, MenubarTrigger, Toolbar, ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarSeparator } from './menubar-toolbar.js';
5
+ export { NavigationMenu, NavigationMenuArrow, NavigationMenuContent, NavigationMenuIcon, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPopup, NavigationMenuPortal, NavigationMenuPositioner, NavigationMenuTrigger, NavigationMenuViewport } from './navigation-menu.js';
6
+ export { ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport } from './scroll-area.js';
7
+ export { Collection, CollectionActions, CollectionButton, CollectionContent, CollectionDescription, CollectionHeading, CollectionItem, CollectionLink, CollectionMeta, DataTable, DataTableControls, DataTableDescription, DataTableHeader, DataTableRegion, DataTableStatus, DataTableTitle, List, ListActions, ListButton, ListContent, ListDescription, ListHeading, ListItem, ListLink, ListMeta, OrderedCollection, OrderedList, Table, TableBody, TableCaption, TableCell, TableFooter, TableFrame, TableHead, TableHeader, TableRow, type CollectionButtonProps, type CollectionItemProps, type CollectionLinkProps, type CollectionProps, type DataTableRegionProps, type OrderedCollectionProps, type TableCellProps, type TableHeadProps } from './table-collection.js';
@@ -1,4 +1,4 @@
1
- import { withBaseClass as e } from "./utils.js";
1
+ import { withStateClassName as e } from "../../internal/class-names.js";
2
2
  import { forwardRef as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import { CheckIcon as r } from "@phosphor-icons/react/dist/csr/Check";
@@ -1 +1 @@
1
- {"version":3,"file":"menubar-toolbar.js","names":[],"sources":["../../../src/components/navigation-data/menubar-toolbar.tsx"],"sourcesContent":["import { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { Toolbar as BaseToolbar } from \"@base-ui/react/toolbar\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { CircleIcon } from \"@phosphor-icons/react/dist/csr/Circle\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport { withBaseClass } from \"./utils.js\";\n\nexport const Menubar = forwardRef<ComponentRef<typeof BaseMenubar>, BaseMenubar.Props>(function Menubar(props, ref) {\n\tconst { className, ...menubarProps } = props;\n\treturn <BaseMenubar ref={ref} className={withBaseClass<BaseMenubar.State>(\"lyds-menubar\", className)} {...menubarProps} />;\n});\n\nexport function MenubarMenu<Payload = unknown>(props: BaseMenu.Root.Props<Payload>) {\n\treturn <BaseMenu.Root {...props} />;\n}\n\nfunction MenubarTriggerInner<Payload = unknown>(props: BaseMenu.Trigger.Props<Payload>, ref: ForwardedRef<HTMLButtonElement>) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.Trigger ref={ref} className={withBaseClass<BaseMenu.Trigger.State>(\"lyds-menubar__trigger\", className)} {...triggerProps} />;\n}\n\nexport const MenubarTrigger = forwardRef(MenubarTriggerInner) as <Payload = unknown>(props: BaseMenu.Trigger.Props<Payload> & RefAttributes<HTMLButtonElement>) => ReactElement;\n\nexport const MenubarPortal = BaseMenu.Portal;\n\nexport const MenubarPositioner = forwardRef<ComponentRef<typeof BaseMenu.Positioner>, BaseMenu.Positioner.Props>(function MenubarPositioner(props, ref) {\n\tconst { className, sideOffset = 6, ...positionerProps } = props;\n\treturn <BaseMenu.Positioner ref={ref} className={withBaseClass<BaseMenu.Positioner.State>(\"lyds-menubar__positioner\", className)} sideOffset={sideOffset} {...positionerProps} />;\n});\n\nexport const MenubarPopup = forwardRef<ComponentRef<typeof BaseMenu.Popup>, BaseMenu.Popup.Props>(function MenubarPopup(props, ref) {\n\tconst { className, ...popupProps } = props;\n\treturn <BaseMenu.Popup ref={ref} className={withBaseClass<BaseMenu.Popup.State>(\"lyds-menubar__popup\", className)} {...popupProps} />;\n});\n\nexport const MenubarItem = forwardRef<ComponentRef<typeof BaseMenu.Item>, BaseMenu.Item.Props>(function MenubarItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.Item ref={ref} className={withBaseClass<BaseMenu.Item.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarLinkItem = forwardRef<ComponentRef<typeof BaseMenu.LinkItem>, BaseMenu.LinkItem.Props>(function MenubarLinkItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.LinkItem ref={ref} className={withBaseClass<BaseMenu.LinkItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItem = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItem>, BaseMenu.CheckboxItem.Props>(function MenubarCheckboxItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.CheckboxItem ref={ref} className={withBaseClass<BaseMenu.CheckboxItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItemIndicator>, BaseMenu.CheckboxItemIndicator.Props>(function MenubarCheckboxItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator ref={ref} className={withBaseClass<BaseMenu.CheckboxItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenubarRadioGroup = BaseMenu.RadioGroup;\n\nexport const MenubarRadioItem = forwardRef<ComponentRef<typeof BaseMenu.RadioItem>, BaseMenu.RadioItem.Props>(function MenubarRadioItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.RadioItem ref={ref} className={withBaseClass<BaseMenu.RadioItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarRadioItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.RadioItemIndicator>, BaseMenu.RadioItemIndicator.Props>(function MenubarRadioItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator ref={ref} className={withBaseClass<BaseMenu.RadioItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CircleIcon aria-hidden=\"true\" weight=\"fill\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenubarGroup = BaseMenu.Group;\n\nexport const MenubarGroupLabel = forwardRef<ComponentRef<typeof BaseMenu.GroupLabel>, BaseMenu.GroupLabel.Props>(function MenubarGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseMenu.GroupLabel ref={ref} className={withBaseClass<BaseMenu.GroupLabel.State>(\"lyds-menubar__group-label\", className)} {...labelProps} />;\n});\n\nexport const MenubarSeparator = forwardRef<ComponentRef<typeof BaseMenu.Separator>, BaseMenu.Separator.Props>(function MenubarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseMenu.Separator ref={ref} className={withBaseClass<BaseMenu.Separator.State>(\"lyds-menubar__separator\", className)} {...separatorProps} />;\n});\n\nexport const MenubarSubmenu = BaseMenu.SubmenuRoot;\n\nexport const MenubarSubmenuTrigger = forwardRef<ComponentRef<typeof BaseMenu.SubmenuTrigger>, BaseMenu.SubmenuTrigger.Props>(function MenubarSubmenuTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.SubmenuTrigger ref={ref} className={withBaseClass<BaseMenu.SubmenuTrigger.State>(\"lyds-menubar__item\", className)} {...triggerProps} />;\n});\n\nexport const Toolbar = forwardRef<ComponentRef<typeof BaseToolbar.Root>, BaseToolbar.Root.Props>(function Toolbar(props, ref) {\n\tconst { className, ...toolbarProps } = props;\n\treturn <BaseToolbar.Root ref={ref} className={withBaseClass<BaseToolbar.Root.State>(\"lyds-toolbar\", className)} {...toolbarProps} />;\n});\n\nexport const ToolbarGroup = forwardRef<ComponentRef<typeof BaseToolbar.Group>, BaseToolbar.Group.Props>(function ToolbarGroup(props, ref) {\n\tconst { className, ...groupProps } = props;\n\treturn <BaseToolbar.Group ref={ref} className={withBaseClass<BaseToolbar.Group.State>(\"lyds-toolbar__group\", className)} {...groupProps} />;\n});\n\nexport const ToolbarButton = forwardRef<ComponentRef<typeof BaseToolbar.Button>, BaseToolbar.Button.Props>(function ToolbarButton(props, ref) {\n\tconst { className, ...buttonProps } = props;\n\treturn <BaseToolbar.Button ref={ref} className={withBaseClass<BaseToolbar.Button.State>(\"lyds-toolbar__button\", className)} {...buttonProps} />;\n});\n\nexport const ToolbarLink = forwardRef<ComponentRef<typeof BaseToolbar.Link>, BaseToolbar.Link.Props>(function ToolbarLink(props, ref) {\n\tconst { className, ...linkProps } = props;\n\treturn <BaseToolbar.Link ref={ref} className={withBaseClass<BaseToolbar.Link.State>(\"lyds-toolbar__button\", className)} {...linkProps} />;\n});\n\nexport const ToolbarInput = forwardRef<ComponentRef<typeof BaseToolbar.Input>, BaseToolbar.Input.Props>(function ToolbarInput(props, ref) {\n\tconst { className, ...inputProps } = props;\n\treturn <BaseToolbar.Input ref={ref} className={withBaseClass<BaseToolbar.Input.State>(\"lyds-toolbar__input\", className)} {...inputProps} />;\n});\n\nexport const ToolbarSeparator = forwardRef<ComponentRef<typeof BaseToolbar.Separator>, BaseToolbar.Separator.Props>(function ToolbarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseToolbar.Separator ref={ref} className={withBaseClass<BaseToolbar.Separator.State>(\"lyds-toolbar__separator\", className)} {...separatorProps} />;\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AAG,GAAI;CAAa,CAAA;AAC3I,CAAC,GAEY,IAAmB,EAAoF,SAA0B,GAAO,GAAK;CACzJ,IAAM,EAAE,cAAW,GAAG,MAAmB;CACzC,OAAO,kBAAC,EAAY,WAAb;EAA4B;EAAK,WAAW,EAA2C,2BAA2B,CAAS;EAAG,GAAI;CAAiB,CAAA;AAC3J,CAAC"}
1
+ {"version":3,"file":"menubar-toolbar.js","names":[],"sources":["../../../src/components/navigation-data/menubar-toolbar.tsx"],"sourcesContent":["import { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { Toolbar as BaseToolbar } from \"@base-ui/react/toolbar\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { CircleIcon } from \"@phosphor-icons/react/dist/csr/Circle\";\nimport { forwardRef, type ComponentRef, type ForwardedRef, type ReactElement, type RefAttributes } from \"react\";\n\nimport { withStateClassName } from \"@/internal\";\nexport const Menubar = forwardRef<ComponentRef<typeof BaseMenubar>, BaseMenubar.Props>(function Menubar(props, ref) {\n\tconst { className, ...menubarProps } = props;\n\treturn <BaseMenubar ref={ref} className={withStateClassName<BaseMenubar.State>(\"lyds-menubar\", className)} {...menubarProps} />;\n});\n\nexport function MenubarMenu<Payload = unknown>(props: BaseMenu.Root.Props<Payload>) {\n\treturn <BaseMenu.Root {...props} />;\n}\n\nfunction MenubarTriggerInner<Payload = unknown>(props: BaseMenu.Trigger.Props<Payload>, ref: ForwardedRef<HTMLButtonElement>) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.Trigger ref={ref} className={withStateClassName<BaseMenu.Trigger.State>(\"lyds-menubar__trigger\", className)} {...triggerProps} />;\n}\n\nexport const MenubarTrigger = forwardRef(MenubarTriggerInner) as <Payload = unknown>(props: BaseMenu.Trigger.Props<Payload> & RefAttributes<HTMLButtonElement>) => ReactElement;\n\nexport const MenubarPortal = BaseMenu.Portal;\n\nexport const MenubarPositioner = forwardRef<ComponentRef<typeof BaseMenu.Positioner>, BaseMenu.Positioner.Props>(function MenubarPositioner(props, ref) {\n\tconst { className, sideOffset = 6, ...positionerProps } = props;\n\treturn <BaseMenu.Positioner ref={ref} className={withStateClassName<BaseMenu.Positioner.State>(\"lyds-menubar__positioner\", className)} sideOffset={sideOffset} {...positionerProps} />;\n});\n\nexport const MenubarPopup = forwardRef<ComponentRef<typeof BaseMenu.Popup>, BaseMenu.Popup.Props>(function MenubarPopup(props, ref) {\n\tconst { className, ...popupProps } = props;\n\treturn <BaseMenu.Popup ref={ref} className={withStateClassName<BaseMenu.Popup.State>(\"lyds-menubar__popup\", className)} {...popupProps} />;\n});\n\nexport const MenubarItem = forwardRef<ComponentRef<typeof BaseMenu.Item>, BaseMenu.Item.Props>(function MenubarItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.Item ref={ref} className={withStateClassName<BaseMenu.Item.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarLinkItem = forwardRef<ComponentRef<typeof BaseMenu.LinkItem>, BaseMenu.LinkItem.Props>(function MenubarLinkItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.LinkItem ref={ref} className={withStateClassName<BaseMenu.LinkItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItem = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItem>, BaseMenu.CheckboxItem.Props>(function MenubarCheckboxItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.CheckboxItem ref={ref} className={withStateClassName<BaseMenu.CheckboxItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarCheckboxItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.CheckboxItemIndicator>, BaseMenu.CheckboxItemIndicator.Props>(function MenubarCheckboxItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.CheckboxItemIndicator ref={ref} className={withStateClassName<BaseMenu.CheckboxItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CheckIcon aria-hidden=\"true\" weight=\"bold\" />}\n\t\t</BaseMenu.CheckboxItemIndicator>\n\t);\n});\n\nexport const MenubarRadioGroup = BaseMenu.RadioGroup;\n\nexport const MenubarRadioItem = forwardRef<ComponentRef<typeof BaseMenu.RadioItem>, BaseMenu.RadioItem.Props>(function MenubarRadioItem(props, ref) {\n\tconst { className, ...itemProps } = props;\n\treturn <BaseMenu.RadioItem ref={ref} className={withStateClassName<BaseMenu.RadioItem.State>(\"lyds-menubar__item\", className)} {...itemProps} />;\n});\n\nexport const MenubarRadioItemIndicator = forwardRef<ComponentRef<typeof BaseMenu.RadioItemIndicator>, BaseMenu.RadioItemIndicator.Props>(function MenubarRadioItemIndicator(props, ref) {\n\tconst { className, children, ...indicatorProps } = props;\n\treturn (\n\t\t<BaseMenu.RadioItemIndicator ref={ref} className={withStateClassName<BaseMenu.RadioItemIndicator.State>(\"lyds-menubar__indicator\", className)} {...indicatorProps}>\n\t\t\t{children ?? <CircleIcon aria-hidden=\"true\" weight=\"fill\" />}\n\t\t</BaseMenu.RadioItemIndicator>\n\t);\n});\n\nexport const MenubarGroup = BaseMenu.Group;\n\nexport const MenubarGroupLabel = forwardRef<ComponentRef<typeof BaseMenu.GroupLabel>, BaseMenu.GroupLabel.Props>(function MenubarGroupLabel(props, ref) {\n\tconst { className, ...labelProps } = props;\n\treturn <BaseMenu.GroupLabel ref={ref} className={withStateClassName<BaseMenu.GroupLabel.State>(\"lyds-menubar__group-label\", className)} {...labelProps} />;\n});\n\nexport const MenubarSeparator = forwardRef<ComponentRef<typeof BaseMenu.Separator>, BaseMenu.Separator.Props>(function MenubarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseMenu.Separator ref={ref} className={withStateClassName<BaseMenu.Separator.State>(\"lyds-menubar__separator\", className)} {...separatorProps} />;\n});\n\nexport const MenubarSubmenu = BaseMenu.SubmenuRoot;\n\nexport const MenubarSubmenuTrigger = forwardRef<ComponentRef<typeof BaseMenu.SubmenuTrigger>, BaseMenu.SubmenuTrigger.Props>(function MenubarSubmenuTrigger(props, ref) {\n\tconst { className, ...triggerProps } = props;\n\treturn <BaseMenu.SubmenuTrigger ref={ref} className={withStateClassName<BaseMenu.SubmenuTrigger.State>(\"lyds-menubar__item\", className)} {...triggerProps} />;\n});\n\nexport const Toolbar = forwardRef<ComponentRef<typeof BaseToolbar.Root>, BaseToolbar.Root.Props>(function Toolbar(props, ref) {\n\tconst { className, ...toolbarProps } = props;\n\treturn <BaseToolbar.Root ref={ref} className={withStateClassName<BaseToolbar.Root.State>(\"lyds-toolbar\", className)} {...toolbarProps} />;\n});\n\nexport const ToolbarGroup = forwardRef<ComponentRef<typeof BaseToolbar.Group>, BaseToolbar.Group.Props>(function ToolbarGroup(props, ref) {\n\tconst { className, ...groupProps } = props;\n\treturn <BaseToolbar.Group ref={ref} className={withStateClassName<BaseToolbar.Group.State>(\"lyds-toolbar__group\", className)} {...groupProps} />;\n});\n\nexport const ToolbarButton = forwardRef<ComponentRef<typeof BaseToolbar.Button>, BaseToolbar.Button.Props>(function ToolbarButton(props, ref) {\n\tconst { className, ...buttonProps } = props;\n\treturn <BaseToolbar.Button ref={ref} className={withStateClassName<BaseToolbar.Button.State>(\"lyds-toolbar__button\", className)} {...buttonProps} />;\n});\n\nexport const ToolbarLink = forwardRef<ComponentRef<typeof BaseToolbar.Link>, BaseToolbar.Link.Props>(function ToolbarLink(props, ref) {\n\tconst { className, ...linkProps } = props;\n\treturn <BaseToolbar.Link ref={ref} className={withStateClassName<BaseToolbar.Link.State>(\"lyds-toolbar__button\", className)} {...linkProps} />;\n});\n\nexport const ToolbarInput = forwardRef<ComponentRef<typeof BaseToolbar.Input>, BaseToolbar.Input.Props>(function ToolbarInput(props, ref) {\n\tconst { className, ...inputProps } = props;\n\treturn <BaseToolbar.Input ref={ref} className={withStateClassName<BaseToolbar.Input.State>(\"lyds-toolbar__input\", className)} {...inputProps} />;\n});\n\nexport const ToolbarSeparator = forwardRef<ComponentRef<typeof BaseToolbar.Separator>, BaseToolbar.Separator.Props>(function ToolbarSeparator(props, ref) {\n\tconst { className, ...separatorProps } = props;\n\treturn <BaseToolbar.Separator ref={ref} className={withStateClassName<BaseToolbar.Separator.State>(\"lyds-toolbar__separator\", className)} {...separatorProps} />;\n});\n"],"mappings":";;;;;;;;;AAQA,IAAa,IAAU,EAAgE,SAAiB,GAAO,GAAK;CACnH,IAAM,EAAE,cAAW,GAAG,MAAiB;CACvC,OAAO,kBAAC,GAAD;EAAkB;EAAK,WAAW,EAAsC,gBAAgB,CAAS;EAAG,GAAI;CAAe,CAAA;AAC/H,CAAC;AAED,SAAgB,EAA+B,GAAqC;CACnF,OAAO,kBAAC,EAAS,MAAV,EAAe,GAAI,EAAQ,CAAA;AACnC;AAEA,SAAS,EAAuC,GAAwC,GAAsC;CAC7H,IAAM,EAAE,cAAW,GAAG,MAAiB;CACvC,OAAO,kBAAC,EAAS,SAAV;EAAuB;EAAK,WAAW,EAA2C,yBAAyB,CAAS;EAAG,GAAI;CAAe,CAAA;AAClJ;AAEA,IAAa,IAAiB,EAAW,CAAmB,GAE/C,IAAgB,EAAS,QAEzB,IAAoB,EAAgF,SAA2B,GAAO,GAAK;CACvJ,IAAM,EAAE,cAAW,gBAAa,GAAG,GAAG,MAAoB;CAC1D,OAAO,kBAAC,EAAS,YAAV;EAA0B;EAAK,WAAW,EAA8C,4BAA4B,CAAS;EAAe;EAAY,GAAI;CAAkB,CAAA;AACtL,CAAC,GAEY,IAAe,EAAsE,SAAsB,GAAO,GAAK;CACnI,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAS,OAAV;EAAqB;EAAK,WAAW,EAAyC,uBAAuB,CAAS;EAAG,GAAI;CAAa,CAAA;AAC1I,CAAC,GAEY,IAAc,EAAoE,SAAqB,GAA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AAM,EAAE,cAAW,GAAG,MAAc;CACpC,OAAO,kBAAC,EAAY,MAAb;EAAuB;EAAK,WAAW,EAA2C,wBAAwB,CAAS;EAAG,GAAI;CAAY,CAAA;AAC9I,CAAC,GAEY,IAAe,EAA4E,SAAsB,GAAO,GAAK;CACzI,IAAM,EAAE,cAAW,GAAG,MAAe;CACrC,OAAO,kBAAC,EAAY,OAAb;EAAwB;EAAK,WAAW,EAA4C,uBAAuB,CAAS;EAAG,GAAI;CAAa,CAAA;AAChJ,CAAC,GAEY,IAAmB,EAAoF,SAA0B,GAAO,GAAK;CACzJ,IAAM,EAAE,cAAW,GAAG,MAAmB;CACzC,OAAO,kBAAC,EAAY,WAAb;EAA4B;EAAK,WAAW,EAAgD,2BAA2B,CAAS;EAAG,GAAI;CAAiB,CAAA;AAChK,CAAC"}
@@ -1,4 +1,4 @@
1
- import { withBaseClass as e } from "./utils.js";
1
+ import { withStateClassName as e } from "../../internal/class-names.js";
2
2
  import { forwardRef as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  import { NavigationMenu as r } from "@base-ui/react/navigation-menu";