@mond-design-system/react 1.0.0-alpha.3 → 1.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,28 +7,8 @@ function cx(...parts) {
7
7
  return parts.filter(Boolean).join(" ");
8
8
  }
9
9
 
10
- // src/components/Text/Text.module.css
11
- var Text_default = {
12
- text: "Text_text",
13
- "variant-body": "Text_variant-body",
14
- "variant-label": "Text_variant-label",
15
- "variant-note": "Text_variant-note",
16
- "variant-meta": "Text_variant-meta",
17
- "variant-eyebrow": "Text_variant-eyebrow",
18
- "tone-primary": "Text_tone-primary",
19
- "tone-secondary": "Text_tone-secondary",
20
- "tone-muted": "Text_tone-muted",
21
- "tone-inverse": "Text_tone-inverse",
22
- "tone-accent": "Text_tone-accent",
23
- "tone-on-media": "Text_tone-on-media",
24
- "tone-danger": "Text_tone-danger",
25
- "tone-warning": "Text_tone-warning",
26
- "tone-success": "Text_tone-success",
27
- "align-left": "Text_align-left",
28
- "align-center": "Text_align-center",
29
- "align-right": "Text_align-right",
30
- truncate: "Text_truncate"
31
- };
10
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Text/Text.module.css?mds-scoped
11
+ var Text_module_default = { "text": "mds-Text__text", "variant-body": "mds-Text__variant-body", "variant-label": "mds-Text__variant-label", "variant-note": "mds-Text__variant-note", "variant-meta": "mds-Text__variant-meta", "variant-eyebrow": "mds-Text__variant-eyebrow", "tone-primary": "mds-Text__tone-primary", "tone-secondary": "mds-Text__tone-secondary", "tone-muted": "mds-Text__tone-muted", "tone-inverse": "mds-Text__tone-inverse", "tone-accent": "mds-Text__tone-accent", "tone-on-media": "mds-Text__tone-on-media", "tone-danger": "mds-Text__tone-danger", "tone-warning": "mds-Text__tone-warning", "tone-success": "mds-Text__tone-success", "align-left": "mds-Text__align-left", "align-center": "mds-Text__align-center", "align-right": "mds-Text__align-right", "truncate": "mds-Text__truncate" };
32
12
 
33
13
  // src/components/Text/Text.tsx
