@duskmoon-dev/components 0.5.0 → 0.5.2

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.
@@ -2147,6 +2147,7 @@ var SelectRoot = forwardRef6(({
2147
2147
  "aria-invalid": ariaInvalid,
2148
2148
  "aria-label": ariaLabel,
2149
2149
  "aria-labelledby": ariaLabelledBy,
2150
+ "aria-required": ariaRequired,
2150
2151
  children,
2151
2152
  className,
2152
2153
  defaultValue,
@@ -2283,6 +2284,7 @@ var SelectRoot = forwardRef6(({
2283
2284
  "aria-invalid": ariaInvalid,
2284
2285
  "aria-label": ariaLabel,
2285
2286
  "aria-labelledby": ariaLabelledBy,
2287
+ "aria-required": ariaRequired,
2286
2288
  "aria-haspopup": "listbox",
2287
2289
  "aria-expanded": open,
2288
2290
  onClick: () => setOpen((current) => !current),
@@ -2297,7 +2299,20 @@ var SelectRoot = forwardRef6(({
2297
2299
  /* @__PURE__ */ jsx8("span", {
2298
2300
  className: selectIconClass,
2299
2301
  "aria-hidden": "true",
2300
- children: "v"
2302
+ children: /* @__PURE__ */ jsx8("svg", {
2303
+ width: "16",
2304
+ height: "16",
2305
+ viewBox: "0 0 24 24",
2306
+ fill: "none",
2307
+ stroke: "currentColor",
2308
+ strokeWidth: "2",
2309
+ strokeLinecap: "round",
2310
+ strokeLinejoin: "round",
2311
+ "aria-hidden": "true",
2312
+ children: /* @__PURE__ */ jsx8("path", {
2313
+ d: "m6 9 6 6 6-6"
2314
+ })
2315
+ })
2301
2316
  })
2302
2317
  ]
2303
2318
  }),
@@ -2306,7 +2321,19 @@ var SelectRoot = forwardRef6(({
2306
2321
  className: selectClearClass,
2307
2322
  "aria-label": "Clear selection",
2308
2323
  onClick: clearValue,
2309
- children: "x"
2324
+ children: /* @__PURE__ */ jsx8("svg", {
2325
+ width: "14",
2326
+ height: "14",
2327
+ viewBox: "0 0 24 24",
2328
+ fill: "none",
2329
+ stroke: "currentColor",
2330
+ strokeWidth: "2",
2331
+ strokeLinecap: "round",
2332
+ "aria-hidden": "true",
2333
+ children: /* @__PURE__ */ jsx8("path", {
2334
+ d: "m6 6 12 12M6 18 18 6"
2335
+ })
2336
+ })
2310
2337
  }) : null,
2311
2338
  open ? /* @__PURE__ */ jsxs7("div", {
2312
2339
  className: selectDropdownClass,
@@ -1645,6 +1645,7 @@ var SelectRoot = forwardRef4(({
1645
1645
  "aria-invalid": ariaInvalid,
1646
1646
  "aria-label": ariaLabel,
1647
1647
  "aria-labelledby": ariaLabelledBy,
1648
+ "aria-required": ariaRequired,
1648
1649
  children,
1649
1650
  className,
1650
1651
  defaultValue,
@@ -1781,6 +1782,7 @@ var SelectRoot = forwardRef4(({
1781
1782
  "aria-invalid": ariaInvalid,
1782
1783
  "aria-label": ariaLabel,
1783
1784
  "aria-labelledby": ariaLabelledBy,
1785
+ "aria-required": ariaRequired,
1784
1786
  "aria-haspopup": "listbox",
1785
1787
  "aria-expanded": open,
1786
1788
  onClick: () => setOpen((current) => !current),
@@ -1795,7 +1797,20 @@ var SelectRoot = forwardRef4(({
1795
1797
  /* @__PURE__ */ jsx5("span", {
1796
1798
  className: selectIconClass,
1797
1799
  "aria-hidden": "true",
1798
- children: "v"
1800
+ children: /* @__PURE__ */ jsx5("svg", {
1801
+ width: "16",
1802
+ height: "16",
1803
+ viewBox: "0 0 24 24",
1804
+ fill: "none",
1805
+ stroke: "currentColor",
1806
+ strokeWidth: "2",
1807
+ strokeLinecap: "round",
1808
+ strokeLinejoin: "round",
1809
+ "aria-hidden": "true",
1810
+ children: /* @__PURE__ */ jsx5("path", {
1811
+ d: "m6 9 6 6 6-6"
1812
+ })
1813
+ })
1799
1814
  })
1800
1815
  ]
1801
1816
  }),
@@ -1804,7 +1819,19 @@ var SelectRoot = forwardRef4(({
1804
1819
  className: selectClearClass,
1805
1820
  "aria-label": "Clear selection",
1806
1821
  onClick: clearValue,
1807
- children: "x"
1822
+ children: /* @__PURE__ */ jsx5("svg", {
1823
+ width: "14",
1824
+ height: "14",
1825
+ viewBox: "0 0 24 24",
1826
+ fill: "none",
1827
+ stroke: "currentColor",
1828
+ strokeWidth: "2",
1829
+ strokeLinecap: "round",
1830
+ "aria-hidden": "true",
1831
+ children: /* @__PURE__ */ jsx5("path", {
1832
+ d: "m6 6 12 12M6 18 18 6"
1833
+ })
1834
+ })
1808
1835
  }) : null,
1809
1836
  open ? /* @__PURE__ */ jsxs5("div", {
1810
1837
  className: selectDropdownClass,
@@ -1637,6 +1637,7 @@ var SelectRoot = forwardRef4(({
1637
1637
  "aria-invalid": ariaInvalid,
1638
1638
  "aria-label": ariaLabel,
1639
1639
  "aria-labelledby": ariaLabelledBy,
1640
+ "aria-required": ariaRequired,
1640
1641
  children,
1641
1642
  className,
1642
1643
  defaultValue,
@@ -1773,6 +1774,7 @@ var SelectRoot = forwardRef4(({
1773
1774
  "aria-invalid": ariaInvalid,
1774
1775
  "aria-label": ariaLabel,
1775
1776
  "aria-labelledby": ariaLabelledBy,
1777
+ "aria-required": ariaRequired,
1776
1778
  "aria-haspopup": "listbox",
1777
1779
  "aria-expanded": open,
1778
1780
  onClick: () => setOpen((current) => !current),
@@ -1787,7 +1789,20 @@ var SelectRoot = forwardRef4(({
1787
1789
  /* @__PURE__ */ jsx5("span", {
1788
1790
  className: selectIconClass,
1789
1791
  "aria-hidden": "true",
1790
- children: "v"
1792
+ children: /* @__PURE__ */ jsx5("svg", {
1793
+ width: "16",
1794
+ height: "16",
1795
+ viewBox: "0 0 24 24",
1796
+ fill: "none",
1797
+ stroke: "currentColor",
1798
+ strokeWidth: "2",
1799
+ strokeLinecap: "round",
1800
+ strokeLinejoin: "round",
1801
+ "aria-hidden": "true",
1802
+ children: /* @__PURE__ */ jsx5("path", {
1803
+ d: "m6 9 6 6 6-6"
1804
+ })
1805
+ })
1791
1806
  })
1792
1807
  ]
1793
1808
  }),
@@ -1796,7 +1811,19 @@ var SelectRoot = forwardRef4(({
1796
1811
  className: selectClearClass,
1797
1812
  "aria-label": "Clear selection",
1798
1813
  onClick: clearValue,
1799
- children: "x"
1814
+ children: /* @__PURE__ */ jsx5("svg", {
1815
+ width: "14",
1816
+ height: "14",
1817
+ viewBox: "0 0 24 24",
1818
+ fill: "none",
1819
+ stroke: "currentColor",
1820
+ strokeWidth: "2",
1821
+ strokeLinecap: "round",
1822
+ "aria-hidden": "true",
1823
+ children: /* @__PURE__ */ jsx5("path", {
1824
+ d: "m6 6 12 12M6 18 18 6"
1825
+ })
1826
+ })
1800
1827
  }) : null,
1801
1828
  open ? /* @__PURE__ */ jsxs5("div", {
1802
1829
  className: selectDropdownClass,
@@ -2137,6 +2137,7 @@ var SelectRoot = forwardRef6(({
2137
2137
  "aria-invalid": ariaInvalid,
2138
2138
  "aria-label": ariaLabel,
2139
2139
  "aria-labelledby": ariaLabelledBy,
2140
+ "aria-required": ariaRequired,
2140
2141
  children,
2141
2142
  className,
2142
2143
  defaultValue,
@@ -2273,6 +2274,7 @@ var SelectRoot = forwardRef6(({
2273
2274
  "aria-invalid": ariaInvalid,
2274
2275
  "aria-label": ariaLabel,
2275
2276
  "aria-labelledby": ariaLabelledBy,
2277
+ "aria-required": ariaRequired,
2276
2278
  "aria-haspopup": "listbox",
2277
2279
  "aria-expanded": open,
2278
2280
  onClick: () => setOpen((current) => !current),
@@ -2287,7 +2289,20 @@ var SelectRoot = forwardRef6(({
2287
2289
  /* @__PURE__ */ jsx8("span", {
2288
2290
  className: selectIconClass,
2289
2291
  "aria-hidden": "true",
2290
- children: "v"
2292
+ children: /* @__PURE__ */ jsx8("svg", {
2293
+ width: "16",
2294
+ height: "16",
2295
+ viewBox: "0 0 24 24",
2296
+ fill: "none",
2297
+ stroke: "currentColor",
2298
+ strokeWidth: "2",
2299
+ strokeLinecap: "round",
2300
+ strokeLinejoin: "round",
2301
+ "aria-hidden": "true",
2302
+ children: /* @__PURE__ */ jsx8("path", {
2303
+ d: "m6 9 6 6 6-6"
2304
+ })
2305
+ })
2291
2306
  })
2292
2307
  ]
2293
2308
  }),
@@ -2296,7 +2311,19 @@ var SelectRoot = forwardRef6(({
2296
2311
  className: selectClearClass,
2297
2312
  "aria-label": "Clear selection",
2298
2313
  onClick: clearValue,
2299
- children: "x"
2314
+ children: /* @__PURE__ */ jsx8("svg", {
2315
+ width: "14",
2316
+ height: "14",
2317
+ viewBox: "0 0 24 24",
2318
+ fill: "none",
2319
+ stroke: "currentColor",
2320
+ strokeWidth: "2",
2321
+ strokeLinecap: "round",
2322
+ "aria-hidden": "true",
2323
+ children: /* @__PURE__ */ jsx8("path", {
2324
+ d: "m6 6 12 12M6 18 18 6"
2325
+ })
2326
+ })
2300
2327
  }) : null,
2301
2328
  open ? /* @__PURE__ */ jsxs7("div", {
2302
2329
  className: selectDropdownClass,
@@ -88,6 +88,7 @@ var InputNumber = forwardRef(({
88
88
  onStep,
89
89
  parser = parseNumber,
90
90
  precision,
91
+ readOnly,
91
92
  size = "md",
92
93
  status,
93
94
  step = 1,
@@ -107,7 +108,7 @@ var InputNumber = forwardRef(({
107
108
  return normalized;
108
109
  }
109
110
  function stepValue(type) {
110
- if (disabled)
111
+ if (disabled || readOnly)
111
112
  return;
112
113
  const offset = type === "up" ? step : -step;
113
114
  const base = typeof currentValue === "number" ? currentValue : 0;
@@ -129,11 +130,15 @@ var InputNumber = forwardRef(({
129
130
  inputMode: "decimal",
130
131
  className: inputNumberInputClass,
131
132
  disabled,
133
+ readOnly,
132
134
  value: displayValue,
133
- onChange: (event) => emitChange(parser(event.currentTarget.value)),
135
+ onChange: (event) => {
136
+ if (!readOnly)
137
+ emitChange(parser(event.currentTarget.value));
138
+ },
134
139
  onKeyDown: (event) => {
135
140
  onKeyDown?.(event);
136
- if (!keyboard || event.defaultPrevented)
141
+ if (readOnly || !keyboard || event.defaultPrevented)
137
142
  return;
138
143
  if (event.key === "ArrowUp") {
139
144
  event.preventDefault();
@@ -151,7 +156,7 @@ var InputNumber = forwardRef(({
151
156
  /* @__PURE__ */ jsx("button", {
152
157
  type: "button",
153
158
  className: inputNumberControlClass,
154
- disabled: disabled || max !== undefined && Number(currentValue) >= max,
159
+ disabled: disabled || readOnly || max !== undefined && Number(currentValue) >= max,
155
160
  "aria-label": "Increase value",
156
161
  onClick: () => stepValue("up"),
157
162
  children: "+"
@@ -159,7 +164,7 @@ var InputNumber = forwardRef(({
159
164
  /* @__PURE__ */ jsx("button", {
160
165
  type: "button",
161
166
  className: inputNumberControlClass,
162
- disabled: disabled || min !== undefined && Number(currentValue) <= min,
167
+ disabled: disabled || readOnly || min !== undefined && Number(currentValue) <= min,
163
168
  "aria-label": "Decrease value",
164
169
  onClick: () => stepValue("down"),
165
170
  children: "-"
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
2
  import type { CompiledForm, FormErrors, RenderableSchema, FormValue } from "./json-schema-form";
3
3
  export type JsonSchemaFormProps = {
4
+ /** Additional classes for the generated native form; default classes are preserved. */
5
+ className?: string;
4
6
  value?: FormValue;
5
7
  defaultValue?: FormValue;
6
8
  onChange?: (value: FormValue) => void;
@@ -16,4 +18,4 @@ export type JsonSchemaFormProps = {
16
18
  schema: RenderableSchema;
17
19
  compiled?: never;
18
20
  });
19
- export declare function JsonSchemaForm({ compiled: suppliedCompiled, schema, value: controlledValue, defaultValue, onChange, errors: suppliedErrors, onErrorsChange, onSubmit, onReset, }: JsonSchemaFormProps): React.JSX.Element;
21
+ export declare function JsonSchemaForm({ className, compiled: suppliedCompiled, schema, value: controlledValue, defaultValue, onChange, errors: suppliedErrors, onErrorsChange, onSubmit, onReset, }: JsonSchemaFormProps): React.JSX.Element;
@@ -3328,6 +3328,7 @@ var InputNumber = forwardRef11(({
3328
3328
  onStep,
3329
3329
  parser = parseNumber,
3330
3330
  precision,
3331
+ readOnly,
3331
3332
  size = "md",
3332
3333
  status,
3333
3334
  step = 1,
@@ -3347,7 +3348,7 @@ var InputNumber = forwardRef11(({
3347
3348
  return normalized;
3348
3349
  }
3349
3350
  function stepValue(type) {
3350
- if (disabled)
3351
+ if (disabled || readOnly)
3351
3352
  return;
3352
3353
  const offset = type === "up" ? step : -step;
3353
3354
  const base = typeof currentValue === "number" ? currentValue : 0;
@@ -3369,11 +3370,15 @@ var InputNumber = forwardRef11(({
3369
3370
  inputMode: "decimal",
3370
3371
  className: inputNumberInputClass,
3371
3372
  disabled,
3373
+ readOnly,
3372
3374
  value: displayValue,
3373
- onChange: (event) => emitChange(parser(event.currentTarget.value)),
3375
+ onChange: (event) => {
3376
+ if (!readOnly)
3377
+ emitChange(parser(event.currentTarget.value));
3378
+ },
3374
3379
  onKeyDown: (event) => {
3375
3380
  onKeyDown?.(event);
3376
- if (!keyboard || event.defaultPrevented)
3381
+ if (readOnly || !keyboard || event.defaultPrevented)
3377
3382
  return;
3378
3383
  if (event.key === "ArrowUp") {
3379
3384
  event.preventDefault();
@@ -3391,7 +3396,7 @@ var InputNumber = forwardRef11(({
3391
3396
  /* @__PURE__ */ jsx12("button", {
3392
3397
  type: "button",
3393
3398
  className: inputNumberControlClass,
3394
- disabled: disabled || max !== undefined && Number(currentValue) >= max,
3399
+ disabled: disabled || readOnly || max !== undefined && Number(currentValue) >= max,
3395
3400
  "aria-label": "Increase value",
3396
3401
  onClick: () => stepValue("up"),
3397
3402
  children: "+"
@@ -3399,7 +3404,7 @@ var InputNumber = forwardRef11(({
3399
3404
  /* @__PURE__ */ jsx12("button", {
3400
3405
  type: "button",
3401
3406
  className: inputNumberControlClass,
3402
- disabled: disabled || min !== undefined && Number(currentValue) <= min,
3407
+ disabled: disabled || readOnly || min !== undefined && Number(currentValue) <= min,
3403
3408
  "aria-label": "Decrease value",
3404
3409
  onClick: () => stepValue("down"),
3405
3410
  children: "-"
@@ -4207,6 +4212,7 @@ var SelectRoot = forwardRef16(({
4207
4212
  "aria-invalid": ariaInvalid,
4208
4213
  "aria-label": ariaLabel,
4209
4214
  "aria-labelledby": ariaLabelledBy,
4215
+ "aria-required": ariaRequired,
4210
4216
  children,
4211
4217
  className,
4212
4218
  defaultValue,
@@ -4343,6 +4349,7 @@ var SelectRoot = forwardRef16(({
4343
4349
  "aria-invalid": ariaInvalid,
4344
4350
  "aria-label": ariaLabel,
4345
4351
  "aria-labelledby": ariaLabelledBy,
4352
+ "aria-required": ariaRequired,
4346
4353
  "aria-haspopup": "listbox",
4347
4354
  "aria-expanded": open,
4348
4355
  onClick: () => setOpen((current) => !current),
@@ -4357,7 +4364,20 @@ var SelectRoot = forwardRef16(({
4357
4364
  /* @__PURE__ */ jsx17("span", {
4358
4365
  className: selectIconClass,
4359
4366
  "aria-hidden": "true",
4360
- children: "v"
4367
+ children: /* @__PURE__ */ jsx17("svg", {
4368
+ width: "16",
4369
+ height: "16",
4370
+ viewBox: "0 0 24 24",
4371
+ fill: "none",
4372
+ stroke: "currentColor",
4373
+ strokeWidth: "2",
4374
+ strokeLinecap: "round",
4375
+ strokeLinejoin: "round",
4376
+ "aria-hidden": "true",
4377
+ children: /* @__PURE__ */ jsx17("path", {
4378
+ d: "m6 9 6 6 6-6"
4379
+ })
4380
+ })
4361
4381
  })
4362
4382
  ]
4363
4383
  }),
@@ -4366,7 +4386,19 @@ var SelectRoot = forwardRef16(({
4366
4386
  className: selectClearClass,
4367
4387
  "aria-label": "Clear selection",
4368
4388
  onClick: clearValue,
4369
- children: "x"
4389
+ children: /* @__PURE__ */ jsx17("svg", {
4390
+ width: "14",
4391
+ height: "14",
4392
+ viewBox: "0 0 24 24",
4393
+ fill: "none",
4394
+ stroke: "currentColor",
4395
+ strokeWidth: "2",
4396
+ strokeLinecap: "round",
4397
+ "aria-hidden": "true",
4398
+ children: /* @__PURE__ */ jsx17("path", {
4399
+ d: "m6 6 12 12M6 18 18 6"
4400
+ })
4401
+ })
4370
4402
  }) : null,
4371
4403
  open ? /* @__PURE__ */ jsxs15("div", {
4372
4404
  className: selectDropdownClass,
@@ -7258,6 +7290,7 @@ function newItem(schema) {
7258
7290
  return "";
7259
7291
  }
7260
7292
  function JsonSchemaForm({
7293
+ className,
7261
7294
  compiled: suppliedCompiled,
7262
7295
  schema,
7263
7296
  value: controlledValue,
@@ -7617,7 +7650,7 @@ function JsonSchemaForm({
7617
7650
  ref: formRef,
7618
7651
  className: "schema-form-container",
7619
7652
  children: /* @__PURE__ */ jsxs22("form", {
7620
- className: "form form-vertical schema-form",
7653
+ className: ["form form-vertical schema-form", className].filter(Boolean).join(" "),
7621
7654
  noValidate: true,
7622
7655
  onSubmit: (event) => {
7623
7656
  event.preventDefault();
@@ -177,6 +177,7 @@ var SelectRoot = forwardRef(({
177
177
  "aria-invalid": ariaInvalid,
178
178
  "aria-label": ariaLabel,
179
179
  "aria-labelledby": ariaLabelledBy,
180
+ "aria-required": ariaRequired,
180
181
  children,
181
182
  className,
182
183
  defaultValue,
@@ -313,6 +314,7 @@ var SelectRoot = forwardRef(({
313
314
  "aria-invalid": ariaInvalid,
314
315
  "aria-label": ariaLabel,
315
316
  "aria-labelledby": ariaLabelledBy,
317
+ "aria-required": ariaRequired,
316
318
  "aria-haspopup": "listbox",
317
319
  "aria-expanded": open,
318
320
  onClick: () => setOpen((current) => !current),
@@ -327,7 +329,20 @@ var SelectRoot = forwardRef(({
327
329
  /* @__PURE__ */ jsx("span", {
328
330
  className: selectIconClass,
329
331
  "aria-hidden": "true",
330
- children: "v"
332
+ children: /* @__PURE__ */ jsx("svg", {
333
+ width: "16",
334
+ height: "16",
335
+ viewBox: "0 0 24 24",
336
+ fill: "none",
337
+ stroke: "currentColor",
338
+ strokeWidth: "2",
339
+ strokeLinecap: "round",
340
+ strokeLinejoin: "round",
341
+ "aria-hidden": "true",
342
+ children: /* @__PURE__ */ jsx("path", {
343
+ d: "m6 9 6 6 6-6"
344
+ })
345
+ })
331
346
  })
332
347
  ]
333
348
  }),
@@ -336,7 +351,19 @@ var SelectRoot = forwardRef(({
336
351
  className: selectClearClass,
337
352
  "aria-label": "Clear selection",
338
353
  onClick: clearValue,
339
- children: "x"
354
+ children: /* @__PURE__ */ jsx("svg", {
355
+ width: "14",
356
+ height: "14",
357
+ viewBox: "0 0 24 24",
358
+ fill: "none",
359
+ stroke: "currentColor",
360
+ strokeWidth: "2",
361
+ strokeLinecap: "round",
362
+ "aria-hidden": "true",
363
+ children: /* @__PURE__ */ jsx("path", {
364
+ d: "m6 6 12 12M6 18 18 6"
365
+ })
366
+ })
340
367
  }) : null,
341
368
  open ? /* @__PURE__ */ jsxs("div", {
342
369
  className: selectDropdownClass,
@@ -1 +1 @@
1
- export declare const version = "0.5.0";
1
+ export declare const version = "0.5.2";
package/dist/index.js CHANGED
@@ -107,7 +107,7 @@ function duskmoonMerge(classes) {
107
107
  import { useCallback as useCallback2, useState as useState2 } from "react";
108
108
 
109
109
  // src/generated/version.ts
110
- var version = "0.5.0";
110
+ var version = "0.5.2";
111
111
 
112
112
  // src/infrastructure.ts
113
113
  var theme = {
@@ -8967,6 +8967,7 @@ var SelectRoot = forwardRef38(({
8967
8967
  "aria-invalid": ariaInvalid,
8968
8968
  "aria-label": ariaLabel,
8969
8969
  "aria-labelledby": ariaLabelledBy,
8970
+ "aria-required": ariaRequired,
8970
8971
  children,
8971
8972
  className,
8972
8973
  defaultValue,
@@ -9103,6 +9104,7 @@ var SelectRoot = forwardRef38(({
9103
9104
  "aria-invalid": ariaInvalid,
9104
9105
  "aria-label": ariaLabel,
9105
9106
  "aria-labelledby": ariaLabelledBy,
9107
+ "aria-required": ariaRequired,
9106
9108
  "aria-haspopup": "listbox",
9107
9109
  "aria-expanded": open,
9108
9110
  onClick: () => setOpen((current) => !current),
@@ -9117,7 +9119,20 @@ var SelectRoot = forwardRef38(({
9117
9119
  /* @__PURE__ */ jsx48("span", {
9118
9120
  className: selectIconClass,
9119
9121
  "aria-hidden": "true",
9120
- children: "v"
9122
+ children: /* @__PURE__ */ jsx48("svg", {
9123
+ width: "16",
9124
+ height: "16",
9125
+ viewBox: "0 0 24 24",
9126
+ fill: "none",
9127
+ stroke: "currentColor",
9128
+ strokeWidth: "2",
9129
+ strokeLinecap: "round",
9130
+ strokeLinejoin: "round",
9131
+ "aria-hidden": "true",
9132
+ children: /* @__PURE__ */ jsx48("path", {
9133
+ d: "m6 9 6 6 6-6"
9134
+ })
9135
+ })
9121
9136
  })
9122
9137
  ]
9123
9138
  }),
@@ -9126,7 +9141,19 @@ var SelectRoot = forwardRef38(({
9126
9141
  className: selectClearClass,
9127
9142
  "aria-label": "Clear selection",
9128
9143
  onClick: clearValue,
9129
- children: "x"
9144
+ children: /* @__PURE__ */ jsx48("svg", {
9145
+ width: "14",
9146
+ height: "14",
9147
+ viewBox: "0 0 24 24",
9148
+ fill: "none",
9149
+ stroke: "currentColor",
9150
+ strokeWidth: "2",
9151
+ strokeLinecap: "round",
9152
+ "aria-hidden": "true",
9153
+ children: /* @__PURE__ */ jsx48("path", {
9154
+ d: "m6 6 12 12M6 18 18 6"
9155
+ })
9156
+ })
9130
9157
  }) : null,
9131
9158
  open ? /* @__PURE__ */ jsxs34("div", {
9132
9159
  className: selectDropdownClass,
@@ -13869,6 +13896,7 @@ var InputNumber = forwardRef58(({
13869
13896
  onStep,
13870
13897
  parser = parseNumber,
13871
13898
  precision,
13899
+ readOnly,
13872
13900
  size = "md",
13873
13901
  status,
13874
13902
  step = 1,
@@ -13888,7 +13916,7 @@ var InputNumber = forwardRef58(({
13888
13916
  return normalized;
13889
13917
  }
13890
13918
  function stepValue(type) {
13891
- if (disabled)
13919
+ if (disabled || readOnly)
13892
13920
  return;
13893
13921
  const offset = type === "up" ? step : -step;
13894
13922
  const base = typeof currentValue === "number" ? currentValue : 0;
@@ -13910,11 +13938,15 @@ var InputNumber = forwardRef58(({
13910
13938
  inputMode: "decimal",
13911
13939
  className: inputNumberInputClass,
13912
13940
  disabled,
13941
+ readOnly,
13913
13942
  value: displayValue,
13914
- onChange: (event) => emitChange(parser(event.currentTarget.value)),
13943
+ onChange: (event) => {
13944
+ if (!readOnly)
13945
+ emitChange(parser(event.currentTarget.value));
13946
+ },
13915
13947
  onKeyDown: (event) => {
13916
13948
  onKeyDown?.(event);
13917
- if (!keyboard || event.defaultPrevented)
13949
+ if (readOnly || !keyboard || event.defaultPrevented)
13918
13950
  return;
13919
13951
  if (event.key === "ArrowUp") {
13920
13952
  event.preventDefault();
@@ -13932,7 +13964,7 @@ var InputNumber = forwardRef58(({
13932
13964
  /* @__PURE__ */ jsx71("button", {
13933
13965
  type: "button",
13934
13966
  className: inputNumberControlClass,
13935
- disabled: disabled || max !== undefined && Number(currentValue) >= max,
13967
+ disabled: disabled || readOnly || max !== undefined && Number(currentValue) >= max,
13936
13968
  "aria-label": "Increase value",
13937
13969
  onClick: () => stepValue("up"),
13938
13970
  children: "+"
@@ -13940,7 +13972,7 @@ var InputNumber = forwardRef58(({
13940
13972
  /* @__PURE__ */ jsx71("button", {
13941
13973
  type: "button",
13942
13974
  className: inputNumberControlClass,
13943
- disabled: disabled || min !== undefined && Number(currentValue) <= min,
13975
+ disabled: disabled || readOnly || min !== undefined && Number(currentValue) <= min,
13944
13976
  "aria-label": "Decrease value",
13945
13977
  onClick: () => stepValue("down"),
13946
13978
  children: "-"
@@ -4,7 +4,7 @@
4
4
  import { useCallback, useState } from "react";
5
5
 
6
6
  // src/generated/version.ts
7
- var version = "0.5.0";
7
+ var version = "0.5.2";
8
8
 
9
9
  // src/infrastructure.ts
10
10
  var theme = {
package/dist/styles.css CHANGED
@@ -434,29 +434,33 @@ html {
434
434
  grid-template-columns: repeat(auto-fit, minmax(min(calc(--value(integer) * 0.25rem), 100%), 1fr));
435
435
  }
436
436
 
437
- /* Screen reader only utility - visually hidden but accessible */
438
- .sr-only {
439
- position: absolute;
440
- width: 1px;
441
- height: 1px;
442
- padding: 0;
443
- margin: -1px;
444
- overflow: hidden;
445
- clip: rect(0, 0, 0, 0);
446
- white-space: nowrap;
447
- border: 0;
448
- }
437
+ /* Low-specificity fallbacks let Tailwind variants override either import order. */
438
+ @layer utilities {
439
+ /* Screen reader only utility - visually hidden but accessible */
440
+ :where(.sr-only) {
441
+ position: absolute;
442
+ width: 1px;
443
+ height: 1px;
444
+ padding: 0;
445
+ margin: -1px;
446
+ overflow: hidden;
447
+ clip-path: inset(50%);
448
+ white-space: nowrap;
449
+ border: 0;
450
+ }
449
451
 
450
- /* Undo sr-only for focus states (useful for skip links) */
451
- .not-sr-only {
452
- position: static;
453
- width: auto;
454
- height: auto;
455
- padding: 0;
456
- margin: 0;
457
- overflow: visible;
458
- clip: auto;
459
- white-space: normal;
452
+ /* Undo sr-only for focus states (useful for skip links) */
453
+ :where(.not-sr-only) {
454
+ position: static;
455
+ width: auto;
456
+ height: auto;
457
+ padding: 0;
458
+ margin: 0;
459
+ overflow: visible;
460
+ clip: auto;
461
+ clip-path: none;
462
+ white-space: normal;
463
+ }
460
464
  }
461
465
 
462
466
 
@@ -5075,6 +5079,10 @@ html {
5075
5079
  .pagination-item-active,
5076
5080
  .pagination-item-active-primary,
5077
5081
  .pagination-item[aria-current="page"],
5082
+ .pagination li > a.pagination-item-active,
5083
+ .pagination li > button.pagination-item-active,
5084
+ .pagination li > a.pagination-item-active-primary,
5085
+ .pagination li > button.pagination-item-active-primary,
5078
5086
  .pagination li > a.active,
5079
5087
  .pagination li > button.active,
5080
5088
  .pagination li > a[aria-current="page"],
@@ -5084,13 +5092,19 @@ html {
5084
5092
  border-color: var(--color-primary);
5085
5093
  }
5086
5094
 
5087
- .pagination-item-active-secondary {
5095
+ .pagination-item-active-secondary,
5096
+ .pagination-item-active-secondary[aria-current="page"],
5097
+ .pagination li > a.pagination-item-active-secondary,
5098
+ .pagination li > button.pagination-item-active-secondary {
5088
5099
  background-color: var(--color-secondary);
5089
5100
  color: var(--color-secondary-content);
5090
5101
  border-color: var(--color-secondary);
5091
5102
  }
5092
5103
 
5093
- .pagination-item-active-tertiary {
5104
+ .pagination-item-active-tertiary,
5105
+ .pagination-item-active-tertiary[aria-current="page"],
5106
+ .pagination li > a.pagination-item-active-tertiary,
5107
+ .pagination li > button.pagination-item-active-tertiary {
5094
5108
  background-color: var(--color-tertiary);
5095
5109
  color: var(--color-tertiary-content);
5096
5110
  border-color: var(--color-tertiary);
@@ -5099,11 +5113,29 @@ html {
5099
5113
  .pagination-item-active:hover,
5100
5114
  .pagination-item-active-primary:hover,
5101
5115
  .pagination-item[aria-current="page"]:hover,
5116
+ .pagination li > a.pagination-item-active:hover,
5117
+ .pagination li > button.pagination-item-active:hover,
5118
+ .pagination li > a.pagination-item-active-primary:hover,
5119
+ .pagination li > button.pagination-item-active-primary:hover,
5102
5120
  .pagination li > a[aria-current="page"]:hover,
5103
5121
  .pagination li > button[aria-current="page"]:hover {
5104
5122
  background-color: color-mix(in oklch, var(--color-primary), black 10%);
5105
5123
  }
5106
5124
 
5125
+ .pagination-item-active-secondary:hover,
5126
+ .pagination-item-active-secondary[aria-current="page"]:hover,
5127
+ .pagination li > a.pagination-item-active-secondary:hover,
5128
+ .pagination li > button.pagination-item-active-secondary:hover {
5129
+ background-color: color-mix(in oklch, var(--color-secondary), black 10%);
5130
+ }
5131
+
5132
+ .pagination-item-active-tertiary:hover,
5133
+ .pagination-item-active-tertiary[aria-current="page"]:hover,
5134
+ .pagination li > a.pagination-item-active-tertiary:hover,
5135
+ .pagination li > button.pagination-item-active-tertiary:hover {
5136
+ background-color: color-mix(in oklch, var(--color-tertiary), black 10%);
5137
+ }
5138
+
5107
5139
  .pagination-item:focus-visible,
5108
5140
  .pagination-prev:focus-visible,
5109
5141
  .pagination-next:focus-visible,
@@ -5318,7 +5350,9 @@ html {
5318
5350
  .megamenu-panel[popover] {
5319
5351
  position-anchor: var(--megamenu-anchor);
5320
5352
  position-area: block-end span-inline-end;
5321
- position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
5353
+ /* Narrow viewports need candidates spanning the whole inline axis. */
5354
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline,
5355
+ block-end span-all, block-start span-all;
5322
5356
  display: none; box-sizing: border-box;
5323
5357
  width: min(48rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem);
5324
5358
  max-height: min(36rem, calc(100dvh - 2rem)); margin: 0.5rem; padding: 1rem;
@@ -26433,6 +26467,10 @@ html {
26433
26467
  border-color: var(--color-primary);
26434
26468
  }
26435
26469
 
26470
+ .select-container > .select {
26471
+ background-image: none;
26472
+ }
26473
+
26436
26474
  .select:focus-visible {
26437
26475
  outline: none;
26438
26476
  border-color: var(--color-primary);
@@ -26481,6 +26519,10 @@ html {
26481
26519
  text-overflow: ellipsis;
26482
26520
  }
26483
26521
 
26522
+ .select-container:has(> .select-clear) > .select > .select-selection {
26523
+ margin-inline-end: 1.75rem;
26524
+ }
26525
+
26484
26526
  .select-placeholder {
26485
26527
  color: var(--color-on-surface-variant);
26486
26528
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duskmoon-dev/components",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -485,7 +485,7 @@
485
485
  "ajv-formats": "^3.0.1"
486
486
  },
487
487
  "devDependencies": {
488
- "@duskmoon-dev/core": "1.20.3",
488
+ "@duskmoon-dev/core": "1.20.5",
489
489
  "@testing-library/react": "16.3.2",
490
490
  "@types/react": "19.2.18",
491
491
  "@types/react-dom": "19.2.4",