@atom63/ui-react 0.2.0-beta.1 → 0.2.0-beta.11

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 (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -50
  3. package/dist/{button-sktq-nvV.d.ts → button-CfLIHg-R.d.ts} +1 -1
  4. package/dist/calendar/index.d.ts +7 -0
  5. package/dist/calendar/index.js +116 -0
  6. package/dist/calendar/index.js.map +1 -0
  7. package/dist/chunk-GDUMA6FI.js +2678 -0
  8. package/dist/chunk-GDUMA6FI.js.map +1 -0
  9. package/dist/{chunk-STCXERLM.js → chunk-J77BAGTA.js} +8 -148
  10. package/dist/chunk-J77BAGTA.js.map +1 -0
  11. package/dist/chunk-NBHGMMQN.js +135 -0
  12. package/dist/chunk-NBHGMMQN.js.map +1 -0
  13. package/dist/{chunk-7VSPECOH.js → chunk-R67OZVA2.js} +4 -14
  14. package/dist/chunk-R67OZVA2.js.map +1 -0
  15. package/dist/chunk-UPPHQLZ2.js +18 -0
  16. package/dist/chunk-UPPHQLZ2.js.map +1 -0
  17. package/dist/{chunk-MXNO63TC.js → chunk-X5L5DEUZ.js} +597 -290
  18. package/dist/chunk-X5L5DEUZ.js.map +1 -0
  19. package/dist/{destination-link-C9NKeKLe.d.ts → destination-link-DMLeR-oF.d.ts} +1 -1
  20. package/dist/index-BDzW8upQ.d.ts +442 -0
  21. package/dist/index.d.ts +56 -458
  22. package/dist/index.js +344 -3038
  23. package/dist/index.js.map +1 -1
  24. package/dist/layout/index.d.ts +8 -6
  25. package/dist/layout/index.js +16 -14
  26. package/dist/layout/index.js.map +1 -1
  27. package/dist/media/index.d.ts +15 -4
  28. package/dist/media/index.js +213 -46
  29. package/dist/media/index.js.map +1 -1
  30. package/dist/media/media-lightbox/parts/index.d.ts +23 -15
  31. package/dist/media/media-lightbox/parts/index.js +3 -2
  32. package/dist/preview/index.d.ts +16 -0
  33. package/dist/preview/index.js +6 -0
  34. package/dist/preview/index.js.map +1 -0
  35. package/dist/theme/index.d.ts +2 -2
  36. package/dist/theme/index.js +82 -37
  37. package/dist/theme/index.js.map +1 -1
  38. package/package.json +36 -27
  39. package/src/components/accordion/accordion.css +2 -4
  40. package/src/components/alert-dialog/alert-dialog.css +1 -1
  41. package/src/components/autocomplete/autocomplete.css +3 -7
  42. package/src/components/badge/badge.css +48 -51
  43. package/src/components/breadcrumb/breadcrumb.css +1 -2
  44. package/src/components/button/button.css +8 -6
  45. package/src/components/button-group/button-group.css +17 -1
  46. package/src/components/calendar/calendar.css +6 -9
  47. package/src/components/card/card.css +2 -2
  48. package/src/components/carousel/carousel.css +4 -8
  49. package/src/components/checkbox/checkbox.css +1 -1
  50. package/src/components/command/command.css +8 -0
  51. package/src/components/connected-panel/connected-panel.css +3 -2
  52. package/src/components/dialog/dialog.css +1 -1
  53. package/src/components/drawer/drawer.css +1 -1
  54. package/src/components/empty/empty.css +2 -2
  55. package/src/components/feedback-state/feedback-state.css +1 -1
  56. package/src/components/field/field.css +4 -4
  57. package/src/components/form/form.css +2 -2
  58. package/src/components/input/input.css +2 -6
  59. package/src/components/input-otp/input-otp.css +4 -11
  60. package/src/components/item/item.css +3 -3
  61. package/src/components/menu/menu.css +5 -4
  62. package/src/components/menubar/menubar.css +4 -1
  63. package/src/components/navigation-menu/navigation-menu.css +5 -1
  64. package/src/components/panel-setting-button/panel-setting-button.css +1 -1
  65. package/src/components/radio/radio.css +1 -1
  66. package/src/components/resizable/resizable.css +1 -1
  67. package/src/components/scroll-area/scroll-area.css +1 -2
  68. package/src/components/scrollable-list/scrollable-list.css +4 -7
  69. package/src/components/segmented-control/segmented-control.css +8 -1
  70. package/src/components/select/select.css +2 -6
  71. package/src/components/sidebar/sidebar.css +12 -12
  72. package/src/components/sidebar-nav-tree/sidebar-nav-tree.css +8 -8
  73. package/src/components/slider/slider.css +6 -6
  74. package/src/components/switch/switch.css +3 -3
  75. package/src/components/table/table.css +7 -1
  76. package/src/components/tabs/tabs.css +15 -1
  77. package/src/components/textarea/textarea.css +2 -6
  78. package/src/components/toggle/toggle.css +5 -4
  79. package/src/components/toggle-group/toggle-group.css +4 -4
  80. package/src/media/media-lightbox/media-lightbox.css +15 -5
  81. package/src/styles/index.css +1 -0
  82. package/src/styles/utilities.css +2234 -0
  83. package/dist/chunk-7VSPECOH.js.map +0 -1
  84. package/dist/chunk-MXNO63TC.js.map +0 -1
  85. package/dist/chunk-STCXERLM.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 You Zhang (ATOM63)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -6,60 +6,42 @@ The primary React renderer for Atom63. It provides accessible components,
6
6
  layout primitives, media, and theme controls backed by `@atom63/ui-foundation`
7
7
  contracts and `@atom63/styles` tokens.
8
8
 
9
- Built by You Zhang through Hermes Agent
10
-
11
9
  ## Install
12
10
 
13
11
  The package name is `@atom63/ui-react`, with React 19 and React DOM 19 as peer
14
- dependencies. Public npm availability is not promised yet: the currently
15
- verified paths are workspace dependencies or locally packed tarballs. Public
16
- publishing requires YZ approval and confirmation of the npm organization policy.
17
-
18
- After an approved public release, install by package name:
12
+ dependencies. It is available as a public npm beta, not a stable API. Install
13
+ the explicit `beta` tags:
19
14
 
20
15
  ```sh
21
- pnpm add @atom63/ui-react @atom63/styles react react-dom
22
- ```
23
-
24
- Until then, use workspace dependencies:
25
-
26
- ```json
27
- {
28
- "dependencies": {
29
- "@atom63/styles": "workspace:*",
30
- "@atom63/ui-react": "workspace:*",
31
- "react": "^19.1.0",
32
- "react-dom": "^19.1.0"
33
- }
34
- }
16
+ pnpm add @atom63/styles@beta @atom63/ui-react@beta
35
17
  ```
36
18
 
37
- For a non-workspace consumer, use the packed artifacts for `@atom63/ui-react`
38
- and its Atom63 package dependencies. The repository smoke test exercises that
39
- exact installation shape before building a fresh Vite consumer.
19
+ Add React 19 and React DOM 19 if the app does not already provide them. For the
20
+ complete external-consumer path, start with the
21
+ [public beta quickstart](../../docs/design-system/quickstart.md).
40
22
 
41
23
  ## Minimum setup
42
24
 
43
- Load the shared CSS once, then render components from the root entry point.
25
+ Load the shared CSS once, wrap your app with `Atom63Theme`, then render
26
+ components from the root entry point.
44
27
 
45
28
  ## CSS imports
46
29
 
47
- Import the Atom63 foundation and the React recipe bundle once from the
48
- application entry:
30
+ Import the React stylesheet once from the application entry:
49
31
 
50
32
  ```tsx
51
- import '@atom63/styles'
52
33
  import '@atom63/ui-react/styles.css'
53
34
  ```
54
35
 
55
- The full React stylesheet also includes the foundation and reset; the explicit
56
- foundation import is retained here because it is the verified package smoke
57
- path and makes the token dependency visible.
36
+ The stylesheet includes the Atom63 foundation, reset, and component recipes.
37
+ Keep `@atom63/styles` installed because it is a package dependency, but no
38
+ second CSS import is needed for the standard React setup.
58
39
 
59
40
  ## First component
60
41
 
61
42
  ```tsx
62
43
  import {
44
+ Atom63Theme,
63
45
  Badge,
64
46
  Button,
65
47
  Card,
@@ -71,30 +53,43 @@ import {
71
53
 
72
54
  export function Example() {
73
55
  return (
74
- <Card>
75
- <CardHeader>
76
- <Badge>Preview</Badge>
77
- <CardTitle>Invite a collaborator</CardTitle>
78
- </CardHeader>
79
- <CardContent>
80
- <Input aria-label="Email address" placeholder="you@example.com" type="email" />
81
- <Button type="button" variant="primary">
82
- Send invite
83
- </Button>
84
- </CardContent>
85
- </Card>
56
+ <Atom63Theme mode="light" theme="modern">
57
+ <Card>
58
+ <CardHeader>
59
+ <Badge>Preview</Badge>
60
+ <CardTitle>Invite a collaborator</CardTitle>
61
+ </CardHeader>
62
+ <CardContent>
63
+ <Input aria-label="Email address" placeholder="you@example.com" type="email" />
64
+ <Button type="button" variant="primary">
65
+ Send invite
66
+ </Button>
67
+ </CardContent>
68
+ </Card>
69
+ </Atom63Theme>
86
70
  )
87
71
  }
88
72
  ```
89
73
 
90
74
  These imports match the packed-package smoke path and the package root exports.
91
75
 
76
+ `Calendar` has its own entry point, so importing the root does not load
77
+ `react-day-picker`:
78
+
79
+ ```tsx
80
+ import { Calendar } from '@atom63/ui-react/calendar'
81
+ ```
82
+
92
83
  ## Theming
93
84
 
94
- Set theme and mode on a shared ancestor, normally `<html>`:
85
+ `Atom63Theme` sets `data-a63-mode`, `data-a63-theme`, and the matching `light`
86
+ or `dark` class on its wrapper. It renders a `div` by default; use the `render`
87
+ prop when a different wrapper is needed.
95
88
 
96
- ```html
97
- <html class="dark" data-a63-mode="dark" data-a63-theme="modern">
89
+ ```tsx
90
+ <Atom63Theme mode="dark" render={<main />} theme="modern">
91
+ <App />
92
+ </Atom63Theme>
98
93
  ```
99
94
 
100
95
  The bundled themes are `modern`, `aqua`, `retro`, and `terminal`. Use `light` or
@@ -105,17 +100,33 @@ documentation.
105
100
  ## Stable vs preview
106
101
 
107
102
  The production consumption path is verified by `pnpm check:ds-pack-smoke`
108
- against packed tarballs, including the CSS imports and components above. Public
109
- publishing still requires YZ approval and npm organization policy.
103
+ against packed tarballs, including the CSS imports and components above. The
104
+ package is publicly available under the `beta` tag, but it is not yet a
105
+ stable/latest compatibility promise.
110
106
 
111
107
  For the first public beta, the package keeps the current broad root export to
112
108
  avoid pre-release churn, but the support promise is tiered. Core controls are the
113
109
  primary compatibility surface; monitor/preview-candidate exports may remain
114
- importable while their evidence and API shape harden. See the design-system
115
- handbook's root API audit before treating a less common export as stable.
110
+ importable while their evidence and API shape harden. Preview candidates are also
111
+ available from `@atom63/ui-react/preview`; that subpath is public but is not a
112
+ stable-compatibility promise. See the design-system handbook's root API audit
113
+ before treating a less common export as stable.
114
+
115
+ Preview escape hatches should use the explicit preview subpath:
116
+
117
+ ```tsx
118
+ import { DialogPrimitive } from '@atom63/ui-react/preview'
119
+ ```
120
+
121
+ The broad beta root still exports those names today, but stable/latest may narrow
122
+ the root. Treat `@atom63/ui-react/preview` as the safer import path for APIs that
123
+ are not part of the stable root promise.
116
124
 
117
125
  ## Docs
118
126
 
127
+ - [Public beta quickstart](../../docs/design-system/quickstart.md)
128
+ - [Support and governance policy](../../docs/design-system/support-governance.md)
119
129
  - [Design system handbook](../../docs/design-system/README.md)
130
+ - [Preview migration guidance](../../docs/design-system/ui-react-preview-migration.md)
120
131
  - [Component review and stability criteria](../../docs/design-system/ui-react-component-review.md)
121
132
  - [Production readiness audit](../../docs/design-system/production-readiness-audit.md)
@@ -10,4 +10,4 @@ interface ButtonProps extends useRender.ComponentProps<'button'> {
10
10
  }
11
11
  declare function Button({ children, className, disabled, loading, render, size, type, variant, 'data-slot': triggerSlot, ...props }: ButtonProps): React.ReactElement;
12
12
 
13
- export { type ButtonProps as B, Button as a };
13
+ export { Button as B, type ButtonProps as a };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { DayPicker } from 'react-day-picker';
3
+
4
+ type CalendarProps = React.ComponentProps<typeof DayPicker>;
5
+ declare function Calendar({ className, classNames, showOutsideDays, components: userComponents, mode, ...props }: CalendarProps): React.ReactElement;
6
+
7
+ export { Calendar, type CalendarProps };
@@ -0,0 +1,116 @@
1
+ import { cn } from '../chunk-AJLHJRK6.js';
2
+ import { DayPicker } from 'react-day-picker';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ function ChevronLeftIcon({ className }) {
6
+ return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", className, fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(
7
+ "path",
8
+ {
9
+ d: "M10 3.5 5.5 8l4.5 4.5",
10
+ stroke: "currentColor",
11
+ strokeLinecap: "round",
12
+ strokeLinejoin: "round",
13
+ strokeWidth: "1.5"
14
+ }
15
+ ) });
16
+ }
17
+ function ChevronRightIcon({ className }) {
18
+ return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", className, fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(
19
+ "path",
20
+ {
21
+ d: "M6 3.5 10.5 8 6 12.5",
22
+ stroke: "currentColor",
23
+ strokeLinecap: "round",
24
+ strokeLinejoin: "round",
25
+ strokeWidth: "1.5"
26
+ }
27
+ ) });
28
+ }
29
+ function ChevronsUpDownIcon({ className }) {
30
+ return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", className, fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(
31
+ "path",
32
+ {
33
+ d: "M5 6.5 8 3.5 11 6.5M5 9.5l3 3 3-3",
34
+ stroke: "currentColor",
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round",
37
+ strokeWidth: "1.5"
38
+ }
39
+ ) });
40
+ }
41
+ function Calendar({
42
+ className,
43
+ classNames,
44
+ showOutsideDays = true,
45
+ components: userComponents,
46
+ mode = "single",
47
+ ...props
48
+ }) {
49
+ const defaultClassNames = {
50
+ button_next: "a63-Calendar-nav-button",
51
+ button_previous: "a63-Calendar-nav-button",
52
+ caption_label: "a63-Calendar-caption-label",
53
+ day: "a63-Calendar-day",
54
+ day_button: "a63-Calendar-day-button",
55
+ dropdown: "a63-Calendar-dropdown",
56
+ dropdown_root: "a63-Calendar-dropdown-root",
57
+ dropdowns: "a63-Calendar-dropdowns",
58
+ hidden: "a63-Calendar-hidden",
59
+ month: "a63-Calendar-month",
60
+ month_caption: "a63-Calendar-month-caption",
61
+ months: "a63-Calendar-months",
62
+ nav: "a63-Calendar-nav",
63
+ outside: "a63-Calendar-outside",
64
+ range_end: "range-end",
65
+ range_middle: "range-middle",
66
+ range_start: "range-start",
67
+ today: "a63-Calendar-today",
68
+ week_number: "a63-Calendar-week-number",
69
+ weekday: "a63-Calendar-weekday"
70
+ };
71
+ const mergedClassNames = { ...defaultClassNames };
72
+ if (classNames) {
73
+ for (const key of Object.keys(defaultClassNames)) {
74
+ const userClass = classNames[key];
75
+ if (userClass) {
76
+ mergedClassNames[key] = cn(defaultClassNames[key], userClass);
77
+ }
78
+ }
79
+ }
80
+ const defaultComponents = {
81
+ Chevron: ({
82
+ className: chevronClassName,
83
+ orientation
84
+ }) => {
85
+ if (orientation === "left") {
86
+ return /* @__PURE__ */ jsx(ChevronLeftIcon, { className: cn("a63-Calendar-chevron", chevronClassName) });
87
+ }
88
+ if (orientation === "right") {
89
+ return /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("a63-Calendar-chevron", chevronClassName) });
90
+ }
91
+ return /* @__PURE__ */ jsx(ChevronsUpDownIcon, { className: cn("a63-Calendar-chevron", chevronClassName) });
92
+ }
93
+ };
94
+ const mergedComponents = {
95
+ ...defaultComponents,
96
+ ...userComponents
97
+ };
98
+ const dayPickerProps = {
99
+ className: cn("a63-Calendar", className),
100
+ classNames: mergedClassNames,
101
+ components: mergedComponents,
102
+ "data-slot": "calendar",
103
+ formatters: {
104
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
105
+ ...props.formatters
106
+ },
107
+ mode,
108
+ showOutsideDays,
109
+ ...props
110
+ };
111
+ return /* @__PURE__ */ jsx(DayPicker, { ...dayPickerProps });
112
+ }
113
+
114
+ export { Calendar };
115
+ //# sourceMappingURL=index.js.map
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/calendar/calendar.tsx"],"names":[],"mappings":";;;;AAiBA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAU,EAA+C;AAClF,EAAA,uBACE,GAAA,CAAC,SAAI,aAAA,EAAY,MAAA,EAAO,WAAsB,IAAA,EAAK,MAAA,EAAO,SAAQ,WAAA,EAChE,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,CAAA,EAAE,uBAAA;AAAA,MACF,MAAA,EAAO,cAAA;AAAA,MACP,aAAA,EAAc,OAAA;AAAA,MACd,cAAA,EAAe,OAAA;AAAA,MACf,WAAA,EAAY;AAAA;AAAA,GACd,EACF,CAAA;AAEJ;AAEA,SAAS,gBAAA,CAAiB,EAAE,SAAA,EAAU,EAA+C;AACnF,EAAA,uBACE,GAAA,CAAC,SAAI,aAAA,EAAY,MAAA,EAAO,WAAsB,IAAA,EAAK,MAAA,EAAO,SAAQ,WAAA,EAChE,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,CAAA,EAAE,sBAAA;AAAA,MACF,MAAA,EAAO,cAAA;AAAA,MACP,aAAA,EAAc,OAAA;AAAA,MACd,cAAA,EAAe,OAAA;AAAA,MACf,WAAA,EAAY;AAAA;AAAA,GACd,EACF,CAAA;AAEJ;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAU,EAA+C;AACrF,EAAA,uBACE,GAAA,CAAC,SAAI,aAAA,EAAY,MAAA,EAAO,WAAsB,IAAA,EAAK,MAAA,EAAO,SAAQ,WAAA,EAChE,QAAA,kBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,CAAA,EAAE,mCAAA;AAAA,MACF,MAAA,EAAO,cAAA;AAAA,MACP,aAAA,EAAc,OAAA;AAAA,MACd,cAAA,EAAe,OAAA;AAAA,MACf,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import { cn } from '../../lib/cn'\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\n/*\n * Calendar — a faithful DS port of the react-day-picker DayPicker wrapper.\n * Every rdp element gets an `a63-Calendar-*` recipe class (calendar.css owns\n * layout + selected/today/range styling from --a63-* tokens); the nav buttons\n * mimic the DS Button via `a63-Calendar-nav-button`. Chevrons are inline SVGs\n * (matching Select / DropdownMenu) rather than icon fonts, so\n * no rdp base style.css is imported — the DS convention (no side-effect CSS).\n */\nfunction ChevronLeftIcon({ className }: { className?: string }): React.ReactElement {\n return (\n <svg aria-hidden=\"true\" className={className} fill=\"none\" viewBox=\"0 0 16 16\">\n <path\n d=\"M10 3.5 5.5 8l4.5 4.5\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n />\n </svg>\n )\n}\n\nfunction ChevronRightIcon({ className }: { className?: string }): React.ReactElement {\n return (\n <svg aria-hidden=\"true\" className={className} fill=\"none\" viewBox=\"0 0 16 16\">\n <path\n d=\"M6 3.5 10.5 8 6 12.5\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n />\n </svg>\n )\n}\n\nfunction ChevronsUpDownIcon({ className }: { className?: string }): React.ReactElement {\n return (\n <svg aria-hidden=\"true\" className={className} fill=\"none\" viewBox=\"0 0 16 16\">\n <path\n d=\"M5 6.5 8 3.5 11 6.5M5 9.5l3 3 3-3\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"1.5\"\n />\n </svg>\n )\n}\n\nexport function Calendar({\n className,\n classNames,\n showOutsideDays = true,\n components: userComponents,\n mode = 'single',\n ...props\n}: CalendarProps): React.ReactElement {\n const defaultClassNames = {\n button_next: 'a63-Calendar-nav-button',\n button_previous: 'a63-Calendar-nav-button',\n caption_label: 'a63-Calendar-caption-label',\n day: 'a63-Calendar-day',\n day_button: 'a63-Calendar-day-button',\n dropdown: 'a63-Calendar-dropdown',\n dropdown_root: 'a63-Calendar-dropdown-root',\n dropdowns: 'a63-Calendar-dropdowns',\n hidden: 'a63-Calendar-hidden',\n month: 'a63-Calendar-month',\n month_caption: 'a63-Calendar-month-caption',\n months: 'a63-Calendar-months',\n nav: 'a63-Calendar-nav',\n outside: 'a63-Calendar-outside',\n range_end: 'range-end',\n range_middle: 'range-middle',\n range_start: 'range-start',\n today: 'a63-Calendar-today',\n week_number: 'a63-Calendar-week-number',\n weekday: 'a63-Calendar-weekday',\n }\n\n const mergedClassNames = { ...defaultClassNames }\n if (classNames) {\n for (const key of Object.keys(defaultClassNames) as Array<keyof typeof defaultClassNames>) {\n const userClass = classNames[key]\n if (userClass) {\n mergedClassNames[key] = cn(defaultClassNames[key], userClass)\n }\n }\n }\n\n const defaultComponents = {\n Chevron: ({\n className: chevronClassName,\n orientation,\n }: {\n className?: string\n orientation?: 'left' | 'right' | 'up' | 'down'\n }): React.ReactElement => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('a63-Calendar-chevron', chevronClassName)} />\n }\n if (orientation === 'right') {\n return <ChevronRightIcon className={cn('a63-Calendar-chevron', chevronClassName)} />\n }\n return <ChevronsUpDownIcon className={cn('a63-Calendar-chevron', chevronClassName)} />\n },\n }\n\n const mergedComponents = {\n ...defaultComponents,\n ...userComponents,\n }\n\n const dayPickerProps = {\n className: cn('a63-Calendar', className),\n classNames: mergedClassNames,\n components: mergedComponents,\n 'data-slot': 'calendar',\n formatters: {\n formatMonthDropdown: (date: Date) => date.toLocaleString('default', { month: 'short' }),\n ...props.formatters,\n },\n mode,\n showOutsideDays,\n ...props,\n }\n\n return <DayPicker {...(dayPickerProps as CalendarProps)} />\n}\n"]}