ionbase-ui 0.51.0 → 0.69.0

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 (174) hide show
  1. package/dist/components/Accordion.d.ts +54 -0
  2. package/dist/components/Accordion.d.ts.map +1 -0
  3. package/dist/components/Accordion.js +68 -0
  4. package/dist/components/Accordion.js.map +1 -0
  5. package/dist/components/AgentActivity.d.ts +2 -1
  6. package/dist/components/AgentActivity.d.ts.map +1 -1
  7. package/dist/components/AgentActivity.js +4 -17
  8. package/dist/components/AgentActivity.js.map +1 -1
  9. package/dist/components/Breadcrumb.d.ts +45 -0
  10. package/dist/components/Breadcrumb.d.ts.map +1 -0
  11. package/dist/components/Breadcrumb.js +31 -0
  12. package/dist/components/Breadcrumb.js.map +1 -0
  13. package/dist/components/Calendar.d.ts +20 -0
  14. package/dist/components/Calendar.d.ts.map +1 -0
  15. package/dist/components/Calendar.js +151 -0
  16. package/dist/components/Calendar.js.map +1 -0
  17. package/dist/components/CalendarPopover.d.ts +26 -0
  18. package/dist/components/CalendarPopover.d.ts.map +1 -0
  19. package/dist/components/CalendarPopover.js +45 -0
  20. package/dist/components/CalendarPopover.js.map +1 -0
  21. package/dist/components/Checkbox.d.ts +2 -1
  22. package/dist/components/Checkbox.d.ts.map +1 -1
  23. package/dist/components/Checkbox.js +4 -2
  24. package/dist/components/Checkbox.js.map +1 -1
  25. package/dist/components/Combobox.d.ts +86 -0
  26. package/dist/components/Combobox.d.ts.map +1 -0
  27. package/dist/components/Combobox.js +261 -0
  28. package/dist/components/Combobox.js.map +1 -0
  29. package/dist/components/DateField.d.ts +15 -0
  30. package/dist/components/DateField.d.ts.map +1 -0
  31. package/dist/components/DateField.js +74 -0
  32. package/dist/components/DateField.js.map +1 -0
  33. package/dist/components/DatePicker.d.ts +81 -0
  34. package/dist/components/DatePicker.d.ts.map +1 -0
  35. package/dist/components/DatePicker.js +102 -0
  36. package/dist/components/DatePicker.js.map +1 -0
  37. package/dist/components/DateRangePicker.d.ts +117 -0
  38. package/dist/components/DateRangePicker.d.ts.map +1 -0
  39. package/dist/components/DateRangePicker.js +152 -0
  40. package/dist/components/DateRangePicker.js.map +1 -0
  41. package/dist/components/Drawer.d.ts +52 -0
  42. package/dist/components/Drawer.d.ts.map +1 -0
  43. package/dist/components/Drawer.js +66 -0
  44. package/dist/components/Drawer.js.map +1 -0
  45. package/dist/components/FileUpload.d.ts +79 -0
  46. package/dist/components/FileUpload.d.ts.map +1 -0
  47. package/dist/components/FileUpload.js +218 -0
  48. package/dist/components/FileUpload.js.map +1 -0
  49. package/dist/components/Header.d.ts +10 -0
  50. package/dist/components/Header.d.ts.map +1 -1
  51. package/dist/components/Header.js +18 -3
  52. package/dist/components/Header.js.map +1 -1
  53. package/dist/components/NumberInput.d.ts +63 -0
  54. package/dist/components/NumberInput.d.ts.map +1 -0
  55. package/dist/components/NumberInput.js +102 -0
  56. package/dist/components/NumberInput.js.map +1 -0
  57. package/dist/components/ProgressBar.d.ts +46 -0
  58. package/dist/components/ProgressBar.d.ts.map +1 -0
  59. package/dist/components/ProgressBar.js +52 -0
  60. package/dist/components/ProgressBar.js.map +1 -0
  61. package/dist/components/PromptInput.d.ts +89 -0
  62. package/dist/components/PromptInput.d.ts.map +1 -0
  63. package/dist/components/PromptInput.js +130 -0
  64. package/dist/components/PromptInput.js.map +1 -0
  65. package/dist/components/SegmentedControl.d.ts +63 -0
  66. package/dist/components/SegmentedControl.d.ts.map +1 -0
  67. package/dist/components/SegmentedControl.js +79 -0
  68. package/dist/components/SegmentedControl.js.map +1 -0
  69. package/dist/components/Select.d.ts +9 -2
  70. package/dist/components/Select.d.ts.map +1 -1
  71. package/dist/components/Select.js.map +1 -1
  72. package/dist/components/Sidebar.d.ts +109 -0
  73. package/dist/components/Sidebar.d.ts.map +1 -0
  74. package/dist/components/Sidebar.js +106 -0
  75. package/dist/components/Sidebar.js.map +1 -0
  76. package/dist/components/Skeleton.d.ts +39 -0
  77. package/dist/components/Skeleton.d.ts.map +1 -0
  78. package/dist/components/Skeleton.js +50 -0
  79. package/dist/components/Skeleton.js.map +1 -0
  80. package/dist/components/Spinner.d.ts +45 -0
  81. package/dist/components/Spinner.d.ts.map +1 -0
  82. package/dist/components/Spinner.js +44 -0
  83. package/dist/components/Spinner.js.map +1 -0
  84. package/dist/components/Stepper.d.ts +73 -0
  85. package/dist/components/Stepper.d.ts.map +1 -0
  86. package/dist/components/Stepper.js +82 -0
  87. package/dist/components/Stepper.js.map +1 -0
  88. package/dist/components/Toggle.d.ts +2 -1
  89. package/dist/components/Toggle.d.ts.map +1 -1
  90. package/dist/components/Toggle.js +4 -2
  91. package/dist/components/Toggle.js.map +1 -1
  92. package/dist/components/ToolCall.d.ts +66 -0
  93. package/dist/components/ToolCall.d.ts.map +1 -0
  94. package/dist/components/ToolCall.js +78 -0
  95. package/dist/components/ToolCall.js.map +1 -0
  96. package/dist/components/agent-status.d.ts +14 -0
  97. package/dist/components/agent-status.d.ts.map +1 -0
  98. package/dist/components/agent-status.js +16 -0
  99. package/dist/components/agent-status.js.map +1 -0
  100. package/dist/components/index.d.ts +33 -0
  101. package/dist/components/index.d.ts.map +1 -1
  102. package/dist/components/index.js +16 -0
  103. package/dist/components/index.js.map +1 -1
  104. package/dist/components/iso-date.d.ts +53 -0
  105. package/dist/components/iso-date.d.ts.map +1 -0
  106. package/dist/components/iso-date.js +102 -0
  107. package/dist/components/iso-date.js.map +1 -0
  108. package/dist/components/resolve-selection.d.ts +36 -0
  109. package/dist/components/resolve-selection.d.ts.map +1 -0
  110. package/dist/components/resolve-selection.js +14 -0
  111. package/dist/components/resolve-selection.js.map +1 -0
  112. package/dist/figma-descriptions.json +255 -145
  113. package/dist/figma-map.json +3205 -1860
  114. package/dist/meta/Accordion.json +123 -0
  115. package/dist/meta/AccordionItem.json +90 -0
  116. package/dist/meta/AgentActivityStep.json +2 -2
  117. package/dist/meta/Breadcrumb.json +87 -0
  118. package/dist/meta/BreadcrumbItem.json +78 -0
  119. package/dist/meta/Checkbox.json +18 -1
  120. package/dist/meta/Combobox.json +265 -0
  121. package/dist/meta/DatePicker.json +270 -0
  122. package/dist/meta/DateRangePicker.json +284 -0
  123. package/dist/meta/Drawer.json +234 -0
  124. package/dist/meta/EmptyState.json +1 -1
  125. package/dist/meta/FileUpload.json +246 -0
  126. package/dist/meta/Header.json +32 -2
  127. package/dist/meta/NumberInput.json +407 -0
  128. package/dist/meta/PhoneInput.json +39 -39
  129. package/dist/meta/Popover.json +3 -3
  130. package/dist/meta/ProgressBar.json +166 -0
  131. package/dist/meta/PromptInput.json +212 -0
  132. package/dist/meta/SegmentedControl.json +217 -0
  133. package/dist/meta/SegmentedControlItem.json +122 -0
  134. package/dist/meta/Select.json +4 -3
  135. package/dist/meta/Sidebar.json +150 -0
  136. package/dist/meta/SidebarItem.json +184 -0
  137. package/dist/meta/SidebarSection.json +131 -0
  138. package/dist/meta/Skeleton.json +120 -0
  139. package/dist/meta/Spinner.json +123 -0
  140. package/dist/meta/Stepper.json +135 -0
  141. package/dist/meta/StepperStep.json +148 -0
  142. package/dist/meta/Tabs.json +5 -0
  143. package/dist/meta/Toggle.json +18 -1
  144. package/dist/meta/ToolCall.json +192 -0
  145. package/dist/meta/Tooltip.json +3 -3
  146. package/dist/meta/components.json +6759 -2705
  147. package/dist/meta/contrast.json +11075 -3098
  148. package/dist/meta/index.json +266 -8
  149. package/dist/meta/patterns/AgentRun.json +27 -0
  150. package/dist/meta/patterns/Form.json +9 -0
  151. package/dist/meta/patterns/PageShell.json +43 -3
  152. package/dist/meta/patterns/Wizard.json +20 -1
  153. package/dist/meta/patterns/index.json +10 -1
  154. package/dist/styles/accordion.css +102 -0
  155. package/dist/styles/breadcrumb.css +72 -0
  156. package/dist/styles/combobox.css +154 -0
  157. package/dist/styles/date-picker.css +420 -0
  158. package/dist/styles/date-range-picker.css +280 -0
  159. package/dist/styles/drawer.css +181 -0
  160. package/dist/styles/empty-state.css +16 -4
  161. package/dist/styles/file-upload.css +236 -0
  162. package/dist/styles/header.css +26 -0
  163. package/dist/styles/index.css +23 -0
  164. package/dist/styles/number-input.css +83 -0
  165. package/dist/styles/progress-bar.css +107 -0
  166. package/dist/styles/prompt-input.css +127 -0
  167. package/dist/styles/segmented-control.css +182 -0
  168. package/dist/styles/sidebar.css +307 -0
  169. package/dist/styles/skeleton.css +76 -0
  170. package/dist/styles/spinner.css +70 -0
  171. package/dist/styles/stepper.css +250 -0
  172. package/dist/styles/tool-call.css +202 -0
  173. package/llms.txt +2 -2
  174. package/package.json +2 -1
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ export type AccordionHeadingLevel = 2 | 3 | 4 | 5 | 6;
3
+ export interface AccordionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
4
+ /** Let more than one section be open at once. */
5
+ allowsMultiple?: boolean;
6
+ /** Uncontrolled: which sections start open. */
7
+ defaultExpandedKeys?: string[];
8
+ /** Controlled: which sections are open. Pass `onExpandedChange` with it. */
9
+ expandedKeys?: string[];
10
+ onExpandedChange?: (keys: string[]) => void;
11
+ /**
12
+ * The level each section's heading renders at. Must fit the surrounding
13
+ * document — a panel inside an `h2` section wants `3`.
14
+ */
15
+ headingLevel?: AccordionHeadingLevel;
16
+ children?: React.ReactNode;
17
+ }
18
+ export interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'id'> {
19
+ /** Stable identity for the open set. Required. */
20
+ id: string;
21
+ /** The always-visible label. */
22
+ title: React.ReactNode;
23
+ isDisabled?: boolean;
24
+ children?: React.ReactNode;
25
+ }
26
+ /**
27
+ * Accordion — sections that collapse, with the heading structure intact.
28
+ *
29
+ * WHY THE TRIGGER IS A BUTTON INSIDE A HEADING
30
+ *
31
+ * Both parts are load-bearing and the obvious implementations drop one of them.
32
+ * The heading is how a screen-reader user navigates a long page — pressing `h`
33
+ * moves between sections, and an accordion built from `div`s removes every one
34
+ * of those stops. The button is what makes the section operable by keyboard and
35
+ * announced as expandable; a heading with a click handler is neither.
36
+ *
37
+ * So the shape is `<h3><button aria-expanded aria-controls>`, which is the only
38
+ * arrangement that keeps document structure AND operability.
39
+ *
40
+ * `headingLevel` is a prop with no safe default beyond 3, because the right
41
+ * level depends on the document around it and nothing here can see that. Two
42
+ * accordions at the wrong level produce a page whose outline is nonsense while
43
+ * looking perfectly fine.
44
+ *
45
+ * THE PANEL IS NOT UNMOUNTED
46
+ *
47
+ * Collapsed sections keep their DOM and are hidden with `hidden`. Unmounting
48
+ * would lose form state in a collapsed section — the classic multi-step-form
49
+ * bug where answers vanish when a section is folded away — and would break
50
+ * in-page search, which cannot find text that is not there.
51
+ */
52
+ export declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
53
+ export declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
54
+ //# sourceMappingURL=Accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/components/Accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAUtD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,UAAU,CACX;IACC,iDAAiD;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,IAAI,CACf;IACC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,SAAS,uFA+CrB,CAAC;AAIF,eAAO,MAAM,aAAa,2FAsDzB,CAAC"}
@@ -0,0 +1,68 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createContext, forwardRef, useContext, useId, useState, } from 'react';
4
+ const AccordionContext = createContext(null);
5
+ const Chevron = () => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m6 9 6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
6
+ /**
7
+ * Accordion — sections that collapse, with the heading structure intact.
8
+ *
9
+ * WHY THE TRIGGER IS A BUTTON INSIDE A HEADING
10
+ *
11
+ * Both parts are load-bearing and the obvious implementations drop one of them.
12
+ * The heading is how a screen-reader user navigates a long page — pressing `h`
13
+ * moves between sections, and an accordion built from `div`s removes every one
14
+ * of those stops. The button is what makes the section operable by keyboard and
15
+ * announced as expandable; a heading with a click handler is neither.
16
+ *
17
+ * So the shape is `<h3><button aria-expanded aria-controls>`, which is the only
18
+ * arrangement that keeps document structure AND operability.
19
+ *
20
+ * `headingLevel` is a prop with no safe default beyond 3, because the right
21
+ * level depends on the document around it and nothing here can see that. Two
22
+ * accordions at the wrong level produce a page whose outline is nonsense while
23
+ * looking perfectly fine.
24
+ *
25
+ * THE PANEL IS NOT UNMOUNTED
26
+ *
27
+ * Collapsed sections keep their DOM and are hidden with `hidden`. Unmounting
28
+ * would lose form state in a collapsed section — the classic multi-step-form
29
+ * bug where answers vanish when a section is folded away — and would break
30
+ * in-page search, which cannot find text that is not there.
31
+ */
32
+ export const Accordion = forwardRef(({ allowsMultiple = false, defaultExpandedKeys, expandedKeys, onExpandedChange, headingLevel = 3, children, className, ...rest }, ref) => {
33
+ const [internal, setInternal] = useState(defaultExpandedKeys ?? []);
34
+ const isControlled = expandedKeys !== undefined;
35
+ const current = isControlled ? expandedKeys : internal;
36
+ const toggle = (id) => {
37
+ const open = current.includes(id);
38
+ const next = open
39
+ ? current.filter((k) => k !== id)
40
+ : allowsMultiple
41
+ ? [...current, id]
42
+ : [id];
43
+ if (!isControlled)
44
+ setInternal(next);
45
+ onExpandedChange?.(next);
46
+ };
47
+ return (_jsx(AccordionContext.Provider, { value: { expanded: new Set(current), toggle, headingLevel }, children: _jsx("div", { ...rest, ref: ref, className: ['ion-accordion', className || '']
48
+ .filter(Boolean)
49
+ .join(' '), children: children }) }));
50
+ });
51
+ Accordion.displayName = 'Accordion';
52
+ export const AccordionItem = forwardRef(({ id, title, isDisabled = false, children, className, ...rest }, ref) => {
53
+ const ctx = useContext(AccordionContext);
54
+ if (!ctx) {
55
+ throw new Error('AccordionItem must be rendered inside an Accordion');
56
+ }
57
+ const { expanded, toggle, headingLevel } = ctx;
58
+ const reactId = useId();
59
+ const buttonId = `${reactId}-trigger`;
60
+ const panelId = `${reactId}-panel`;
61
+ const isExpanded = expanded.has(id);
62
+ const Heading = `h${headingLevel}`;
63
+ return (_jsxs("div", { ...rest, ref: ref, "data-expanded": isExpanded || undefined, className: ['ion-accordion__item', className || '']
64
+ .filter(Boolean)
65
+ .join(' '), children: [_jsx(Heading, { className: "ion-accordion__heading", children: _jsxs("button", { type: "button", id: buttonId, className: "ion-accordion__trigger", "aria-expanded": isExpanded, "aria-controls": panelId, disabled: isDisabled, onClick: () => toggle(id), children: [_jsx("span", { className: "ion-accordion__title", children: title }), _jsx("span", { className: "ion-accordion__indicator", "aria-hidden": "true", children: _jsx(Chevron, {}) })] }) }), _jsx("div", { id: panelId, role: "region", "aria-labelledby": buttonId, hidden: !isExpanded, className: "ion-accordion__panel", children: _jsx("div", { className: "ion-accordion__content", children: children }) })] }));
66
+ });
67
+ AccordionItem.displayName = 'AccordionItem';
68
+ //# sourceMappingURL=Accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../src/components/Accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,EACL,QAAQ,GACT,MAAM,OAAO,CAAC;AAUf,MAAM,gBAAgB,GAAG,aAAa,CAA+B,IAAI,CAAC,CAAC;AAiC3E,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CACpB,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YACvE,eACE,CAAC,EAAC,cAAc,EAChB,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CACE,EACE,cAAc,GAAG,KAAK,EACtB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,YAAY,GAAG,CAAC,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CACtC,mBAAmB,IAAI,EAAE,CAC1B,CAAC;IACF,MAAM,YAAY,GAAG,YAAY,KAAK,SAAS,CAAC;IAChD,MAAM,OAAO,GAAG,YAAY,CAAC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
1
1
  import React from 'react';
