@mindlogic-ai/logician-ui 4.0.0-alpha.21 → 4.0.0-alpha.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
  2. package/dist/components/ErrorFallback/ErrorFallback.js +13 -2
  3. package/dist/components/ErrorFallback/ErrorFallback.js.map +1 -1
  4. package/dist/components/ErrorFallback/ErrorFallback.mjs +13 -2
  5. package/dist/components/ErrorFallback/ErrorFallback.mjs.map +1 -1
  6. package/dist/components/FileInput/FileInput.d.ts.map +1 -1
  7. package/dist/components/FileInput/FileInput.js +7 -1
  8. package/dist/components/FileInput/FileInput.js.map +1 -1
  9. package/dist/components/FileInput/FileInput.mjs +7 -1
  10. package/dist/components/FileInput/FileInput.mjs.map +1 -1
  11. package/dist/components/Markdown/Markdown.d.ts.map +1 -1
  12. package/dist/components/Markdown/Markdown.js +6 -1
  13. package/dist/components/Markdown/Markdown.js.map +1 -1
  14. package/dist/components/Markdown/Markdown.mjs +6 -1
  15. package/dist/components/Markdown/Markdown.mjs.map +1 -1
  16. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  17. package/dist/components/Pagination/Pagination.js +6 -1
  18. package/dist/components/Pagination/Pagination.js.map +1 -1
  19. package/dist/components/Pagination/Pagination.mjs +6 -1
  20. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  21. package/dist/components/Radio/RadioControl.d.ts.map +1 -1
  22. package/dist/components/Radio/RadioControl.js +14 -1
  23. package/dist/components/Radio/RadioControl.js.map +1 -1
  24. package/dist/components/Radio/RadioControl.mjs +15 -2
  25. package/dist/components/Radio/RadioControl.mjs.map +1 -1
  26. package/dist/components/Select/ComboboxField.d.ts +1 -1
  27. package/dist/components/Select/ComboboxField.d.ts.map +1 -1
  28. package/dist/components/Select/ComboboxField.js +2 -2
  29. package/dist/components/Select/ComboboxField.js.map +1 -1
  30. package/dist/components/Select/ComboboxField.mjs +2 -2
  31. package/dist/components/Select/ComboboxField.mjs.map +1 -1
  32. package/dist/components/Select/Select.types.d.ts +16 -0
  33. package/dist/components/Select/Select.types.d.ts.map +1 -1
  34. package/dist/components/Select/SelectField.d.ts +1 -1
  35. package/dist/components/Select/SelectField.d.ts.map +1 -1
  36. package/dist/components/Select/SelectField.js +2 -2
  37. package/dist/components/Select/SelectField.js.map +1 -1
  38. package/dist/components/Select/SelectField.mjs +2 -2
  39. package/dist/components/Select/SelectField.mjs.map +1 -1
  40. package/dist/components/Slider/Slider.d.ts.map +1 -1
  41. package/dist/components/Slider/Slider.js +2 -2
  42. package/dist/components/Slider/Slider.js.map +1 -1
  43. package/dist/components/Slider/Slider.mjs +3 -3
  44. package/dist/components/Slider/Slider.mjs.map +1 -1
  45. package/dist/components/Slider/Slider.types.d.ts +15 -0
  46. package/dist/components/Slider/Slider.types.d.ts.map +1 -1
  47. package/dist/components/Typography/Link.d.ts +25 -0
  48. package/dist/components/Typography/Link.d.ts.map +1 -1
  49. package/dist/components/Typography/Link.js +44 -7
  50. package/dist/components/Typography/Link.js.map +1 -1
  51. package/dist/components/Typography/Link.mjs +44 -8
  52. package/dist/components/Typography/Link.mjs.map +1 -1
  53. package/dist/components/Typography/Subtitle.d.ts +17 -0
  54. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  55. package/dist/components/Typography/Subtitle.js +18 -1
  56. package/dist/components/Typography/Subtitle.js.map +1 -1
  57. package/dist/components/Typography/Subtitle.mjs +18 -1
  58. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  59. package/dist/components/Typography/index.d.ts +1 -1
  60. package/dist/components/Typography/index.d.ts.map +1 -1
  61. package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts.map +1 -1
  62. package/dist/components/Workflow/canvas/NodePalette/NodePalette.js +19 -2
  63. package/dist/components/Workflow/canvas/NodePalette/NodePalette.js.map +1 -1
  64. package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs +19 -2
  65. package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs.map +1 -1
  66. package/dist/theme/colors.d.ts +145 -37
  67. package/dist/theme/colors.d.ts.map +1 -1
  68. package/dist/theme/colors.js +98 -68
  69. package/dist/theme/colors.js.map +1 -1
  70. package/dist/theme/colors.mjs +98 -68
  71. package/dist/theme/colors.mjs.map +1 -1
  72. package/package.json +2 -1
  73. package/src/components/ErrorFallback/ErrorFallback.tsx +30 -3
  74. package/src/components/FileInput/FileInput.tsx +11 -2
  75. package/src/components/Markdown/Markdown.tsx +6 -1
  76. package/src/components/Pagination/Pagination.tsx +5 -0
  77. package/src/components/Radio/RadioControl.tsx +20 -6
  78. package/src/components/Select/ComboboxField.tsx +11 -1
  79. package/src/components/Select/Select.types.ts +16 -0
  80. package/src/components/Select/SelectField.tsx +14 -1
  81. package/src/components/Slider/Slider.tsx +16 -1
  82. package/src/components/Slider/Slider.types.ts +15 -0
  83. package/src/components/Typography/Link.tsx +44 -7
  84. package/src/components/Typography/Subtitle.tsx +17 -1
  85. package/src/components/Typography/index.ts +1 -1
  86. package/src/components/Workflow/canvas/NodePalette/NodePalette.tsx +12 -2
  87. package/src/components/a11y.kwcag.test.tsx +412 -0
  88. package/src/theme/colors.ts +99 -69
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxField.mjs","sources":["../../../src/components/Select/ComboboxField.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;AAKA;;;;;;;;AAQG;SACa,aAAa,CAAa,EACxC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,GAAG,MAAM,EACd,SAAS,GAAG,kBAAkB,GACR,EAAA;AACtB,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AACvD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CAAC,QAAQ,CAAC,aAAa,EAAA,EAAA,CAAG,CAAA,EAAA,EAFI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAGlC,CACjB,CAAC,CAAA,EAAA,CACe,GACC,EAAA,CACf,CAAA,EAAA,CACK;AAEpB;;;;"}
@@ -17,6 +17,22 @@ interface FieldBaseProps<T> {
17
17
  placeholder?: string;
18
18
  /** Optional label rendered above the control. */
19
19
  label?: ReactNode;
20
+ /**
21
+ * Accessible name for the trigger when no visible `label` is rendered — a
22
+ * field labelled by a table column header, a `FieldRow`, or the sentence
23
+ * around it.
24
+ *
25
+ * Without one of `label` / `ariaLabel` / `placeholder` the trigger has **no
26
+ * accessible name at all**: the composition points `aria-labelledby` at a
27
+ * label part that is not rendered, the reference dangles, and the control
28
+ * announces as a bare "button" however much text it shows (KWCAG 2.1
29
+ * 5.3.4.1 레이블 제공, axe `button-name`).
30
+ *
31
+ * Rendered as a visually hidden label rather than an `aria-label` so the name
32
+ * is in the server-rendered markup — an attribute applied after hydration
33
+ * leaves a window in which the control is nameless.
34
+ */
35
+ ariaLabel?: string;
20
36
  size?: SelectSize;
21
37
  invalid?: boolean;
22
38
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,MAAM;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,cAAc,CAAC,CAAC;IACxB,wCAAwC;IACxC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,iCAAiC;IACjC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C,CAAC,CAAC,EAAE,CAAC;IAC3B,iCAAiC;IACjC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACjB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AAE7D,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IACvE,4DAA4D;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB"}
@@ -7,5 +7,5 @@ import { SelectFieldProps } from './Select.types';
7
7
  * For multi-select, grouped options or custom layouts, compose the `Select`
8
8
  * primitives directly.
9
9
  */
10
- export declare function SelectField<T = string>({ options, value, defaultValue, onChange, placeholder, label, size, invalid, disabled, readOnly, required, name, width, }: SelectFieldProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function SelectField<T = string>({ options, value, defaultValue, onChange, placeholder, label, ariaLabel, size, invalid, disabled, readOnly, required, name, width, }: SelectFieldProps<T>): import("react/jsx-runtime").JSX.Element;
11
11
  //# sourceMappingURL=SelectField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,MAAM,EAAE,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAc,GACf,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CA0DrB"}
1
+ {"version":3,"file":"SelectField.d.ts","sourceRoot":"","sources":["../../../src/components/Select/SelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,MAAM,EAAE,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,IAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAc,GACf,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAsErB"}
@@ -14,7 +14,7 @@ var Select = require('./Select.js');
14
14
  * For multi-select, grouped options or custom layouts, compose the `Select`
15
15
  * primitives directly.
16
16
  */
17
- function SelectField({ options, value, defaultValue, onChange, placeholder, label, size = 'md', invalid, disabled, readOnly, required, name, width = 'full', }) {
17
+ function SelectField({ options, value, defaultValue, onChange, placeholder, label, ariaLabel, size = 'md', invalid, disabled, readOnly, required, name, width = 'full', }) {
18
18
  const collection = React.useMemo(() => react.createListCollection({
19
19
  items: options,
20
20
  itemToValue: (item) => String(item.value),
@@ -25,7 +25,7 @@ function SelectField({ options, value, defaultValue, onChange, placeholder, labe
25
25
  return (jsxRuntime.jsxs(Select.Select.Root, { collection: collection, size: size, width: width, invalid: invalid, disabled: disabled, readOnly: readOnly, required: required, name: name, value: value === undefined ? undefined : toKeys(value), defaultValue: defaultValue === undefined ? undefined : toKeys(defaultValue), onValueChange: (details) => {
26
26
  const selected = details.items[0];
27
27
  onChange?.(selected ? selected.value : null);
28
- }, children: [jsxRuntime.jsx(Select.Select.HiddenSelect, {}), label != null && jsxRuntime.jsx(Select.Select.Label, { children: label }), jsxRuntime.jsxs(Select.Select.Control, { children: [jsxRuntime.jsx(Select.Select.Trigger, { children: jsxRuntime.jsx(Select.Select.ValueText, { placeholder: placeholder }) }), jsxRuntime.jsx(Select.Select.IndicatorGroup, { children: jsxRuntime.jsx(Select.Select.Indicator, {}) })] }), jsxRuntime.jsx(react.Portal, { children: jsxRuntime.jsx(Select.Select.Positioner, { children: jsxRuntime.jsx(Select.Select.Content, { children: options.map((option) => (jsxRuntime.jsxs(Select.Select.Item, { item: option, children: [jsxRuntime.jsx(Select.Select.ItemText, { children: option.label }), jsxRuntime.jsx(Select.Select.ItemIndicator, {})] }, String(option.value)))) }) }) })] }));
28
+ }, children: [jsxRuntime.jsx(Select.Select.HiddenSelect, {}), label != null ? (jsxRuntime.jsx(Select.Select.Label, { children: label })) : ((ariaLabel ?? placeholder) && (jsxRuntime.jsx(Select.Select.Label, { srOnly: true, children: ariaLabel ?? placeholder }))), jsxRuntime.jsxs(Select.Select.Control, { children: [jsxRuntime.jsx(Select.Select.Trigger, { children: jsxRuntime.jsx(Select.Select.ValueText, { placeholder: placeholder }) }), jsxRuntime.jsx(Select.Select.IndicatorGroup, { children: jsxRuntime.jsx(Select.Select.Indicator, {}) })] }), jsxRuntime.jsx(react.Portal, { children: jsxRuntime.jsx(Select.Select.Positioner, { children: jsxRuntime.jsx(Select.Select.Content, { children: options.map((option) => (jsxRuntime.jsxs(Select.Select.Item, { item: option, children: [jsxRuntime.jsx(Select.Select.ItemText, { children: option.label }), jsxRuntime.jsx(Select.Select.ItemIndicator, {})] }, String(option.value)))) }) }) })] }));
29
29
  }
30
30
 
31
31
  exports.SelectField = SelectField;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectField.js","sources":["../../../src/components/Select/SelectField.tsx"],"sourcesContent":[null],"names":["useMemo","createListCollection","_jsxs","Select","_jsx","Portal"],"mappings":";;;;;;;;AAMA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAa,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,GAAG,MAAM,GACM,EAAA;IACpB,MAAM,UAAU,GAAGA,aAAO,CACxB,MACEC,0BAAoB,CAAC;AACnB,QAAA,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK;QAClC,cAAc,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;AACjD,KAAA,CAAC,EACJ,CAAC,OAAO,CAAC,CACV;IAED,MAAM,MAAM,GAAG,CAAC,GAAyB,KACvC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAExD,IAAA,QACEC,eAAA,CAACC,aAAM,CAAC,IAAI,IACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,SA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,CAAG,CAAA,EAAA,EAFM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAGtC,CACf,CAAC,EAAA,CACa,EAAA,CACC,EAAA,CACb,CAAA,EAAA,CACG;AAElB;;;;"}
1
+ {"version":3,"file":"SelectField.js","sources":["../../../src/components/Select/SelectField.tsx"],"sourcesContent":[null],"names":["useMemo","createListCollection","_jsxs","Select","_jsx","Portal"],"mappings":";;;;;;;;AAMA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAa,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,GAAG,MAAM,GACM,EAAA;IACpB,MAAM,UAAU,GAAGA,aAAO,CACxB,MACEC,0BAAoB,CAAC;AACnB,QAAA,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK;QAClC,cAAc,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;AACjD,KAAA,CAAC,EACJ,CAAC,OAAO,CAAC,CACV;IAED,MAAM,MAAM,GAAG,CAAC,GAAyB,KACvC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAExD,IAAA,QACEC,eAAA,CAACC,aAAM,CAAC,IAAI,IACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,E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EAAA,EAAC,IAAI,EAAE,MAAM,EAAA,QAAA,EAAA,CACvBC,cAAA,CAACD,aAAM,CAAC,QAAQ,EAAA,EAAA,QAAA,EAAE,MAAM,CAAC,KAAK,EAAA,CAAmB,EACjDC,eAACD,aAAM,CAAC,aAAa,EAAA,EAAA,CAAG,CAAA,EAAA,EAFM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAGtC,CACf,CAAC,EAAA,CACa,EAAA,CACC,EAAA,CACb,CAAA,EAAA,CACG;AAElB;;;;"}
@@ -12,7 +12,7 @@ import { Select } from './Select.mjs';
12
12
  * For multi-select, grouped options or custom layouts, compose the `Select`
13
13
  * primitives directly.
14
14
  */
15
- function SelectField({ options, value, defaultValue, onChange, placeholder, label, size = 'md', invalid, disabled, readOnly, required, name, width = 'full', }) {
15
+ function SelectField({ options, value, defaultValue, onChange, placeholder, label, ariaLabel, size = 'md', invalid, disabled, readOnly, required, name, width = 'full', }) {
16
16
  const collection = useMemo(() => createListCollection({
17
17
  items: options,
18
18
  itemToValue: (item) => String(item.value),
@@ -23,7 +23,7 @@ function SelectField({ options, value, defaultValue, onChange, placeholder, labe
23
23
  return (jsxs(Select.Root, { collection: collection, size: size, width: width, invalid: invalid, disabled: disabled, readOnly: readOnly, required: required, name: name, value: value === undefined ? undefined : toKeys(value), defaultValue: defaultValue === undefined ? undefined : toKeys(defaultValue), onValueChange: (details) => {
24
24
  const selected = details.items[0];
25
25
  onChange?.(selected ? selected.value : null);
26
- }, children: [jsx(Select.HiddenSelect, {}), label != null && jsx(Select.Label, { children: label }), jsxs(Select.Control, { children: [jsx(Select.Trigger, { children: jsx(Select.ValueText, { placeholder: placeholder }) }), jsx(Select.IndicatorGroup, { children: jsx(Select.Indicator, {}) })] }), jsx(Portal, { children: jsx(Select.Positioner, { children: jsx(Select.Content, { children: options.map((option) => (jsxs(Select.Item, { item: option, children: [jsx(Select.ItemText, { children: option.label }), jsx(Select.ItemIndicator, {})] }, String(option.value)))) }) }) })] }));
26
+ }, children: [jsx(Select.HiddenSelect, {}), label != null ? (jsx(Select.Label, { children: label })) : ((ariaLabel ?? placeholder) && (jsx(Select.Label, { srOnly: true, children: ariaLabel ?? placeholder }))), jsxs(Select.Control, { children: [jsx(Select.Trigger, { children: jsx(Select.ValueText, { placeholder: placeholder }) }), jsx(Select.IndicatorGroup, { children: jsx(Select.Indicator, {}) })] }), jsx(Portal, { children: jsx(Select.Positioner, { children: jsx(Select.Content, { children: options.map((option) => (jsxs(Select.Item, { item: option, children: [jsx(Select.ItemText, { children: option.label }), jsx(Select.ItemIndicator, {})] }, String(option.value)))) }) }) })] }));
27
27
  }
28
28
 
29
29
  export { SelectField };
@@ -1 +1 @@
1
- {"version":3,"file":"SelectField.mjs","sources":["../../../src/components/Select/SelectField.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAMA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAa,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,GAAG,MAAM,GACM,EAAA;IACpB,MAAM,UAAU,GAAG,OAAO,CACxB,MACE,oBAAoB,CAAC;AACnB,QAAA,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK;QAClC,cAAc,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;AACjD,KAAA,CAAC,EACJ,CAAC,OAAO,CAAC,CACV;IAED,MAAM,MAAM,GAAG,CAAC,GAAyB,KACvC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAExD,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,EAAA,QAAA,EACZ,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MAClBD,IAAA,CAAC,MAAM,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,MAAM,EAAA,QAAA,EAAA,CACvBC,GAAA,CAAC,MAAM,CAAC,QAAQ,EAAA,EAAA,QAAA,EAAE,MAAM,CAAC,KAAK,EAAA,CAAmB,EACjDA,GAAA,CAAC,MAAM,CAAC,aAAa,EAAA,EAAA,CAAG,CAAA,EAAA,EAFM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAGtC,CACf,CAAC,EAAA,CACa,EAAA,CACC,EAAA,CACb,CAAA,EAAA,CACG;AAElB;;;;"}
1
+ {"version":3,"file":"SelectField.mjs","sources":["../../../src/components/Select/SelectField.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAMA;;;;;;;AAOG;AACG,SAAU,WAAW,CAAa,EACtC,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,IAAI,GAAG,IAAI,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,GAAG,MAAM,GACM,EAAA;IACpB,MAAM,UAAU,GAAG,OAAO,CACxB,MACE,oBAAoB,CAAC;AACnB,QAAA,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;QACzC,YAAY,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK;QAClC,cAAc,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;AACjD,KAAA,CAAC,EACJ,CAAC,OAAO,CAAC,CACV;IAED,MAAM,MAAM,GAAG,CAAC,GAAyB,KACvC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC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AAA,CACE,CAAA,EAAA,CACT,EACjBA,GAAA,CAAC,MAAM,EAAA,EAAA,QAAA,EACLA,GAAA,CAAC,MAAM,CAAC,UAAU,EAAA,EAAA,QAAA,EAChBA,GAAA,CAAC,MAAM,CAAC,OAAO,EAAA,EAAA,QAAA,EACZ,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,MAClBD,IAAA,CAAC,MAAM,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,MAAM,EAAA,QAAA,EAAA,CACvBC,GAAA,CAAC,MAAM,CAAC,QAAQ,EAAA,EAAA,QAAA,EAAE,MAAM,CAAC,KAAK,EAAA,CAAmB,EACjDA,IAAC,MAAM,CAAC,aAAa,EAAA,EAAA,CAAG,CAAA,EAAA,EAFM,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAGtC,CACf,CAAC,EAAA,CACa,EAAA,CACC,EAAA,CACb,CAAA,EAAA,CACG;AAElB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,wGAiClB,CAAC"}
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,wGAgDlB,CAAC"}
@@ -15,14 +15,14 @@ var SliderControl = require('./SliderControl/SliderControl.js');
15
15
  *
16
16
  * Automatically wraps children in SliderControl if not already wrapped.
17
17
  */
18
- const Slider = React.forwardRef(({ value, defaultValue, onValueChange, children, ...rest }, ref) => {
18
+ const Slider = React.forwardRef(({ value, defaultValue, onValueChange, ariaLabel, children, ...rest }, ref) => {
19
19
  // Check if children already contains SliderControl
20
20
  const hasSliderControl = React.Children.toArray(children).some((child) => React.isValidElement(child) &&
21
21
  (child.type === SliderControl.SliderControl ||
22
22
  child.type?.displayName === 'SliderControl'));
23
23
  // Wrap children in SliderControl if not already wrapped
24
24
  const wrappedChildren = hasSliderControl ? (children) : (jsxRuntime.jsx(SliderControl.SliderControl, { children: children }));
25
- return (jsxRuntime.jsx(react.Slider.Root, { isolation: "isolate", ref: ref, value: value, defaultValue: defaultValue, onValueChange: onValueChange, ...rest, children: wrappedChildren }));
25
+ return (jsxRuntime.jsxs(react.Slider.Root, { isolation: "isolate", ref: ref, value: value, defaultValue: defaultValue, onValueChange: onValueChange, ...rest, children: [ariaLabel && (jsxRuntime.jsx(react.Slider.Label, { srOnly: true, children: ariaLabel })), wrappedChildren] }));
26
26
  });
27
27
  Slider.displayName = 'Slider';
28
28
 
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":[null],"names":["forwardRef","Children","isValidElement","SliderControl","_jsx","ChakraSlider"],"mappings":";;;;;;;;AAMA;;;;;;;;AAQG;MACU,MAAM,GAAGA,gBAAU,CAC9B,CACE,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAe,EACtE,GAAkC,KAChC;;AAEF,IAAA,MAAM,gBAAgB,GAAGC,cAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CACtD,CAAC,KAAK,KACJC,oBAAc,CAAC,KAAK,CAAC;AACrB,SAAC,KAAK,CAAC,IAAI,KAAKC,2BAAa;YAC1B,KAAK,CAAC,IAAY,EAAE,WAAW,KAAK,eAAe,CAAC,CAC1D;;AAGD,IAAA,MAAM,eAAe,GAAG,gBAAgB,IACtC,QAAQ,KAERC,cAAA,CAACD,2BAAa,cAAE,QAAQ,EAAA,CAAiB,CAC1C;AAED,IAAA,QACEC,cAAA,CAACC,YAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAAA,GACxB,IAAI,EAAA,QAAA,EAEP,eAAe,EAAA,CACE;AAExB,CAAC;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
1
+ {"version":3,"file":"Slider.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":[null],"names":["forwardRef","Children","isValidElement","SliderControl","_jsx","_jsxs","ChakraSlider"],"mappings":";;;;;;;;AAMA;;;;;;;;AAQG;AACI,MAAM,MAAM,GAAGA,gBAAU,CAC9B,CACE,EACE,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACK,EACd,GAAkC,KAChC;;AAEF,IAAA,MAAM,gBAAgB,GAAGC,cAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CACtD,CAAC,KAAK,KACJC,oBAAc,CAAC,KAAK,CAAC;AACrB,SAAC,KAAK,CAAC,IAAI,KAAKC,2BAAa;YAC1B,KAAK,CAAC,IAAY,EAAE,WAAW,KAAK,eAAe,CAAC,CAC1D;;AAGD,IAAA,MAAM,eAAe,GAAG,gBAAgB,IACtC,QAAQ,KAERC,cAAA,CAACD,2BAAa,cAAE,QAAQ,EAAA,CAAiB,CAC1C;IAED,QACEE,gBAACC,YAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,KACxB,IAAI,EAAA,QAAA,EAAA,CAOP,SAAS,KACRF,eAACE,YAAY,CAAC,KAAK,EAAA,EAAC,MAAM,kBAAE,SAAS,EAAA,CAAsB,CAC5D,EACA,eAAe,CAAA,EAAA,CACE;AAExB,CAAC;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { forwardRef, Children, isValidElement } from 'react';
4
4
  import { Slider as Slider$1 } from '@chakra-ui/react';
5
5
  import { SliderControl } from './SliderControl/SliderControl.mjs';
@@ -13,14 +13,14 @@ import { SliderControl } from './SliderControl/SliderControl.mjs';
13
13
  *
14
14
  * Automatically wraps children in SliderControl if not already wrapped.
15
15
  */
16
- const Slider = forwardRef(({ value, defaultValue, onValueChange, children, ...rest }, ref) => {
16
+ const Slider = forwardRef(({ value, defaultValue, onValueChange, ariaLabel, children, ...rest }, ref) => {
17
17
  // Check if children already contains SliderControl
18
18
  const hasSliderControl = Children.toArray(children).some((child) => isValidElement(child) &&
19
19
  (child.type === SliderControl ||
20
20
  child.type?.displayName === 'SliderControl'));
21
21
  // Wrap children in SliderControl if not already wrapped
22
22
  const wrappedChildren = hasSliderControl ? (children) : (jsx(SliderControl, { children: children }));
23
- return (jsx(Slider$1.Root, { isolation: "isolate", ref: ref, value: value, defaultValue: defaultValue, onValueChange: onValueChange, ...rest, children: wrappedChildren }));
23
+ return (jsxs(Slider$1.Root, { isolation: "isolate", ref: ref, value: value, defaultValue: defaultValue, onValueChange: onValueChange, ...rest, children: [ariaLabel && (jsx(Slider$1.Label, { srOnly: true, children: ariaLabel })), wrappedChildren] }));
24
24
  });
25
25
  Slider.displayName = 'Slider';
26
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.mjs","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraSlider"],"mappings":";;;;;;AAMA;;;;;;;;AAQG;MACU,MAAM,GAAG,UAAU,CAC9B,CACE,EAAE,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAe,EACtE,GAAkC,KAChC;;AAEF,IAAA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CACtD,CAAC,KAAK,KACJ,cAAc,CAAC,KAAK,CAAC;AACrB,SAAC,KAAK,CAAC,IAAI,KAAK,aAAa;YAC1B,KAAK,CAAC,IAAY,EAAE,WAAW,KAAK,eAAe,CAAC,CAC1D;;AAGD,IAAA,MAAM,eAAe,GAAG,gBAAgB,IACtC,QAAQ,KAERA,GAAA,CAAC,aAAa,cAAE,QAAQ,EAAA,CAAiB,CAC1C;AAED,IAAA,QACEA,GAAA,CAACC,QAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAAA,GACxB,IAAI,EAAA,QAAA,EAEP,eAAe,EAAA,CACE;AAExB,CAAC;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
1
+ {"version":3,"file":"Slider.mjs","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","ChakraSlider"],"mappings":";;;;;;AAMA;;;;;;;;AAQG;AACI,MAAM,MAAM,GAAG,UAAU,CAC9B,CACE,EACE,KAAK,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACK,EACd,GAAkC,KAChC;;AAEF,IAAA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CACtD,CAAC,KAAK,KACJ,cAAc,CAAC,KAAK,CAAC;AACrB,SAAC,KAAK,CAAC,IAAI,KAAK,aAAa;YAC1B,KAAK,CAAC,IAAY,EAAE,WAAW,KAAK,eAAe,CAAC,CAC1D;;AAGD,IAAA,MAAM,eAAe,GAAG,gBAAgB,IACtC,QAAQ,KAERA,GAAA,CAAC,aAAa,cAAE,QAAQ,EAAA,CAAiB,CAC1C;IAED,QACEC,KAACC,QAAY,CAAC,IAAI,EAAA,EAChB,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,KACxB,IAAI,EAAA,QAAA,EAAA,CAOP,SAAS,KACRF,IAACE,QAAY,CAAC,KAAK,EAAA,EAAC,MAAM,kBAAE,SAAS,EAAA,CAAsB,CAC5D,EACA,eAAe,CAAA,EAAA,CACE;AAExB,CAAC;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
@@ -7,6 +7,21 @@ export interface SliderProps extends Omit<Slider.RootProps, 'value' | 'defaultVa
7
7
  defaultValue?: number[];
8
8
  /** Callback when slider value changes */
9
9
  onValueChange?: Slider.RootProps['onValueChange'];
10
+ /**
11
+ * Accessible name for the slider, when no visible `Slider.Label` is composed
12
+ * in — a seek bar next to a time display, a volume control beside a mute
13
+ * button.
14
+ *
15
+ * Without it the thumb has **no accessible name**: Zag points each thumb's
16
+ * `aria-labelledby` at a label part, and a composition that does not render
17
+ * one leaves that reference dangling — the control announces as a bare
18
+ * "slider" (KWCAG 2.1 5.3.4.1 레이블 제공, axe `aria-input-field-name`).
19
+ *
20
+ * Rendered as a visually hidden label rather than an `aria-label` array so it
21
+ * works the same whether the slider has one thumb or several, and so the name
22
+ * is in the server-rendered markup.
23
+ */
24
+ ariaLabel?: string;
10
25
  children?: ReactNode;
11
26
  }
12
27
  //# sourceMappingURL=Slider.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.types.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,MAAM,CAAC,SAAS,EAChB,OAAO,GAAG,cAAc,GAAG,eAAe,CAC3C;IACC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"Slider.types.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,MAAM,CAAC,SAAS,EAChB,OAAO,GAAG,cAAc,GAAG,eAAe,CAC3C;IACC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAClD;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -2,5 +2,30 @@ import { LinkProps } from '@chakra-ui/react';
2
2
  export interface LinkCustomProps extends Omit<LinkProps, 'variant'> {
3
3
  variant?: 'error';
4
4
  }
5
+ /**
6
+ * The ramp steps the link paints, exported so a test can assert BOTH halves at
7
+ * once: that the component still picks these tokens, and that these tokens
8
+ * still clear the contrast bar. Asserting only the second half is a test that
9
+ * passes while the component points somewhere else entirely — which is how the
10
+ * dark hover regressed with a green suite.
11
+ */
12
+ export declare const LINK_RAMP: {
13
+ readonly default: {
14
+ readonly base: "primary.main";
15
+ readonly _dark: "primary.dark";
16
+ };
17
+ readonly error: {
18
+ readonly base: "danger.main";
19
+ readonly _dark: "danger.dark";
20
+ };
21
+ readonly defaultHover: {
22
+ readonly base: "primary.dark";
23
+ readonly _dark: "primary.darker";
24
+ };
25
+ readonly errorHover: {
26
+ readonly base: "danger.dark";
27
+ readonly _dark: "danger.darker";
28
+ };
29
+ };
5
30
  export declare const Link: import("react").ForwardRefExoticComponent<LinkCustomProps & import("react").RefAttributes<HTMLAnchorElement>>;
6
31
  //# sourceMappingURL=Link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,+GAiChB,CAAC"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAKZ,CAAC;AAEX,eAAO,MAAM,IAAI,+GAwDhB,CAAC"}
@@ -5,14 +5,50 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var react = require('@chakra-ui/react');
7
7
 
8
+ /**
9
+ * The ramp steps the link paints, exported so a test can assert BOTH halves at
10
+ * once: that the component still picks these tokens, and that these tokens
11
+ * still clear the contrast bar. Asserting only the second half is a test that
12
+ * passes while the component points somewhere else entirely — which is how the
13
+ * dark hover regressed with a green suite.
14
+ */
15
+ const LINK_RAMP = {
16
+ default: { base: 'primary.main', _dark: 'primary.dark' },
17
+ error: { base: 'danger.main', _dark: 'danger.dark' },
18
+ defaultHover: { base: 'primary.dark', _dark: 'primary.darker' },
19
+ errorHover: { base: 'danger.dark', _dark: 'danger.darker' },
20
+ };
8
21
  const Link = React.forwardRef(({ color, variant, ...rest }, ref) => {
9
- const defaultColor = 'primary.main';
10
- const errorColor = 'danger.main';
11
- const defaultHoverColor = 'primary.dark';
12
- const errorHoverColor = 'danger.dark';
13
- const linkColor = variant === 'error'
14
- ? errorColor
15
- : (typeof color === 'string' ? color : undefined) || defaultColor;
22
+ // Theme-aware, because `.main` is tuned against a WHITE page. On the dark
23
+ // canvas (#181A20) `primary.main` measures 4.19:1 and `danger.main` 4.26:1
24
+ // both under the 4.5:1 that KWCAG 2.1 5.1.3.3 (명도 대비) asks of body
25
+ // text, and every link in a consuming app inherits it. The `.dark` end of
26
+ // each ramp is the far side from the PAGE rather than a fixed lightness, so
27
+ // in dark mode it resolves lighter: 6.68:1 and 6.38:1.
28
+ const defaultColor = LINK_RAMP.default;
29
+ const errorColor = LINK_RAMP.error;
30
+ // The hover has to move AWAY from the page in BOTH modes, and `.main` is
31
+ // the wrong end of the ramp to move toward in dark. Mirroring the light
32
+ // step ("one darker") instead of reflecting it sent the dark hover back
33
+ // toward the background: resting 6.68:1 → hovering **4.19:1**, under the
34
+ // same 4.5:1 the resting colour above was just fixed to clear. KWCAG
35
+ // 5.3.3 applies to text in every state a user can put it in, and hover is
36
+ // a state a mouse user is IN while reading the link.
37
+ //
38
+ // `.darker` is the step past `.dark` at both ends, so one token is correct
39
+ // in both modes with no special-casing: light 11.98:1 (unchanged from
40
+ // before), dark 10.68:1. Error the same: 10.83:1 and 10.34:1.
41
+ //
42
+ // No axe rule would have caught this — it measures the resting state only.
43
+ const defaultHoverColor = LINK_RAMP.defaultHover;
44
+ const errorHoverColor = LINK_RAMP.errorHover;
45
+ // `color ?? defaultColor`, not a `typeof color === 'string'` narrowing. The
46
+ // old form silently DISCARDED any non-string value, so a call site passing
47
+ // a per-theme `{ base, _dark }` — the documented Chakra way to fix exactly
48
+ // the contrast problem above — got the default back and no error, in the
49
+ // types or at runtime. A prop the type accepts and the component throws
50
+ // away is worse than one it rejects.
51
+ const linkColor = variant === 'error' ? errorColor : (color ?? defaultColor);
16
52
  const hoverColor = variant === 'error' ? errorHoverColor : defaultHoverColor;
17
53
  return (jsxRuntime.jsx(react.Link, { ref: ref,
18
54
  // Inherit the surrounding text weight so an inline link reads as part of
@@ -26,5 +62,6 @@ const Link = React.forwardRef(({ color, variant, ...rest }, ref) => {
26
62
  });
27
63
  Link.displayName = 'Link';
28
64
 
65
+ exports.LINK_RAMP = LINK_RAMP;
29
66
  exports.Link = Link;
30
67
  //# sourceMappingURL=Link.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../src/components/Typography/Link.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraLink"],"mappings":";;;;;;;AAOO,MAAM,IAAI,GAAGA,gBAAU,CAC5B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;IACnC,MAAM,YAAY,GAAG,cAAc;IACnC,MAAM,UAAU,GAAG,aAAa;IAChC,MAAM,iBAAiB,GAAG,cAAc;IACxC,MAAM,eAAe,GAAG,aAAa;AAErC,IAAA,MAAM,SAAS,GACb,OAAO,KAAK;AACV,UAAE;AACF,UAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,SAAS,KAAK,YAAY;AAErE,IAAA,MAAM,UAAU,GACd,OAAO,KAAK,OAAO,GAAG,eAAe,GAAG,iBAAiB;AAE3D,IAAA,QACEC,cAAA,CAACC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG;;;;;AAKR,QAAA,UAAU,EAAC,SAAS,EACpB,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE;AACN,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,SAAS,EAAE,MAAM;SAClB,EAAA,GACG,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../src/components/Typography/Link.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","ChakraLink"],"mappings":";;;;;;;AAOA;;;;;;AAMG;AACI,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IACxD,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IACpD,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC/D,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE;;AAGtD,MAAM,IAAI,GAAGA,gBAAU,CAC5B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;;;;;;;AAOnC,IAAA,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO;AACtC,IAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK;;;;;;;;;;;;;;AAclC,IAAA,MAAM,iBAAiB,GAAG,SAAS,CAAC,YAAY;AAChD,IAAA,MAAM,eAAe,GAAG,SAAS,CAAC,UAAU;;;;;;;AAQ5C,IAAA,MAAM,SAAS,GACb,OAAO,KAAK,OAAO,GAAG,UAAU,IAAI,KAAK,IAAI,YAAY,CAAC;AAE5D,IAAA,MAAM,UAAU,GACd,OAAO,KAAK,OAAO,GAAG,eAAe,GAAG,iBAAiB;AAE3D,IAAA,QACEC,cAAA,CAACC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG;;;;;AAKR,QAAA,UAAU,EAAC,SAAS,EACpB,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE;AACN,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,SAAS,EAAE,MAAM;SAClB,EAAA,GACG,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;;"}
@@ -3,14 +3,50 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { Link as Link$1 } from '@chakra-ui/react';
5
5
 
6
+ /**
7
+ * The ramp steps the link paints, exported so a test can assert BOTH halves at
8
+ * once: that the component still picks these tokens, and that these tokens
9
+ * still clear the contrast bar. Asserting only the second half is a test that
10
+ * passes while the component points somewhere else entirely — which is how the
11
+ * dark hover regressed with a green suite.
12
+ */
13
+ const LINK_RAMP = {
14
+ default: { base: 'primary.main', _dark: 'primary.dark' },
15
+ error: { base: 'danger.main', _dark: 'danger.dark' },
16
+ defaultHover: { base: 'primary.dark', _dark: 'primary.darker' },
17
+ errorHover: { base: 'danger.dark', _dark: 'danger.darker' },
18
+ };
6
19
  const Link = forwardRef(({ color, variant, ...rest }, ref) => {
7
- const defaultColor = 'primary.main';
8
- const errorColor = 'danger.main';
9
- const defaultHoverColor = 'primary.dark';
10
- const errorHoverColor = 'danger.dark';
11
- const linkColor = variant === 'error'
12
- ? errorColor
13
- : (typeof color === 'string' ? color : undefined) || defaultColor;
20
+ // Theme-aware, because `.main` is tuned against a WHITE page. On the dark
21
+ // canvas (#181A20) `primary.main` measures 4.19:1 and `danger.main` 4.26:1
22
+ // both under the 4.5:1 that KWCAG 2.1 5.1.3.3 (명도 대비) asks of body
23
+ // text, and every link in a consuming app inherits it. The `.dark` end of
24
+ // each ramp is the far side from the PAGE rather than a fixed lightness, so
25
+ // in dark mode it resolves lighter: 6.68:1 and 6.38:1.
26
+ const defaultColor = LINK_RAMP.default;
27
+ const errorColor = LINK_RAMP.error;
28
+ // The hover has to move AWAY from the page in BOTH modes, and `.main` is
29
+ // the wrong end of the ramp to move toward in dark. Mirroring the light
30
+ // step ("one darker") instead of reflecting it sent the dark hover back
31
+ // toward the background: resting 6.68:1 → hovering **4.19:1**, under the
32
+ // same 4.5:1 the resting colour above was just fixed to clear. KWCAG
33
+ // 5.3.3 applies to text in every state a user can put it in, and hover is
34
+ // a state a mouse user is IN while reading the link.
35
+ //
36
+ // `.darker` is the step past `.dark` at both ends, so one token is correct
37
+ // in both modes with no special-casing: light 11.98:1 (unchanged from
38
+ // before), dark 10.68:1. Error the same: 10.83:1 and 10.34:1.
39
+ //
40
+ // No axe rule would have caught this — it measures the resting state only.
41
+ const defaultHoverColor = LINK_RAMP.defaultHover;
42
+ const errorHoverColor = LINK_RAMP.errorHover;
43
+ // `color ?? defaultColor`, not a `typeof color === 'string'` narrowing. The
44
+ // old form silently DISCARDED any non-string value, so a call site passing
45
+ // a per-theme `{ base, _dark }` — the documented Chakra way to fix exactly
46
+ // the contrast problem above — got the default back and no error, in the
47
+ // types or at runtime. A prop the type accepts and the component throws
48
+ // away is worse than one it rejects.
49
+ const linkColor = variant === 'error' ? errorColor : (color ?? defaultColor);
14
50
  const hoverColor = variant === 'error' ? errorHoverColor : defaultHoverColor;
15
51
  return (jsx(Link$1, { ref: ref,
16
52
  // Inherit the surrounding text weight so an inline link reads as part of
@@ -24,5 +60,5 @@ const Link = forwardRef(({ color, variant, ...rest }, ref) => {
24
60
  });
25
61
  Link.displayName = 'Link';
26
62
 
27
- export { Link };
63
+ export { LINK_RAMP, Link };
28
64
  //# sourceMappingURL=Link.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.mjs","sources":["../../../src/components/Typography/Link.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraLink"],"mappings":";;;;;AAOO,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;IACnC,MAAM,YAAY,GAAG,cAAc;IACnC,MAAM,UAAU,GAAG,aAAa;IAChC,MAAM,iBAAiB,GAAG,cAAc;IACxC,MAAM,eAAe,GAAG,aAAa;AAErC,IAAA,MAAM,SAAS,GACb,OAAO,KAAK;AACV,UAAE;AACF,UAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,SAAS,KAAK,YAAY;AAErE,IAAA,MAAM,UAAU,GACd,OAAO,KAAK,OAAO,GAAG,eAAe,GAAG,iBAAiB;AAE3D,IAAA,QACEA,GAAA,CAACC,MAAU,EAAA,EACT,GAAG,EAAE,GAAG;;;;;AAKR,QAAA,UAAU,EAAC,SAAS,EACpB,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE;AACN,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,SAAS,EAAE,MAAM;SAClB,EAAA,GACG,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Link.mjs","sources":["../../../src/components/Typography/Link.tsx"],"sourcesContent":[null],"names":["_jsx","ChakraLink"],"mappings":";;;;;AAOA;;;;;;AAMG;AACI,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IACxD,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IACpD,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC/D,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE;;AAGtD,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,KAAI;;;;;;;AAOnC,IAAA,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO;AACtC,IAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK;;;;;;;;;;;;;;AAclC,IAAA,MAAM,iBAAiB,GAAG,SAAS,CAAC,YAAY;AAChD,IAAA,MAAM,eAAe,GAAG,SAAS,CAAC,UAAU;;;;;;;AAQ5C,IAAA,MAAM,SAAS,GACb,OAAO,KAAK,OAAO,GAAG,UAAU,IAAI,KAAK,IAAI,YAAY,CAAC;AAE5D,IAAA,MAAM,UAAU,GACd,OAAO,KAAK,OAAO,GAAG,eAAe,GAAG,iBAAiB;AAE3D,IAAA,QACEA,GAAA,CAACC,MAAU,EAAA,EACT,GAAG,EAAE,GAAG;;;;;AAKR,QAAA,UAAU,EAAC,SAAS,EACpB,SAAS,EAAC,UAAU,EACpB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE;AACN,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,SAAS,EAAE,MAAM;SAClB,EAAA,GACG,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -1,3 +1,20 @@
1
1
  import { TextProps } from '@chakra-ui/react';
2
+ /**
3
+ * Supporting text under a heading — a subtitle by role in the page, not by
4
+ * document structure.
5
+ *
6
+ * Renders a paragraph. It used to render `<h6>`, which made every call site a
7
+ * level-6 heading in the document outline: a sentence of helper copy under an
8
+ * `<h1>` announced as a heading to a screen reader, and a jump from level 1 to
9
+ * level 6 in the heading list (KWCAG 2.1 5.2.4.2 제목 제공 / axe `heading-order`).
10
+ * A component chosen for its type scale should not decide the outline.
11
+ *
12
+ * A subtitle that genuinely IS the next heading level still says so at the call
13
+ * site, which is where that is known:
14
+ *
15
+ * ```tsx
16
+ * <Subtitle as="h2">{sectionTitle}</Subtitle>
17
+ * ```
18
+ */
2
19
  export declare const Subtitle: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<HTMLParagraphElement>>;
3
20
  //# sourceMappingURL=Subtitle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Subtitle.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtitle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,QAAQ,4GAgBpB,CAAC"}
1
+ {"version":3,"file":"Subtitle.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtitle.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,4GAepB,CAAC"}
@@ -5,9 +5,26 @@ var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var react = require('@chakra-ui/react');
7
7
 
8
+ /**
9
+ * Supporting text under a heading — a subtitle by role in the page, not by
10
+ * document structure.
11
+ *
12
+ * Renders a paragraph. It used to render `<h6>`, which made every call site a
13
+ * level-6 heading in the document outline: a sentence of helper copy under an
14
+ * `<h1>` announced as a heading to a screen reader, and a jump from level 1 to
15
+ * level 6 in the heading list (KWCAG 2.1 5.2.4.2 제목 제공 / axe `heading-order`).
16
+ * A component chosen for its type scale should not decide the outline.
17
+ *
18
+ * A subtitle that genuinely IS the next heading level still says so at the call
19
+ * site, which is where that is known:
20
+ *
21
+ * ```tsx
22
+ * <Subtitle as="h2">{sectionTitle}</Subtitle>
23
+ * ```
24
+ */
8
25
  const Subtitle = React.forwardRef((props, ref) => {
9
26
  const { fontSize, ...rest } = props;
10
- return (jsxRuntime.jsx(react.Text, { ref: ref, as: "h6", textStyle: fontSize ? undefined : 'subtitle', fontSize: fontSize, color: "fg.muted", wordBreak: "keep-all", ...rest }));
27
+ return (jsxRuntime.jsx(react.Text, { ref: ref, textStyle: fontSize ? undefined : 'subtitle', fontSize: fontSize, color: "fg.muted", wordBreak: "keep-all", ...rest }));
11
28
  });
12
29
  Subtitle.displayName = 'Subtitle';
13
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"Subtitle.js","sources":["../../../src/components/Typography/Subtitle.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","Text"],"mappings":";;;;;;;AAGO,MAAM,QAAQ,GAAGA,gBAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;AAEnC,IAAA,QACEC,cAAA,CAACC,UAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAC,IAAI,EACP,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,EAC5C,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAC,UAAU,EAChB,SAAS,EAAC,UAAU,KAChB,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"Subtitle.js","sources":["../../../src/components/Typography/Subtitle.tsx"],"sourcesContent":[null],"names":["forwardRef","_jsx","Text"],"mappings":";;;;;;;AAGA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,QAAQ,GAAGA,gBAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;AAEnC,IAAA,QACEC,cAAA,CAACC,UAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,EAC5C,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAC,UAAU,EAChB,SAAS,EAAC,UAAU,EAAA,GAChB,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -3,9 +3,26 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef } from 'react';
4
4
  import { Text } from '@chakra-ui/react';
5
5
 
6
+ /**
7
+ * Supporting text under a heading — a subtitle by role in the page, not by
8
+ * document structure.
9
+ *
10
+ * Renders a paragraph. It used to render `<h6>`, which made every call site a
11
+ * level-6 heading in the document outline: a sentence of helper copy under an
12
+ * `<h1>` announced as a heading to a screen reader, and a jump from level 1 to
13
+ * level 6 in the heading list (KWCAG 2.1 5.2.4.2 제목 제공 / axe `heading-order`).
14
+ * A component chosen for its type scale should not decide the outline.
15
+ *
16
+ * A subtitle that genuinely IS the next heading level still says so at the call
17
+ * site, which is where that is known:
18
+ *
19
+ * ```tsx
20
+ * <Subtitle as="h2">{sectionTitle}</Subtitle>
21
+ * ```
22
+ */
6
23
  const Subtitle = forwardRef((props, ref) => {
7
24
  const { fontSize, ...rest } = props;
8
- return (jsx(Text, { ref: ref, as: "h6", textStyle: fontSize ? undefined : 'subtitle', fontSize: fontSize, color: "fg.muted", wordBreak: "keep-all", ...rest }));
25
+ return (jsx(Text, { ref: ref, textStyle: fontSize ? undefined : 'subtitle', fontSize: fontSize, color: "fg.muted", wordBreak: "keep-all", ...rest }));
9
26
  });
10
27
  Subtitle.displayName = 'Subtitle';
11
28
 
@@ -1 +1 @@
1
- {"version":3,"file":"Subtitle.mjs","sources":["../../../src/components/Typography/Subtitle.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAGO,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;AAEnC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAC,IAAI,EACP,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,EAC5C,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAC,UAAU,EAChB,SAAS,EAAC,UAAU,KAChB,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"Subtitle.mjs","sources":["../../../src/components/Typography/Subtitle.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;AAGA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;AAEnC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,EAC5C,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAC,UAAU,EAChB,SAAS,EAAC,UAAU,EAAA,GAChB,IAAI,EAAA,CACR;AAEN,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -4,7 +4,7 @@ export { H2 } from './H2';
4
4
  export { H3 } from './H3';
5
5
  export { H4 } from './H4';
6
6
  export { H5 } from './H5';
7
- export { Link } from './Link';
7
+ export { Link, LINK_RAMP } from './Link';
8
8
  export { Overline } from './Overline';
9
9
  export { Subtext } from './Subtext';
10
10
  export { Subtitle } from './Subtitle';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,YAAY,EAAE,eAAe,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC3D,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,YAAY,IAAI,OAAO,EACvB,YAAY,IAAI,OAAO,EACvB,YAAY,IAAI,OAAO,EACvB,YAAY,IAAI,OAAO,GACxB,MAAM,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NodePalette.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.tsx"],"names":[],"mappings":"AAyFA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,2CAqF/D"}
1
+ {"version":3,"file":"NodePalette.d.ts","sourceRoot":"","sources":["../../../../../src/components/Workflow/canvas/NodePalette/NodePalette.tsx"],"names":[],"mappings":"AAyFA;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,2CA+F/D"}
@@ -2,6 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
+ var React = require('react');
5
6
  var react = require('@chakra-ui/react');
6
7
  var Card = require('../../../Card/Card.js');
7
8
  var index = require('../../../Icon/index.js');
@@ -69,6 +70,8 @@ function PaletteItem({ def }) {
69
70
  function NodePalette({ onClose }) {
70
71
  const { nodeTypes, readOnly } = WorkflowContext.useWorkflow();
71
72
  const translate = WorkflowContext.useWorkflowTranslate();
73
+ // Names the region below with the same words the header shows.
74
+ const titleId = React.useId();
72
75
  if (readOnly)
73
76
  return null;
74
77
  // Group by category, preserving registration order within each group.
@@ -84,12 +87,26 @@ function NodePalette({ onClose }) {
84
87
  ...CATEGORY_ORDER.filter((c) => byCategory.has(c)),
85
88
  ...[...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)),
86
89
  ];
87
- return (jsxRuntime.jsxs(FloatingCard.FloatingCard, { width: NodePalette_styles.PALETTE_WIDTH, mt: 4, mb: 4, mx: 4,
90
+ return (jsxRuntime.jsxs(FloatingCard.FloatingCard
91
+ // A named region, so the palette is something a screen-reader user can
92
+ // navigate TO. Its title used to be a `Subtitle`, which rendered `<h6>`
93
+ // and put a level-6 heading under the host page's `<h1>` (axe
94
+ // `heading-order`); `Subtitle` is a paragraph now, and a labelled region
95
+ // is what this panel actually is — a landmark, not an outline entry
96
+ // (KWCAG 2.1 5.2.4.1 반복 영역 건너뛰기 / 5.2.4.2 제목 제공).
97
+ , {
98
+ // A named region, so the palette is something a screen-reader user can
99
+ // navigate TO. Its title used to be a `Subtitle`, which rendered `<h6>`
100
+ // and put a level-6 heading under the host page's `<h1>` (axe
101
+ // `heading-order`); `Subtitle` is a paragraph now, and a labelled region
102
+ // is what this panel actually is — a landmark, not an outline entry
103
+ // (KWCAG 2.1 5.2.4.1 반복 영역 건너뛰기 / 5.2.4.2 제목 제공).
104
+ role: "region", "aria-labelledby": titleId, width: NodePalette_styles.PALETTE_WIDTH, mt: 4, mb: 4, mx: 4,
88
105
  // Size to content and float (like the right-hand inspector) instead of
89
106
  // stretching the full canvas height into a sidebar. `height="fit-content"`
90
107
  // forces it off the flex row's cross-axis stretch; a long list still caps
91
108
  // at the available column via `maxHeight` and scrolls its body.
92
- alignSelf: "flex-start", height: "fit-content", maxHeight: "calc(100% - var(--chakra-spacing-4) - var(--chakra-spacing-4))", display: "flex", flexDirection: "column", children: [jsxRuntime.jsxs(react.HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsxRuntime.jsx(Subtitle.Subtitle, { color: "slate.1300", children: translate('workflow_palette_title') }), jsxRuntime.jsx(IconButton.IconButton, { "aria-label": translate('workflow_palette_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsxRuntime.jsx(index.CloseIcon, { boxSize: "xs", "aria-hidden": true }) })] }), jsxRuntime.jsx(react.Box, { flex: "1", minHeight: 0, overflowY: "auto", p: 3, children: jsxRuntime.jsx(react.Stack, { gap: 4, children: orderedCategories.map((category) => (jsxRuntime.jsxs(react.Stack, { gap: 2, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", pl: 1, children: CATEGORY_LABELS[category] }), jsxRuntime.jsx(react.Stack, { gap: 2, children: byCategory.get(category).map((def) => (jsxRuntime.jsx(PaletteItem, { def: def }, def.kind))) })] }, category))) }) })] }));
109
+ alignSelf: "flex-start", height: "fit-content", maxHeight: "calc(100% - var(--chakra-spacing-4) - var(--chakra-spacing-4))", display: "flex", flexDirection: "column", children: [jsxRuntime.jsxs(react.HStack, { justify: "space-between", align: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: "slate.200", children: [jsxRuntime.jsx(Subtitle.Subtitle, { id: titleId, color: "slate.1300", children: translate('workflow_palette_title') }), jsxRuntime.jsx(IconButton.IconButton, { "aria-label": translate('workflow_palette_close'), size: "xs", variant: "ghost", colorPalette: "neutral", onClick: onClose, children: jsxRuntime.jsx(index.CloseIcon, { boxSize: "xs", "aria-hidden": true }) })] }), jsxRuntime.jsx(react.Box, { flex: "1", minHeight: 0, overflowY: "auto", p: 3, children: jsxRuntime.jsx(react.Stack, { gap: 4, children: orderedCategories.map((category) => (jsxRuntime.jsxs(react.Stack, { gap: 2, children: [jsxRuntime.jsx(Subtext.Subtext, { fontWeight: "bold", color: "slate.900", textTransform: "uppercase", letterSpacing: "wider", pl: 1, children: CATEGORY_LABELS[category] }), jsxRuntime.jsx(react.Stack, { gap: 2, children: byCategory.get(category).map((def) => (jsxRuntime.jsx(PaletteItem, { def: def }, def.kind))) })] }, category))) }) })] }));
93
110
  }
94
111
 
95
112
  exports.NodePalette = NodePalette;