@hjmds/react 0.8.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.
Files changed (135) hide show
  1. package/README.md +146 -0
  2. package/dist/actions.d.ts +61 -0
  3. package/dist/actions.d.ts.map +1 -0
  4. package/dist/actions.js +54 -0
  5. package/dist/actions.js.map +1 -0
  6. package/dist/advanced-display.d.ts +133 -0
  7. package/dist/advanced-display.d.ts.map +1 -0
  8. package/dist/advanced-display.js +201 -0
  9. package/dist/advanced-display.js.map +1 -0
  10. package/dist/advanced-forms.d.ts +116 -0
  11. package/dist/advanced-forms.d.ts.map +1 -0
  12. package/dist/advanced-forms.js +234 -0
  13. package/dist/advanced-forms.js.map +1 -0
  14. package/dist/advanced-navigation.d.ts +24 -0
  15. package/dist/advanced-navigation.d.ts.map +1 -0
  16. package/dist/advanced-navigation.js +25 -0
  17. package/dist/advanced-navigation.js.map +1 -0
  18. package/dist/bottom-navigation.d.ts +37 -0
  19. package/dist/bottom-navigation.d.ts.map +1 -0
  20. package/dist/bottom-navigation.js +132 -0
  21. package/dist/bottom-navigation.js.map +1 -0
  22. package/dist/date-picker.d.ts +24 -0
  23. package/dist/date-picker.d.ts.map +1 -0
  24. package/dist/date-picker.js +81 -0
  25. package/dist/date-picker.js.map +1 -0
  26. package/dist/display-public.d.ts +5 -0
  27. package/dist/display-public.d.ts.map +1 -0
  28. package/dist/display-public.js +5 -0
  29. package/dist/display-public.js.map +1 -0
  30. package/dist/display.d.ts +77 -0
  31. package/dist/display.d.ts.map +1 -0
  32. package/dist/display.js +51 -0
  33. package/dist/display.js.map +1 -0
  34. package/dist/evidence.d.ts +940 -0
  35. package/dist/evidence.d.ts.map +1 -0
  36. package/dist/evidence.js +98 -0
  37. package/dist/evidence.js.map +1 -0
  38. package/dist/feedback.d.ts +89 -0
  39. package/dist/feedback.d.ts.map +1 -0
  40. package/dist/feedback.js +41 -0
  41. package/dist/feedback.js.map +1 -0
  42. package/dist/file-picker.d.ts +30 -0
  43. package/dist/file-picker.d.ts.map +1 -0
  44. package/dist/file-picker.js +40 -0
  45. package/dist/file-picker.js.map +1 -0
  46. package/dist/forms-public.d.ts +8 -0
  47. package/dist/forms-public.d.ts.map +1 -0
  48. package/dist/forms-public.js +8 -0
  49. package/dist/forms-public.js.map +1 -0
  50. package/dist/forms.d.ts +160 -0
  51. package/dist/forms.d.ts.map +1 -0
  52. package/dist/forms.js +178 -0
  53. package/dist/forms.js.map +1 -0
  54. package/dist/index.d.ts +24 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +24 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/internal.d.ts +17 -0
  59. package/dist/internal.d.ts.map +1 -0
  60. package/dist/internal.js +68 -0
  61. package/dist/internal.js.map +1 -0
  62. package/dist/layout.d.ts +134 -0
  63. package/dist/layout.d.ts.map +1 -0
  64. package/dist/layout.js +167 -0
  65. package/dist/layout.js.map +1 -0
  66. package/dist/navigation-public.d.ts +6 -0
  67. package/dist/navigation-public.d.ts.map +1 -0
  68. package/dist/navigation-public.js +6 -0
  69. package/dist/navigation-public.js.map +1 -0
  70. package/dist/navigation.d.ts +65 -0
  71. package/dist/navigation.d.ts.map +1 -0
  72. package/dist/navigation.js +196 -0
  73. package/dist/navigation.js.map +1 -0
  74. package/dist/number-field.d.ts +55 -0
  75. package/dist/number-field.d.ts.map +1 -0
  76. package/dist/number-field.js +107 -0
  77. package/dist/number-field.js.map +1 -0
  78. package/dist/otp-field.d.ts +2 -0
  79. package/dist/otp-field.d.ts.map +1 -0
  80. package/dist/otp-field.js +2 -0
  81. package/dist/otp-field.js.map +1 -0
  82. package/dist/overlays.d.ts +192 -0
  83. package/dist/overlays.d.ts.map +1 -0
  84. package/dist/overlays.js +949 -0
  85. package/dist/overlays.js.map +1 -0
  86. package/dist/password-field.d.ts +2 -0
  87. package/dist/password-field.d.ts.map +1 -0
  88. package/dist/password-field.js +2 -0
  89. package/dist/password-field.js.map +1 -0
  90. package/dist/portal.d.ts +32 -0
  91. package/dist/portal.d.ts.map +1 -0
  92. package/dist/portal.js +264 -0
  93. package/dist/portal.js.map +1 -0
  94. package/dist/provider.d.ts +38 -0
  95. package/dist/provider.d.ts.map +1 -0
  96. package/dist/provider.js +87 -0
  97. package/dist/provider.js.map +1 -0
  98. package/dist/select.d.ts +72 -0
  99. package/dist/select.d.ts.map +1 -0
  100. package/dist/select.js +353 -0
  101. package/dist/select.js.map +1 -0
  102. package/dist/selection.d.ts +160 -0
  103. package/dist/selection.d.ts.map +1 -0
  104. package/dist/selection.js +225 -0
  105. package/dist/selection.js.map +1 -0
  106. package/dist/slider.d.ts +35 -0
  107. package/dist/slider.d.ts.map +1 -0
  108. package/dist/slider.js +150 -0
  109. package/dist/slider.js.map +1 -0
  110. package/dist/steps.d.ts +29 -0
  111. package/dist/steps.d.ts.map +1 -0
  112. package/dist/steps.js +10 -0
  113. package/dist/steps.js.map +1 -0
  114. package/dist/styles.css +1349 -0
  115. package/dist/supplemental-display.d.ts +59 -0
  116. package/dist/supplemental-display.d.ts.map +1 -0
  117. package/dist/supplemental-display.js +136 -0
  118. package/dist/supplemental-display.js.map +1 -0
  119. package/dist/supplemental-navigation.d.ts +28 -0
  120. package/dist/supplemental-navigation.d.ts.map +1 -0
  121. package/dist/supplemental-navigation.js +106 -0
  122. package/dist/supplemental-navigation.js.map +1 -0
  123. package/dist/theme.d.ts +5 -0
  124. package/dist/theme.d.ts.map +1 -0
  125. package/dist/theme.js +55 -0
  126. package/dist/theme.js.map +1 -0
  127. package/dist/toast.d.ts +41 -0
  128. package/dist/toast.d.ts.map +1 -0
  129. package/dist/toast.js +250 -0
  130. package/dist/toast.js.map +1 -0
  131. package/dist/upload-item.d.ts +18 -0
  132. package/dist/upload-item.d.ts.map +1 -0
  133. package/dist/upload-item.js +19 -0
  134. package/dist/upload-item.js.map +1 -0
  135. package/package.json +151 -0
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # @hjmds/react
2
+
3
+ React 19 renderer for `@hjmds/design-contracts`. Components render native HTML,
4
+ keep controlled and uncontrolled state explicit, and expose stable `data-state`
5
+ and `data-*` recipe axes for styling and tests.
6
+
7
+ ```tsx
8
+ import { Button, Dialog, Grid, HjmProvider, TextField } from "@hjmds/react";
9
+ import "@hjmds/react/styles.css";
10
+
11
+ export function Example() {
12
+ return (
13
+ <HjmProvider theme="system" textScale={1}>
14
+ <Grid columns={{ compact: 1, medium: 2 }} gap={{ compact: "md" }}>
15
+ <TextField label="이름" />
16
+ <Button>저장</Button>
17
+ </Grid>
18
+ <Dialog closeLabel="닫기" trigger={<Button>설정 열기</Button>} title="설정">
19
+ native HTML controls compose inside the focus-trapped dialog.
20
+ </Dialog>
21
+ </HjmProvider>
22
+ );
23
+ }
24
+ ```
25
+
26
+ `HjmProvider` emits light/dark palette variables, logical direction, text
27
+ scale, and reduced-motion state at one DOM boundary. Importing the JavaScript
28
+ does not mutate global CSS; consumers opt into the stylesheet subpath.
29
+ Products with a reviewed full semantic palette can pass a resolved
30
+ `DesignSystemProviderValue` through the mutually exclusive `value` prop; the
31
+ same runtime validation as Native rejects partial or malformed token overrides.
32
+
33
+ `Badge` exposes the shared `filled | outline` recipe axis on both Web and Native. `filled` remains
34
+ the default for backward compatibility; `outline` preserves each semantic tone while replacing the
35
+ plate with the recipe border treatment.
36
+
37
+ ## Public surface
38
+
39
+ - `provider`: `HjmProvider`, `useHjmTheme`
40
+ - `layout`: `Text`, `Surface`, `Stack`, `Section`, responsive `Grid`, adaptive app-shell `Layout`
41
+ - `actions`: `Button`, `IconButton`, `Link`
42
+ - `forms`: `Field`, `TextField`, `TextArea`, `SearchField`, custom accessible
43
+ `Select`, opt-in `NativeSelect`, editable `Combobox`, exact `NumberField`,
44
+ approximate `Slider`, async-safe `Form`, `DatePicker`, `FilePicker`
45
+ - `selection`: `Checkbox`, `Radio`, `CheckboxGroup`, `RadioGroup`, `Switch`,
46
+ `SegmentedControl`, `Chip`
47
+ - `navigation`: `Tabs`, `Steps`, `BottomNavigation`, `Breadcrumb`, `Pagination`, `LoadMore`
48
+ - `display`: `Badge`, `Tag`, `Card`, `ListRow`, `Accordion`, `Avatar`,
49
+ `Divider`, `List`, `Statistic`, `UploadItem`, responsive `DescriptionList`, native `Table`,
50
+ `Timeline`, intrinsic-size `Image`, `Icon`, `CounterBadge`
51
+ - `feedback`: `Notice`, `EmptyState`, `Result`, `Progress`, `Spinner`, `Skeleton`
52
+ - `toast`: controlled `Toast`, queued `ToastProvider`/`useToast`
53
+ - `overlays`: `Dialog`, `AlertDialog`, `Sheet`, `Tooltip`, `Menu`
54
+
55
+ The root entry exports the complete renderer. Public domain entry points are the supported
56
+ granularity boundary: they keep feature imports explicit and are verified not to traverse the
57
+ renderer root barrel:
58
+
59
+ ```tsx
60
+ import { Combobox, Form, Select } from "@hjmds/react/forms";
61
+ import { NumberField } from "@hjmds/react/number-field";
62
+ import { Slider } from "@hjmds/react/slider";
63
+ import { DatePicker } from "@hjmds/react/date-picker";
64
+ import { FilePicker } from "@hjmds/react/file-picker";
65
+ import { Steps } from "@hjmds/react/steps";
66
+ import { UploadItem } from "@hjmds/react/upload-item";
67
+ import { Accordion, Image, Table, Timeline } from "@hjmds/react/display";
68
+ import { BottomNavigation, Breadcrumb, Pagination, Tabs } from "@hjmds/react/navigation";
69
+ import { Dialog, Menu, Sheet } from "@hjmds/react/overlays";
70
+ import { ToastProvider, useToast } from "@hjmds/react/toast";
71
+ ```
72
+
73
+ `pnpm bundle:renderer:check` measures every executable domain graph and the stylesheet against an
74
+ explicit reviewed budget. This guarantees family-level entry isolation; it does not promise a
75
+ separate file or component-level tree-shaking result for every named export. Final application
76
+ chunks still depend on the consumer bundler and its configuration.
77
+
78
+ Stateful components accept `value`/`checked` plus a change callback for
79
+ controlled use, or `defaultValue`/`defaultChecked` for uncontrolled use. Native
80
+ buttons, anchors, inputs, fieldsets, progress, and tab ARIA relationships are
81
+ kept in the rendered HTML; `data-state` is a styling/evidence hook, not a
82
+ replacement for browser semantics.
83
+
84
+ Modal overlays are SSR-safe: their trigger renders on the server and portal
85
+ content mounts in the browser. They enter and trap focus, restore it on close,
86
+ lock body scrolling, and inherit provider theme, direction, text scale, and
87
+ reduced-motion variables across the portal boundary. Controlled `Dialog`,
88
+ `AlertDialog`, and `Sheet` instances may omit `trigger` when a product owns
89
+ `open` and `onOpenChange`; uncontrolled instances still require a trigger.
90
+ While a modal is open, siblings outside the topmost modal's ancestor path are
91
+ made `inert` and `aria-hidden`. This isolation follows late-added portals,
92
+ stacks across nested modals, and restores each element's previous values as the
93
+ stack unwinds. `AlertDialog` applies the shared least-destructive-focus and
94
+ async-error contracts. `Menu`, `Combobox`, `Accordion`, and `Tabs` implement
95
+ their documented Arrow/Home/End/Escape keyboard behavior; `Tooltip` only adds
96
+ `aria-describedby` while visible.
97
+
98
+ Canonical `Select` implements the shared select-only combobox contract with a
99
+ button trigger, listbox popup, active-descendant focus, async collection states,
100
+ and selection reconciliation. `NativeSelect` remains available when browser or
101
+ mobile-picker semantics are the product requirement. `Form`, `Table`,
102
+ `Breadcrumb`, and `Pagination` preserve native HTML semantics. Consumers provide
103
+ localized labels and finished domain copy; the renderer does not invent
104
+ translations. Import the stylesheet once at the application boundary—JavaScript
105
+ entry points have no global side effects.
106
+
107
+ `NumberField` keeps editable draft text separate from its `number | null`
108
+ model. It accepts locale-neutral finite decimal/exponent text, commits and
109
+ snaps only on blur, Enter, a stepper, or ArrowUp/ArrowDown, and requires
110
+ product-localized increment/decrement labels. The input is the only Tab stop;
111
+ named steppers remain available to pointer and voice control. Currency/unit
112
+ formatting, grouping separators, locale-specific decimal separators, and
113
+ non-Latin number parsing are deliberately unsupported until a bidirectional
114
+ adapter plus IME/locale fixtures are part of the contract. Composition drafts
115
+ stay local, but non-ASCII numeric IME parsing and caret preservation are not
116
+ certified.
117
+
118
+ `Slider` is the approximate numeric counterpart to `NumberField` and reuses
119
+ the same min-origin clamp/snap resolver. It supports controlled `value` or
120
+ uncontrolled `defaultValue` (falling back to `min`), horizontal LTR/RTL native
121
+ range pointer input, Arrow/Home/End/Page keyboard input, and product-owned
122
+ `getValueText`. `onValueChange` fires during an interaction;
123
+ `onValueChangeEnd` fires once when pointer capture ends, the pointer is
124
+ released, or the keyboard interaction ends. The native range input itself is
125
+ the 44px interaction layer and uses internal `step="any"`; HJM's shared resolver
126
+ snaps user input while preserving off-grid controlled values and exact endpoints.
127
+ Disabling an active interaction commits its last value exactly once.
128
+ Range/multi-thumb, vertical orientation, marks,
129
+ tooltips, nonlinear scales, and drag acceleration remain outside this initial
130
+ renderer.
131
+
132
+ ## Localization ownership
133
+
134
+ The renderer has no built-in language. Products must provide copy whose meaning
135
+ cannot be derived from native HTML: `SearchField.clearLabel`,
136
+ `Select.placeholder` / `Select.emptySelectionLabel`, `Combobox.emptyMessage` /
137
+ `loadingMessage` / `selectionRequiredMessage`, and `Dialog.closeLabel` /
138
+ `Sheet.closeLabel`, plus `Table.emptyState`. This makes a missing translation a
139
+ TypeScript error instead
140
+ of silently shipping Korean or English fallback text. Labels supplied by the
141
+ product are passed through unchanged; punctuation-only accessible composition
142
+ uses caller-owned strings.
143
+
144
+ `Grid` observes window and element widths in the browser and starts from a
145
+ deterministic compact layout during SSR. Tests may pass `windowWidth` and
146
+ `availableWidth` explicitly; product code normally leaves both unset.
@@ -0,0 +1,61 @@
1
+ import { type ButtonSize, type ButtonTone } from "@hjmds/design-contracts/recipes/base";
2
+ import { type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkTone, type LinkVariant } from "@hjmds/design-contracts/recipes";
3
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ForwardedRef, type ReactElement, type ReactNode } from "react";
4
+ export type { ButtonSize, ButtonTone } from "@hjmds/design-contracts/recipes/base";
5
+ export type { IconButtonShape, IconButtonSize, IconButtonTone, } from "@hjmds/design-contracts/recipes";
6
+ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & Readonly<{
7
+ tone?: ButtonTone;
8
+ size?: ButtonSize;
9
+ loading?: boolean;
10
+ leading?: ReactNode;
11
+ trailing?: ReactNode;
12
+ }>;
13
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & Readonly<{
14
+ tone?: ButtonTone;
15
+ size?: ButtonSize;
16
+ loading?: boolean;
17
+ leading?: ReactNode;
18
+ trailing?: ReactNode;
19
+ }> & import("react").RefAttributes<HTMLButtonElement>>;
20
+ export type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & Readonly<{
21
+ label: string;
22
+ tone?: IconButtonTone;
23
+ size?: IconButtonSize;
24
+ shape?: IconButtonShape;
25
+ loading?: boolean;
26
+ children: ReactNode;
27
+ }>;
28
+ export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & Readonly<{
29
+ label: string;
30
+ tone?: IconButtonTone;
31
+ size?: IconButtonSize;
32
+ shape?: IconButtonShape;
33
+ loading?: boolean;
34
+ children: ReactNode;
35
+ }> & import("react").RefAttributes<HTMLButtonElement>>;
36
+ export type LinkRenderProps = AnchorHTMLAttributes<HTMLAnchorElement> & Readonly<{
37
+ children: ReactNode;
38
+ ref: ForwardedRef<HTMLAnchorElement>;
39
+ "data-tone": LinkTone;
40
+ "data-variant": LinkVariant;
41
+ "data-state": "disabled" | "idle";
42
+ }>;
43
+ export type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & Readonly<{
44
+ tone?: LinkTone;
45
+ variant?: LinkVariant;
46
+ disabled?: boolean;
47
+ leading?: ReactNode;
48
+ trailing?: ReactNode;
49
+ /** Framework adapter, for example Next.js Link, while HJM keeps link semantics and state. */
50
+ renderAnchor?: (props: LinkRenderProps) => ReactElement;
51
+ }>;
52
+ export declare const Link: import("react").ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & Readonly<{
53
+ tone?: LinkTone;
54
+ variant?: LinkVariant;
55
+ disabled?: boolean;
56
+ leading?: ReactNode;
57
+ trailing?: ReactNode;
58
+ /** Framework adapter, for example Next.js Link, while HJM keeps link semantics and state. */
59
+ renderAnchor?: (props: LinkRenderProps) => ReactElement;
60
+ }> & import("react").RefAttributes<HTMLAnchorElement>>;
61
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAEjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACnF,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,GACf,MAAM,iCAAiC,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAC/D,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC,CAAC;AAEL,eAAO,MAAM,MAAM;WAPR,UAAU;WACV,UAAU;cACP,OAAO;cACP,SAAS;eACR,SAAS;sDA+CtB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,YAAY,CACb,GACC,QAAQ,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC,CAAC;AAEL,eAAO,MAAM,UAAU;WARZ,MAAM;WACN,cAAc;WACd,cAAc;YACb,eAAe;cACb,OAAO;cACP,SAAS;sDAiDtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GACnE,QAAQ,CAAC;IACP,QAAQ,EAAE,SAAS,CAAC;IACpB,GAAG,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACrC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,WAAW,CAAC;IAC5B,YAAY,EAAE,UAAU,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC;AAEL,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAC7D,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,YAAY,CAAC;CACzD,CAAC,CAAC;AAEL,eAAO,MAAM,IAAI;WATN,QAAQ;cACL,WAAW;eACV,OAAO;cACR,SAAS;eACR,SAAS;IACpB,6FAA6F;mBAC9E,CAAC,KAAK,EAAE,eAAe,KAAK,YAAY;sDAiDzD,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { buttonRecipe, } from "@hjmds/design-contracts/recipes/base";
3
+ import { iconButtonRecipe, linkRecipe, } from "@hjmds/design-contracts/recipes";
4
+ import { forwardRef, } from "react";
5
+ import { classNames } from "./internal.js";
6
+ export const Button = forwardRef(function Button({ tone = buttonRecipe.defaults.tone, size = buttonRecipe.defaults.size, loading = false, leading, trailing, disabled, onClick, type = "button", className, children, ...props }, ref) {
7
+ const unavailable = disabled === true || loading;
8
+ const handleClick = (event) => {
9
+ if (loading) {
10
+ event.preventDefault();
11
+ event.stopPropagation();
12
+ return;
13
+ }
14
+ onClick?.(event);
15
+ };
16
+ return (_jsxs("button", { ...props, ref: ref, type: type, className: classNames("hjm-button", className), "data-tone": tone, "data-size": size, "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-busy": loading || undefined, "aria-disabled": loading || undefined, disabled: disabled, onClick: handleClick, children: [loading ? _jsx("span", { className: "hjm-button__spinner", "aria-hidden": "true" }) : leading, _jsx("span", { className: "hjm-button__label", children: children }), trailing] }));
17
+ });
18
+ export const IconButton = forwardRef(function IconButton({ label, tone = iconButtonRecipe.defaults.tone, size = iconButtonRecipe.defaults.size, shape = iconButtonRecipe.defaults.shape, loading = false, disabled, onClick, type = "button", className, children, ...props }, ref) {
19
+ const unavailable = disabled === true || loading;
20
+ const handleClick = (event) => {
21
+ if (loading) {
22
+ event.preventDefault();
23
+ event.stopPropagation();
24
+ return;
25
+ }
26
+ onClick?.(event);
27
+ };
28
+ return (_jsx("button", { ...props, ref: ref, type: type, className: classNames("hjm-icon-button", className), "data-tone": tone, "data-size": size, "data-shape": shape, "data-state": loading ? "loading" : unavailable ? "disabled" : "idle", "aria-label": label, "aria-busy": loading || undefined, "aria-disabled": loading || undefined, disabled: disabled, onClick: handleClick, children: loading ? _jsx("span", { className: "hjm-button__spinner", "aria-hidden": "true" }) : children }));
29
+ });
30
+ export const Link = forwardRef(function Link({ tone = linkRecipe.defaults.tone, variant = linkRecipe.defaults.variant, disabled = false, leading, trailing, renderAnchor, target, rel, tabIndex, onClick, className, children, ...props }, ref) {
31
+ const handleClick = (event) => {
32
+ if (disabled) {
33
+ event.preventDefault();
34
+ return;
35
+ }
36
+ onClick?.(event);
37
+ };
38
+ const anchorProps = {
39
+ ...props,
40
+ ref,
41
+ className: classNames("hjm-link", className),
42
+ "data-tone": tone,
43
+ "data-variant": variant,
44
+ "data-state": disabled ? "disabled" : "idle",
45
+ "aria-disabled": disabled || undefined,
46
+ tabIndex: disabled ? -1 : tabIndex,
47
+ target,
48
+ rel: rel ?? (target === "_blank" ? "noreferrer noopener" : undefined),
49
+ onClick: handleClick,
50
+ children: (_jsxs(_Fragment, { children: [leading, _jsx("span", { children: children }), trailing] })),
51
+ };
52
+ return renderAnchor ? renderAnchor(anchorProps) : _jsx("a", { ...anchorProps });
53
+ });
54
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,GAGb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,UAAU,GAMX,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,UAAU,GAOX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAkB3C,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAiC,SAAS,MAAM,CAC9E,EACE,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,EACjC,IAAI,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,EACjC,OAAO,GAAG,KAAK,EACf,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG;IAEH,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC;IACjD,MAAM,WAAW,GAAG,CAAC,KAAoC,EAAE,EAAE;QAC3D,IAAI,OAAO,EAAE,CAAC;YACZ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K;QACR,GAAG;QACH,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC;QAC5C,WAAW,EAAE,IAAI;QACjB,cAAc,EAAE,OAAO;QACvB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;QAC5C,eAAe,EAAE,QAAQ,IAAI,SAAS;QACtC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ;QAClC,MAAM;QACN,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;QACrE,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,CACR,8BACC,OAAO,EACR,yBAAO,QAAQ,GAAQ,EACtB,QAAQ,IACN,CACJ;KACF,CAAC;IACF,OAAO,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,eAAO,WAAW,GAAI,CAAC;AAC3E,CAAC,CAAC,CAAC","sourcesContent":["import {\n buttonRecipe,\n type ButtonSize,\n type ButtonTone,\n} from \"@hjmds/design-contracts/recipes/base\";\nimport {\n iconButtonRecipe,\n linkRecipe,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkTone,\n type LinkVariant,\n} from \"@hjmds/design-contracts/recipes\";\nimport {\n forwardRef,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ForwardedRef,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n} from \"react\";\nimport { classNames } from \"./internal.js\";\n\nexport type { ButtonSize, ButtonTone } from \"@hjmds/design-contracts/recipes/base\";\nexport type {\n IconButtonShape,\n IconButtonSize,\n IconButtonTone,\n} from \"@hjmds/design-contracts/recipes\";\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n Readonly<{\n tone?: ButtonTone;\n size?: ButtonSize;\n loading?: boolean;\n leading?: ReactNode;\n trailing?: ReactNode;\n }>;\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n tone = buttonRecipe.defaults.tone,\n size = buttonRecipe.defaults.size,\n loading = false,\n leading,\n trailing,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n ...props\n },\n ref,\n) {\n const unavailable = disabled === true || loading;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n ref={ref}\n type={type}\n className={classNames(\"hjm-button\", className)}\n data-tone={tone}\n data-size={size}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-busy={loading || undefined}\n aria-disabled={loading || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {loading ? <span className=\"hjm-button__spinner\" aria-hidden=\"true\" /> : leading}\n <span className=\"hjm-button__label\">{children}</span>\n {trailing}\n </button>\n );\n});\n\nexport type IconButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"aria-label\"\n> &\n Readonly<{\n label: string;\n tone?: IconButtonTone;\n size?: IconButtonSize;\n shape?: IconButtonShape;\n loading?: boolean;\n children: ReactNode;\n }>;\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function IconButton(\n {\n label,\n tone = iconButtonRecipe.defaults.tone,\n size = iconButtonRecipe.defaults.size,\n shape = iconButtonRecipe.defaults.shape,\n loading = false,\n disabled,\n onClick,\n type = \"button\",\n className,\n children,\n ...props\n },\n ref,\n ) {\n const unavailable = disabled === true || loading;\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClick?.(event);\n };\n return (\n <button\n {...props}\n ref={ref}\n type={type}\n className={classNames(\"hjm-icon-button\", className)}\n data-tone={tone}\n data-size={size}\n data-shape={shape}\n data-state={loading ? \"loading\" : unavailable ? \"disabled\" : \"idle\"}\n aria-label={label}\n aria-busy={loading || undefined}\n aria-disabled={loading || undefined}\n disabled={disabled}\n onClick={handleClick}\n >\n {loading ? <span className=\"hjm-button__spinner\" aria-hidden=\"true\" /> : children}\n </button>\n );\n },\n);\n\nexport type LinkRenderProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n children: ReactNode;\n ref: ForwardedRef<HTMLAnchorElement>;\n \"data-tone\": LinkTone;\n \"data-variant\": LinkVariant;\n \"data-state\": \"disabled\" | \"idle\";\n }>;\n\nexport type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> &\n Readonly<{\n tone?: LinkTone;\n variant?: LinkVariant;\n disabled?: boolean;\n leading?: ReactNode;\n trailing?: ReactNode;\n /** Framework adapter, for example Next.js Link, while HJM keeps link semantics and state. */\n renderAnchor?: (props: LinkRenderProps) => ReactElement;\n }>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link(\n {\n tone = linkRecipe.defaults.tone,\n variant = linkRecipe.defaults.variant,\n disabled = false,\n leading,\n trailing,\n renderAnchor,\n target,\n rel,\n tabIndex,\n onClick,\n className,\n children,\n ...props\n },\n ref,\n) {\n const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n };\n const anchorProps: LinkRenderProps = {\n ...props,\n ref,\n className: classNames(\"hjm-link\", className),\n \"data-tone\": tone,\n \"data-variant\": variant,\n \"data-state\": disabled ? \"disabled\" : \"idle\",\n \"aria-disabled\": disabled || undefined,\n tabIndex: disabled ? -1 : tabIndex,\n target,\n rel: rel ?? (target === \"_blank\" ? \"noreferrer noopener\" : undefined),\n onClick: handleClick,\n children: (\n <>\n {leading}\n <span>{children}</span>\n {trailing}\n </>\n ),\n };\n return renderAnchor ? renderAnchor(anchorProps) : <a {...anchorProps} />;\n});\n"]}
@@ -0,0 +1,133 @@
1
+ import { type DescriptionItemDescriptor, type DescriptionListColumns } from "@hjmds/design-contracts/components/description-list";
2
+ import { type ComposeTimelineAccessibleName, type TimelineItemDescriptor } from "@hjmds/design-contracts/components/timeline";
3
+ import { type ResolvedStatisticDescriptor, type StatisticDescriptor, type StatisticGroupDescriptor } from "@hjmds/design-contracts/components/statistic";
4
+ import { dividerRecipe, listRecipe, type AccordionDensity, type AvatarShape, type AvatarSize, type StatisticDensity, type StatisticPresentation } from "@hjmds/design-contracts/recipes";
5
+ import { type HTMLAttributes, type ImgHTMLAttributes, type ReactElement, type ReactNode, type RefAttributes, type TableHTMLAttributes } from "react";
6
+ export type AccordionItem = Readonly<{
7
+ id: string;
8
+ title: ReactNode;
9
+ panel: ReactNode;
10
+ disabled?: boolean;
11
+ }>;
12
+ export type AccordionProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & Readonly<{
13
+ items: readonly AccordionItem[];
14
+ value?: readonly string[];
15
+ defaultValue?: readonly string[];
16
+ onValueChange?: (value: readonly string[]) => void;
17
+ allowsMultipleExpanded?: boolean;
18
+ density?: AccordionDensity;
19
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
20
+ }>;
21
+ export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & Readonly<{
22
+ items: readonly AccordionItem[];
23
+ value?: readonly string[];
24
+ defaultValue?: readonly string[];
25
+ onValueChange?: (value: readonly string[]) => void;
26
+ allowsMultipleExpanded?: boolean;
27
+ density?: AccordionDensity;
28
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
29
+ }> & RefAttributes<HTMLDivElement>>;
30
+ export type AvatarProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & Readonly<{
31
+ name: string;
32
+ src?: string;
33
+ alt?: string;
34
+ fallback?: ReactNode;
35
+ size?: AvatarSize;
36
+ shape?: AvatarShape;
37
+ imageProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, "alt" | "src">;
38
+ }>;
39
+ export declare const Avatar: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & Readonly<{
40
+ name: string;
41
+ src?: string;
42
+ alt?: string;
43
+ fallback?: ReactNode;
44
+ size?: AvatarSize;
45
+ shape?: AvatarShape;
46
+ imageProps?: Omit<ImgHTMLAttributes<HTMLImageElement>, "alt" | "src">;
47
+ }> & RefAttributes<HTMLSpanElement>>;
48
+ export type DividerOrientation = "horizontal" | "vertical";
49
+ export type DividerInset = keyof typeof dividerRecipe.insets;
50
+ export type DividerProps = HTMLAttributes<HTMLElement> & Readonly<{
51
+ orientation?: DividerOrientation;
52
+ inset?: DividerInset;
53
+ decorative?: boolean;
54
+ }>;
55
+ export declare const Divider: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & Readonly<{
56
+ orientation?: DividerOrientation;
57
+ inset?: DividerInset;
58
+ decorative?: boolean;
59
+ }> & RefAttributes<HTMLElement>>;
60
+ export type ListAppearance = "grouped" | "plain";
61
+ export type ListProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
62
+ label: string;
63
+ children: ReactNode;
64
+ separator?: keyof typeof listRecipe.separators;
65
+ appearance?: ListAppearance;
66
+ }>;
67
+ /** Semantic list container that owns separators around composed rows. */
68
+ export declare const List: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
69
+ label: string;
70
+ children: ReactNode;
71
+ separator?: keyof typeof listRecipe.separators;
72
+ appearance?: ListAppearance;
73
+ }> & RefAttributes<HTMLDivElement>>;
74
+ export type StatisticTrendMarkRenderProps = Readonly<{
75
+ name: "trendUp" | "trendDown" | "trendFlat";
76
+ color: "currentColor";
77
+ size: number;
78
+ }>;
79
+ export type ComposeStatisticAccessibilityLabel<Id extends string = string> = (input: Readonly<{
80
+ contextLabel?: string;
81
+ descriptor: ResolvedStatisticDescriptor<Id>;
82
+ valueText: string;
83
+ }>) => string;
84
+ export type StatisticProps<Id extends string = string> = Omit<HTMLAttributes<HTMLElement>, "children"> & Readonly<{
85
+ descriptor: StatisticDescriptor<Id>;
86
+ density?: StatisticDensity;
87
+ presentation?: StatisticPresentation;
88
+ contextLabel?: string;
89
+ accessibilityLabel?: string;
90
+ composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;
91
+ renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;
92
+ }>;
93
+ export declare function Statistic<Id extends string = string>({ descriptor, density, presentation, contextLabel, accessibilityLabel, composeAccessibilityLabel, renderTrendMark, className, ...props }: StatisticProps<Id>): import("react").JSX.Element;
94
+ export type StatisticGroupProps<Id extends string = string> = Omit<HTMLAttributes<HTMLDivElement>, "children"> & Readonly<{
95
+ label: string;
96
+ descriptor: StatisticGroupDescriptor<Id>;
97
+ density?: StatisticDensity;
98
+ presentation?: StatisticPresentation;
99
+ composeAccessibilityLabel?: ComposeStatisticAccessibilityLabel<Id>;
100
+ renderTrendMark?: (props: StatisticTrendMarkRenderProps) => ReactNode;
101
+ }>;
102
+ export declare function StatisticGroup<Id extends string = string>({ label, descriptor, density, presentation, composeAccessibilityLabel, renderTrendMark, className, style, ...props }: StatisticGroupProps<Id>): import("react").JSX.Element;
103
+ export type DescriptionListProps<Id extends string = string> = Omit<HTMLAttributes<HTMLDListElement>, "children"> & Readonly<{
104
+ items: readonly DescriptionItemDescriptor<Id>[];
105
+ columns?: DescriptionListColumns;
106
+ }>;
107
+ export declare const DescriptionList: <Id extends string = string>(props: DescriptionListProps<Id> & RefAttributes<HTMLDListElement>) => ReactElement;
108
+ export type TableSortDirection = "ascending" | "descending";
109
+ export type TableColumn<Row> = Readonly<{
110
+ id: string;
111
+ header: ReactNode;
112
+ cell: (row: Row, rowIndex: number) => ReactNode;
113
+ align?: "start" | "center" | "end";
114
+ sortable?: boolean;
115
+ sortDirection?: TableSortDirection;
116
+ }>;
117
+ export type TableProps<Row> = Omit<TableHTMLAttributes<HTMLTableElement>, "children"> & Readonly<{
118
+ columns: readonly TableColumn<Row>[];
119
+ rows: readonly Row[];
120
+ getRowKey: (row: Row, rowIndex: number) => string;
121
+ caption?: ReactNode;
122
+ /** Localized content rendered when rows is empty. */
123
+ emptyState: ReactNode;
124
+ onSortChange?: (columnId: string, direction: TableSortDirection) => void;
125
+ wrapperClassName?: string;
126
+ }>;
127
+ export declare const Table: <Row>(props: TableProps<Row> & RefAttributes<HTMLTableElement>) => ReactElement;
128
+ export type TimelineProps<Id extends string = string> = Omit<HTMLAttributes<HTMLOListElement>, "children"> & Readonly<{
129
+ items: readonly TimelineItemDescriptor<Id>[];
130
+ composeAccessibleName: ComposeTimelineAccessibleName;
131
+ }>;
132
+ export declare const Timeline: <Id extends string = string>(props: TimelineProps<Id> & RefAttributes<HTMLOListElement>) => ReactElement;
133
+ //# sourceMappingURL=advanced-display.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced-display.d.ts","sourceRoot":"","sources":["../src/advanced-display.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC5B,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC5B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAGL,aAAa,EACb,UAAU,EAEV,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAWL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC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