2
- export type AgentActivityStatus = 'pending' | 'active' | 'done' | 'failed' | 'skipped';
2
+ import type { AgentActivityStatus } from './agent-status.js';
3
+ export type { AgentActivityStatus } from './agent-status.js';
3
4
  export interface AgentActivityProps extends React.HTMLAttributes<HTMLOListElement> {
4
5
  children?: React.ReactNode;
5
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AgentActivity.d.ts","sourceRoot":"","sources":["../../src/components/AgentActivity.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAC7B,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IAChF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACnF,uEAAuE;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAsED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,6FAyDzB,CAAC;AAIF,eAAO,MAAM,iBAAiB,8FA6B5B,CAAC"}
1
+ {"version":3,"file":"AgentActivity.d.ts","sourceRoot":"","sources":["../../src/components/AgentActivity.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IAChF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACnF,uEAAuE;IACvE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,6FAyDzB,CAAC;AAIF,eAAO,MAAM,iBAAiB,8FAkC5B,CAAC"}
@@ -1,20 +1,7 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React, { forwardRef, useEffect, useRef, useState } from 'react';
4
- const STATUS_TEXT = {
5
- pending: 'Not started',
6
- active: 'In progress',
7
- done: 'Done',
8
- failed: 'Failed',
9
- skipped: 'Skipped',
10
- };
11
- const Glyphs = {
12
- pending: () => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: _jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2" }) })),
13
- active: () => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.3" }), _jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] })),
14
- done: () => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "m8.5 12 2.5 2.5 4.5-5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] })),
15
- failed: () => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "m9 9 6 6M15 9l-6 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] })),
16
- skipped: () => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: [_jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M8.5 12h7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })] })),
17
- };
4
+ import { STATUS_GLYPHS, STATUS_TEXT } from './agent-status.js';
18
5
  /**
19
6
  * AgentActivity — what the agent is doing, in plain language.
20
7
  *
@@ -71,14 +58,14 @@ export const AgentActivity = forwardRef(({ children, announceActive = true, clas
71
58
  });
72
59
  AgentActivity.displayName = 'AgentActivity';
73
60
  export const AgentActivityStep = forwardRef(({ children, status = 'pending', detail, className, ...rest }, ref) => {
74
- const Glyph = Glyphs[status];
61
+ const Glyph = STATUS_GLYPHS[status];
75
62
  return (_jsxs("li", { ...rest, ref: ref, "data-status": status, className: [
76
63
  'ion-agent-activity__step',
77
64
  `ion-agent-activity__step--${status}`,
78
65
  className || '',
79
66
  ]
80
67
  .filter(Boolean)
81
- .join(' '), children: [_jsx("span", { className: "ion-agent-activity__glyph", "aria-hidden": "true", children: _jsx(Glyph, {}) }), _jsxs("span", { className: "ion-agent-activity__body", children: [_jsx("span", { className: "ion-agent-activity__label", children: children }), detail && _jsx("span", { className: "ion-agent-activity__detail", children: detail })] }), _jsx("span", { className: "ion-visually-hidden", children: STATUS_TEXT[status] })] }));
68
+ .join(' '), children: [_jsx("span", { className: "ion-agent-activity__glyph", "aria-hidden": "true", children: _jsx(Glyph, {}) }), _jsxs("div", { className: "ion-agent-activity__body", children: [_jsx("span", { className: "ion-agent-activity__label", children: children }), detail && _jsx("div", { className: "ion-agent-activity__detail", children: detail })] }), _jsx("span", { className: "ion-visually-hidden", children: STATUS_TEXT[status] })] }));
82
69
  });
83
70
  AgentActivityStep.displayName = 'AgentActivityStep';
84
71
  //# sourceMappingURL=AgentActivity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentActivity.js","sourceRoot":"","sources":["../../src/components/AgentActivity.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyBvE,MAAM,WAAW,GAAwC;IACvD,OAAO,EAAE,aAAa;IACtB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,MAAM,GAA0D;IACpE,OAAO,EAAE,GAAG,EAAE,CAAC,CACb,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YACvE,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,GAAG,GAClE,CACP;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,eAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,aACvE,iBACE,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,GAAG,EACL,MAAM,EAAC,cAAc,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D,CACN,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ export interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
3
+ /**
4
+ * Names the landmark. A page with more than one `nav` needs them told apart,
5
+ * and "Breadcrumb" is what screen-reader users are listening for.
6
+ */
7
+ label?: string;
8
+ /** `BreadcrumbItem` elements, ancestor first. */
9
+ children?: React.ReactNode;
10
+ }
11
+ export interface BreadcrumbItemProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> {
12
+ /** Omit on the current page — the last crumb is not a link. */
13
+ href?: string;
14
+ /**
15
+ * The page the user is on. Marked `aria-current="page"` and rendered as text
16
+ * rather than a link.
17
+ */
18
+ isCurrent?: boolean;
19
+ children?: React.ReactNode;
20
+ }
21
+ /**
22
+ * Breadcrumb — where this page sits, and how to get back up.
23
+ *
24
+ * WHY AN ORDERED LIST INSIDE A NAMED LANDMARK
25
+ *
26
+ * The trail is a sequence, and `ol` is what says so: a screen reader announces
27
+ * "list, 4 items" and the position within it, which is the entire content of a
28
+ * breadcrumb. A row of `div`s with slashes conveys none of that, and the
29
+ * slashes themselves get read out as punctuation.
30
+ *
31
+ * The separator here is drawn by CSS `::before` on each item after the first,
32
+ * so it is decoration that never enters the accessibility tree. Putting a "/"
33
+ * in the markup is the usual version of this component and the usual defect.
34
+ *
35
+ * THE LAST CRUMB IS NOT A LINK
36
+ *
37
+ * `isCurrent` renders text with `aria-current="page"`. A link to the page you
38
+ * are already on is a dead control: it announces as a link, invites a click,
39
+ * and does nothing. This is the most common breadcrumb bug and the reason the
40
+ * prop exists rather than being inferred from position — a trail whose last
41
+ * crumb IS a link to somewhere else is legitimate, and inferring would break it.
42
+ */
43
+ export declare const Breadcrumb: React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLElement>>;
44
+ export declare const BreadcrumbItem: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
45
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACxE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EACrC,SAAS,CACV;IACC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,qFAWtB,CAAC;AAIF,eAAO,MAAM,cAAc,2FAuB1B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ /**
4
+ * Breadcrumb — where this page sits, and how to get back up.
5
+ *
6
+ * WHY AN ORDERED LIST INSIDE A NAMED LANDMARK
7
+ *
8
+ * The trail is a sequence, and `ol` is what says so: a screen reader announces
9
+ * "list, 4 items" and the position within it, which is the entire content of a
10
+ * breadcrumb. A row of `div`s with slashes conveys none of that, and the
11
+ * slashes themselves get read out as punctuation.
12
+ *
13
+ * The separator here is drawn by CSS `::before` on each item after the first,
14
+ * so it is decoration that never enters the accessibility tree. Putting a "/"
15
+ * in the markup is the usual version of this component and the usual defect.
16
+ *
17
+ * THE LAST CRUMB IS NOT A LINK
18
+ *
19
+ * `isCurrent` renders text with `aria-current="page"`. A link to the page you
20
+ * are already on is a dead control: it announces as a link, invites a click,
21
+ * and does nothing. This is the most common breadcrumb bug and the reason the
22
+ * prop exists rather than being inferred from position — a trail whose last
23
+ * crumb IS a link to somewhere else is legitimate, and inferring would break it.
24
+ */
25
+ export const Breadcrumb = forwardRef(({ label = 'Breadcrumb', children, className, ...rest }, ref) => (_jsx("nav", { ...rest, ref: ref, "aria-label": label, className: ['ion-breadcrumb', className || ''].filter(Boolean).join(' '), children: _jsx("ol", { className: "ion-breadcrumb__list", children: children }) })));
26
+ Breadcrumb.displayName = 'Breadcrumb';
27
+ export const BreadcrumbItem = forwardRef(({ href, isCurrent = false, children, className, ...rest }, ref) => (_jsx("li", { ...rest, ref: ref, className: ['ion-breadcrumb__item', className || '']
28
+ .filter(Boolean)
29
+ .join(' '), children: isCurrent || !href ? (_jsx("span", { className: "ion-breadcrumb__current", ...(isCurrent ? { 'aria-current': 'page' } : {}), children: children })) : (_jsx("a", { href: href, className: "ion-breadcrumb__link", children: children })) })));
30
+ BreadcrumbItem.displayName = 'BreadcrumbItem';
31
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../src/components/Breadcrumb.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA0B1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,EAAE,KAAK,GAAG,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC/D,iBACM,IAAI,EACR,GAAG,EAAE,GAAG,gBACI,KAAK,EACjB,SAAS,EAAE,CAAC,gBAAgB,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAExE,aAAI,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAM,GAChD,CACP,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClE,gBACM,IAAI,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,CAAC,sBAAsB,EAAE,SAAS,IAAI,EAAE,CAAC;SACjD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,YAEX,SAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,eACE,SAAS,EAAC,yBAAyB,KAC/B,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,YAEhD,QAAQ,GACJ,CACR,CAAC,CAAC,CAAC,CACF,YAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,sBAAsB,YAC5C,QAAQ,GACP,CACL,GACE,CACN,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { AriaCalendarProps, AriaRangeCalendarProps } from 'react-aria';
3
+ import type { DateValue } from '@internationalized/date';
4
+ /** The single-date calendar, for `DatePicker`. */
5
+ export declare function SingleCalendar(props: AriaCalendarProps<DateValue>): React.JSX.Element;
6
+ /**
7
+ * The range calendar, for `DateRangePicker`.
8
+ *
9
+ * `useRangeCalendar` takes a ref and the single-date `useCalendar` does not,
10
+ * which is not an inconsistency: the range calendar attaches a pointer-up
11
+ * listener to it so that releasing the mouse OUTSIDE the calendar still ends
12
+ * the drag. Without the ref the range would keep following the pointer after
13
+ * the button came up somewhere else on the page.
14
+ */
15
+ export declare function RangeCalendar({ visibleMonths, aside, footer, ...props }: AriaRangeCalendarProps<DateValue> & {
16
+ visibleMonths?: number;
17
+ aside?: React.ReactNode;
18
+ footer?: React.ReactNode;
19
+ }): React.JSX.Element;
20
+ //# sourceMappingURL=Calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/components/Calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAiBtC,OAAO,KAAK,EAEV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAgWvE,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,qBAgBjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAC5B,aAAiB,EACjB,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACT,EAAE,sBAAsB,CAAC,SAAS,CAAC,GAAG;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,qBA0BA"}
@@ -0,0 +1,151 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRef } from 'react';
4
+ import { useButton, useCalendar, useCalendarCell, useCalendarGrid, useLocale, useRangeCalendar, } from 'react-aria';
5
+ import { useCalendarState, useRangeCalendarState } from 'react-stately';
6
+ import { createCalendar, endOfMonth, getWeeksInMonth, isSameDay, today, } from '@internationalized/date';
7
+ const ChevronLeft = () => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m15 18-6-6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
8
+ const ChevronRight = () => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "m9 18 6-6-6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
9
+ /* -------------------------------------------------------------------- nav */
10
+ /**
11
+ * A month-step arrow.
12
+ *
13
+ * `useButton` rather than a bare `<button>` because the props react-aria hands
14
+ * back carry the disabled state for the boundary case — a `minValue` in the
15
+ * current month means there is no previous month to step to, and the arrow has
16
+ * to say so rather than silently doing nothing.
17
+ */
18
+ function NavButton({ buttonProps, children, }) {
19
+ const ref = useRef(null);
20
+ const { buttonProps: props } = useButton(buttonProps, ref);
21
+ return (_jsx("button", { ...props, ref: ref, type: "button", className: "ion-calendar__nav-button", children: children }));
22
+ }
23
+ /* ------------------------------------------------------------------- cell */
24
+ function Cell({ state, date, currentMonth, }) {
25
+ const ref = useRef(null);
26
+ const { cellProps, buttonProps, isSelected, isOutsideVisibleRange, isDisabled, isUnavailable, formattedDate, } = useCalendarCell({ date }, state, ref);
27
+ /*
28
+ * A day that belongs to the neighbouring month.
29
+ *
30
+ * `isOutsideVisibleRange` is NOT the same question and using it here is a
31
+ * bug worth naming: it is true for a date outside the whole visible RANGE,
32
+ * which for the two-month range calendar spans both grids. December's cells
33
+ * are inside that range and still do not belong to November's table, so a
34
+ * cell keyed on it would render December's first week into November's grid
35
+ * as though those days were November's.
36
+ */
37
+ const isOutsideMonth = date.month !== currentMonth.month;
38
+ /*
39
+ * The one place the two states differ.
40
+ *
41
+ * `highlightedRange` is the committed range OR the one being dragged out
42
+ * right now, which is what makes the band follow the pointer between the
43
+ * first and second click instead of appearing only once both ends exist.
44
+ */
45
+ const range = 'highlightedRange' in state ? state.highlightedRange : null;
46
+ const isRangeStart = range ? isSameDay(date, range.start) : false;
47
+ const isRangeEnd = range ? isSameDay(date, range.end) : false;
48
+ /*
49
+ * Inside the band but not an endpoint. Rendered as a flat tint with square
50
+ * sides so consecutive days join into one continuous bar; the endpoints keep
51
+ * the solid fill and the rounded outer edge.
52
+ */
53
+ const isInRange = Boolean(range) && isSelected && !isRangeStart && !isRangeEnd;
54
+ /*
55
+ * Today is marked even when it is selected — the dot moves to the on-colour
56
+ * token rather than being dropped. A "today" cue that disappears the moment
57
+ * today is picked vanishes exactly when the user is looking for confirmation
58
+ * that they picked it.
59
+ *
60
+ * The mark is VISUAL ONLY, and deliberately so. `useCalendarCell` already
61
+ * puts "today" into the cell's accessible name in the reader's own language;
62
+ * a second announcement from a hidden span would say it twice.
63
+ */
64
+ const isToday = isSameDay(date, today(state.timeZone));
65
+ return (_jsx("td", { ...cellProps, className: "ion-calendar__cell", children: _jsx("div", { ...buttonProps, ref: ref, hidden: isOutsideMonth || undefined, className: [
66
+ 'ion-calendar__day',
67
+ isSelected ? 'ion-calendar__day--selected' : '',
68
+ isInRange ? 'ion-calendar__day--in-range' : '',
69
+ isRangeStart ? 'ion-calendar__day--range-start' : '',
70
+ isRangeEnd ? 'ion-calendar__day--range-end' : '',
71
+ isDisabled ? 'ion-calendar__day--disabled' : '',
72
+ isUnavailable ? 'ion-calendar__day--unavailable' : '',
73
+ ]
74
+ .filter(Boolean)
75
+ .join(' '), "data-selected": isSelected || undefined, "data-in-range": isInRange || undefined, "data-range-start": isRangeStart || undefined, "data-range-end": isRangeEnd || undefined, "data-disabled": isDisabled || undefined, "data-unavailable": isUnavailable || undefined, "data-outside-range": isOutsideVisibleRange || undefined, "data-today": isToday || undefined, children: formattedDate }) }));
76
+ }
77
+ /* ------------------------------------------------------------------- grid */
78
+ /**
79
+ * One month's table.
80
+ *
81
+ * `offset` shifts it forward, which is how the range picker shows two months
82
+ * from one state: both grids read the same `state.visibleRange.start`, and the
83
+ * second adds a month to it. Stepping the state forward moves both together,
84
+ * which is the behaviour a two-month picker needs — a next-month arrow that
85
+ * moved only the right-hand grid would let the two overlap.
86
+ */
87
+ function MonthGrid({ state, offset = 0, }) {
88
+ const { locale } = useLocale();
89
+ const startDate = state.visibleRange.start.add({ months: offset });
90
+ const endDate = endOfMonth(startDate);
91
+ const { gridProps, headerProps, weekDays } = useCalendarGrid({ startDate, endDate }, state);
92
+ /*
93
+ * How many week rows this month needs — 4 through 6, depending on which
94
+ * weekday it starts on. Rendering a fixed 6 would pad February with a blank
95
+ * row, and rendering `Math.ceil(days / 7)` gets the common case right and the
96
+ * month that spills over a sixth week wrong.
97
+ */
98
+ const weeksInMonth = getWeeksInMonth(startDate, locale);
99
+ /*
100
+ * The month name above each grid, from the grid's own start date rather than
101
+ * from `useCalendar`'s `title`. `title` describes the whole visible range —
102
+ * "November – December 2024" for the two-month calendar — which is right for
103
+ * the header and wrong above one of the two grids.
104
+ */
105
+ const monthLabel = new Intl.DateTimeFormat(locale, {
106
+ month: 'long',
107
+ year: 'numeric',
108
+ calendar: startDate.calendar.identifier,
109
+ timeZone: state.timeZone,
110
+ }).format(startDate.toDate(state.timeZone));
111
+ return (_jsxs("div", { className: "ion-calendar__month", children: [_jsx("div", { className: "ion-calendar__month-label", "aria-hidden": "true", children: monthLabel }), _jsxs("table", { ...gridProps, className: "ion-calendar__grid", children: [_jsx("thead", { ...headerProps, children: _jsx("tr", { children: weekDays.map((day, i) => (
112
+ // The index IS the identity here: the weekday row is a fixed
113
+ // seven columns in a fixed order, and nothing reorders it.
114
+ _jsx("th", { className: "ion-calendar__weekday", children: day }, i))) }) }), _jsx("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => (_jsx("tr", { children: state.getDatesInWeek(weekIndex, startDate).map((date, i) => date ? (_jsx(Cell, { state: state, date: date, currentMonth: startDate }, date.toString())) : (
115
+ // A padding cell before the 1st or after the last —
116
+ // it has no date to key on, and its position is its identity.
117
+ _jsx("td", {}, i))) }, weekIndex))) })] })] }));
118
+ }
119
+ /* ----------------------------------------------------------------- shells */
120
+ function CalendarShell({ calendarProps, prevButtonProps, nextButtonProps, title, state, visibleMonths, aside, footer, refProp, }) {
121
+ return (_jsxs("div", { ...calendarProps, ref: refProp, className: "ion-calendar", "data-months": visibleMonths, children: [aside, _jsxs("div", { className: "ion-calendar__body", children: [_jsxs("div", { className: "ion-calendar__header", children: [_jsx(NavButton, { buttonProps: prevButtonProps, children: _jsx(ChevronLeft, {}) }), _jsx("h2", { className: "ion-visually-hidden", children: title }), _jsx("div", { className: "ion-calendar__title", "aria-hidden": "true", children: title }), _jsx(NavButton, { buttonProps: nextButtonProps, children: _jsx(ChevronRight, {}) })] }), _jsx("div", { className: "ion-calendar__months", children: [...new Array(visibleMonths).keys()].map((offset) => (_jsx(MonthGrid, { state: state, offset: offset }, offset))) }), footer] })] }));
122
+ }
123
+ /** The single-date calendar, for `DatePicker`. */
124
+ export function SingleCalendar(props) {
125
+ const { locale } = useLocale();
126
+ const state = useCalendarState({ ...props, locale, createCalendar });
127
+ const { calendarProps, prevButtonProps, nextButtonProps, title } = useCalendar(props, state);
128
+ return (_jsx(CalendarShell, { calendarProps: calendarProps, prevButtonProps: prevButtonProps, nextButtonProps: nextButtonProps, title: title, state: state, visibleMonths: 1 }));
129
+ }
130
+ /**
131
+ * The range calendar, for `DateRangePicker`.
132
+ *
133
+ * `useRangeCalendar` takes a ref and the single-date `useCalendar` does not,
134
+ * which is not an inconsistency: the range calendar attaches a pointer-up
135
+ * listener to it so that releasing the mouse OUTSIDE the calendar still ends
136
+ * the drag. Without the ref the range would keep following the pointer after
137
+ * the button came up somewhere else on the page.
138
+ */
139
+ export function RangeCalendar({ visibleMonths = 2, aside, footer, ...props }) {
140
+ const { locale } = useLocale();
141
+ const state = useRangeCalendarState({
142
+ ...props,
143
+ locale,
144
+ createCalendar,
145
+ visibleDuration: { months: visibleMonths },
146
+ });
147
+ const ref = useRef(null);
148
+ const { calendarProps, prevButtonProps, nextButtonProps, title } = useRangeCalendar(props, state, ref);
149
+ return (_jsx(CalendarShell, { calendarProps: calendarProps, prevButtonProps: prevButtonProps, nextButtonProps: nextButtonProps, title: title, state: state, visibleMonths: visibleMonths, aside: aside, footer: footer, refProp: ref }));
150
+ }
151
+ //# sourceMappingURL=Calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../../src/components/Calendar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EACL,cAAc,EACd,UAAU,EACV,eAAe,EACf,SAAS,EACT,KAAK,GACN,MAAM,yBAAyB,CAAC;AAiCjC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CACxB,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YACvE,eACE,CAAC,EAAC,gBAAgB,EAClB,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AAEF,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CACzB,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YACvE,eACE,CAAC,EAAC,eAAe,EACjB,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AAEF,8EAA8E;AAE9E;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,EACjB,WAAW,EACX,QAAQ,GAIT;IACC,MAAM,GAAG,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAC5C,MAAM,EAAE,WAAW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AAC,CAAC;IACrE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,GAC9D,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAE5B,OAAO,CACL,KAAC,aAAa,IACZ,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,CAAC,GAChB,CACH,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,aAAa,GAAG,CAAC,EACjB,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EAKT;IACC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,KAAK,GAAG,qBAAqB,CAAC;QAClC,GAAG,KAAK;QACR,MAAM;QACN,cAAc;QACd,eAAe,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;KAC3C,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,GAC9D,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAEtC,OAAO,CACL,KAAC,aAAa,IACZ,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,GACZ,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { OverlayTriggerState } from 'react-stately';
3
+ interface CalendarPopoverProps {
4
+ state: OverlayTriggerState;
5
+ triggerRef: React.RefObject<HTMLElement | null>;
6
+ /** `dialogProps` from `useDatePicker` / `useDateRangePicker`. */
7
+ dialogProps: React.HTMLAttributes<HTMLElement>;
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ }
11
+ /**
12
+ * The panel, in its own component because it is mounted only while open.
13
+ *
14
+ * `useDialog` focuses the panel and resolves the title id in effects keyed on
15
+ * the ref — effects that run when the component CALLING the hook mounts. Called
16
+ * beside `useDatePickerState` in the picker, that moment is when the field
17
+ * mounts, with the calendar not yet in the DOM: the dialog never takes focus,
18
+ * so Escape never reaches it, and `aria-labelledby` is silently dropped. Same
19
+ * split as `Popover` / `PopoverPanel` and `Drawer`, for the same reason.
20
+ */
21
+ export declare function CalendarPopover({ state, triggerRef, dialogProps, children, className, }: CalendarPopoverProps): React.JSX.Element;
22
+ export declare namespace CalendarPopover {
23
+ var displayName: string;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=CalendarPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarPopover.d.ts","sourceRoot":"","sources":["../../src/components/CalendarPopover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAmBzD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,mBAAmB,CAAC;IAC3B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChD,iEAAiE;IACjE,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC/C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,oBAAoB,qBAkDtB;yBAxDe,eAAe"}
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRef } from 'react';
4
+ import { Overlay, usePopover, useDialog, mergeProps } from 'react-aria';
5
+ /**
6
+ * The panel, in its own component because it is mounted only while open.
7
+ *
8
+ * `useDialog` focuses the panel and resolves the title id in effects keyed on
9
+ * the ref — effects that run when the component CALLING the hook mounts. Called
10
+ * beside `useDatePickerState` in the picker, that moment is when the field
11
+ * mounts, with the calendar not yet in the DOM: the dialog never takes focus,
12
+ * so Escape never reaches it, and `aria-labelledby` is silently dropped. Same
13
+ * split as `Popover` / `PopoverPanel` and `Drawer`, for the same reason.
14
+ */
15
+ export function CalendarPopover({ state, triggerRef, dialogProps, children, className, }) {
16
+ const popoverRef = useRef(null);
17
+ const { popoverProps, underlayProps } = usePopover({
18
+ triggerRef,
19
+ popoverRef,
20
+ /*
21
+ * Aligned to the START of the field rather than centred under it. The
22
+ * calendar is much wider than a small date field and narrower than a wide
23
+ * one, and a centred overlay would sit at a different offset in each —
24
+ * which reads as a positioning bug rather than a choice. Anchored left,
25
+ * the month grid and the first segment share an edge.
26
+ */
27
+ placement: 'bottom start',
28
+ offset: 8,
29
+ }, state);
30
+ /*
31
+ * MODAL, unlike Combobox's listbox, and this is the opposite call from the
32
+ * one that file makes. A combobox must not move focus, because the user is
33
+ * still typing into the input that drives the list. A calendar is the
34
+ * opposite: the grid IS the input while it is open, arrow keys belong to it,
35
+ * and the date field behind it must not be receiving the same keystrokes.
36
+ * `usePopover` contains focus and hides the rest of the page from assistive
37
+ * tech for exactly this case.
38
+ */
39
+ const { dialogProps: innerDialogProps } = useDialog({}, popoverRef);
40
+ return (_jsxs(Overlay, { children: [_jsx("div", { ...underlayProps, className: "ion-calendar-popover__underlay" }), _jsx("div", { ...mergeProps(popoverProps, innerDialogProps, dialogProps), ref: popoverRef, className: ['ion-calendar-popover', className]
41
+ .filter(Boolean)
42
+ .join(' '), children: children })] }));
43
+ }
44
+ CalendarPopover.displayName = 'CalendarPopover';
45
+ //# sourceMappingURL=CalendarPopover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarPopover.js","sourceRoot":"","sources":["../../src/components/CalendarPopover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6BxE;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,GACY;IACrB,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,UAAU,CAChD;QACE,UAAU;QACV,UAAU;QACV;;;;;;WAMG;QACH,SAAS,EAAE,cAAc;QACzB,MAAM,EAAE,CAAC;KACV,EACD,KAAK,CACN,CAAC;IAEF;;;;;;;;OAQG;IACH,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IAEpE,OAAO,CACL,MAAC,OAAO,eAMN,iBAAS,aAAa,EAAE,SAAS,EAAC,gCAAgC,GAAG,EACrE,iBACM,UAAU,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAC3D,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC;qBAC3C,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,GAAG,CAAC,YAEX,QAAQ,GACL,IACE,CACX,CAAC;AACJ,CAAC;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
+ import { type SelectionProps } from './resolve-selection.js';
2
3
  export type CheckboxSize = 'sm' | 'md' | 'lg';
3
4
  export type CheckboxIntent = 'brand' | 'neutral' | 'danger';
4
- export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
5
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, SelectionProps {
5
6
  /** Matches the Figma `Size` variant: Small, Medium, Large. */
6
7
  size?: CheckboxSize;
7
8
  /** Matches the Figma `Color` variant: Brand, Neutral, Danger. */
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAKN,MAAM,OAAO,CAAC;AAGf,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,MAAM,CAChB;IACC,8DAA8D;IAC9D,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,iEAAiE;IACjE,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA2BD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,wFAkDpB,CAAC"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAKN,MAAM,OAAO,CAAC;AAEf,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAA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