34
14
  var ELEMENT = {
@@ -56,29 +36,19 @@ function Text({
56
36
  const resolvedTone = tone ?? DEFAULT_TONE[variant] ?? "primary";
57
37
  return createElement(element, {
58
38
  className: cx(
59
- Text_default.text,
60
- Text_default[`variant-${variant}`],
61
- Text_default[`tone-${resolvedTone}`],
62
- align && Text_default[`align-${align}`],
63
- truncate && Text_default.truncate,
39
+ Text_module_default.text,
40
+ Text_module_default[`variant-${variant}`],
41
+ Text_module_default[`tone-${resolvedTone}`],
42
+ align && Text_module_default[`align-${align}`],
43
+ truncate && Text_module_default.truncate,
64
44
  className
65
45
  ),
66
46
  ...rest
67
47
  });
68
48
  }
69
49
 
70
- // src/components/Heading/Heading.module.css
71
- var Heading_default = {
72
- heading: "Heading_heading",
73
- "variant-display": "Heading_variant-display",
74
- "variant-title": "Heading_variant-title",
75
- "variant-subtitle": "Heading_variant-subtitle",
76
- "tone-primary": "Heading_tone-primary",
77
- "tone-secondary": "Heading_tone-secondary",
78
- "tone-inverse": "Heading_tone-inverse",
79
- "tone-accent": "Heading_tone-accent",
80
- "tone-on-media": "Heading_tone-on-media"
81
- };
50
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Heading/Heading.module.css?mds-scoped
51
+ var Heading_module_default = { "heading": "mds-Heading__heading", "variant-display": "mds-Heading__variant-display", "variant-title": "mds-Heading__variant-title", "variant-subtitle": "mds-Heading__variant-subtitle", "tone-primary": "mds-Heading__tone-primary", "tone-secondary": "mds-Heading__tone-secondary", "tone-inverse": "mds-Heading__tone-inverse", "tone-accent": "mds-Heading__tone-accent", "tone-on-media": "mds-Heading__tone-on-media" };
82
52
 
83
53
  // src/components/Heading/Heading.tsx
84
54
  var LEVEL_VARIANT = {
@@ -96,19 +66,17 @@ function Heading({
96
66
  }) {
97
67
  return createElement(`h${level}`, {
98
68
  className: cx(
99
- Heading_default.heading,
100
- Heading_default[`variant-${variant ?? LEVEL_VARIANT[level]}`],
101
- Heading_default[`tone-${tone}`],
69
+ Heading_module_default.heading,
70
+ Heading_module_default[`variant-${variant ?? LEVEL_VARIANT[level]}`],
71
+ Heading_module_default[`tone-${tone}`],
102
72
  className
103
73
  ),
104
74
  ...rest
105
75
  });
106
76
  }
107
77
 
108
- // src/components/Spinner/Spinner.module.css
109
- var Spinner_default = {
110
- spinner: "Spinner_spinner"
111
- };
78
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Spinner/Spinner.module.css?mds-scoped
79
+ var Spinner_module_default = { "spinner": "mds-Spinner__spinner"};
112
80
  function Spinner({
113
81
  size = 20,
114
82
  label = "Loading",
@@ -125,20 +93,15 @@ function Spinner({
125
93
  {
126
94
  role: "status",
127
95
  "aria-label": label,
128
- className: cx(Spinner_default.spinner, className),
96
+ className: cx(Spinner_module_default.spinner, className),
129
97
  style: { ...vars, ...style },
130
98
  ...rest
131
99
  }
132
100
  );
133
101
  }
134
102
 
135
- // src/components/Icon/Icon.module.css
136
- var Icon_default = {
137
- icon: "Icon_icon",
138
- "size-sm": "Icon_size-sm",
139
- "size-md": "Icon_size-md",
140
- "size-lg": "Icon_size-lg"
141
- };
103
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Icon/Icon.module.css?mds-scoped
104
+ var Icon_module_default = { "icon": "mds-Icon__icon", "size-sm": "mds-Icon__size-sm", "size-md": "mds-Icon__size-md", "size-lg": "mds-Icon__size-lg" };
142
105
  var IconContext = createContext(null);
143
106
  function IconProvider({ render, children }) {
144
107
  return /* @__PURE__ */ jsx(IconContext.Provider, { value: render, children });
@@ -156,7 +119,7 @@ function Icon({ name, size = "md", label, className, ...rest }) {
156
119
  return /* @__PURE__ */ jsx(
157
120
  "span",
158
121
  {
159
- className: cx(Icon_default.icon, Icon_default[`size-${size}`], className),
122
+ className: cx(Icon_module_default.icon, Icon_module_default[`size-${size}`], className),
160
123
  ...label ? { role: "img", "aria-label": label } : { "aria-hidden": true },
161
124
  ...rest,
162
125
  children: render?.(name, { size: SIZE_PX[size] })
@@ -164,20 +127,8 @@ function Icon({ name, size = "md", label, className, ...rest }) {
164
127
  );
165
128
  }
166
129
 
167
- // src/components/Button/Button.module.css
168
- var Button_default = {
169
- button: "Button_button",
170
- "size-sm": "Button_size-sm",
171
- "size-md": "Button_size-md",
172
- "size-lg": "Button_size-lg",
173
- "variant-primary": "Button_variant-primary",
174
- "variant-secondary": "Button_variant-secondary",
175
- "variant-ghost": "Button_variant-ghost",
176
- "variant-highlight": "Button_variant-highlight",
177
- "variant-danger": "Button_variant-danger",
178
- fullWidth: "Button_fullWidth",
179
- "icon-only": "Button_icon-only"
180
- };
130
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Button/Button.module.css?mds-scoped
131
+ var Button_module_default = { "button": "mds-Button__button", "size-sm": "mds-Button__size-sm", "size-md": "mds-Button__size-md", "size-lg": "mds-Button__size-lg", "variant-primary": "mds-Button__variant-primary", "variant-secondary": "mds-Button__variant-secondary", "variant-ghost": "mds-Button__variant-ghost", "variant-highlight": "mds-Button__variant-highlight", "variant-danger": "mds-Button__variant-danger", "variant-warning": "mds-Button__variant-warning", "fullWidth": "mds-Button__fullWidth", "icon-only": "mds-Button__icon-only" };
181
132
  var SPINNER_PX = { sm: 16, md: 18, lg: 20 };
182
133
  function Button({
183
134
  variant = "primary",
@@ -202,11 +153,11 @@ function Button({
202
153
  Element,
203
154
  {
204
155
  className: cx(
205
- Button_default.button,
206
- Button_default[`variant-${variant}`],
207
- Button_default[`size-${size}`],
208
- fullWidth && Button_default.fullWidth,
209
- iconOnly && Button_default["icon-only"],
156
+ Button_module_default.button,
157
+ Button_module_default[`variant-${variant}`],
158
+ Button_module_default[`size-${size}`],
159
+ fullWidth && Button_module_default.fullWidth,
160
+ iconOnly && Button_module_default["icon-only"],
210
161
  className
211
162
  ),
212
163
  "aria-busy": loading || void 0,
@@ -221,60 +172,37 @@ function Button({
221
172
  );
222
173
  }
223
174
 
224
- // src/components/Link/Link.module.css
225
- var Link_default = {
226
- link: "Link_link",
227
- "variant-inline": "Link_variant-inline",
228
- "variant-standalone": "Link_variant-standalone",
229
- "variant-plain": "Link_variant-plain",
230
- "size-xs": "Link_size-xs",
231
- "size-sm": "Link_size-sm",
232
- "size-base": "Link_size-base",
233
- "size-lg": "Link_size-lg",
234
- "size-xl": "Link_size-xl"
235
- };
175
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Link/Link.module.css?mds-scoped
176
+ var Link_module_default = { "link": "mds-Link__link", "variant-inline": "mds-Link__variant-inline", "variant-standalone": "mds-Link__variant-standalone", "variant-plain": "mds-Link__variant-plain", "size-xs": "mds-Link__size-xs", "size-sm": "mds-Link__size-sm", "size-base": "mds-Link__size-base", "size-lg": "mds-Link__size-lg", "size-xl": "mds-Link__size-xl" };
236
177
  function Link({
237
178
  variant = "inline",
238
179
  size,
239
180
  external = false,
240
- as: Element = "a",
241
- className,
181
+ as,
242
182
  ...rest
243
183
  }) {
184
+ const Element = as ?? "a";
185
+ const { className, type, ...others } = rest;
244
186
  const externalProps = external ? { target: "_blank", rel: "noopener noreferrer" } : {};
245
- const typeProps = Element === "button" ? { type: rest.type ?? "button" } : {};
187
+ const typeProps = Element === "button" ? { type: type ?? "button" } : type !== void 0 ? { type } : {};
246
188
  return /* @__PURE__ */ jsx(
247
189
  Element,
248
190
  {
249
191
  className: cx(
250
- Link_default.link,
251
- Link_default[`variant-${variant}`],
252
- size && Link_default[`size-${size}`],
192
+ Link_module_default.link,
193
+ Link_module_default[`variant-${variant}`],
194
+ size && Link_module_default[`size-${size}`],
253
195
  className
254
196
  ),
255
197
  ...externalProps,
256
- ...rest,
198
+ ...others,
257
199
  ...typeProps
258
200
  }
259
201
  );
260
202
  }
261
203
 
262
- // src/components/Avatar/Avatar.module.css
263
- var Avatar_default = {
264
- avatar: "Avatar_avatar",
265
- "size-xs": "Avatar_size-xs",
266
- "size-sm": "Avatar_size-sm",
267
- "size-md": "Avatar_size-md",
268
- "size-lg": "Avatar_size-lg",
269
- "size-xl": "Avatar_size-xl",
270
- "tone-1": "Avatar_tone-1",
271
- "tone-2": "Avatar_tone-2",
272
- "tone-3": "Avatar_tone-3",
273
- "tone-4": "Avatar_tone-4",
274
- "tone-5": "Avatar_tone-5",
275
- image: "Avatar_image",
276
- initials: "Avatar_initials"
277
- };
204
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Avatar/Avatar.module.css?mds-scoped
205
+ var Avatar_module_default = { "avatar": "mds-Avatar__avatar", "size-xs": "mds-Avatar__size-xs", "size-sm": "mds-Avatar__size-sm", "size-md": "mds-Avatar__size-md", "size-lg": "mds-Avatar__size-lg", "size-xl": "mds-Avatar__size-xl", "tone-1": "mds-Avatar__tone-1", "tone-2": "mds-Avatar__tone-2", "tone-3": "mds-Avatar__tone-3", "tone-4": "mds-Avatar__tone-4", "tone-5": "mds-Avatar__tone-5", "image": "mds-Avatar__image", "initials": "mds-Avatar__initials" };
278
206
  function initials(name) {
279
207
  const words = name.trim().split(/\s+/).filter(Boolean);
280
208
  const first = words[0]?.[0] ?? "";
@@ -294,19 +222,19 @@ function Avatar({
294
222
  "span",
295
223
  {
296
224
  className: cx(
297
- Avatar_default.avatar,
298
- Avatar_default[`size-${size}`],
299
- tone !== void 0 && Avatar_default[`tone-${tone}`],
225
+ Avatar_module_default.avatar,
226
+ Avatar_module_default[`size-${size}`],
227
+ tone !== void 0 && Avatar_module_default[`tone-${tone}`],
300
228
  className
301
229
  ),
302
230
  "aria-hidden": decorative || void 0,
303
231
  ...rest,
304
- children: src ? /* @__PURE__ */ jsx("img", { className: Avatar_default.image, src, alt: decorative ? "" : name }) : /* @__PURE__ */ jsx(
232
+ children: src ? /* @__PURE__ */ jsx("img", { className: Avatar_module_default.image, src, alt: decorative ? "" : name }) : /* @__PURE__ */ jsx(
305
233
  "span",
306
234
  {
307
235
  role: decorative ? void 0 : "img",
308
236
  "aria-label": decorative ? void 0 : name,
309
- className: Avatar_default.initials,
237
+ className: Avatar_module_default.initials,
310
238
  children: initials(name)
311
239
  }
312
240
  )
@@ -314,15 +242,8 @@ function Avatar({
314
242
  );
315
243
  }
316
244
 
317
- // src/components/AvatarGroup/AvatarGroup.module.css
318
- var AvatarGroup_default = {
319
- group: "AvatarGroup_group",
320
- item: "AvatarGroup_item",
321
- overflow: "AvatarGroup_overflow",
322
- "size-sm": "AvatarGroup_size-sm",
323
- "size-md": "AvatarGroup_size-md",
324
- "size-lg": "AvatarGroup_size-lg"
325
- };
245
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/AvatarGroup/AvatarGroup.module.css?mds-scoped
246
+ var AvatarGroup_module_default = { "group": "mds-AvatarGroup__group", "item": "mds-AvatarGroup__item", "overflow": "mds-AvatarGroup__overflow", "size-xs": "mds-AvatarGroup__size-xs", "size-sm": "mds-AvatarGroup__size-sm", "size-md": "mds-AvatarGroup__size-md", "size-lg": "mds-AvatarGroup__size-lg", "size-xl": "mds-AvatarGroup__size-xl" };
326
247
  function AvatarGroup({
327
248
  children,
328
249
  max = 4,
@@ -333,12 +254,12 @@ function AvatarGroup({
333
254
  const all = Children.toArray(children);
334
255
  const visible = all.slice(0, max);
335
256
  const hidden = all.length - visible.length;
336
- return /* @__PURE__ */ jsxs("div", { className: cx(AvatarGroup_default.group, className), ...rest, children: [
337
- visible.map((child, i) => /* @__PURE__ */ jsx("span", { className: AvatarGroup_default.item, children: child }, i)),
257
+ return /* @__PURE__ */ jsxs("div", { className: cx(AvatarGroup_module_default.group, className), ...rest, children: [
258
+ visible.map((child, i) => /* @__PURE__ */ jsx("span", { className: AvatarGroup_module_default.item, children: child }, i)),
338
259
  hidden > 0 && /* @__PURE__ */ jsxs(
339
260
  "span",
340
261
  {
341
- className: cx(AvatarGroup_default.item, AvatarGroup_default.overflow, AvatarGroup_default[`size-${size}`]),
262
+ className: cx(AvatarGroup_module_default.item, AvatarGroup_module_default.overflow, AvatarGroup_module_default[`size-${size}`]),
342
263
  "aria-label": `${hidden} more`,
343
264
  children: [
344
265
  "+",
@@ -349,30 +270,14 @@ function AvatarGroup({
349
270
  ] });
350
271
  }
351
272
 
352
- // src/components/Badge/Badge.module.css
353
- var Badge_default = {
354
- badge: "Badge_badge",
355
- "tone-neutral": "Badge_tone-neutral",
356
- "tone-accent": "Badge_tone-accent",
357
- "tone-highlight": "Badge_tone-highlight",
358
- "tone-danger": "Badge_tone-danger",
359
- "tone-warning": "Badge_tone-warning",
360
- "tone-success": "Badge_tone-success"
361
- };
273
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Badge/Badge.module.css?mds-scoped
274
+ var Badge_module_default = { "badge": "mds-Badge__badge", "tone-neutral": "mds-Badge__tone-neutral", "tone-accent": "mds-Badge__tone-accent", "tone-highlight": "mds-Badge__tone-highlight", "tone-danger": "mds-Badge__tone-danger", "tone-warning": "mds-Badge__tone-warning", "tone-success": "mds-Badge__tone-success" };
362
275
  function Badge({ tone = "neutral", className, ...rest }) {
363
- return /* @__PURE__ */ jsx("span", { className: cx(Badge_default.badge, Badge_default[`tone-${tone}`], className), ...rest });
276
+ return /* @__PURE__ */ jsx("span", { className: cx(Badge_module_default.badge, Badge_module_default[`tone-${tone}`], className), ...rest });
364
277
  }
365
278
 
366
- // src/components/Chip/Chip.module.css
367
- var Chip_default = {
368
- chip: "Chip_chip",
369
- "variant-soft": "Chip_variant-soft",
370
- "variant-outline": "Chip_variant-outline",
371
- "variant-highlight": "Chip_variant-highlight",
372
- selected: "Chip_selected",
373
- interactive: "Chip_interactive",
374
- disabled: "Chip_disabled"
375
- };
279
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Chip/Chip.module.css?mds-scoped
280
+ var Chip_module_default = { "chip": "mds-Chip__chip", "variant-soft": "mds-Chip__variant-soft", "variant-outline": "mds-Chip__variant-outline", "variant-highlight": "mds-Chip__variant-highlight", "selected": "mds-Chip__selected", "interactive": "mds-Chip__interactive", "disabled": "mds-Chip__disabled" };
376
281
  function Chip({
377
282
  children,
378
283
  variant = "soft",
@@ -386,11 +291,11 @@ function Chip({
386
291
  const interactive = typeof onClick === "function";
387
292
  const shared = {
388
293
  className: cx(
389
- Chip_default.chip,
390
- Chip_default[`variant-${variant}`],
391
- selected && Chip_default.selected,
392
- interactive && !disabled && Chip_default.interactive,
393
- disabled && Chip_default.disabled,
294
+ Chip_module_default.chip,
295
+ Chip_module_default[`variant-${variant}`],
296
+ selected && Chip_module_default.selected,
297
+ interactive && !disabled && Chip_module_default.interactive,
298
+ disabled && Chip_module_default.disabled,
394
299
  className
395
300
  ),
396
301
  ...rest
@@ -412,27 +317,14 @@ function Chip({
412
317
  ) : /* @__PURE__ */ jsx("span", { ...shared, children: content });
413
318
  }
414
319
 
415
- // src/components/Chip/ChipGroup.module.css
416
- var ChipGroup_default = {
417
- group: "ChipGroup_group",
418
- "gap-hairline": "ChipGroup_gap-hairline",
419
- "gap-tight": "ChipGroup_gap-tight",
420
- "gap-base": "ChipGroup_gap-base"
421
- };
320
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Chip/ChipGroup.module.css?mds-scoped
321
+ var ChipGroup_module_default = { "group": "mds-ChipGroup__group", "gap-hairline": "mds-ChipGroup__gap-hairline", "gap-tight": "mds-ChipGroup__gap-tight", "gap-base": "mds-ChipGroup__gap-base" };
422
322
  function ChipGroup({ children, gap = "tight", className, ...rest }) {
423
- return /* @__PURE__ */ jsx("div", { className: cx(ChipGroup_default.group, ChipGroup_default[`gap-${gap}`], className), ...rest, children });
323
+ return /* @__PURE__ */ jsx("div", { className: cx(ChipGroup_module_default.group, ChipGroup_module_default[`gap-${gap}`], className), ...rest, children });
424
324
  }
425
325
 
426
- // src/components/Chip/ChipBar.module.css
427
- var ChipBar_default = {
428
- bar: "ChipBar_bar",
429
- "gap-hairline": "ChipBar_gap-hairline",
430
- "gap-tight": "ChipBar_gap-tight",
431
- "gap-base": "ChipBar_gap-base",
432
- bordered: "ChipBar_bordered",
433
- fade: "ChipBar_fade",
434
- item: "ChipBar_item"
435
- };
326
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Chip/ChipBar.module.css?mds-scoped
327
+ var ChipBar_module_default = { "bar": "mds-ChipBar__bar", "gap-hairline": "mds-ChipBar__gap-hairline", "gap-tight": "mds-ChipBar__gap-tight", "gap-base": "mds-ChipBar__gap-base", "bordered": "mds-ChipBar__bordered", "fade": "mds-ChipBar__fade", "item": "mds-ChipBar__item" };
436
328
  function ChipBar({
437
329
  children,
438
330
  gap = "tight",
@@ -444,20 +336,15 @@ function ChipBar({
444
336
  return /* @__PURE__ */ jsx(
445
337
  "div",
446
338
  {
447
- className: cx(ChipBar_default.bar, ChipBar_default[`gap-${gap}`], bordered && ChipBar_default.bordered, fade && ChipBar_default.fade, className),
339
+ className: cx(ChipBar_module_default.bar, ChipBar_module_default[`gap-${gap}`], bordered && ChipBar_module_default.bordered, fade && ChipBar_module_default.fade, className),
448
340
  ...rest,
449
- children: Children.map(children, (child) => /* @__PURE__ */ jsx("div", { className: ChipBar_default.item, children: child }))
341
+ children: Children.map(children, (child) => /* @__PURE__ */ jsx("div", { className: ChipBar_module_default.item, children: child }))
450
342
  }
451
343
  );
452
344
  }
453
345
 
454
- // src/components/CountButton/CountButton.module.css
455
- var CountButton_default = {
456
- button: "CountButton_button",
457
- "tone-accent": "CountButton_tone-accent",
458
- "tone-danger": "CountButton_tone-danger",
459
- glyph: "CountButton_glyph"
460
- };
346
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/CountButton/CountButton.module.css?mds-scoped
347
+ var CountButton_module_default = { "button": "mds-CountButton__button", "tone-accent": "mds-CountButton__tone-accent", "tone-danger": "mds-CountButton__tone-danger", "glyph": "mds-CountButton__glyph" };
461
348
  var SPINNER_PX2 = 20;
462
349
  function CountButton({
463
350
  icon,
@@ -479,24 +366,18 @@ function CountButton({
479
366
  "aria-label": label,
480
367
  "aria-pressed": isToggle ? active : void 0,
481
368
  "aria-busy": loading || void 0,
482
- className: cx(CountButton_default.button, active && CountButton_default[`tone-${tone}`], className),
369
+ className: cx(CountButton_module_default.button, active && CountButton_module_default[`tone-${tone}`], className),
483
370
  ...rest,
484
371
  children: [
485
- loading ? /* @__PURE__ */ jsx(Spinner, { size: SPINNER_PX2, label: "", "aria-hidden": "true" }) : /* @__PURE__ */ jsx("span", { className: CountButton_default.glyph, children: icon }),
372
+ loading ? /* @__PURE__ */ jsx(Spinner, { size: SPINNER_PX2, label: "", "aria-hidden": "true" }) : /* @__PURE__ */ jsx("span", { className: CountButton_module_default.glyph, children: icon }),
486
373
  children != null ? /* @__PURE__ */ jsx("span", { children }) : null
487
374
  ]
488
375
  }
489
376
  );
490
377
  }
491
378
 
492
- // src/components/Field/Field.module.css
493
- var Field_default = {
494
- field: "Field_field",
495
- label: "Field_label",
496
- required: "Field_required",
497
- message: "Field_message",
498
- error: "Field_error"
499
- };
379
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Field/Field.module.css?mds-scoped
380
+ var Field_module_default = { "field": "mds-Field__field", "label": "mds-Field__label", "required": "mds-Field__required", "message": "mds-Field__message", "error": "mds-Field__error" };
500
381
  var FieldContext = createContext(null);
501
382
  function useFieldContext() {
502
383
  return useContext(FieldContext);
@@ -505,10 +386,10 @@ function Field({ label, children, hint, error, required = false, className }) {
505
386
  const id = useId();
506
387
  const messageId = `${id}-message`;
507
388
  const message = error ?? hint;
508
- return /* @__PURE__ */ jsxs("div", { className: cx(Field_default.field, className), children: [
509
- /* @__PURE__ */ jsxs("label", { className: Field_default.label, htmlFor: id, children: [
389
+ return /* @__PURE__ */ jsxs("div", { className: cx(Field_module_default.field, className), children: [
390
+ /* @__PURE__ */ jsxs("label", { className: Field_module_default.label, htmlFor: id, children: [
510
391
  label,
511
- required && /* @__PURE__ */ jsx("span", { className: Field_default.required, "aria-hidden": "true", children: "*" })
392
+ required && /* @__PURE__ */ jsx("span", { className: Field_module_default.required, "aria-hidden": "true", children: "*" })
512
393
  ] }),
513
394
  /* @__PURE__ */ jsx(
514
395
  FieldContext.Provider,
@@ -517,34 +398,27 @@ function Field({ label, children, hint, error, required = false, className }) {
517
398
  children
518
399
  }
519
400
  ),
520
- message && /* @__PURE__ */ jsx("span", { id: messageId, className: cx(Field_default.message, error !== void 0 && Field_default.error), children: message })
401
+ message && /* @__PURE__ */ jsx("span", { id: messageId, className: cx(Field_module_default.message, error !== void 0 && Field_module_default.error), children: message })
521
402
  ] });
522
403
  }
523
404
 
524
- // src/components/Select/Select.module.css
525
- var Select_default = {
526
- wrap: "Select_wrap",
527
- select: "Select_select",
528
- "size-sm": "Select_size-sm",
529
- "size-md": "Select_size-md",
530
- "size-lg": "Select_size-lg",
531
- chevron: "Select_chevron"
532
- };
405
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Select/Select.module.css?mds-scoped
406
+ var Select_module_default = { "wrap": "mds-Select__wrap", "select": "mds-Select__select", "size-sm": "mds-Select__size-sm", "size-md": "mds-Select__size-md", "size-lg": "mds-Select__size-lg", "chevron": "mds-Select__chevron" };
533
407
  function Select({ size = "md", className, children, ...rest }) {
534
408
  const field = useFieldContext();
535
- return /* @__PURE__ */ jsxs("span", { className: Select_default.wrap, children: [
409
+ return /* @__PURE__ */ jsxs("span", { className: Select_module_default.wrap, children: [
536
410
  /* @__PURE__ */ jsx(
537
411
  "select",
538
412
  {
539
413
  id: rest.id ?? field?.id,
540
414
  "aria-describedby": rest["aria-describedby"] ?? field?.describedBy,
541
415
  "aria-invalid": rest["aria-invalid"] ?? (field?.invalid || void 0),
542
- className: cx(Select_default.select, Select_default[`size-${size}`], className),
416
+ className: cx(Select_module_default.select, Select_module_default[`size-${size}`], className),
543
417
  ...rest,
544
418
  children
545
419
  }
546
420
  ),
547
- /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Select_default.chevron, children: /* @__PURE__ */ jsx("path", { d: "M4 6l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) })
421
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Select_module_default.chevron, children: /* @__PURE__ */ jsx("path", { d: "M4 6l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) })
548
422
  ] });
549
423
  }
550
424
  var OverlayHistoryContext = createContext(null);
@@ -614,14 +488,10 @@ function usePresence(open, durationMs) {
614
488
  return { mounted: open || mounted, visible: open };
615
489
  }
616
490
 
617
- // src/components/Overlay/Overlay.module.css
618
- var Overlay_default = {
619
- scrim: "Overlay_scrim",
620
- "variant-modal": "Overlay_variant-modal",
621
- "variant-sheet": "Overlay_variant-sheet"
622
- };
491
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Overlay/Overlay.module.css?mds-scoped
492
+ var Overlay_module_default = { "scrim": "mds-Overlay__scrim", "variant-modal": "mds-Overlay__variant-modal", "variant-sheet": "mds-Overlay__variant-sheet" };
623
493
  var OVERLAY_EXIT_MS = 200;
624
- function Overlay({ open, onClose, label, variant, closeOnScrimClick, panelClassName, children }) {
494
+ function Overlay({ open, onClose, label, variant, role = "dialog", closeOnScrimClick, panelClassName, children }) {
625
495
  const { mounted, visible } = usePresence(open, OVERLAY_EXIT_MS);
626
496
  const ref = useOverlay({ open, onClose });
627
497
  if (!mounted) return null;
@@ -629,7 +499,7 @@ function Overlay({ open, onClose, label, variant, closeOnScrimClick, panelClassN
629
499
  /* @__PURE__ */ jsx(
630
500
  "div",
631
501
  {
632
- className: cx(Overlay_default.scrim, Overlay_default[`variant-${variant}`]),
502
+ className: cx(Overlay_module_default.scrim, Overlay_module_default[`variant-${variant}`]),
633
503
  "data-open": visible || void 0,
634
504
  "data-testid": "mds-scrim",
635
505
  onClick: closeOnScrimClick ? onClose : void 0,
@@ -637,7 +507,7 @@ function Overlay({ open, onClose, label, variant, closeOnScrimClick, panelClassN
637
507
  "div",
638
508
  {
639
509
  ref,
640
- role: "dialog",
510
+ role,
641
511
  "aria-modal": "true",
642
512
  "aria-label": label,
643
513
  tabIndex: -1,
@@ -653,13 +523,8 @@ function Overlay({ open, onClose, label, variant, closeOnScrimClick, panelClassN
653
523
  );
654
524
  }
655
525
 
656
- // src/components/Sheet/Sheet.module.css
657
- var Sheet_default = {
658
- panel: "Sheet_panel",
659
- header: "Sheet_header",
660
- body: "Sheet_body",
661
- footer: "Sheet_footer"
662
- };
526
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Sheet/Sheet.module.css?mds-scoped
527
+ var Sheet_module_default = { "panel": "mds-Sheet__panel", "header": "mds-Sheet__header", "body": "mds-Sheet__body", "footer": "mds-Sheet__footer", "headerTitle": "mds-Sheet__headerTitle", "close": "mds-Sheet__close", "closeGlyph": "mds-Sheet__closeGlyph" };
663
528
  function Sheet({ open, onClose, label, closeOnScrimClick = true, children }) {
664
529
  return /* @__PURE__ */ jsx(
665
530
  Overlay,
@@ -669,41 +534,26 @@ function Sheet({ open, onClose, label, closeOnScrimClick = true, children }) {
669
534
  label,
670
535
  variant: "sheet",
671
536
  closeOnScrimClick,
672
- panelClassName: Sheet_default.panel,
537
+ panelClassName: Sheet_module_default.panel,
673
538
  children
674
539
  }
675
540
  );
676
541
  }
677
- function SheetHeader({ children }) {
678
- return /* @__PURE__ */ jsx("div", { className: Sheet_default.header, children });
542
+ function SheetHeader({ children, onClose, closeLabel }) {
543
+ return /* @__PURE__ */ jsxs("div", { className: Sheet_module_default.header, children: [
544
+ /* @__PURE__ */ jsx("span", { className: Sheet_module_default.headerTitle, children }),
545
+ onClose !== void 0 && /* @__PURE__ */ jsx("button", { type: "button", "aria-label": closeLabel, className: Sheet_module_default.close, onClick: onClose, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Sheet_module_default.closeGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) }) })
546
+ ] });
679
547
  }
680
548
  function SheetBody({ children }) {
681
- return /* @__PURE__ */ jsx("div", { className: Sheet_default.body, children });
549
+ return /* @__PURE__ */ jsx("div", { className: Sheet_module_default.body, children });
682
550
  }
683
551
  function SheetFooter({ children }) {
684
- return /* @__PURE__ */ jsx("div", { className: Sheet_default.footer, children });
552
+ return /* @__PURE__ */ jsx("div", { className: Sheet_module_default.footer, children });
685
553
  }
686
554
 
687
- // src/components/DateTimePicker/DateTimePicker.module.css
688
- var DateTimePicker_default = {
689
- trigger: "DateTimePicker_trigger",
690
- hasValue: "DateTimePicker_hasValue",
691
- triggerLabel: "DateTimePicker_triggerLabel",
692
- glyph: "DateTimePicker_glyph",
693
- timeRow: "DateTimePicker_timeRow",
694
- grow: "DateTimePicker_grow",
695
- meridiem: "DateTimePicker_meridiem",
696
- colon: "DateTimePicker_colon",
697
- calendarHeader: "DateTimePicker_calendarHeader",
698
- monthLabel: "DateTimePicker_monthLabel",
699
- weekdays: "DateTimePicker_weekdays",
700
- weekday: "DateTimePicker_weekday",
701
- grid: "DateTimePicker_grid",
702
- day: "DateTimePicker_day",
703
- today: "DateTimePicker_today",
704
- selected: "DateTimePicker_selected",
705
- outside: "DateTimePicker_outside"
706
- };
555
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/DateTimePicker/DateTimePicker.module.css?mds-scoped
556
+ var DateTimePicker_module_default = { "trigger": "mds-DateTimePicker__trigger", "hasValue": "mds-DateTimePicker__hasValue", "triggerLabel": "mds-DateTimePicker__triggerLabel", "glyph": "mds-DateTimePicker__glyph", "timeRow": "mds-DateTimePicker__timeRow", "grow": "mds-DateTimePicker__grow", "meridiem": "mds-DateTimePicker__meridiem", "colon": "mds-DateTimePicker__colon", "calendarHeader": "mds-DateTimePicker__calendarHeader", "monthLabel": "mds-DateTimePicker__monthLabel", "weekdays": "mds-DateTimePicker__weekdays", "weekday": "mds-DateTimePicker__weekday", "grid": "mds-DateTimePicker__grid", "day": "mds-DateTimePicker__day", "today": "mds-DateTimePicker__today", "selected": "mds-DateTimePicker__selected", "outside": "mds-DateTimePicker__outside" };
707
557
  var DEFAULT_LABELS = {
708
558
  dialog: "Pick date and time",
709
559
  previousMonth: "Previous month",
@@ -769,13 +619,13 @@ function minuteOptions(step) {
769
619
  function pad2(n) {
770
620
  return String(n).padStart(2, "0");
771
621
  }
772
- var chevronLeft = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_default.glyph, children: /* @__PURE__ */ jsx("path", { d: "M10 3l-5 5 5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
773
- var chevronRight = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_default.glyph, children: /* @__PURE__ */ jsx("path", { d: "M6 3l5 5-5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
774
- var calendarGlyph = /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_default.glyph, children: [
622
+ var chevronLeft = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: /* @__PURE__ */ jsx("path", { d: "M10 3l-5 5 5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
623
+ var chevronRight = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: /* @__PURE__ */ jsx("path", { d: "M6 3l5 5-5 5", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round" }) });
624
+ var calendarGlyph = /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: [
775
625
  /* @__PURE__ */ jsx("rect", { x: "2.5", y: "3.5", width: "11", height: "10", rx: "1.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
776
626
  /* @__PURE__ */ jsx("path", { d: "M2.5 6.5h11M5.5 2v2.5M10.5 2v2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
777
627
  ] });
778
- var clockGlyph = /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_default.glyph, children: [
628
+ var clockGlyph = /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: DateTimePicker_module_default.glyph, children: [
779
629
  /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "5.75", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
780
630
  /* @__PURE__ */ jsx("path", { d: "M8 5v3.25l2 1.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
781
631
  ] });
@@ -792,6 +642,7 @@ function DateTimePicker({
792
642
  labels
793
643
  }) {
794
644
  const text = { ...DEFAULT_LABELS, ...labels };
645
+ const field = useFieldContext();
795
646
  const intl = useMemo(() => localeData(locale), [locale]);
796
647
  const [open, setOpen] = useState(false);
797
648
  const [draft, setDraft] = useState(() => /* @__PURE__ */ new Date());
@@ -947,7 +798,7 @@ function DateTimePicker({
947
798
  "aria-pressed": isSelected,
948
799
  onClick: inMonth ? () => pickDay(cell.getDate()) : void 0,
949
800
  onKeyDown: inMonth && !isDisabled ? (e) => onDayKeyDown(e, cell) : void 0,
950
- className: cx(DateTimePicker_default.day, isToday && DateTimePicker_default.today, isSelected && DateTimePicker_default.selected, !inMonth && DateTimePicker_default.outside),
801
+ className: cx(DateTimePicker_module_default.day, isToday && DateTimePicker_module_default.today, isSelected && DateTimePicker_module_default.selected, !inMonth && DateTimePicker_module_default.outside),
951
802
  children: cell.getDate()
952
803
  },
953
804
  `c-${i}`
@@ -957,41 +808,42 @@ function DateTimePicker({
957
808
  /* @__PURE__ */ jsxs(
958
809
  "button",
959
810
  {
960
- id,
811
+ id: id ?? field?.id,
961
812
  type: "button",
962
813
  disabled,
814
+ "aria-describedby": field?.describedBy,
963
815
  "aria-haspopup": "dialog",
964
816
  "aria-expanded": open,
965
817
  "aria-label": ariaLabel ? `${ariaLabel}: ${value ? intl.full.format(new Date(value)) : placeholder}` : void 0,
966
818
  onClick: openPicker,
967
- className: cx(DateTimePicker_default.trigger, value && DateTimePicker_default.hasValue),
819
+ className: cx(DateTimePicker_module_default.trigger, value && DateTimePicker_module_default.hasValue),
968
820
  children: [
969
821
  calendarGlyph,
970
- /* @__PURE__ */ jsx("span", { className: DateTimePicker_default.triggerLabel, children: value ? intl.full.format(new Date(value)) : placeholder })
822
+ /* @__PURE__ */ jsx("span", { className: DateTimePicker_module_default.triggerLabel, children: value ? intl.full.format(new Date(value)) : placeholder })
971
823
  ]
972
824
  }
973
825
  ),
974
826
  /* @__PURE__ */ jsxs(Sheet, { open, onClose: () => setOpen(false), label: ariaLabel ?? text.dialog, children: [
975
827
  /* @__PURE__ */ jsx(SheetHeader, { children: intl.full.format(draft) }),
976
828
  /* @__PURE__ */ jsxs(SheetBody, { children: [
977
- /* @__PURE__ */ jsxs("div", { className: DateTimePicker_default.timeRow, children: [
829
+ /* @__PURE__ */ jsxs("div", { className: DateTimePicker_module_default.timeRow, children: [
978
830
  clockGlyph,
979
831
  intl.hour12 ? /* @__PURE__ */ jsxs(Fragment, { children: [
980
- /* @__PURE__ */ jsx(Select, { "aria-label": text.hour, value: String(h12), onChange: (e) => setHour(e.target.value), className: DateTimePicker_default.grow, children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i + 1), children: i + 1 }, i + 1)) }),
981
- /* @__PURE__ */ jsx("span", { className: DateTimePicker_default.colon, "aria-hidden": "true", children: ":" }),
982
- /* @__PURE__ */ jsx(Select, { "aria-label": text.minute, value: String(draft.getMinutes()), onChange: (e) => setMinute(e.target.value), className: DateTimePicker_default.grow, children: minuteOptions(minuteStep).map((m) => /* @__PURE__ */ jsx("option", { value: String(m), children: pad2(m) }, m)) }),
983
- /* @__PURE__ */ jsxs(Select, { "aria-label": text.dayPeriod, value: isPM ? "pm" : "am", onChange: (e) => setMeridiem(e.target.value), className: DateTimePicker_default.meridiem, children: [
832
+ /* @__PURE__ */ jsx(Select, { "aria-label": text.hour, value: String(h12), onChange: (e) => setHour(e.target.value), className: DateTimePicker_module_default.grow, children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i + 1), children: i + 1 }, i + 1)) }),
833
+ /* @__PURE__ */ jsx("span", { className: DateTimePicker_module_default.colon, "aria-hidden": "true", children: ":" }),
834
+ /* @__PURE__ */ jsx(Select, { "aria-label": text.minute, value: String(draft.getMinutes()), onChange: (e) => setMinute(e.target.value), className: DateTimePicker_module_default.grow, children: minuteOptions(minuteStep).map((m) => /* @__PURE__ */ jsx("option", { value: String(m), children: pad2(m) }, m)) }),
835
+ /* @__PURE__ */ jsxs(Select, { "aria-label": text.dayPeriod, value: isPM ? "pm" : "am", onChange: (e) => setMeridiem(e.target.value), className: DateTimePicker_module_default.meridiem, children: [
984
836
  /* @__PURE__ */ jsx("option", { value: "am", children: intl.dayPeriods[0] }),
985
837
  /* @__PURE__ */ jsx("option", { value: "pm", children: intl.dayPeriods[1] })
986
838
  ] })
987
839
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
988
- /* @__PURE__ */ jsx(Select, { "aria-label": text.hour, value: String(h24), onChange: (e) => setHour(e.target.value), className: DateTimePicker_default.grow, children: Array.from({ length: 24 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i), children: pad2(i) }, i)) }),
989
- /* @__PURE__ */ jsx("span", { className: DateTimePicker_default.colon, "aria-hidden": "true", children: ":" }),
990
- /* @__PURE__ */ jsx(Select, { "aria-label": text.minute, value: String(draft.getMinutes()), onChange: (e) => setMinute(e.target.value), className: DateTimePicker_default.grow, children: minuteOptions(minuteStep).map((m) => /* @__PURE__ */ jsx("option", { value: String(m), children: pad2(m) }, m)) })
840
+ /* @__PURE__ */ jsx(Select, { "aria-label": text.hour, value: String(h24), onChange: (e) => setHour(e.target.value), className: DateTimePicker_module_default.grow, children: Array.from({ length: 24 }, (_, i) => /* @__PURE__ */ jsx("option", { value: String(i), children: pad2(i) }, i)) }),
841
+ /* @__PURE__ */ jsx("span", { className: DateTimePicker_module_default.colon, "aria-hidden": "true", children: ":" }),
842
+ /* @__PURE__ */ jsx(Select, { "aria-label": text.minute, value: String(draft.getMinutes()), onChange: (e) => setMinute(e.target.value), className: DateTimePicker_module_default.grow, children: minuteOptions(minuteStep).map((m) => /* @__PURE__ */ jsx("option", { value: String(m), children: pad2(m) }, m)) })
991
843
  ] })
992
844
  ] }),
993
845
  /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": intl.monthTitle.format(first), children: [
994
- /* @__PURE__ */ jsxs("div", { className: DateTimePicker_default.calendarHeader, children: [
846
+ /* @__PURE__ */ jsxs("div", { className: DateTimePicker_module_default.calendarHeader, children: [
995
847
  /* @__PURE__ */ jsx(
996
848
  Button,
997
849
  {
@@ -1004,11 +856,11 @@ function DateTimePicker({
1004
856
  children: chevronLeft
1005
857
  }
1006
858
  ),
1007
- /* @__PURE__ */ jsx("span", { className: DateTimePicker_default.monthLabel, children: intl.monthTitle.format(first) }),
859
+ /* @__PURE__ */ jsx("span", { className: DateTimePicker_module_default.monthLabel, children: intl.monthTitle.format(first) }),
1008
860
  /* @__PURE__ */ jsx(Button, { iconOnly: true, "aria-label": text.nextMonth, variant: "ghost", size: "sm", onClick: () => shiftMonth(1), children: chevronRight })
1009
861
  ] }),
1010
- /* @__PURE__ */ jsx("div", { className: DateTimePicker_default.weekdays, children: intl.weekdays.map((w, i) => /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: DateTimePicker_default.weekday, children: w }, `wd-${i}`)) }),
1011
- /* @__PURE__ */ jsx("div", { className: DateTimePicker_default.grid, children: dayCells })
862
+ /* @__PURE__ */ jsx("div", { className: DateTimePicker_module_default.weekdays, children: intl.weekdays.map((w, i) => /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: DateTimePicker_module_default.weekday, children: w }, `wd-${i}`)) }),
863
+ /* @__PURE__ */ jsx("div", { className: DateTimePicker_module_default.grid, children: dayCells })
1012
864
  ] })
1013
865
  ] }),
1014
866
  /* @__PURE__ */ jsxs(SheetFooter, { children: [
@@ -1019,56 +871,41 @@ function DateTimePicker({
1019
871
  ] });
1020
872
  }
1021
873
 
1022
- // src/components/Tag/Tag.module.css
1023
- var Tag_default = {
1024
- tag: "Tag_tag",
1025
- "tone-accent": "Tag_tone-accent",
1026
- remove: "Tag_remove",
1027
- removeGlyph: "Tag_removeGlyph"
1028
- };
874
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Tag/Tag.module.css?mds-scoped
875
+ var Tag_module_default = { "tag": "mds-Tag__tag", "tone-accent": "mds-Tag__tone-accent", "remove": "mds-Tag__remove", "removeGlyph": "mds-Tag__removeGlyph" };
1029
876
  function Tag({ children, tone = "neutral", onRemove, className, ...rest }) {
1030
877
  const text = typeof children === "string" ? children : void 0;
1031
- return /* @__PURE__ */ jsxs("span", { className: cx(Tag_default.tag, Tag_default[`tone-${tone}`], className), ...rest, children: [
878
+ return /* @__PURE__ */ jsxs("span", { className: cx(Tag_module_default.tag, Tag_module_default[`tone-${tone}`], className), ...rest, children: [
1032
879
  children,
1033
880
  onRemove && /* @__PURE__ */ jsx(
1034
881
  "button",
1035
882
  {
1036
883
  type: "button",
1037
- className: Tag_default.remove,
884
+ className: Tag_module_default.remove,
1038
885
  "aria-label": text ? `Remove ${text}` : "Remove",
1039
886
  onClick: onRemove,
1040
- children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Tag_default.removeGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
887
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Tag_module_default.removeGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1041
888
  }
1042
889
  )
1043
890
  ] });
1044
891
  }
1045
892
 
1046
- // src/components/Divider/Divider.module.css
1047
- var Divider_default = {
1048
- divider: "Divider_divider",
1049
- horizontal: "Divider_horizontal",
1050
- vertical: "Divider_vertical"
1051
- };
893
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Divider/Divider.module.css?mds-scoped
894
+ var Divider_module_default = { "divider": "mds-Divider__divider", "horizontal": "mds-Divider__horizontal", "vertical": "mds-Divider__vertical" };
1052
895
  function Divider({ orientation = "horizontal", className, ...rest }) {
1053
896
  return /* @__PURE__ */ jsx(
1054
897
  "div",
1055
898
  {
1056
899
  role: "separator",
1057
900
  "aria-orientation": orientation === "vertical" ? "vertical" : void 0,
1058
- className: cx(Divider_default.divider, Divider_default[orientation], className),
901
+ className: cx(Divider_module_default.divider, Divider_module_default[orientation], className),
1059
902
  ...rest
1060
903
  }
1061
904
  );
1062
905
  }
1063
906
 
1064
- // src/components/Skeleton/Skeleton.module.css
1065
- var Skeleton_default = {
1066
- skeleton: "Skeleton_skeleton",
1067
- pulse: "Skeleton_pulse",
1068
- "variant-text": "Skeleton_variant-text",
1069
- "variant-rect": "Skeleton_variant-rect",
1070
- "variant-circle": "Skeleton_variant-circle"
1071
- };
907
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Skeleton/Skeleton.module.css?mds-scoped
908
+ var Skeleton_module_default = { "skeleton": "mds-Skeleton__skeleton", "pulse": "mds-Skeleton__pulse", "variant-text": "mds-Skeleton__variant-text", "variant-rect": "mds-Skeleton__variant-rect", "variant-circle": "mds-Skeleton__variant-circle" };
1072
909
  function Skeleton({
1073
910
  variant = "text",
1074
911
  width,
@@ -1085,18 +922,15 @@ function Skeleton({
1085
922
  "span",
1086
923
  {
1087
924
  "aria-hidden": "true",
1088
- className: cx(Skeleton_default.skeleton, Skeleton_default[`variant-${variant}`], className),
925
+ className: cx(Skeleton_module_default.skeleton, Skeleton_module_default[`variant-${variant}`], className),
1089
926
  style: { ...vars, ...style },
1090
927
  ...rest
1091
928
  }
1092
929
  );
1093
930
  }
1094
931
 
1095
- // src/components/ProgressBar/ProgressBar.module.css
1096
- var ProgressBar_default = {
1097
- track: "ProgressBar_track",
1098
- fill: "ProgressBar_fill",
1099
- indeterminate: "ProgressBar_indeterminate"};
932
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/ProgressBar/ProgressBar.module.css?mds-scoped
933
+ var ProgressBar_module_default = { "track": "mds-ProgressBar__track", "fill": "mds-ProgressBar__fill", "indeterminate": "mds-ProgressBar__indeterminate"};
1100
934
  function ProgressBar({
1101
935
  value = 0,
1102
936
  label,
@@ -1114,27 +948,16 @@ function ProgressBar({
1114
948
  "aria-valuemin": 0,
1115
949
  "aria-valuemax": 100,
1116
950
  "aria-valuenow": indeterminate ? void 0 : clamped,
1117
- className: cx(ProgressBar_default.track, indeterminate && ProgressBar_default.indeterminate, className),
951
+ className: cx(ProgressBar_module_default.track, indeterminate && ProgressBar_module_default.indeterminate, className),
1118
952
  style: { ...{ "--progress": `${clamped}%` }, ...style },
1119
953
  ...rest,
1120
- children: /* @__PURE__ */ jsx("span", { className: ProgressBar_default.fill })
954
+ children: /* @__PURE__ */ jsx("span", { className: ProgressBar_module_default.fill })
1121
955
  }
1122
956
  );
1123
957
  }
1124
958
 
1125
- // src/components/Input/Input.module.css
1126
- var Input_default = {
1127
- input: "Input_input",
1128
- "size-sm": "Input_size-sm",
1129
- "size-md": "Input_size-md",
1130
- "size-lg": "Input_size-lg",
1131
- iconWrap: "Input_iconWrap",
1132
- icon: "Input_icon",
1133
- iconLeft: "Input_iconLeft",
1134
- iconRight: "Input_iconRight",
1135
- "with-icon-left": "Input_with-icon-left",
1136
- "with-icon-right": "Input_with-icon-right"
1137
- };
959
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Input/Input.module.css?mds-scoped
960
+ var Input_module_default = { "input": "mds-Input__input", "size-sm": "mds-Input__size-sm", "size-md": "mds-Input__size-md", "size-lg": "mds-Input__size-lg", "iconWrap": "mds-Input__iconWrap", "icon": "mds-Input__icon", "iconLeft": "mds-Input__iconLeft", "iconRight": "mds-Input__iconRight", "with-icon-left": "mds-Input__with-icon-left", "with-icon-right": "mds-Input__with-icon-right" };
1138
961
  function Input({
1139
962
  size = "md",
1140
963
  invalid,
@@ -1151,38 +974,34 @@ function Input({
1151
974
  "aria-describedby": rest["aria-describedby"] ?? field?.describedBy,
1152
975
  "aria-invalid": rest["aria-invalid"] ?? ((invalid ?? field?.invalid) || void 0),
1153
976
  className: cx(
1154
- Input_default.input,
1155
- Input_default[`size-${size}`],
1156
- iconLeft != null && Input_default["with-icon-left"],
1157
- iconRight != null && Input_default["with-icon-right"],
977
+ Input_module_default.input,
978
+ Input_module_default[`size-${size}`],
979
+ iconLeft != null && Input_module_default["with-icon-left"],
980
+ iconRight != null && Input_module_default["with-icon-right"],
1158
981
  className
1159
982
  ),
1160
983
  ...rest
1161
984
  }
1162
985
  );
1163
986
  if (iconLeft == null && iconRight == null) return input;
1164
- return /* @__PURE__ */ jsxs("span", { className: Input_default.iconWrap, children: [
987
+ return /* @__PURE__ */ jsxs("span", { className: Input_module_default.iconWrap, children: [
1165
988
  input,
1166
- iconLeft != null && /* @__PURE__ */ jsx("span", { className: cx(Input_default.icon, Input_default.iconLeft), "aria-hidden": "true", children: iconLeft }),
1167
- iconRight != null && /* @__PURE__ */ jsx("span", { className: cx(Input_default.icon, Input_default.iconRight), "aria-hidden": "true", children: iconRight })
989
+ iconLeft != null && /* @__PURE__ */ jsx("span", { className: cx(Input_module_default.icon, Input_module_default.iconLeft), "aria-hidden": "true", children: iconLeft }),
990
+ iconRight != null && /* @__PURE__ */ jsx("span", { className: cx(Input_module_default.icon, Input_module_default.iconRight), "aria-hidden": "true", children: iconRight })
1168
991
  ] });
1169
992
  }
1170
993
 
1171
- // src/components/PasswordInput/PasswordInput.module.css
1172
- var PasswordInput_default = {
1173
- wrap: "PasswordInput_wrap",
1174
- input: "PasswordInput_input",
1175
- toggle: "PasswordInput_toggle"
1176
- };
994
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/PasswordInput/PasswordInput.module.css?mds-scoped
995
+ var PasswordInput_module_default = { "wrap": "mds-PasswordInput__wrap", "input": "mds-PasswordInput__input", "toggle": "mds-PasswordInput__toggle" };
1177
996
  function PasswordInput({ className, ...rest }) {
1178
997
  const [visible, setVisible] = useState(false);
1179
- return /* @__PURE__ */ jsxs("span", { className: PasswordInput_default.wrap, children: [
1180
- /* @__PURE__ */ jsx(Input, { ...rest, type: visible ? "text" : "password", className: cx(PasswordInput_default.input, className) }),
998
+ return /* @__PURE__ */ jsxs("span", { className: PasswordInput_module_default.wrap, children: [
999
+ /* @__PURE__ */ jsx(Input, { ...rest, type: visible ? "text" : "password", className: cx(PasswordInput_module_default.input, className) }),
1181
1000
  /* @__PURE__ */ jsx(
1182
1001
  "button",
1183
1002
  {
1184
1003
  type: "button",
1185
- className: PasswordInput_default.toggle,
1004
+ className: PasswordInput_module_default.toggle,
1186
1005
  "aria-label": visible ? "Hide password" : "Show password",
1187
1006
  "aria-pressed": visible,
1188
1007
  onClick: () => setVisible((v) => !v),
@@ -1206,12 +1025,8 @@ function PasswordInput({ className, ...rest }) {
1206
1025
  ] });
1207
1026
  }
1208
1027
 
1209
- // src/components/Textarea/Textarea.module.css
1210
- var Textarea_default = {
1211
- textarea: "Textarea_textarea",
1212
- wrap: "Textarea_wrap",
1213
- count: "Textarea_count"
1214
- };
1028
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Textarea/Textarea.module.css?mds-scoped
1029
+ var Textarea_module_default = { "textarea": "mds-Textarea__textarea", "wrap": "mds-Textarea__wrap", "count": "mds-Textarea__count" };
1215
1030
  function Textarea({ rows = 3, showCount = false, className, ...rest }) {
1216
1031
  const field = useFieldContext();
1217
1032
  const [tracked, setTracked] = useState(() => String(rest.defaultValue ?? ""));
@@ -1227,52 +1042,38 @@ function Textarea({ rows = 3, showCount = false, className, ...rest }) {
1227
1042
  "aria-describedby": rest["aria-describedby"] ?? field?.describedBy,
1228
1043
  "aria-invalid": rest["aria-invalid"] ?? (field?.invalid || void 0),
1229
1044
  rows,
1230
- className: cx(Textarea_default.textarea, className),
1045
+ className: cx(Textarea_module_default.textarea, className),
1231
1046
  ...rest,
1232
1047
  ...showCount ? { onChange } : {}
1233
1048
  }
1234
1049
  );
1235
1050
  if (!showCount) return textarea;
1236
- return /* @__PURE__ */ jsxs("span", { className: Textarea_default.wrap, children: [
1051
+ return /* @__PURE__ */ jsxs("span", { className: Textarea_module_default.wrap, children: [
1237
1052
  textarea,
1238
- /* @__PURE__ */ jsx("span", { className: Textarea_default.count, "aria-hidden": "true", children: rest.maxLength !== void 0 ? `${current.length}/${rest.maxLength}` : current.length })
1053
+ /* @__PURE__ */ jsx("span", { className: Textarea_module_default.count, "aria-hidden": "true", children: rest.maxLength !== void 0 ? `${current.length}/${rest.maxLength}` : current.length })
1239
1054
  ] });
1240
1055
  }
1241
1056
 
1242
- // src/components/Checkbox/Checkbox.module.css
1243
- var Checkbox_default = {
1244
- root: "Checkbox_root",
1245
- box: "Checkbox_box",
1246
- label: "Checkbox_label"
1247
- };
1057
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Checkbox/Checkbox.module.css?mds-scoped
1058
+ var Checkbox_module_default = { "root": "mds-Checkbox__root", "box": "mds-Checkbox__box", "label": "mds-Checkbox__label" };
1248
1059
  function Checkbox({ label, className, ...rest }) {
1249
- return /* @__PURE__ */ jsxs("label", { className: cx(Checkbox_default.root, className), children: [
1250
- /* @__PURE__ */ jsx("input", { type: "checkbox", className: Checkbox_default.box, ...rest }),
1251
- /* @__PURE__ */ jsx("span", { className: Checkbox_default.label, children: label })
1060
+ return /* @__PURE__ */ jsxs("label", { className: cx(Checkbox_module_default.root, className), children: [
1061
+ /* @__PURE__ */ jsx("input", { type: "checkbox", className: Checkbox_module_default.box, ...rest }),
1062
+ /* @__PURE__ */ jsx("span", { className: Checkbox_module_default.label, children: label })
1252
1063
  ] });
1253
1064
  }
1254
1065
 
1255
- // src/components/Radio/Radio.module.css
1256
- var Radio_default = {
1257
- root: "Radio_root",
1258
- dot: "Radio_dot",
1259
- label: "Radio_label"
1260
- };
1066
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Radio/Radio.module.css?mds-scoped
1067
+ var Radio_module_default = { "root": "mds-Radio__root", "dot": "mds-Radio__dot", "label": "mds-Radio__label" };
1261
1068
  function Radio({ label, className, ...rest }) {
1262
- return /* @__PURE__ */ jsxs("label", { className: cx(Radio_default.root, className), children: [
1263
- /* @__PURE__ */ jsx("input", { type: "radio", className: Radio_default.dot, ...rest }),
1264
- /* @__PURE__ */ jsx("span", { className: Radio_default.label, children: label })
1069
+ return /* @__PURE__ */ jsxs("label", { className: cx(Radio_module_default.root, className), children: [
1070
+ /* @__PURE__ */ jsx("input", { type: "radio", className: Radio_module_default.dot, ...rest }),
1071
+ /* @__PURE__ */ jsx("span", { className: Radio_module_default.label, children: label })
1265
1072
  ] });
1266
1073
  }
1267
1074
 
1268
- // src/components/Switch/Switch.module.css
1269
- var Switch_default = {
1270
- root: "Switch_root",
1271
- track: "Switch_track",
1272
- trackWrap: "Switch_trackWrap",
1273
- spinner: "Switch_spinner",
1274
- label: "Switch_label"
1275
- };
1075
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Switch/Switch.module.css?mds-scoped
1076
+ var Switch_module_default = { "root": "mds-Switch__root", "track": "mds-Switch__track", "trackWrap": "mds-Switch__trackWrap", "spinner": "mds-Switch__spinner", "label": "mds-Switch__label" };
1276
1077
  function Switch({
1277
1078
  label,
1278
1079
  loading = false,
@@ -1280,42 +1081,38 @@ function Switch({
1280
1081
  className,
1281
1082
  ...rest
1282
1083
  }) {
1283
- return /* @__PURE__ */ jsxs("label", { className: cx(Switch_default.root, className), children: [
1284
- /* @__PURE__ */ jsxs("span", { className: Switch_default.trackWrap, children: [
1084
+ return /* @__PURE__ */ jsxs("label", { className: cx(Switch_module_default.root, className), children: [
1085
+ /* @__PURE__ */ jsxs("span", { className: Switch_module_default.trackWrap, children: [
1285
1086
  /* @__PURE__ */ jsx(
1286
1087
  "input",
1287
1088
  {
1288
1089
  type: "checkbox",
1289
1090
  role: "switch",
1290
- className: Switch_default.track,
1091
+ className: Switch_module_default.track,
1291
1092
  disabled: disabled || loading,
1292
1093
  "aria-busy": loading || void 0,
1293
1094
  ...rest
1294
1095
  }
1295
1096
  ),
1296
- loading && /* @__PURE__ */ jsx(Spinner, { size: 12, label: "", "aria-hidden": "true", className: Switch_default.spinner })
1097
+ loading && /* @__PURE__ */ jsx(Spinner, { size: 12, label: "", "aria-hidden": "true", className: Switch_module_default.spinner })
1297
1098
  ] }),
1298
- label !== void 0 && /* @__PURE__ */ jsx("span", { className: Switch_default.label, children: label })
1099
+ label !== void 0 && /* @__PURE__ */ jsx("span", { className: Switch_module_default.label, children: label })
1299
1100
  ] });
1300
1101
  }
1301
1102
 
1302
- // src/components/SegmentedControl/SegmentedControl.module.css
1303
- var SegmentedControl_default = {
1304
- group: "SegmentedControl_group",
1305
- segment: "SegmentedControl_segment",
1306
- input: "SegmentedControl_input",
1307
- face: "SegmentedControl_face"
1308
- };
1103
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/SegmentedControl/SegmentedControl.module.css?mds-scoped
1104
+ var SegmentedControl_module_default = { "group": "mds-SegmentedControl__group", "segment": "mds-SegmentedControl__segment", "fullWidth": "mds-SegmentedControl__fullWidth", "face": "mds-SegmentedControl__face", "input": "mds-SegmentedControl__input" };
1309
1105
  function SegmentedControl({
1310
1106
  label,
1311
1107
  options,
1312
1108
  value,
1313
1109
  onChange,
1314
1110
  disabled = false,
1111
+ fullWidth = false,
1315
1112
  className
1316
1113
  }) {
1317
1114
  const name = useId();
1318
- return /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-label": label, className: cx(SegmentedControl_default.group, className), children: options.map((option) => /* @__PURE__ */ jsxs("label", { className: SegmentedControl_default.segment, children: [
1115
+ return /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-label": label, className: cx(SegmentedControl_module_default.group, fullWidth && SegmentedControl_module_default.fullWidth, className), children: options.map((option) => /* @__PURE__ */ jsxs("label", { className: SegmentedControl_module_default.segment, children: [
1319
1116
  /* @__PURE__ */ jsx(
1320
1117
  "input",
1321
1118
  {
@@ -1325,24 +1122,18 @@ function SegmentedControl({
1325
1122
  checked: option.value === value,
1326
1123
  onChange: () => onChange(option.value),
1327
1124
  disabled,
1328
- className: SegmentedControl_default.input
1125
+ className: SegmentedControl_module_default.input
1329
1126
  }
1330
1127
  ),
1331
- /* @__PURE__ */ jsx("span", { className: SegmentedControl_default.face, children: option.label })
1128
+ /* @__PURE__ */ jsx("span", { className: SegmentedControl_module_default.face, children: option.label })
1332
1129
  ] }, option.value)) });
1333
1130
  }
1334
1131
 
1335
- // src/components/SearchField/SearchField.module.css
1336
- var SearchField_default = {
1337
- wrap: "SearchField_wrap",
1338
- glass: "SearchField_glass",
1339
- input: "SearchField_input",
1340
- clear: "SearchField_clear",
1341
- clearGlyph: "SearchField_clearGlyph"
1342
- };
1132
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/SearchField/SearchField.module.css?mds-scoped
1133
+ var SearchField_module_default = { "wrap": "mds-SearchField__wrap", "glass": "mds-SearchField__glass", "input": "mds-SearchField__input", "clear": "mds-SearchField__clear", "clearGlyph": "mds-SearchField__clearGlyph" };
1343
1134
  function SearchField({ label, value, onChange, className, ...rest }) {
1344
- return /* @__PURE__ */ jsxs("span", { className: cx(SearchField_default.wrap, className), children: [
1345
- /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_default.glass, children: /* @__PURE__ */ jsx(
1135
+ return /* @__PURE__ */ jsxs("span", { className: cx(SearchField_module_default.wrap, className), children: [
1136
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_module_default.glass, children: /* @__PURE__ */ jsx(
1346
1137
  "path",
1347
1138
  {
1348
1139
  d: "M7 12a5 5 0 1 1 0-10 5 5 0 0 1 0 10Zm7 2-3.5-3.5",
@@ -1359,7 +1150,7 @@ function SearchField({ label, value, onChange, className, ...rest }) {
1359
1150
  "aria-label": label,
1360
1151
  value,
1361
1152
  onChange: (event) => onChange(event.target.value),
1362
- className: SearchField_default.input,
1153
+ className: SearchField_module_default.input,
1363
1154
  ...rest
1364
1155
  }
1365
1156
  ),
@@ -1368,33 +1159,32 @@ function SearchField({ label, value, onChange, className, ...rest }) {
1368
1159
  {
1369
1160
  type: "button",
1370
1161
  "aria-label": "Clear search",
1371
- className: SearchField_default.clear,
1162
+ className: SearchField_module_default.clear,
1372
1163
  onClick: () => onChange(""),
1373
- children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_default.clearGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1164
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: SearchField_module_default.clearGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1374
1165
  }
1375
1166
  )
1376
1167
  ] });
1377
1168
  }
1378
1169
 
1379
- // src/components/List/List.module.css
1380
- var List_default = {
1381
- group: "List_group",
1382
- item: "List_item",
1383
- "surface-card": "List_surface-card",
1384
- "surface-sunken": "List_surface-sunken",
1385
- "surface-accent": "List_surface-accent",
1386
- "surface-plain": "List_surface-plain",
1387
- row: "List_row",
1388
- interactive: "List_interactive",
1389
- leading: "List_leading",
1390
- trailing: "List_trailing",
1391
- text: "List_text",
1392
- title: "List_title",
1393
- description: "List_description"
1394
- };
1170
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/List/List.module.css?mds-scoped
1171
+ var List_module_default = { "group": "mds-List__group", "labelledGroup": "mds-List__labelledGroup", "label": "mds-List__label", "item": "mds-List__item", "surface-card": "mds-List__surface-card", "surface-sunken": "mds-List__surface-sunken", "surface-accent": "mds-List__surface-accent", "surface-plain": "mds-List__surface-plain", "row": "mds-List__row", "interactive": "mds-List__interactive", "leading": "mds-List__leading", "trailing": "mds-List__trailing", "text": "mds-List__text", "title": "mds-List__title", "description": "mds-List__description" };
1395
1172
  var ListGroupContext = createContext(false);
1396
- function ListGroup({ className, ...rest }) {
1397
- return /* @__PURE__ */ jsx(ListGroupContext.Provider, { value: true, children: /* @__PURE__ */ jsx("ul", { className: cx(List_default.group, className), ...rest }) });
1173
+ function ListGroup({ label, className, ...rest }) {
1174
+ const headingId = useId();
1175
+ const list = /* @__PURE__ */ jsx(ListGroupContext.Provider, { value: true, children: /* @__PURE__ */ jsx(
1176
+ "ul",
1177
+ {
1178
+ className: cx(List_module_default.group, className),
1179
+ "aria-labelledby": label != null ? headingId : void 0,
1180
+ ...rest
1181
+ }
1182
+ ) });
1183
+ if (label == null) return list;
1184
+ return /* @__PURE__ */ jsxs("div", { className: List_module_default.labelledGroup, children: [
1185
+ /* @__PURE__ */ jsx("span", { className: List_module_default.label, id: headingId, children: label }),
1186
+ list
1187
+ ] });
1398
1188
  }
1399
1189
  function ListItem({
1400
1190
  title,
@@ -1402,6 +1192,7 @@ function ListItem({
1402
1192
  leading,
1403
1193
  trailing,
1404
1194
  onClick,
1195
+ pressed,
1405
1196
  href,
1406
1197
  surface,
1407
1198
  className,
@@ -1411,45 +1202,45 @@ function ListItem({
1411
1202
  const Root = inGroup ? "li" : "div";
1412
1203
  const resolved = surface ?? (inGroup ? void 0 : "card");
1413
1204
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
1414
- leading != null && /* @__PURE__ */ jsx("span", { className: List_default.leading, children: leading }),
1415
- /* @__PURE__ */ jsxs("span", { className: List_default.text, children: [
1416
- /* @__PURE__ */ jsx("span", { className: List_default.title, children: title }),
1417
- description != null && /* @__PURE__ */ jsx("span", { className: List_default.description, children: description })
1205
+ leading != null && /* @__PURE__ */ jsx("span", { className: List_module_default.leading, children: leading }),
1206
+ /* @__PURE__ */ jsxs("span", { className: List_module_default.text, children: [
1207
+ /* @__PURE__ */ jsx("span", { className: List_module_default.title, children: title }),
1208
+ description != null && /* @__PURE__ */ jsx("span", { className: List_module_default.description, children: description })
1418
1209
  ] }),
1419
- trailing != null && /* @__PURE__ */ jsx("span", { className: List_default.trailing, children: trailing })
1210
+ trailing != null && /* @__PURE__ */ jsx("span", { className: List_module_default.trailing, children: trailing })
1420
1211
  ] });
1421
1212
  return /* @__PURE__ */ jsx(
1422
1213
  Root,
1423
1214
  {
1424
- className: cx(List_default.item, resolved && List_default[`surface-${resolved}`], className),
1215
+ className: cx(List_module_default.item, resolved && List_module_default[`surface-${resolved}`], className),
1425
1216
  ...rest,
1426
- children: href !== void 0 ? /* @__PURE__ */ jsx("a", { className: cx(List_default.row, List_default.interactive), href, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsx("button", { type: "button", className: cx(List_default.row, List_default.interactive), onClick, children: content }) : /* @__PURE__ */ jsx("span", { className: List_default.row, children: content })
1217
+ children: href !== void 0 ? /* @__PURE__ */ jsx("a", { className: cx(List_module_default.row, List_module_default.interactive), href, children: content }) : onClick !== void 0 ? /* @__PURE__ */ jsx(
1218
+ "button",
1219
+ {
1220
+ type: "button",
1221
+ className: cx(List_module_default.row, List_module_default.interactive),
1222
+ onClick,
1223
+ "aria-pressed": pressed,
1224
+ children: content
1225
+ }
1226
+ ) : /* @__PURE__ */ jsx("span", { className: List_module_default.row, children: content })
1427
1227
  }
1428
1228
  );
1429
1229
  }
1430
1230
 
1431
- // src/components/EmptyState/EmptyState.module.css
1432
- var EmptyState_default = {
1433
- root: "EmptyState_root",
1434
- icon: "EmptyState_icon",
1435
- action: "EmptyState_action"
1436
- };
1231
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/EmptyState/EmptyState.module.css?mds-scoped
1232
+ var EmptyState_module_default = { "root": "mds-EmptyState__root", "icon": "mds-EmptyState__icon", "action": "mds-EmptyState__action" };
1437
1233
  function EmptyState({ title, description, icon, action, className }) {
1438
- return /* @__PURE__ */ jsxs("div", { className: cx(EmptyState_default.root, className), children: [
1439
- icon != null && /* @__PURE__ */ jsx("span", { className: EmptyState_default.icon, "aria-hidden": "true", children: icon }),
1234
+ return /* @__PURE__ */ jsxs("div", { className: cx(EmptyState_module_default.root, className), children: [
1235
+ icon != null && /* @__PURE__ */ jsx("span", { className: EmptyState_module_default.icon, "aria-hidden": "true", children: icon }),
1440
1236
  /* @__PURE__ */ jsx(Heading, { level: 3, children: title }),
1441
1237
  description !== void 0 && /* @__PURE__ */ jsx(Text, { tone: "secondary", children: description }),
1442
- action != null && /* @__PURE__ */ jsx("span", { className: EmptyState_default.action, children: action })
1238
+ action != null && /* @__PURE__ */ jsx("span", { className: EmptyState_module_default.action, children: action })
1443
1239
  ] });
1444
1240
  }
1445
1241
 
1446
- // src/components/Tabs/Tabs.module.css
1447
- var Tabs_default = {
1448
- list: "Tabs_list",
1449
- tab: "Tabs_tab",
1450
- selected: "Tabs_selected",
1451
- panel: "Tabs_panel"
1452
- };
1242
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Tabs/Tabs.module.css?mds-scoped
1243
+ var Tabs_module_default = { "list": "mds-Tabs__list", "tab": "mds-Tabs__tab", "selected": "mds-Tabs__selected", "panel": "mds-Tabs__panel" };
1453
1244
  var TabsContext = createContext(null);
1454
1245
  function useTabs(component) {
1455
1246
  const context = useContext(TabsContext);
@@ -1458,7 +1249,18 @@ function useTabs(component) {
1458
1249
  }
1459
1250
  function Tabs({ value, onChange, children }) {
1460
1251
  const baseId = useId();
1461
- return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { value, onChange, baseId }, children });
1252
+ const [panels, setPanels] = useState(/* @__PURE__ */ new Set());
1253
+ const registerPanel = useCallback((panel) => {
1254
+ setPanels((prev) => new Set(prev).add(panel));
1255
+ return () => {
1256
+ setPanels((prev) => {
1257
+ const next = new Set(prev);
1258
+ next.delete(panel);
1259
+ return next;
1260
+ });
1261
+ };
1262
+ }, []);
1263
+ return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { value, onChange, baseId, panels, registerPanel }, children });
1462
1264
  }
1463
1265
  function onArrow(event, onChange) {
1464
1266
  const keys = ["ArrowLeft", "ArrowRight", "Home", "End"];
@@ -1481,7 +1283,7 @@ function TabList({ label, className, children, ...rest }) {
1481
1283
  {
1482
1284
  role: "tablist",
1483
1285
  "aria-label": label,
1484
- className: cx(Tabs_default.list, className),
1286
+ className: cx(Tabs_module_default.list, className),
1485
1287
  onKeyDown: (event) => onArrow(event, onChange),
1486
1288
  ...rest,
1487
1289
  children
@@ -1498,10 +1300,10 @@ function Tab({ value, className, children, ...rest }) {
1498
1300
  role: "tab",
1499
1301
  id: `${tabs.baseId}-tab-${value}`,
1500
1302
  "aria-selected": selected,
1501
- "aria-controls": `${tabs.baseId}-panel-${value}`,
1303
+ "aria-controls": tabs.panels.has(value) ? `${tabs.baseId}-panel-${value}` : void 0,
1502
1304
  tabIndex: selected ? 0 : -1,
1503
1305
  "data-value": value,
1504
- className: cx(Tabs_default.tab, selected && Tabs_default.selected, className),
1306
+ className: cx(Tabs_module_default.tab, selected && Tabs_module_default.selected, className),
1505
1307
  onClick: () => tabs.onChange(value),
1506
1308
  ...rest,
1507
1309
  children
@@ -1511,6 +1313,8 @@ function Tab({ value, className, children, ...rest }) {
1511
1313
  function TabPanel({ value, className, children, ...rest }) {
1512
1314
  const tabs = useTabs("TabPanel");
1513
1315
  const selected = tabs.value === value;
1316
+ const { registerPanel } = tabs;
1317
+ useEffect(() => registerPanel(value), [registerPanel, value]);
1514
1318
  return /* @__PURE__ */ jsx(
1515
1319
  "div",
1516
1320
  {
@@ -1518,32 +1322,26 @@ function TabPanel({ value, className, children, ...rest }) {
1518
1322
  id: `${tabs.baseId}-panel-${value}`,
1519
1323
  "aria-labelledby": `${tabs.baseId}-tab-${value}`,
1520
1324
  hidden: !selected,
1521
- className: cx(Tabs_default.panel, className),
1325
+ className: cx(Tabs_module_default.panel, className),
1522
1326
  ...rest,
1523
1327
  children
1524
1328
  }
1525
1329
  );
1526
1330
  }
1527
1331
 
1528
- // src/components/Toast/Toast.module.css
1529
- var Toast_default = {
1530
- viewport: "Toast_viewport",
1531
- toast: "Toast_toast",
1532
- "tone-success": "Toast_tone-success",
1533
- "tone-danger": "Toast_tone-danger",
1534
- body: "Toast_body",
1535
- title: "Toast_title",
1536
- description: "Toast_description",
1537
- close: "Toast_close",
1538
- closeGlyph: "Toast_closeGlyph"
1539
- };
1332
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Toast/Toast.module.css?mds-scoped
1333
+ var Toast_module_default = { "viewport": "mds-Toast__viewport", "toast": "mds-Toast__toast", "tone-success": "mds-Toast__tone-success", "tone-danger": "mds-Toast__tone-danger", "body": "mds-Toast__body", "title": "mds-Toast__title", "description": "mds-Toast__description", "close": "mds-Toast__close", "closeGlyph": "mds-Toast__closeGlyph" };
1540
1334
  var ToastContext = createContext(null);
1541
1335
  function useToast() {
1542
1336
  const context = useContext(ToastContext);
1543
1337
  if (context === null) throw new Error("useToast needs a <ToastProvider> above it");
1544
1338
  return context;
1545
1339
  }
1546
- function ToastProvider({ children }) {
1340
+ function ToastProvider({
1341
+ children,
1342
+ regionLabel = "Notifications",
1343
+ dismissLabel = "Dismiss"
1344
+ }) {
1547
1345
  const [toasts, setToasts] = useState([]);
1548
1346
  const nextId = useRef(1);
1549
1347
  const dismiss = useCallback((id) => {
@@ -1561,38 +1359,27 @@ function ToastProvider({ children }) {
1561
1359
  const value = useMemo(() => ({ toast, dismiss }), [toast, dismiss]);
1562
1360
  return /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
1563
1361
  children,
1564
- /* @__PURE__ */ jsx("div", { role: "region", "aria-label": "Notifications", className: Toast_default.viewport, children: toasts.map((entry) => /* @__PURE__ */ jsxs("div", { role: "status", className: cx(Toast_default.toast, Toast_default[`tone-${entry.tone}`]), children: [
1565
- /* @__PURE__ */ jsxs("span", { className: Toast_default.body, children: [
1566
- /* @__PURE__ */ jsx("span", { className: Toast_default.title, children: entry.title }),
1567
- entry.description !== void 0 && /* @__PURE__ */ jsx("span", { className: Toast_default.description, children: entry.description })
1362
+ /* @__PURE__ */ jsx("div", { role: "region", "aria-label": regionLabel, className: Toast_module_default.viewport, children: toasts.map((entry) => /* @__PURE__ */ jsxs("div", { role: "status", className: cx(Toast_module_default.toast, Toast_module_default[`tone-${entry.tone}`]), children: [
1363
+ /* @__PURE__ */ jsxs("span", { className: Toast_module_default.body, children: [
1364
+ /* @__PURE__ */ jsx("span", { className: Toast_module_default.title, children: entry.title }),
1365
+ entry.description !== void 0 && /* @__PURE__ */ jsx("span", { className: Toast_module_default.description, children: entry.description })
1568
1366
  ] }),
1569
1367
  /* @__PURE__ */ jsx(
1570
1368
  "button",
1571
1369
  {
1572
1370
  type: "button",
1573
- "aria-label": "Dismiss",
1574
- className: Toast_default.close,
1371
+ "aria-label": `${dismissLabel}: ${entry.title}`,
1372
+ className: Toast_module_default.close,
1575
1373
  onClick: () => dismiss(entry.id),
1576
- children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Toast_default.closeGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1374
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: Toast_module_default.closeGlyph, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) })
1577
1375
  }
1578
1376
  )
1579
1377
  ] }, entry.id)) })
1580
1378
  ] });
1581
1379
  }
1582
1380
 
1583
- // src/components/Stack/Stack.module.css
1584
- var Stack_default = {
1585
- stack: "Stack_stack",
1586
- "gap-hairline": "Stack_gap-hairline",
1587
- "gap-tight": "Stack_gap-tight",
1588
- "gap-base": "Stack_gap-base",
1589
- "gap-loose": "Stack_gap-loose",
1590
- "gap-section": "Stack_gap-section",
1591
- "align-start": "Stack_align-start",
1592
- "align-center": "Stack_align-center",
1593
- "align-end": "Stack_align-end",
1594
- "align-stretch": "Stack_align-stretch"
1595
- };
1381
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Stack/Stack.module.css?mds-scoped
1382
+ var Stack_module_default = { "stack": "mds-Stack__stack", "gap-hairline": "mds-Stack__gap-hairline", "gap-tight": "mds-Stack__gap-tight", "gap-base": "mds-Stack__gap-base", "gap-loose": "mds-Stack__gap-loose", "gap-section": "mds-Stack__gap-section", "align-start": "mds-Stack__align-start", "align-center": "mds-Stack__align-center", "align-end": "mds-Stack__align-end", "align-stretch": "mds-Stack__align-stretch" };
1596
1383
 
1597
1384
  // src/components/Stack/Stack.tsx
1598
1385
  function Stack({
@@ -1603,28 +1390,13 @@ function Stack({
1603
1390
  ...rest
1604
1391
  }) {
1605
1392
  return createElement(as, {
1606
- className: cx(Stack_default.stack, Stack_default[`gap-${gap}`], Stack_default[`align-${align}`], className),
1393
+ className: cx(Stack_module_default.stack, Stack_module_default[`gap-${gap}`], Stack_module_default[`align-${align}`], className),
1607
1394
  ...rest
1608
1395
  });
1609
1396
  }
1610
1397
 
1611
- // src/components/Inline/Inline.module.css
1612
- var Inline_default = {
1613
- inline: "Inline_inline",
1614
- "gap-hairline": "Inline_gap-hairline",
1615
- "gap-tight": "Inline_gap-tight",
1616
- "gap-base": "Inline_gap-base",
1617
- "gap-loose": "Inline_gap-loose",
1618
- "align-start": "Inline_align-start",
1619
- "align-center": "Inline_align-center",
1620
- "align-end": "Inline_align-end",
1621
- "align-baseline": "Inline_align-baseline",
1622
- "justify-start": "Inline_justify-start",
1623
- "justify-center": "Inline_justify-center",
1624
- "justify-end": "Inline_justify-end",
1625
- "justify-between": "Inline_justify-between",
1626
- wrap: "Inline_wrap"
1627
- };
1398
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Inline/Inline.module.css?mds-scoped
1399
+ var Inline_module_default = { "inline": "mds-Inline__inline", "gap-hairline": "mds-Inline__gap-hairline", "gap-tight": "mds-Inline__gap-tight", "gap-base": "mds-Inline__gap-base", "gap-loose": "mds-Inline__gap-loose", "align-start": "mds-Inline__align-start", "align-center": "mds-Inline__align-center", "align-end": "mds-Inline__align-end", "align-baseline": "mds-Inline__align-baseline", "justify-start": "mds-Inline__justify-start", "justify-center": "mds-Inline__justify-center", "justify-end": "mds-Inline__justify-end", "justify-between": "mds-Inline__justify-between", "wrap": "mds-Inline__wrap" };
1628
1400
 
1629
1401
  // src/components/Inline/Inline.tsx
1630
1402
  function Inline({
@@ -1638,23 +1410,19 @@ function Inline({
1638
1410
  }) {
1639
1411
  return createElement(as, {
1640
1412
  className: cx(
1641
- Inline_default.inline,
1642
- Inline_default[`gap-${gap}`],
1643
- Inline_default[`align-${align}`],
1644
- Inline_default[`justify-${justify}`],
1645
- wrap && Inline_default.wrap,
1413
+ Inline_module_default.inline,
1414
+ Inline_module_default[`gap-${gap}`],
1415
+ Inline_module_default[`align-${align}`],
1416
+ Inline_module_default[`justify-${justify}`],
1417
+ wrap && Inline_module_default.wrap,
1646
1418
  className
1647
1419
  ),
1648
1420
  ...rest
1649
1421
  });
1650
1422
  }
1651
1423
 
1652
- // src/components/Container/Container.module.css
1653
- var Container_default = {
1654
- container: "Container_container",
1655
- "width-content": "Container_width-content",
1656
- "width-wide": "Container_width-wide"
1657
- };
1424
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Container/Container.module.css?mds-scoped
1425
+ var Container_module_default = { "container": "mds-Container__container", "width-content": "mds-Container__width-content", "width-wide": "mds-Container__width-wide" };
1658
1426
 
1659
1427
  // src/components/Container/Container.tsx
1660
1428
  function Container({
@@ -1664,48 +1432,36 @@ function Container({
1664
1432
  ...rest
1665
1433
  }) {
1666
1434
  return createElement(as, {
1667
- className: cx(Container_default.container, Container_default[`width-${width}`], className),
1435
+ className: cx(Container_module_default.container, Container_module_default[`width-${width}`], className),
1668
1436
  ...rest
1669
1437
  });
1670
1438
  }
1671
1439
 
1672
- // src/components/Card/Card.module.css
1673
- var Card_default = {
1674
- card: "Card_card",
1675
- "variant-raised": "Card_variant-raised",
1676
- interactive: "Card_interactive",
1677
- header: "Card_header",
1678
- body: "Card_body",
1679
- footer: "Card_footer"
1680
- };
1681
- function Card({ children, variant = "card", onClick, href, className, ...rest }) {
1682
- const cardClass = cx(Card_default.card, Card_default[`variant-${variant}`], className);
1440
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Card/Card.module.css?mds-scoped
1441
+ var Card_module_default = { "card": "mds-Card__card", "variant-raised": "mds-Card__variant-raised", "variant-sunken": "mds-Card__variant-sunken", "emphasis": "mds-Card__emphasis", "interactive": "mds-Card__interactive", "header": "mds-Card__header", "body": "mds-Card__body", "footer": "mds-Card__footer" };
1442
+ function Card({ children, variant = "card", emphasis = false, onClick, href, className, ...rest }) {
1443
+ const cardClass = cx(Card_module_default.card, Card_module_default[`variant-${variant}`], emphasis && Card_module_default.emphasis, className);
1683
1444
  if (href !== void 0) {
1684
- return /* @__PURE__ */ jsx("a", { className: cx(cardClass, Card_default.interactive), href, ...rest, children });
1445
+ return /* @__PURE__ */ jsx("a", { className: cx(cardClass, Card_module_default.interactive), href, ...rest, children });
1685
1446
  }
1686
1447
  if (onClick !== void 0) {
1687
- return /* @__PURE__ */ jsx("button", { type: "button", className: cx(cardClass, Card_default.interactive), onClick, ...rest, children });
1448
+ return /* @__PURE__ */ jsx("button", { type: "button", className: cx(cardClass, Card_module_default.interactive), onClick, ...rest, children });
1688
1449
  }
1689
1450
  return /* @__PURE__ */ jsx("div", { className: cardClass, ...rest, children });
1690
1451
  }
1691
1452
  function CardHeader({ className, ...rest }) {
1692
- return /* @__PURE__ */ jsx("div", { className: cx(Card_default.header, className), ...rest });
1453
+ return /* @__PURE__ */ jsx("div", { className: cx(Card_module_default.header, className), ...rest });
1693
1454
  }
1694
1455
  function CardBody({ className, ...rest }) {
1695
- return /* @__PURE__ */ jsx("div", { className: cx(Card_default.body, className), ...rest });
1456
+ return /* @__PURE__ */ jsx("div", { className: cx(Card_module_default.body, className), ...rest });
1696
1457
  }
1697
1458
  function CardFooter({ className, ...rest }) {
1698
- return /* @__PURE__ */ jsx("div", { className: cx(Card_default.footer, className), ...rest });
1459
+ return /* @__PURE__ */ jsx("div", { className: cx(Card_module_default.footer, className), ...rest });
1699
1460
  }
1700
1461
 
1701
- // src/components/Modal/Modal.module.css
1702
- var Modal_default = {
1703
- panel: "Modal_panel",
1704
- header: "Modal_header",
1705
- body: "Modal_body",
1706
- footer: "Modal_footer"
1707
- };
1708
- function Modal({ open, onClose, label, closeOnScrimClick = true, children }) {
1462
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Modal/Modal.module.css?mds-scoped
1463
+ var Modal_module_default = { "panel": "mds-Modal__panel", "header": "mds-Modal__header", "body": "mds-Modal__body", "footer": "mds-Modal__footer" };
1464
+ function Modal({ open, onClose, label, closeOnScrimClick = true, role = "dialog", children }) {
1709
1465
  return /* @__PURE__ */ jsx(
1710
1466
  Overlay,
1711
1467
  {
@@ -1713,94 +1469,141 @@ function Modal({ open, onClose, label, closeOnScrimClick = true, children }) {
1713
1469
  onClose,
1714
1470
  label,
1715
1471
  variant: "modal",
1472
+ role,
1716
1473
  closeOnScrimClick,
1717
- panelClassName: Modal_default.panel,
1474
+ panelClassName: Modal_module_default.panel,
1718
1475
  children
1719
1476
  }
1720
1477
  );
1721
1478
  }
1722
1479
  function ModalHeader({ children }) {
1723
- return /* @__PURE__ */ jsx("div", { className: Modal_default.header, children });
1480
+ return /* @__PURE__ */ jsx("div", { className: Modal_module_default.header, children });
1724
1481
  }
1725
1482
  function ModalBody({ children }) {
1726
- return /* @__PURE__ */ jsx("div", { className: Modal_default.body, children });
1483
+ return /* @__PURE__ */ jsx("div", { className: Modal_module_default.body, children });
1727
1484
  }
1728
1485
  function ModalFooter({ children }) {
1729
- return /* @__PURE__ */ jsx("div", { className: Modal_default.footer, children });
1486
+ return /* @__PURE__ */ jsx("div", { className: Modal_module_default.footer, children });
1730
1487
  }
1731
1488
 
1732
- // src/components/ConfirmDialog/ConfirmDialog.module.css
1733
- var ConfirmDialog_default = {
1734
- description: "ConfirmDialog_description"
1489
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/ConfirmDialog/ConfirmDialog.module.css?mds-scoped
1490
+ var ConfirmDialog_module_default = { "description": "mds-ConfirmDialog__description", "error": "mds-ConfirmDialog__error" };
1491
+ var CONFIRM_VARIANT = {
1492
+ default: "primary",
1493
+ danger: "danger",
1494
+ warning: "warning"
1735
1495
  };
1736
1496
  function ConfirmDialog({
1737
- open,
1497
+ target,
1498
+ open = target != null,
1738
1499
  onClose,
1739
1500
  onConfirm,
1740
1501
  title,
1741
1502
  description,
1742
1503
  confirmLabel,
1743
1504
  cancelLabel = "Cancel",
1744
- danger = false
1505
+ tone = "default",
1506
+ errorMessage
1745
1507
  }) {
1746
- return /* @__PURE__ */ jsxs(Modal, { open, onClose, label: title, closeOnScrimClick: false, children: [
1747
- /* @__PURE__ */ jsx(ModalHeader, { children: title }),
1748
- /* @__PURE__ */ jsx(ModalBody, { children: description ? /* @__PURE__ */ jsx("p", { className: ConfirmDialog_default.description, children: description }) : null }),
1749
- /* @__PURE__ */ jsxs(ModalFooter, { children: [
1750
- /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onClose, children: cancelLabel }),
1751
- /* @__PURE__ */ jsx(Button, { variant: danger ? "danger" : "primary", onClick: onConfirm, children: confirmLabel })
1752
- ] })
1753
- ] });
1508
+ const [busy, setBusy] = useState(false);
1509
+ const [error, setError] = useState(null);
1510
+ const [prevOpen, setPrevOpen] = useState(open);
1511
+ if (open !== prevOpen) {
1512
+ setPrevOpen(open);
1513
+ if (open) {
1514
+ setBusy(false);
1515
+ setError(null);
1516
+ }
1517
+ }
1518
+ const live = { target, title, description, confirmLabel, cancelLabel, tone };
1519
+ const [frozen, setFrozen] = useState(live);
1520
+ const view = open ? live : frozen;
1521
+ const close = () => {
1522
+ setFrozen(live);
1523
+ onClose?.();
1524
+ };
1525
+ const handleConfirm = async () => {
1526
+ if (!onConfirm) return;
1527
+ const asked = live.target;
1528
+ setBusy(true);
1529
+ setError(null);
1530
+ try {
1531
+ await onConfirm(asked);
1532
+ close();
1533
+ } catch (e) {
1534
+ setBusy(false);
1535
+ const message = e.message;
1536
+ setError(errorMessage?.(message) ?? message);
1537
+ }
1538
+ };
1539
+ return /* @__PURE__ */ jsxs(
1540
+ Modal,
1541
+ {
1542
+ open,
1543
+ onClose: close,
1544
+ label: view.title,
1545
+ role: "alertdialog",
1546
+ closeOnScrimClick: false,
1547
+ children: [
1548
+ /* @__PURE__ */ jsx(ModalHeader, { children: view.title }),
1549
+ /* @__PURE__ */ jsxs(ModalBody, { children: [
1550
+ view.description != null ? /* @__PURE__ */ jsx("p", { className: ConfirmDialog_module_default.description, children: view.description }) : null,
1551
+ error != null ? /* @__PURE__ */ jsx("p", { role: "alert", className: ConfirmDialog_module_default.error, children: error }) : null
1552
+ ] }),
1553
+ /* @__PURE__ */ jsxs(ModalFooter, { children: [
1554
+ /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: close, children: view.cancelLabel }),
1555
+ /* @__PURE__ */ jsx(Button, { variant: CONFIRM_VARIANT[view.tone], loading: busy, onClick: handleConfirm, children: view.confirmLabel })
1556
+ ] })
1557
+ ]
1558
+ }
1559
+ );
1754
1560
  }
1755
1561
 
1756
- // src/components/Screen/Screen.module.css
1757
- var Screen_default = {
1758
- screen: "Screen_screen",
1759
- content: "Screen_content"
1760
- };
1562
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/Screen/Screen.module.css?mds-scoped
1563
+ var Screen_module_default = { "screen": "mds-Screen__screen", "content": "mds-Screen__content", "flush": "mds-Screen__flush" };
1761
1564
  function Screen({ children }) {
1762
- return /* @__PURE__ */ jsx("div", { className: Screen_default.screen, children });
1565
+ return /* @__PURE__ */ jsx("div", { className: Screen_module_default.screen, children });
1763
1566
  }
1764
- function ScreenContent({ children }) {
1765
- return /* @__PURE__ */ jsx("main", { className: Screen_default.content, children });
1567
+ function ScreenContent({ children, flush = false, className, ref, ...rest }) {
1568
+ return /* @__PURE__ */ jsx("main", { ref, className: cx(Screen_module_default.content, flush && Screen_module_default.flush, className), ...rest, children });
1766
1569
  }
1767
1570
 
1768
- // src/components/AppBar/AppBar.module.css
1769
- var AppBar_default = {
1770
- bar: "AppBar_bar",
1771
- title: "AppBar_title",
1772
- slot: "AppBar_slot"
1773
- };
1774
- function AppBar({ title, leading, trailing }) {
1775
- return /* @__PURE__ */ jsxs("header", { className: AppBar_default.bar, children: [
1776
- leading ? /* @__PURE__ */ jsx("div", { className: AppBar_default.slot, children: leading }) : null,
1777
- title ? /* @__PURE__ */ jsx("h1", { className: AppBar_default.title, children: title }) : null,
1778
- trailing ? /* @__PURE__ */ jsx("div", { className: AppBar_default.slot, children: trailing }) : null
1571
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/AppBar/AppBar.module.css?mds-scoped
1572
+ var AppBar_module_default = { "bar": "mds-AppBar__bar", "title": "mds-AppBar__title", "text": "mds-AppBar__text", "subtitle": "mds-AppBar__subtitle", "slot": "mds-AppBar__slot", "trailing": "mds-AppBar__trailing" };
1573
+ function AppBar({ title, subtitle, leading, trailing }) {
1574
+ const heading = title ? /* @__PURE__ */ jsx("h1", { className: AppBar_module_default.title, children: title }) : null;
1575
+ return /* @__PURE__ */ jsxs("header", { className: AppBar_module_default.bar, children: [
1576
+ leading ? /* @__PURE__ */ jsx("div", { className: AppBar_module_default.slot, children: leading }) : null,
1577
+ subtitle != null ? /* @__PURE__ */ jsxs("div", { className: AppBar_module_default.text, children: [
1578
+ heading,
1579
+ /* @__PURE__ */ jsx("div", { className: AppBar_module_default.subtitle, children: subtitle })
1580
+ ] }) : heading,
1581
+ trailing ? /* @__PURE__ */ jsx("div", { className: `${AppBar_module_default.slot} ${AppBar_module_default.trailing}`, children: trailing }) : null
1779
1582
  ] });
1780
1583
  }
1781
1584
 
1782
- // src/components/TabBar/TabBar.module.css
1783
- var TabBar_default = {
1784
- bar: "TabBar_bar",
1785
- item: "TabBar_item",
1786
- active: "TabBar_active",
1787
- icon: "TabBar_icon",
1788
- label: "TabBar_label"
1789
- };
1585
+ // mds-cssmod:/home/runner/work/mond-design-system/mond-design-system/packages/react/src/components/TabBar/TabBar.module.css?mds-scoped
1586
+ var TabBar_module_default = { "bar": "mds-TabBar__bar", "item": "mds-TabBar__item", "active": "mds-TabBar__active", "icon": "mds-TabBar__icon", "badge": "mds-TabBar__badge", "label": "mds-TabBar__label", "action": "mds-TabBar__action" };
1790
1587
  function TabBar({ label, children }) {
1791
- return /* @__PURE__ */ jsx("nav", { "aria-label": label, className: TabBar_default.bar, children });
1588
+ return /* @__PURE__ */ jsx("nav", { "aria-label": label, className: TabBar_module_default.bar, children });
1792
1589
  }
1793
- function TabBarItem({ label, icon, href, onClick, active = false }) {
1794
- const className = cx(TabBar_default.item, active && TabBar_default.active);
1590
+ function TabBarItem({ label, icon, href, onClick, active = false, badge = false }) {
1591
+ const className = cx(TabBar_module_default.item, active && TabBar_module_default.active);
1795
1592
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
1796
- /* @__PURE__ */ jsx("span", { className: TabBar_default.icon, "aria-hidden": "true", children: icon }),
1797
- /* @__PURE__ */ jsx("span", { className: TabBar_default.label, children: label })
1593
+ /* @__PURE__ */ jsxs("span", { className: TabBar_module_default.icon, "aria-hidden": "true", children: [
1594
+ icon,
1595
+ badge ? /* @__PURE__ */ jsx("span", { className: TabBar_module_default.badge, "data-testid": "mds-tabbar-badge" }) : null
1596
+ ] }),
1597
+ /* @__PURE__ */ jsx("span", { className: TabBar_module_default.label, children: label })
1798
1598
  ] });
1799
1599
  if (href !== void 0) {
1800
1600
  return /* @__PURE__ */ jsx("a", { href, className, "aria-current": active ? "page" : void 0, onClick, children: content });
1801
1601
  }
1802
1602
  return /* @__PURE__ */ jsx("button", { type: "button", className, "aria-current": active ? "page" : void 0, onClick, children: content });
1803
1603
  }
1604
+ function TabBarAction({ label, icon, onClick }) {
1605
+ return /* @__PURE__ */ jsx("button", { type: "button", "aria-label": label, className: TabBar_module_default.action, onClick, children: /* @__PURE__ */ jsx("span", { className: TabBar_module_default.icon, "aria-hidden": "true", children: icon }) });
1606
+ }
1804
1607
  function useRovingGroup(ref, { selector, orientation = "horizontal" }) {
1805
1608
  return useCallback(
1806
1609
  (event) => {
@@ -1826,6 +1629,6 @@ function useRovingGroup(ref, { selector, orientation = "horizontal" }) {
1826
1629
  );
1827
1630
  }
1828
1631
 
1829
- export { AppBar, Avatar, AvatarGroup, Badge, Button, Card, CardBody, CardFooter, CardHeader, Checkbox, Chip, ChipBar, ChipGroup, ConfirmDialog, Container, CountButton, DateTimePicker, Divider, EmptyState, Field, Heading, Icon, IconProvider, Inline, Input, Link, ListGroup, ListItem, Modal, ModalBody, ModalFooter, ModalHeader, OverlayHistoryContext, PasswordInput, ProgressBar, Radio, Screen, ScreenContent, SearchField, SegmentedControl, Select, Sheet, SheetBody, SheetFooter, SheetHeader, Skeleton, Spinner, Stack, Switch, Tab, TabBar, TabBarItem, TabList, TabPanel, Tabs, Tag, Text, Textarea, ToastProvider, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
1632
+ export { AppBar, Avatar, AvatarGroup, Badge, Button, Card, CardBody, CardFooter, CardHeader, Checkbox, Chip, ChipBar, ChipGroup, ConfirmDialog, Container, CountButton, DateTimePicker, Divider, EmptyState, Field, Heading, Icon, IconProvider, Inline, Input, Link, ListGroup, ListItem, Modal, ModalBody, ModalFooter, ModalHeader, OverlayHistoryContext, PasswordInput, ProgressBar, Radio, Screen, ScreenContent, SearchField, SegmentedControl, Select, Sheet, SheetBody, SheetFooter, SheetHeader, Skeleton, Spinner, Stack, Switch, Tab, TabBar, TabBarAction, TabBarItem, TabList, TabPanel, Tabs, Tag, Text, Textarea, ToastProvider, cx, useFieldContext, useOverlay, usePresence, useRovingGroup, useToast };
1830
1633
  //# sourceMappingURL=index.js.map
1831
1634
  //# sourceMappingURL=index.js.map