@planningcenter/tapestry 3.8.0-qa-1049.1 → 3.8.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 (131) hide show
  1. package/dist/componentRegistration.js +7 -1
  2. package/dist/componentRegistration.js.map +1 -1
  3. package/dist/components/DataTable/DataTable.d.ts +39 -39
  4. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  5. package/dist/components/DataTable/DataTable.js +145 -24
  6. package/dist/components/DataTable/DataTable.js.map +1 -1
  7. package/dist/components/DataTable/DataTableColumn.d.ts +112 -0
  8. package/dist/components/DataTable/DataTableColumn.d.ts.map +1 -0
  9. package/dist/components/DataTable/DataTableColumnTypes.d.ts +60 -0
  10. package/dist/components/DataTable/DataTableColumnTypes.d.ts.map +1 -0
  11. package/dist/components/DataTable/DataTableColumnTypes.js +167 -0
  12. package/dist/components/DataTable/DataTableColumnTypes.js.map +1 -0
  13. package/dist/components/DataTable/DataTableRow.d.ts +2 -0
  14. package/dist/components/DataTable/DataTableRow.d.ts.map +1 -0
  15. package/dist/components/DataTable/DataTableRow.js +9 -0
  16. package/dist/components/DataTable/DataTableRow.js.map +1 -0
  17. package/dist/components/DataTable/index.d.ts +2 -1
  18. package/dist/components/DataTable/index.d.ts.map +1 -1
  19. package/dist/components/button-group/ButtonGroup.d.ts +35 -0
  20. package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
  21. package/dist/components/button-group/ButtonGroup.js +24 -0
  22. package/dist/components/button-group/ButtonGroup.js.map +1 -0
  23. package/dist/components/button-group/index.d.ts +4 -0
  24. package/dist/components/button-group/index.d.ts.map +1 -0
  25. package/dist/components/checkbox/Checkbox.d.ts +2 -2
  26. package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
  27. package/dist/components/checkbox/Checkbox.js.map +1 -1
  28. package/dist/components/checkbox-group/CheckboxGroup.d.ts +1 -1
  29. package/dist/components/checkbox-group/CheckboxGroup.d.ts.map +1 -1
  30. package/dist/components/checkbox-group/CheckboxGroup.js.map +1 -1
  31. package/dist/components/combo-box/ComboBox.d.ts +1 -1
  32. package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
  33. package/dist/components/combo-box/ComboBox.js.map +1 -1
  34. package/dist/components/date-picker/DatePicker.d.ts +2 -2
  35. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  36. package/dist/components/date-picker/DatePicker.js +39 -39
  37. package/dist/components/date-picker/DatePicker.js.map +1 -1
  38. package/dist/components/dropdown/Dropdown.d.ts +9 -8
  39. package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
  40. package/dist/components/dropdown/Dropdown.js +2 -2
  41. package/dist/components/dropdown/Dropdown.js.map +1 -1
  42. package/dist/components/input/Input.d.ts +1 -1
  43. package/dist/components/input/Input.d.ts.map +1 -1
  44. package/dist/components/input/Input.js.map +1 -1
  45. package/dist/components/input-text-base/InputTextBase.d.ts +1 -1
  46. package/dist/components/input-text-base/InputTextBase.d.ts.map +1 -1
  47. package/dist/components/input-text-base/InputTextBase.js.map +1 -1
  48. package/dist/components/modal/Modal.d.ts +20 -0
  49. package/dist/components/modal/Modal.d.ts.map +1 -0
  50. package/dist/components/modal/Modal.js +113 -0
  51. package/dist/components/modal/Modal.js.map +1 -0
  52. package/dist/components/modal/ModalBody.d.ts +21 -0
  53. package/dist/components/modal/ModalBody.d.ts.map +1 -0
  54. package/dist/components/modal/ModalBody.js +18 -0
  55. package/dist/components/modal/ModalBody.js.map +1 -0
  56. package/dist/components/modal/ModalContext.d.ts +9 -0
  57. package/dist/components/modal/ModalContext.d.ts.map +1 -0
  58. package/dist/components/modal/ModalContext.js +6 -0
  59. package/dist/components/modal/ModalContext.js.map +1 -0
  60. package/dist/components/modal/ModalFooter.d.ts +22 -0
  61. package/dist/components/modal/ModalFooter.d.ts.map +1 -0
  62. package/dist/components/modal/ModalFooter.js +21 -0
  63. package/dist/components/modal/ModalFooter.js.map +1 -0
  64. package/dist/components/modal/ModalHeader.d.ts +23 -0
  65. package/dist/components/modal/ModalHeader.d.ts.map +1 -0
  66. package/dist/components/modal/ModalHeader.js +32 -0
  67. package/dist/components/modal/ModalHeader.js.map +1 -0
  68. package/dist/components/modal/index.d.ts +10 -0
  69. package/dist/components/modal/index.d.ts.map +1 -0
  70. package/dist/components/number-stepper/NumberStepper.d.ts +1 -1
  71. package/dist/components/number-stepper/NumberStepper.d.ts.map +1 -1
  72. package/dist/components/number-stepper/NumberStepper.js +11 -11
  73. package/dist/components/number-stepper/NumberStepper.js.map +1 -1
  74. package/dist/components/radio/Radio.d.ts +2 -2
  75. package/dist/components/radio/Radio.d.ts.map +1 -1
  76. package/dist/components/radio/Radio.js.map +1 -1
  77. package/dist/components/radio-group/RadioGroup.d.ts +2 -2
  78. package/dist/components/radio-group/RadioGroup.d.ts.map +1 -1
  79. package/dist/components/radio-group/RadioGroup.js.map +1 -1
  80. package/dist/components/select/Select.d.ts +1 -1
  81. package/dist/components/select/Select.d.ts.map +1 -1
  82. package/dist/components/select/Select.js +6 -6
  83. package/dist/components/select/Select.js.map +1 -1
  84. package/dist/components/select/SelectNative.js +6 -6
  85. package/dist/components/select/SelectNative.js.map +1 -1
  86. package/dist/components/select/SelectOptions.js +9 -9
  87. package/dist/components/select/SelectOptions.js.map +1 -1
  88. package/dist/components/select/SelectPopover.js +14 -14
  89. package/dist/components/select/SelectPopover.js.map +1 -1
  90. package/dist/components/text-area/TextArea.d.ts +1 -1
  91. package/dist/components/text-area/TextArea.d.ts.map +1 -1
  92. package/dist/components/text-area/TextArea.js.map +1 -1
  93. package/dist/components/time-field/TimeField.d.ts +1 -1
  94. package/dist/components/time-field/TimeField.d.ts.map +1 -1
  95. package/dist/components/time-field/TimeField.js.map +1 -1
  96. package/dist/components/toggle-switch/ToggleSwitch.d.ts +2 -2
  97. package/dist/components/toggle-switch/ToggleSwitch.d.ts.map +1 -1
  98. package/dist/components/toggle-switch/ToggleSwitch.js.map +1 -1
  99. package/dist/ext/@internationalized/date/dist/private/DateFormatter.js +139 -0
  100. package/dist/ext/@internationalized/date/dist/private/DateFormatter.js.map +1 -0
  101. package/dist/index.css +159 -4
  102. package/dist/index.css.map +1 -1
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +5 -0
  106. package/dist/index.js.map +1 -1
  107. package/dist/packages/tapestry-render/dist/buildComponent-Dr2UOgFa.js.map +1 -0
  108. package/dist/packages/tapestry-render/dist/index.js.map +1 -0
  109. package/dist/packages/tapestry-render/dist/legacy.js.map +1 -0
  110. package/dist/packages/tapestry-render/dist/registry.js.map +1 -0
  111. package/dist/reactRender.css +4454 -4114
  112. package/dist/reactRender.css.map +1 -1
  113. package/dist/reactRender.js +2 -2
  114. package/dist/reactRenderLegacy.css +4454 -4114
  115. package/dist/reactRenderLegacy.css.map +1 -1
  116. package/dist/reactRenderLegacy.js +2 -2
  117. package/dist/unstable.css +374 -34
  118. package/dist/unstable.css.map +1 -1
  119. package/dist/unstable.js +5 -0
  120. package/dist/unstable.js.map +1 -1
  121. package/dist/utilities/Icon.js +2 -2
  122. package/dist/utilities/Icon.js.map +1 -1
  123. package/package.json +5 -5
  124. package/dist/tapestry-render/dist/buildComponent-Dr2UOgFa.js.map +0 -1
  125. package/dist/tapestry-render/dist/index.js.map +0 -1
  126. package/dist/tapestry-render/dist/legacy.js.map +0 -1
  127. package/dist/tapestry-render/dist/registry.js.map +0 -1
  128. /package/dist/{tapestry-render → packages/tapestry-render}/dist/buildComponent-Dr2UOgFa.js +0 -0
  129. /package/dist/{tapestry-render → packages/tapestry-render}/dist/index.js +0 -0
  130. /package/dist/{tapestry-render → packages/tapestry-render}/dist/legacy.js +0 -0
  131. /package/dist/{tapestry-render → packages/tapestry-render}/dist/registry.js +0 -0
@@ -0,0 +1,167 @@
1
+ import { getLocalTimeZone as $ad063034c8620db8$export$aa8b41735afcabd2 } from './../../ext/@internationalized/date/dist/private/queries.js';
2
+ import { parseDate as $58246871e4652552$export$6b862160d295c8e } from './../../ext/@internationalized/date/dist/private/string.js';
3
+ import { DateFormatter as $12a3c853105e5a70$export$ad991b66133851cf } from './../../ext/@internationalized/date/dist/private/DateFormatter.js';
4
+ import Icon from '../../utilities/Icon.js';
5
+ import React__default from 'react';
6
+
7
+ const ISO_DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
8
+ /**
9
+ * Locale used to build every `DateFormatter`. Resolved from the environment
10
+ * once so all columns share the same default, matching the behavior of the
11
+ * native `Intl` APIs these formatters replaced.
12
+ */
13
+ const DEFAULT_LOCALE = new Intl.DateTimeFormat().resolvedOptions().locale;
14
+ function isEmpty(value) {
15
+ return value === null || value === undefined;
16
+ }
17
+ function isDateValue(value) {
18
+ return (typeof value === "object" &&
19
+ value !== null &&
20
+ "calendar" in value &&
21
+ typeof value.toDate === "function");
22
+ }
23
+ function toNumber(value) {
24
+ if (typeof value === "number")
25
+ return Number.isFinite(value) ? value : null;
26
+ if (typeof value === "string" && value.trim() !== "") {
27
+ const parsed = Number(value);
28
+ return Number.isFinite(parsed) ? parsed : null;
29
+ }
30
+ return null;
31
+ }
32
+ function toDate(value) {
33
+ let date = null;
34
+ if (value instanceof Date) {
35
+ date = value;
36
+ }
37
+ else if (isDateValue(value)) {
38
+ date =
39
+ "timeZone" in value ? value.toDate() : value.toDate($ad063034c8620db8$export$aa8b41735afcabd2());
40
+ }
41
+ else if (typeof value === "number") {
42
+ date = new Date(value);
43
+ }
44
+ else if (typeof value === "string") {
45
+ if (ISO_DATE_ONLY.test(value)) {
46
+ // Parse ISO date-only strings as local dates to avoid time-zone drift.
47
+ date = $58246871e4652552$export$6b862160d295c8e(value).toDate($ad063034c8620db8$export$aa8b41735afcabd2());
48
+ }
49
+ else {
50
+ date = new Date(value);
51
+ }
52
+ }
53
+ return date && !Number.isNaN(date.getTime()) ? date : null;
54
+ }
55
+ const formatText = (value) => (isEmpty(value) ? "" : String(value));
56
+ /**
57
+ * The single source of truth for per-type behavior. To add a new column type:
58
+ * declare its literal + interface in `DataTableColumn.ts`, then add one entry
59
+ * here.
60
+ */
61
+ const columnTypeDefinitions = {
62
+ boolean: {
63
+ createFormatter: (column) => {
64
+ const trueLabel = column.trueLabel ?? "Yes";
65
+ const falseLabel = column.falseLabel ?? "No";
66
+ return (value) => {
67
+ if (isEmpty(value))
68
+ return "";
69
+ // A truthy value shows a check icon labeled with `trueLabel`; a falsy
70
+ // value shows nothing but keeps `falseLabel` in the DOM as
71
+ // visually-hidden text so the meaning is available to assistive tech.
72
+ return value ? (React__default.createElement(Icon, { symbol: "general#check", role: "img", "aria-label": trueLabel })) : (React__default.createElement("span", { className: "tds-data-table-cell-label--hidden" }, falseLabel));
73
+ };
74
+ },
75
+ },
76
+ currency: {
77
+ align: "end",
78
+ createFormatter: (column) => {
79
+ // Currency support is in beta and hardwired to USD for now.
80
+ const formatter = new Intl.NumberFormat(undefined, {
81
+ ...column.numberFormatOptions,
82
+ currency: "USD",
83
+ style: "currency",
84
+ });
85
+ return (value) => {
86
+ const num = toNumber(value);
87
+ return num === null ? "" : formatter.format(num);
88
+ };
89
+ },
90
+ isNumeric: true,
91
+ },
92
+ custom: {
93
+ createFormatter: () => formatText,
94
+ },
95
+ date: {
96
+ createFormatter: (column) => {
97
+ const formatter = new $12a3c853105e5a70$export$ad991b66133851cf(DEFAULT_LOCALE, column.dateFormatOptions ?? { dateStyle: "medium" });
98
+ return (value) => {
99
+ const date = toDate(value);
100
+ return date ? formatter.format(date) : "";
101
+ };
102
+ },
103
+ },
104
+ datetime: {
105
+ createFormatter: (column) => {
106
+ const formatter = new $12a3c853105e5a70$export$ad991b66133851cf(DEFAULT_LOCALE, column.dateFormatOptions ?? { dateStyle: "medium", timeStyle: "short" });
107
+ return (value) => {
108
+ const date = toDate(value);
109
+ return date ? formatter.format(date) : "";
110
+ };
111
+ },
112
+ },
113
+ enum: {
114
+ createFormatter: () => formatText,
115
+ },
116
+ number: {
117
+ align: "end",
118
+ createFormatter: (column) => {
119
+ const formatter = new Intl.NumberFormat(undefined, column.numberFormatOptions);
120
+ return (value) => {
121
+ const num = toNumber(value);
122
+ return num === null ? "" : formatter.format(num);
123
+ };
124
+ },
125
+ isNumeric: true,
126
+ },
127
+ string: {
128
+ createFormatter: () => formatText,
129
+ },
130
+ };
131
+ function resolveDefinition(column) {
132
+ // Fall back to the string definition if an unknown/undefined `type` slips
133
+ // through at runtime (e.g. untyped data); string formatting is always safe.
134
+ return (columnTypeDefinitions[column.type] ??
135
+ columnTypeDefinitions.string);
136
+ }
137
+ /**
138
+ * Turns a column into the everything-resolved shape the table renders from.
139
+ * This is the single place `render` and the type formatter are reconciled: a
140
+ * `render` prop and a value formatter both become one `renderCell(row)`, with
141
+ * `render` taking precedence. The type formatter is built at most once here
142
+ * (and only when there is no `render`), so callers should prepare each column
143
+ * once — `DataTable` does this in a `useMemo` keyed on the `columns` array, so
144
+ * pass a stable `columns` reference to avoid rebuilding formatters every render.
145
+ */
146
+ function prepareColumn(column) {
147
+ const definition = resolveDefinition(column);
148
+ let renderCell;
149
+ if (column.render) {
150
+ renderCell = column.render;
151
+ }
152
+ else {
153
+ // Localized cast: the registry is keyed by the same discriminant, but TS
154
+ // can't correlate the union member to its entry across the index.
155
+ const format = definition.createFormatter(column);
156
+ renderCell = (row) => format(row?.[column.name]);
157
+ }
158
+ return {
159
+ align: column.align ?? definition.align ?? "start",
160
+ column,
161
+ isNumeric: definition.isNumeric ?? false,
162
+ renderCell,
163
+ };
164
+ }
165
+
166
+ export { columnTypeDefinitions, isEmpty, prepareColumn };
167
+ //# sourceMappingURL=DataTableColumnTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableColumnTypes.js","sources":["../../../src/components/DataTable/DataTableColumnTypes.tsx"],"sourcesContent":["import {\n DateFormatter,\n type DateValue,\n getLocalTimeZone,\n parseDate,\n} from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport React, { type ReactNode } from \"react\"\n\nimport type { DataTableColumn, DataTableColumnAlign } from \"./DataTableColumn\"\n\nconst ISO_DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/\n\n/**\n * Locale used to build every `DateFormatter`. Resolved from the environment\n * once so all columns share the same default, matching the behavior of the\n * native `Intl` APIs these formatters replaced.\n */\nconst DEFAULT_LOCALE = new Intl.DateTimeFormat().resolvedOptions().locale\n\n/** Formats a single cell value. Produced per column by the registry. */\nexport type Formatter = (value: unknown) => ReactNode\n\n/** Renders a cell from the whole row. The unified shape a prepared column exposes. */\nexport type CellRenderer = (row: unknown) => ReactNode\n\nexport function isEmpty(value: unknown): value is null | undefined {\n return value === null || value === undefined\n}\n\nfunction isDateValue(value: unknown): value is DateValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"calendar\" in value &&\n typeof (value as { toDate?: unknown }).toDate === \"function\"\n )\n}\n\nfunction toNumber(value: unknown): number | null {\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null\n if (typeof value === \"string\" && value.trim() !== \"\") {\n const parsed = Number(value)\n return Number.isFinite(parsed) ? parsed : null\n }\n return null\n}\n\nfunction toDate(value: unknown): Date | null {\n let date: Date | null = null\n if (value instanceof Date) {\n date = value\n } else if (isDateValue(value)) {\n date =\n \"timeZone\" in value ? value.toDate() : value.toDate(getLocalTimeZone())\n } else if (typeof value === \"number\") {\n date = new Date(value)\n } else if (typeof value === \"string\") {\n if (ISO_DATE_ONLY.test(value)) {\n // Parse ISO date-only strings as local dates to avoid time-zone drift.\n date = parseDate(value).toDate(getLocalTimeZone())\n } else {\n date = new Date(value)\n }\n }\n return date && !Number.isNaN(date.getTime()) ? date : null\n}\n\n/**\n * Everything that varies per column `type`, co-located in one place: how the\n * column's values are formatted, its default alignment, and whether it counts\n * as numeric. Adding a column type is a single entry in\n * {@link columnTypeDefinitions} below.\n */\nexport interface ColumnTypeDefinition<C extends DataTableColumn> {\n /** Default alignment when the column doesn't set `align`. Omitted = \"start\". */\n align?: DataTableColumnAlign\n /**\n * Builds the per-column value formatter. Called once per column by\n * {@link prepareColumn}, so the `Intl`/`DateFormatter` instances it closes\n * over are constructed once per column rather than per render — provided the\n * consumer passes a stable `columns` reference (see `prepareColumn`).\n */\n createFormatter: (column: C) => Formatter\n /** Marks numeric types (drives the `--numeric` cell class). */\n isNumeric?: boolean\n}\n\n/**\n * Maps each column discriminant to a definition typed to that column's\n * interface, so `createFormatter` receives the correctly-narrowed column (e.g.\n * the `number` entry's `column` is `NumberColumn`). The mapped type also makes\n * a missing entry a compile error.\n */\ntype ColumnTypeRegistry = {\n [C in DataTableColumn as C[\"type\"]]: ColumnTypeDefinition<C>\n}\n\nconst formatText: Formatter = (value) => (isEmpty(value) ? \"\" : String(value))\n\n/**\n * The single source of truth for per-type behavior. To add a new column type:\n * declare its literal + interface in `DataTableColumn.ts`, then add one entry\n * here.\n */\nexport const columnTypeDefinitions: ColumnTypeRegistry = {\n boolean: {\n createFormatter: (column) => {\n const trueLabel = column.trueLabel ?? \"Yes\"\n const falseLabel = column.falseLabel ?? \"No\"\n return (value) => {\n if (isEmpty(value)) return \"\"\n // A truthy value shows a check icon labeled with `trueLabel`; a falsy\n // value shows nothing but keeps `falseLabel` in the DOM as\n // visually-hidden text so the meaning is available to assistive tech.\n return value ? (\n <Icon symbol=\"general#check\" role=\"img\" aria-label={trueLabel} />\n ) : (\n <span className=\"tds-data-table-cell-label--hidden\">\n {falseLabel}\n </span>\n )\n }\n },\n },\n currency: {\n align: \"end\",\n createFormatter: (column) => {\n // Currency support is in beta and hardwired to USD for now.\n const formatter = new Intl.NumberFormat(undefined, {\n ...column.numberFormatOptions,\n currency: \"USD\",\n style: \"currency\",\n })\n return (value) => {\n const num = toNumber(value)\n return num === null ? \"\" : formatter.format(num)\n }\n },\n isNumeric: true,\n },\n custom: {\n createFormatter: () => formatText,\n },\n date: {\n createFormatter: (column) => {\n const formatter = new DateFormatter(\n DEFAULT_LOCALE,\n column.dateFormatOptions ?? { dateStyle: \"medium\" }\n )\n return (value) => {\n const date = toDate(value)\n return date ? formatter.format(date) : \"\"\n }\n },\n },\n datetime: {\n createFormatter: (column) => {\n const formatter = new DateFormatter(\n DEFAULT_LOCALE,\n column.dateFormatOptions ?? { dateStyle: \"medium\", timeStyle: \"short\" }\n )\n return (value) => {\n const date = toDate(value)\n return date ? formatter.format(date) : \"\"\n }\n },\n },\n enum: {\n createFormatter: () => formatText,\n },\n number: {\n align: \"end\",\n createFormatter: (column) => {\n const formatter = new Intl.NumberFormat(\n undefined,\n column.numberFormatOptions\n )\n return (value) => {\n const num = toNumber(value)\n return num === null ? \"\" : formatter.format(num)\n }\n },\n isNumeric: true,\n },\n string: {\n createFormatter: () => formatText,\n },\n}\n\nfunction resolveDefinition(\n column: DataTableColumn\n): ColumnTypeDefinition<DataTableColumn> {\n // Fall back to the string definition if an unknown/undefined `type` slips\n // through at runtime (e.g. untyped data); string formatting is always safe.\n return (columnTypeDefinitions[column.type] ??\n columnTypeDefinitions.string) as ColumnTypeDefinition<DataTableColumn>\n}\n\n/** A column with everything the table needs to render its header and cells. */\nexport interface PreparedColumn {\n align: DataTableColumnAlign\n column: DataTableColumn\n isNumeric: boolean\n renderCell: CellRenderer\n}\n\n/**\n * Turns a column into the everything-resolved shape the table renders from.\n * This is the single place `render` and the type formatter are reconciled: a\n * `render` prop and a value formatter both become one `renderCell(row)`, with\n * `render` taking precedence. The type formatter is built at most once here\n * (and only when there is no `render`), so callers should prepare each column\n * once — `DataTable` does this in a `useMemo` keyed on the `columns` array, so\n * pass a stable `columns` reference to avoid rebuilding formatters every render.\n */\nexport function prepareColumn(column: DataTableColumn): PreparedColumn {\n const definition = resolveDefinition(column)\n let renderCell: CellRenderer\n if (column.render) {\n renderCell = column.render\n } else {\n // Localized cast: the registry is keyed by the same discriminant, but TS\n // can't correlate the union member to its entry across the index.\n const format = (\n definition.createFormatter as (c: DataTableColumn) => Formatter\n )(column)\n renderCell = (row) =>\n format((row as Record<string, unknown>)?.[column.name])\n }\n return {\n align: column.align ?? definition.align ?? \"start\",\n column,\n isNumeric: definition.isNumeric ?? false,\n renderCell,\n }\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,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3D;IACA,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,IAAI,OAAO;QAClD,MAAM;AACN,QAAA,SAAS,EAAE,UAAU,CAAC,SAAS,IAAI,KAAK;QACxC,UAAU;KACX;AACH;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare function getRowKey(row: unknown, index: number, getRowId?: (row: unknown) => number | string): number | string;
2
+ //# sourceMappingURL=DataTableRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableRow.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableRow.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CACvB,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,GAAG,MAAM,GAC3C,MAAM,GAAG,MAAM,CAIjB"}
@@ -0,0 +1,9 @@
1
+ function getRowKey(row, index, getRowId) {
2
+ if (getRowId)
3
+ return getRowId(row);
4
+ const id = row?.id;
5
+ return typeof id === "number" || typeof id === "string" ? id : index;
6
+ }
7
+
8
+ export { getRowKey };
9
+ //# sourceMappingURL=DataTableRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableRow.js","sources":["../../../src/components/DataTable/DataTableRow.ts"],"sourcesContent":["export function getRowKey(\n row: unknown,\n index: number,\n getRowId?: (row: unknown) => number | string\n): number | string {\n if (getRowId) return getRowId(row)\n const id = (row as Record<string, unknown>)?.id\n return typeof id === \"number\" || typeof id === \"string\" ? id : index\n}\n"],"names":[],"mappings":"SAAgB,SAAS,CACvB,GAAY,EACZ,KAAa,EACb,QAA4C,EAAA;AAE5C,IAAA,IAAI,QAAQ;AAAE,QAAA,OAAO,QAAQ,CAAC,GAAG,CAAC;AAClC,IAAA,MAAM,EAAE,GAAI,GAA+B,EAAE,EAAE;AAC/C,IAAA,OAAO,OAAO,EAAE,KAAK,QAAQ,IAAI,OAAO,EAAE,KAAK,QAAQ,GAAG,EAAE,GAAG,KAAK;AACtE;;;;"}
@@ -1,4 +1,5 @@
1
1
  import "./index.css";
2
- export type { DataTableColumn, DataTableColumnType, DataTableElementProps, DataTableProps, EnumColumn, NumberColumn, } from "./DataTable";
2
+ export type { DataTableElementProps, DataTableLoadingState, DataTableProps, } from "./DataTable";
3
3
  export { DataTable } from "./DataTable";
4
+ export type { BooleanColumn, CurrencyColumn, CustomColumn, DataTableColumn, DataTableColumnAlign, DataTableColumnType, DateColumn, DateTimeColumn, EnumColumn, NumberColumn, StringColumn, } from "./DataTableColumn";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,YAAY,GACb,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,YAAY,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,35 @@
1
+ import "./index.css";
2
+ import React, { type HTMLAttributes } from "react";
3
+ interface ButtonGroupBaseProps {
4
+ /** `Button`, `IconButton`, and/or `DropdownButton` elements. */
5
+ children: React.ReactNode;
6
+ }
7
+ interface ButtonGroupWithAriaLabel extends ButtonGroupBaseProps {
8
+ "aria-label": string;
9
+ "aria-labelledby"?: never;
10
+ }
11
+ interface ButtonGroupWithAriaLabelledBy extends ButtonGroupBaseProps {
12
+ "aria-label"?: never;
13
+ "aria-labelledby": string;
14
+ }
15
+ export type ButtonGroupProps = ButtonGroupWithAriaLabel | ButtonGroupWithAriaLabelledBy;
16
+ export type ButtonGroupElementProps = Omit<HTMLAttributes<HTMLDivElement>, keyof ButtonGroupProps> & ButtonGroupProps;
17
+ /**
18
+ * A container that visually attaches a row of Button/IconButton/DropdownButton
19
+ * elements into a single control — shared borders, radius on the outer corners
20
+ * only. Holds no state and contributes no JavaScript behavior; each child keeps
21
+ * its own click handler, kind, size, and disabled/loading state.
22
+ *
23
+ * **Required:** You must provide either:
24
+ * - `aria-label` - Names the group directly
25
+ * - `aria-labelledby` - ID of an external element that names the group
26
+ *
27
+ * @component
28
+ * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-buttongroup--docs | Storybook Documentation}
29
+ */
30
+ export declare const ButtonGroup: {
31
+ ({ children, className, ...restProps }: ButtonGroupElementProps): React.JSX.Element;
32
+ displayName: string;
33
+ };
34
+ export {};
35
+ //# sourceMappingURL=ButtonGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/button-group/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAElD,UAAU,oBAAoB;IAC5B,gEAAgE;IAChE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAC1B;AAED,UAAU,6BAA8B,SAAQ,oBAAoB;IAClE,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,MAAM,gBAAgB,GACxB,wBAAwB,GACxB,6BAA6B,CAAA;AAEjC,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,cAAc,CAAC,cAAc,CAAC,EAC9B,MAAM,gBAAgB,CACvB,GACC,gBAAgB,CAAA;AAElB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW;4CAIrB,uBAAuB;;CAQzB,CAAA"}
@@ -0,0 +1,24 @@
1
+ import classNames from 'classnames';
2
+ import React__default from 'react';
3
+
4
+ /**
5
+ * A container that visually attaches a row of Button/IconButton/DropdownButton
6
+ * elements into a single control — shared borders, radius on the outer corners
7
+ * only. Holds no state and contributes no JavaScript behavior; each child keeps
8
+ * its own click handler, kind, size, and disabled/loading state.
9
+ *
10
+ * **Required:** You must provide either:
11
+ * - `aria-label` - Names the group directly
12
+ * - `aria-labelledby` - ID of an external element that names the group
13
+ *
14
+ * @component
15
+ * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-buttongroup--docs | Storybook Documentation}
16
+ */
17
+ const ButtonGroup = ({ children, className, ...restProps }) => {
18
+ const combinedClassName = classNames("tds-button-group", className);
19
+ return (React__default.createElement("div", { ...restProps, className: combinedClassName, role: "group" }, children));
20
+ };
21
+ ButtonGroup.displayName = "ButtonGroup";
22
+
23
+ export { ButtonGroup };
24
+ //# sourceMappingURL=ButtonGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.js","sources":["../../../src/components/button-group/ButtonGroup.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport classNames from \"classnames\"\nimport React, { type HTMLAttributes } from \"react\"\n\ninterface ButtonGroupBaseProps {\n /** `Button`, `IconButton`, and/or `DropdownButton` elements. */\n children: React.ReactNode\n}\n\ninterface ButtonGroupWithAriaLabel extends ButtonGroupBaseProps {\n \"aria-label\": string\n \"aria-labelledby\"?: never\n}\n\ninterface ButtonGroupWithAriaLabelledBy extends ButtonGroupBaseProps {\n \"aria-label\"?: never\n \"aria-labelledby\": string\n}\n\nexport type ButtonGroupProps =\n | ButtonGroupWithAriaLabel\n | ButtonGroupWithAriaLabelledBy\n\nexport type ButtonGroupElementProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n keyof ButtonGroupProps\n> &\n ButtonGroupProps\n\n/**\n * A container that visually attaches a row of Button/IconButton/DropdownButton\n * elements into a single control — shared borders, radius on the outer corners\n * only. Holds no state and contributes no JavaScript behavior; each child keeps\n * its own click handler, kind, size, and disabled/loading state.\n *\n * **Required:** You must provide either:\n * - `aria-label` - Names the group directly\n * - `aria-labelledby` - ID of an external element that names the group\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-buttongroup--docs | Storybook Documentation}\n */\nexport const ButtonGroup = ({\n children,\n className,\n ...restProps\n}: ButtonGroupElementProps) => {\n const combinedClassName = classNames(\"tds-button-group\", className)\n\n return (\n <div {...restProps} className={combinedClassName} role=\"group\">\n {children}\n </div>\n )\n}\n\nButtonGroup.displayName = \"ButtonGroup\"\n"],"names":["React"],"mappings":";;;AA8BA;;;;;;;;;;;;AAYG;AACI,MAAM,WAAW,GAAG,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,GAAG,SAAS,EACY,KAAI;IAC5B,MAAM,iBAAiB,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC;AAEnE,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,GAAS,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAC,OAAO,EAAA,EAC3D,QAAQ,CACL;AAEV;AAEA,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
@@ -0,0 +1,4 @@
1
+ import "./index.css";
2
+ export type { ButtonGroupElementProps, ButtonGroupProps } from "./ButtonGroup";
3
+ export { ButtonGroup } from "./ButtonGroup";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,YAAY,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
@@ -3,8 +3,8 @@ import "./tds-indeterminate";
3
3
  import React, { InputHTMLAttributes } from "react";
4
4
  export type CheckboxSize = "md" | "sm";
5
5
  interface CheckboxBaseProps {
6
- /** Optional description text that appears below the checkbox label. */
7
- description?: string;
6
+ /** Optional description that appears below the checkbox label. */
7
+ description?: React.ReactNode;
8
8
  /** Whether the checkbox is in an indeterminate state. If true, checked should also be true. */
9
9
  indeterminate?: boolean;
10
10
  /** Whether the checkbox is in an invalid state. If true, include a description to explain why the checkbox is invalid. */
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,qBAAqB,CAAA;AAK5B,OAAO,KAAK,EAAE,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE9D,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAA;AAEtC,UAAU,iBAAiB;IACzB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,0HAA0H;IAC1H,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gCAAgC;IAChC,IAAI,CAAC,EAAE,YAAY,CAAA;CACpB;AAED,UAAU,iBAAkB,SAAQ,iBAAiB;IACnD,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB;;;;;OAKG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,0BAA2B,SAA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AAM,aAAa,GAAG,MAAM,CAC7B,GACC,aAAa,CAAA;AAEf;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,+FAyDpB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import \"./index.css\"\nimport \"./tds-indeterminate\"\n\nimport Icon from \"@utilities/Icon\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, InputHTMLAttributes } from \"react\"\n\nexport type CheckboxSize = \"md\" | \"sm\"\n\ninterface CheckboxBaseProps {\n /** Optional description text that appears below the checkbox label. */\n description?: string\n /** Whether the checkbox is in an indeterminate state. If true, checked should also be true. */\n indeterminate?: boolean\n /** Whether the checkbox is in an invalid state. If true, include a description to explain why the checkbox is invalid. */\n invalid?: boolean\n /** The size of the checkbox. */\n size?: CheckboxSize\n}\n\ninterface CheckboxWithLabel extends CheckboxBaseProps {\n \"aria-labelledby\"?: never\n /**\n * Label content for the checkbox. When using non-string content\n * (e.g. JSX), it must not contain interactive elements. This\n * includes native HTML elements such as `<a>` and `<button>`, as\n * well as Tapestry or Tapestry-React interactive components.\n */\n label: React.ReactNode\n}\n\ninterface CheckboxWithAriaLabelledBy extends CheckboxBaseProps {\n \"aria-labelledby\": string\n label?: never\n}\n\nexport type CheckboxProps = CheckboxWithLabel | CheckboxWithAriaLabelledBy\n\nexport type CheckboxElementProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n keyof CheckboxProps | \"type\"\n> &\n CheckboxProps\n\n/**\n * A checkbox component that renders as a checkbox input with label.\n * Supports various sizes, error states, and disabled states.\n *\n * **Required:** You must provide either:\n * - `label` - Label content for the checkbox\n * - `aria-labelledby` - ID of an external element that provides the label\n *\n * When using non-string content for `label` (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as `<a>` and\n * `<button>`, as well as Tapestry or Tapestry-React interactive components.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-checkbox--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxElementProps>(\n (\n {\n className,\n description,\n id,\n indeterminate = false,\n invalid,\n label,\n size = \"md\",\n ...restProps\n }: CheckboxElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n \"tds-checkbox\",\n size && size === \"sm\" && `tds-checkbox--sm`,\n invalid && \"tds-checkbox--invalid\",\n className\n )\n\n const stableId = useId()\n const checkboxId = id || `tds-checkbox-${stableId}`\n\n const WrapperElement = indeterminate ? \"tds-indeterminate\" : React.Fragment\n\n return (\n <div className={combinedClassName}>\n <WrapperElement>\n <input\n {...restProps}\n aria-describedby={\n description ? `${checkboxId}-description` : undefined\n }\n aria-invalid={invalid}\n id={checkboxId}\n ref={ref}\n type=\"checkbox\"\n />\n </WrapperElement>\n {label && <label htmlFor={checkboxId}>{label}</label>}\n {description && (\n <p\n id={`${checkboxId}-description`}\n className=\"tds-checkbox-description\"\n >\n <Icon\n className=\"tds-checkbox-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n aria-hidden\n />\n {description}\n </p>\n )}\n </div>\n )\n }\n)\n\nCheckbox.displayName = \"Checkbox\"\n"],"names":["React"],"mappings":";;;;;;AA6CA;;;;;;;;;;;;;;;AAeG;AACI,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,SAAS,EACT,WAAW,EACX,EAAE,EACF,aAAa,GAAG,KAAK,EACrB,OAAO,EACP,KAAK,EACL,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACS,EACvB,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAClC,cAAc,EACd,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAA,gBAAA,CAAkB,EAC3C,OAAO,IAAI,uBAAuB,EAClC,SAAS,CACV;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE;AACxB,IAAA,MAAM,UAAU,GAAG,EAAE,IAAI,CAAA,aAAA,EAAgB,QAAQ,EAAE;AAEnD,IAAA,MAAM,cAAc,GAAG,aAAa,GAAG,mBAAmB,GAAGA,cAAK,CAAC,QAAQ;AAE3E,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,iBAAiB,EAAA;AAC/B,QAAAA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,IAAA;AACb,YAAAA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,GACM,SAAS,EAAA,kBAAA,EAEX,WAAW,GAAG,CAAA,EAAG,UAAU,CAAA,YAAA,CAAc,GAAG,SAAS,EAAA,cAAA,EAEzC,OAAO,EACrB,EAAE,EAAE,UAAU,EACd,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,EAAA,CACf,CACa;AAChB,QAAA,KAAK,IAAIA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,OAAO,EAAE,UAAU,EAAA,EAAG,KAAK,CAAS;QACpD,WAAW,KACVA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EACE,EAAE,EAAE,CAAA,EAAG,UAAU,CAAA,YAAA,CAAc,EAC/B,SAAS,EAAC,0BAA0B,EAAA;YAEpCA,cAAA,CAAA,aAAA,CAAC,IAAI,IACH,SAAS,EAAC,uCAAuC,EACjD,MAAM,EAAC,8BAA8B,EAAA,aAAA,EAAA,IAAA,EAAA,CAErC;AACD,YAAA,WAAW,CACV,CACL,CACG;AAEV,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import \"./index.css\"\nimport \"./tds-indeterminate\"\n\nimport Icon from \"@utilities/Icon\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, InputHTMLAttributes } from \"react\"\n\nexport type CheckboxSize = \"md\" | \"sm\"\n\ninterface CheckboxBaseProps {\n /** Optional description that appears below the checkbox label. */\n description?: React.ReactNode\n /** Whether the checkbox is in an indeterminate state. If true, checked should also be true. */\n indeterminate?: boolean\n /** Whether the checkbox is in an invalid state. If true, include a description to explain why the checkbox is invalid. */\n invalid?: boolean\n /** The size of the checkbox. */\n size?: CheckboxSize\n}\n\ninterface CheckboxWithLabel extends CheckboxBaseProps {\n \"aria-labelledby\"?: never\n /**\n * Label content for the checkbox. When using non-string content\n * (e.g. JSX), it must not contain interactive elements. This\n * includes native HTML elements such as `<a>` and `<button>`, as\n * well as Tapestry or Tapestry-React interactive components.\n */\n label: React.ReactNode\n}\n\ninterface CheckboxWithAriaLabelledBy extends CheckboxBaseProps {\n \"aria-labelledby\": string\n label?: never\n}\n\nexport type CheckboxProps = CheckboxWithLabel | CheckboxWithAriaLabelledBy\n\nexport type CheckboxElementProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n keyof CheckboxProps | \"type\"\n> &\n CheckboxProps\n\n/**\n * A checkbox component that renders as a checkbox input with label.\n * Supports various sizes, error states, and disabled states.\n *\n * **Required:** You must provide either:\n * - `label` - Label content for the checkbox\n * - `aria-labelledby` - ID of an external element that provides the label\n *\n * When using non-string content for `label` (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as `<a>` and\n * `<button>`, as well as Tapestry or Tapestry-React interactive components.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-checkbox--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxElementProps>(\n (\n {\n className,\n description,\n id,\n indeterminate = false,\n invalid,\n label,\n size = \"md\",\n ...restProps\n }: CheckboxElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n \"tds-checkbox\",\n size && size === \"sm\" && `tds-checkbox--sm`,\n invalid && \"tds-checkbox--invalid\",\n className\n )\n\n const stableId = useId()\n const checkboxId = id || `tds-checkbox-${stableId}`\n\n const WrapperElement = indeterminate ? \"tds-indeterminate\" : React.Fragment\n\n return (\n <div className={combinedClassName}>\n <WrapperElement>\n <input\n {...restProps}\n aria-describedby={\n description ? `${checkboxId}-description` : undefined\n }\n aria-invalid={invalid}\n id={checkboxId}\n ref={ref}\n type=\"checkbox\"\n />\n </WrapperElement>\n {label && <label htmlFor={checkboxId}>{label}</label>}\n {description && (\n <p\n id={`${checkboxId}-description`}\n className=\"tds-checkbox-description\"\n >\n <Icon\n className=\"tds-checkbox-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n aria-hidden\n />\n {description}\n </p>\n )}\n </div>\n )\n }\n)\n\nCheckbox.displayName = \"Checkbox\"\n"],"names":["React"],"mappings":";;;;;;AA6CA;;;;;;;;;;;;;;;AAeG;AACI,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EACE,SAAS,EACT,WAAW,EACX,EAAE,EACF,aAAa,GAAG,KAAK,EACrB,OAAO,EACP,KAAK,EACL,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACS,EACvB,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAClC,cAAc,EACd,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAA,gBAAA,CAAkB,EAC3C,OAAO,IAAI,uBAAuB,EAClC,SAAS,CACV;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE;AACxB,IAAA,MAAM,UAAU,GAAG,EAAE,IAAI,CAAA,aAAA,EAAgB,QAAQ,EAAE;AAEnD,IAAA,MAAM,cAAc,GAAG,aAAa,GAAG,mBAAmB,GAAGA,cAAK,CAAC,QAAQ;AAE3E,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,iBAAiB,EAAA;AAC/B,QAAAA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,IAAA;AACb,YAAAA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,GACM,SAAS,EAAA,kBAAA,EAEX,WAAW,GAAG,CAAA,EAAG,UAAU,CAAA,YAAA,CAAc,GAAG,SAAS,EAAA,cAAA,EAEzC,OAAO,EACrB,EAAE,EAAE,UAAU,EACd,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,EAAA,CACf,CACa;AAChB,QAAA,KAAK,IAAIA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,OAAO,EAAE,UAAU,EAAA,EAAG,KAAK,CAAS;QACpD,WAAW,KACVA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EACE,EAAE,EAAE,CAAA,EAAG,UAAU,CAAA,YAAA,CAAc,EAC/B,SAAS,EAAC,0BAA0B,EAAA;YAEpCA,cAAA,CAAA,aAAA,CAAC,IAAI,IACH,SAAS,EAAC,uCAAuC,EACjD,MAAM,EAAC,8BAA8B,EAAA,aAAA,EAAA,IAAA,EAAA,CAErC;AACD,YAAA,WAAW,CACV,CACL,CACG;AAEV,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -3,7 +3,7 @@ import React, { FieldsetHTMLAttributes } from "react";
3
3
  export type CheckboxGroupSize = "md" | "sm";
4
4
  export interface CheckboxGroupProps {
5
5
  /** Optional description or error message rendered below the legend. */
6
- description?: string;
6
+ description?: React.ReactNode;
7
7
  /** If true, adds aria-invalid and styles the description as an error. */
8
8
  invalid?: boolean;
9
9
  /** The group label. Renders as <legend>. Required. */
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAA;AAE3C,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,kBAAkB,CACzB,GACC,kBAAkB,CAAA;AAEpB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAW,EACX,GAAG,SAAS,EACb,EAAE,yBAAyB,qBAiC3B"}
1
+ {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAA;AAE3C,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,kBAAkB,CACzB,GACC,kBAAkB,CAAA;AAEpB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAW,EACX,GAAG,SAAS,EACb,EAAE,yBAAyB,qBAiC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.js","sources":["../../../src/components/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport Icon from \"@utilities/Icon\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { FieldsetHTMLAttributes } from \"react\"\n\nexport type CheckboxGroupSize = \"md\" | \"sm\"\n\nexport interface CheckboxGroupProps {\n /** Optional description or error message rendered below the legend. */\n description?: string\n /** If true, adds aria-invalid and styles the description as an error. */\n invalid?: boolean\n /** The group label. Renders as <legend>. Required. */\n label: string\n /** Sets font size for the legend and description. */\n size?: CheckboxGroupSize\n}\n\nexport type CheckboxGroupElementProps = Omit<\n FieldsetHTMLAttributes<HTMLFieldSetElement>,\n keyof CheckboxGroupProps\n> &\n CheckboxGroupProps\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n * Use it to group two or more checkboxes that share a common question or label.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-checkbox-group--docs | Storybook Documentation}\n */\nexport function CheckboxGroup({\n children,\n className,\n description,\n invalid,\n label,\n size = \"md\",\n ...restProps\n}: CheckboxGroupElementProps) {\n const combinedClassName = classNames(\n \"tds-checkbox-group\",\n size === \"sm\" && \"tds-checkbox-group--sm\",\n className\n )\n const stableId = useId()\n\n const displayDescription =\n description || (invalid ? \"One or more checkboxes are invalid.\" : undefined)\n const descriptionId = `tds-checkbox-group-${stableId}-description`\n\n return (\n <fieldset\n {...restProps}\n aria-describedby={displayDescription ? descriptionId : undefined}\n aria-invalid={invalid || undefined}\n className={combinedClassName}\n >\n <legend>{label}</legend>\n {displayDescription && (\n <p id={descriptionId} className=\"tds-checkbox-group-description\">\n <Icon\n aria-hidden\n className=\"tds-checkbox-group-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {displayDescription}\n </p>\n )}\n <div className=\"tds-checkbox-group-fields\">{children}</div>\n </fieldset>\n )\n}\n"],"names":["React"],"mappings":";;;;;AA0BA;;;;;;AAMG;AACG,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACc,EAAA;AAC1B,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,oBAAoB,EACpB,IAAI,KAAK,IAAI,IAAI,wBAAwB,EACzC,SAAS,CACV;AACD,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE;AAExB,IAAA,MAAM,kBAAkB,GACtB,WAAW,KAAK,OAAO,GAAG,qCAAqC,GAAG,SAAS,CAAC;AAC9E,IAAA,MAAM,aAAa,GAAG,CAAA,mBAAA,EAAsB,QAAQ,cAAc;IAElE,QACEA,8CACM,SAAS,EAAA,kBAAA,EACK,kBAAkB,GAAG,aAAa,GAAG,SAAS,kBAClD,OAAO,IAAI,SAAS,EAClC,SAAS,EAAE,iBAAiB,EAAA;AAE5B,QAAAA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAA,EAAS,KAAK,CAAU;QACvB,kBAAkB,KACjBA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,aAAa,EAAE,SAAS,EAAC,gCAAgC,EAAA;YAC9DA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,6CAA6C,EACvD,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,kBAAkB,CACjB,CACL;QACDA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2BAA2B,EAAA,EAAE,QAAQ,CAAO,CAClD;AAEf;;;;"}
1
+ {"version":3,"file":"CheckboxGroup.js","sources":["../../../src/components/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport Icon from \"@utilities/Icon\"\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { FieldsetHTMLAttributes } from \"react\"\n\nexport type CheckboxGroupSize = \"md\" | \"sm\"\n\nexport interface CheckboxGroupProps {\n /** Optional description or error message rendered below the legend. */\n description?: React.ReactNode\n /** If true, adds aria-invalid and styles the description as an error. */\n invalid?: boolean\n /** The group label. Renders as <legend>. Required. */\n label: string\n /** Sets font size for the legend and description. */\n size?: CheckboxGroupSize\n}\n\nexport type CheckboxGroupElementProps = Omit<\n FieldsetHTMLAttributes<HTMLFieldSetElement>,\n keyof CheckboxGroupProps\n> &\n CheckboxGroupProps\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n * Use it to group two or more checkboxes that share a common question or label.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-checkbox-group--docs | Storybook Documentation}\n */\nexport function CheckboxGroup({\n children,\n className,\n description,\n invalid,\n label,\n size = \"md\",\n ...restProps\n}: CheckboxGroupElementProps) {\n const combinedClassName = classNames(\n \"tds-checkbox-group\",\n size === \"sm\" && \"tds-checkbox-group--sm\",\n className\n )\n const stableId = useId()\n\n const displayDescription =\n description || (invalid ? \"One or more checkboxes are invalid.\" : undefined)\n const descriptionId = `tds-checkbox-group-${stableId}-description`\n\n return (\n <fieldset\n {...restProps}\n aria-describedby={displayDescription ? descriptionId : undefined}\n aria-invalid={invalid || undefined}\n className={combinedClassName}\n >\n <legend>{label}</legend>\n {displayDescription && (\n <p id={descriptionId} className=\"tds-checkbox-group-description\">\n <Icon\n aria-hidden\n className=\"tds-checkbox-group-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {displayDescription}\n </p>\n )}\n <div className=\"tds-checkbox-group-fields\">{children}</div>\n </fieldset>\n )\n}\n"],"names":["React"],"mappings":";;;;;AA0BA;;;;;;AAMG;AACG,SAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACc,EAAA;AAC1B,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,oBAAoB,EACpB,IAAI,KAAK,IAAI,IAAI,wBAAwB,EACzC,SAAS,CACV;AACD,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE;AAExB,IAAA,MAAM,kBAAkB,GACtB,WAAW,KAAK,OAAO,GAAG,qCAAqC,GAAG,SAAS,CAAC;AAC9E,IAAA,MAAM,aAAa,GAAG,CAAA,mBAAA,EAAsB,QAAQ,cAAc;IAElE,QACEA,8CACM,SAAS,EAAA,kBAAA,EACK,kBAAkB,GAAG,aAAa,GAAG,SAAS,kBAClD,OAAO,IAAI,SAAS,EAClC,SAAS,EAAE,iBAAiB,EAAA;AAE5B,QAAAA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAA,EAAS,KAAK,CAAU;QACvB,kBAAkB,KACjBA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,aAAa,EAAE,SAAS,EAAC,gCAAgC,EAAA;YAC9DA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,6CAA6C,EACvD,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,kBAAkB,CACjB,CACL;QACDA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,2BAA2B,EAAA,EAAE,QAAQ,CAAO,CAClD;AAEf;;;;"}
@@ -11,7 +11,7 @@ export interface ComboBoxProps<T extends object = object> {
11
11
  /** The contents of the listbox. */
12
12
  children: ComboBoxChildren<T>;
13
13
  /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */
14
- description?: string;
14
+ description?: ReactNode;
15
15
  /** Disables the field and trigger button. */
16
16
  disabled?: boolean;
17
17
  /** Custom filter function for determining if an item should appear in the list. */
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,C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IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,KAAK,0BAA0B,GAAG,YAAY,CAAA;AAE9C,KAAK,6BAA6B,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAA;AAEvE,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAC5D,+BAA+B,CAC7B,gBAAgB,CAAC,CAAC,CAAC,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,6BAA6B,CAC9B,CAAA;AAEH;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,EAC7C,SAAS,EACT,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,wBAAwB,CAAC,CAAC,CAAC,qBAQ7B;AAED,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,QAAQ,EAAE,SAAS,CAAA;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,KAAK,gCAAgC,GAAG,cAAc,CAAA;AAEtD,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAC/D,+BAA+B,CAC7B,mBAAmB,CAAC,CAAC,CAAC,EACtB,oBAAoB,EACpB,KAAK,EACL,gCAAgC,CACjC,CAAA;AAEH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,EAChD,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EACb,EAAE,2BAA2B,CAAC,CAAC,CAAC,qBAYhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","sources":["../../../src/components/combo-box/ComboBox.tsx"],"sourcesContent":["import \"../button/btn.css\"\nimport \"../field/index.css\"\nimport \"./index.css\"\n\nimport LoadingSpinner from \"@components/internal/LoadingSpinner\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React, { type ReactNode } from \"react\"\nimport {\n Button,\n Collection,\n ComboBox as AriaComboBox,\n type ComboBoxProps as AriaComboBoxProps,\n Input,\n type Key,\n Label,\n ListBox,\n ListBoxItem,\n type ListBoxItemProps,\n ListBoxLoadMoreItem,\n type ListBoxProps as AriaListBoxProps,\n ListBoxSection,\n type ListBoxSectionProps,\n Popover,\n Text,\n} from \"react-aria-components/ComboBox\"\nimport { Group } from \"react-aria-components/Group\"\nimport { Header } from \"react-aria-components/Header\"\n\nexport type ComboBoxSize = \"md\" | \"lg\"\n\nexport type ComboBoxLoadingState =\n | \"error\"\n | \"filtering\"\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n\ntype ComboBoxChildren<T extends object> = NonNullable<\n AriaListBoxProps<T>[\"children\"]\n>\n\nexport interface ComboBoxProps<T extends object = object> {\n /** The contents of the listbox. */\n children: ComboBoxChildren<T>\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: string\n /** Disables the field and trigger button. */\n disabled?: boolean\n /** Custom filter function for determining if an item should appear in the list. */\n filter?: (textValue: string, inputValue: string) => boolean\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /**\n * Async loading state for the listbox.\n * - `\"loading\"`: while the collection is empty, replaces the empty state with a spinner.\n * - `\"loadingMore\"`: shows an inline spinner at the bottom of the listbox (use with `onLoadMore`).\n * - Other values render as `\"idle\"`.\n */\n loadingState?: ComboBoxLoadingState\n /**\n * The interaction that opens the popover.\n * - `\"input\"`: opens when the user enters text in the input.\n * - `\"focus\"`: opens when the user focuses (via click or keyboard) into the input.\n * - `\"manual\"`: opens only via the trigger button or arrow keys.\n * @default \"focus\"\n */\n menuTrigger?: \"focus\" | \"input\" | \"manual\"\n /**\n * Called when the selected value(s) change.\n * Receives `Key[]` when `selectionMode` is `\"multiple\"`, otherwise `Key | null`.\n */\n onChange?: ((value: Key | null) => void) | ((value: Key[]) => void)\n /** Called when the user scrolls near the bottom of the listbox. Pair with `loadingState` for infinite scroll. */\n onLoadMore?: () => void\n /** Placeholder text for the input. */\n placeholder?: string\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** Content to display when there are no items in the list. Defaults to \"No results\". */\n renderEmptyState?: ReactNode | (() => ReactNode)\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /** The size of the combo box. */\n size?: ComboBoxSize\n}\n\ntype AriaComboBoxPropsToOmit = \"slot\"\n\ntype AriaComboBoxPropsToInclude =\n | \"allowsEmptyCollection\"\n | \"defaultInputValue\"\n | \"defaultItems\"\n | \"defaultValue\"\n | \"disabledKeys\"\n | \"inputValue\"\n | \"items\"\n | \"name\"\n | \"onInputChange\"\n | \"selectionMode\"\n | \"value\"\n\nexport type ComboBoxElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n AriaComboBoxProps<T, \"single\" | \"multiple\">,\n ComboBoxProps<T>,\n AriaComboBoxPropsToOmit,\n AriaComboBoxPropsToInclude\n >\n\nfunction resolveEmptyState(value: ReactNode | (() => ReactNode)): ReactNode {\n return typeof value === \"function\" ? value() : value\n}\n\n/**\n * A combo box combines a text input with a filterable popover\n * listbox, allowing users to type to search and select from a list of options.\n *\n * It supports both single and multiple selection (`selectionMode`), custom filtering,\n * and asynchronous data loading with infinite scroll capabilities (`loadingState` and `onLoadMore`).\n * Collections can be either static or dynamic, managed via the `children`, `items`,\n * or `defaultItems` props. To construct the dropdown list, compose this component\n * with `ComboBoxItem` for individual options and `ComboBoxSection` for grouping.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBox<T extends object>({\n allowsEmptyCollection = true,\n children,\n className,\n description,\n disabled,\n filter,\n hideLabel,\n invalid,\n label,\n loadingState,\n menuTrigger = \"focus\",\n onChange,\n onLoadMore,\n placeholder,\n readOnly,\n renderEmptyState = \"No results\",\n required,\n size = \"md\",\n ...restProps\n}: ComboBoxElementProps<T>) {\n const combinedClassName = classNames(\n \"tds-field tds-combo-box\",\n {\n \"tds-combo-box--lg\": size === \"lg\",\n \"tds-field--lg\": size === \"lg\",\n },\n className\n )\n\n const loadMoreItem = onLoadMore && (\n <ListBoxLoadMoreItem\n className=\"tds-combo-box-load-more\"\n isLoading={loadingState === \"loadingMore\"}\n onLoadMore={onLoadMore}\n >\n <div aria-label=\"Loading more\" role=\"status\">\n <LoadingSpinner />\n </div>\n </ListBoxLoadMoreItem>\n )\n\n const renderChildren = () => {\n if (typeof children === \"function\") {\n return (\n <Collection items={restProps.items ?? restProps.defaultItems}>\n {children}\n </Collection>\n )\n }\n return children\n }\n\n return (\n // React Aria's ComboBox is generic over selection mode (M). We instantiate\n // it with the union \"single\" | \"multiple\" so value/defaultValue/selectionMode\n // accept both shapes. onChange still needs a cast because our type is a union\n // of function types (to allow narrower handlers like\n // `setValue: (Key|null) => void`), which isn't assignable to RAC's\n // single-function signature.\n <AriaComboBox<T, \"single\" | \"multiple\">\n {...restProps}\n allowsEmptyCollection={allowsEmptyCollection}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultFilter={filter}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n menuTrigger={menuTrigger}\n onChange={onChange as (value: Key | Key[] | null) => void}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <Group className=\"tds-field-control tds-combo-box-field\">\n <Input className=\"tds-combo-box-input\" placeholder={placeholder} />\n {menuTrigger !== \"focus\" && !readOnly && (\n <Button className=\"tds-combo-box-button tds-btn tds-btn--infield\">\n <Icon aria-hidden symbol=\"general#down-caret\" />\n </Button>\n )}\n </Group>\n <Popover className=\"tds-combo-box-popover\">\n <ListBox\n className=\"tds-combo-box-list\"\n renderEmptyState={\n allowsEmptyCollection\n ? () => (\n <div\n aria-label={\n loadingState === \"loading\" ? \"Loading\" : undefined\n }\n className=\"tds-combo-box-empty-state\"\n role={loadingState === \"loading\" ? \"status\" : undefined}\n >\n {loadingState === \"loading\" ? (\n <LoadingSpinner />\n ) : (\n resolveEmptyState(renderEmptyState)\n )}\n </div>\n )\n : undefined\n }\n >\n {renderChildren()}\n {loadMoreItem}\n </ListBox>\n </Popover>\n {description && (\n <Text className=\"tds-field-description\" slot=\"description\">\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaComboBox>\n )\n}\n\nexport interface ComboBoxItemProps {\n /** Disables the item. */\n disabled?: boolean\n}\n\ntype AriaListBoxItemPropsToOmit = \"isDisabled\"\n\ntype AriaListBoxItemPropsToInclude = \"onAction\" | \"textValue\" | \"value\"\n\nexport type ComboBoxItemElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxItemProps<T>,\n ComboBoxItemProps,\n AriaListBoxItemPropsToOmit,\n AriaListBoxItemPropsToInclude\n >\n\n/**\n * A selectable option within a {@link ComboBox}. Renders as a listbox item.\n *\n * Provide an `id` (or `key` when rendering from a collection) to identify the\n * option, and `textValue` when the visible children are not plain text so\n * type-ahead and screen readers have a stable label to use.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxItem<T extends object>({\n className,\n disabled,\n ...restProps\n}: ComboBoxItemElementProps<T>) {\n return (\n <ListBoxItem\n {...restProps}\n className={classNames(\"tds-combo-box-list-item\", className)}\n isDisabled={disabled}\n />\n )\n}\n\nexport interface ComboBoxSectionProps {\n /** The items rendered within the section. */\n children: ReactNode\n /** Optional heading text rendered above the section's items. */\n title?: string\n}\n\ntype AriaListBoxSectionPropsToInclude = \"dependencies\"\n\nexport type ComboBoxSectionElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxSectionProps<T>,\n ComboBoxSectionProps,\n never,\n AriaListBoxSectionPropsToInclude\n >\n\n/**\n * A group of related {@link ComboBoxItem}s within a {@link ComboBox}. Renders\n * an optional `title` heading above its items.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxSection<T extends object>({\n children,\n className,\n title,\n ...restProps\n}: ComboBoxSectionElementProps<T>) {\n return (\n <ListBoxSection\n {...restProps}\n className={classNames(\"tds-combo-box-list-section\", className)}\n >\n {title && (\n <Header className=\"tds-combo-box-section-header\">{title}</Header>\n )}\n {children}\n </ListBoxSection>\n )\n}\n"],"names":["React","AriaComboBox"],"mappings":";;;;;;;;AAoHA,SAAS,iBAAiB,CAAC,KAAoC,EAAA;AAC7D,IAAA,OAAO,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,EAAE,GAAG,KAAK;AACtD;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,QAAQ,CAAmB,EACzC,qBAAqB,GAAG,IAAI,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,SAAS,EACT,OAAO,EACP,KAAK,EACL,YAAY,EACZ,WAAW,GAAG,OAAO,EACrB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,QAAQ,EACR,gBAAgB,GAAG,YAAY,EAC/B,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACY,EAAA;AACxB,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,yBAAyB,EACzB;QACE,mBAAmB,EAAE,IAAI,KAAK,IAAI;QAClC,eAAe,EAAE,IAAI,KAAK,IAAI;KAC/B,EACD,SAAS,CACV;IAED,MAAM,YAAY,GAAG,UAAU,KAC7BA,cAAA,CAAA,aAAA,CAAC,mBAAmB,IAClB,SAAS,EAAC,yBAAyB,EACnC,SAAS,EAAE,YAAY,KAAK,aAAa,EACzC,UAAU,EAAE,UAAU,EAAA;AAEtB,QAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAA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AA,CAAC,cAAc,EAAA,EAAA,GACT,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAA;QAE7D,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,8BAA8B,EAAA,EAAE,KAAK,CAAU,CAClE;QACA,QAAQ,CACM;AAErB;;;;"}
1
+ {"version":3,"file":"ComboBox.js","sources":["../../../src/components/combo-box/ComboBox.tsx"],"sourcesContent":["import \"../button/btn.css\"\nimport \"../field/index.css\"\nimport \"./index.css\"\n\nimport LoadingSpinner from \"@components/internal/LoadingSpinner\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React, { type ReactNode } from \"react\"\nimport {\n Button,\n Collection,\n ComboBox as AriaComboBox,\n type ComboBoxProps as AriaComboBoxProps,\n Input,\n type Key,\n Label,\n ListBox,\n ListBoxItem,\n type ListBoxItemProps,\n ListBoxLoadMoreItem,\n type ListBoxProps as AriaListBoxProps,\n ListBoxSection,\n type ListBoxSectionProps,\n Popover,\n Text,\n} from \"react-aria-components/ComboBox\"\nimport { Group } from \"react-aria-components/Group\"\nimport { Header } from \"react-aria-components/Header\"\n\nexport type ComboBoxSize = \"md\" | \"lg\"\n\nexport type ComboBoxLoadingState =\n | \"error\"\n | \"filtering\"\n | \"idle\"\n | \"loading\"\n | \"loadingMore\"\n | \"sorting\"\n\ntype ComboBoxChildren<T extends object> = NonNullable<\n AriaListBoxProps<T>[\"children\"]\n>\n\nexport interface ComboBoxProps<T extends object = object> {\n /** The contents of the listbox. */\n children: ComboBoxChildren<T>\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: ReactNode\n /** Disables the field and trigger button. */\n disabled?: boolean\n /** Custom filter function for determining if an item should appear in the list. */\n filter?: (textValue: string, inputValue: string) => boolean\n /** If `true`, the `label` text is rendered as an `aria-label` instead of a visible label element. */\n hideLabel?: boolean\n /** Whether the input is in an invalid state. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /**\n * Async loading state for the listbox.\n * - `\"loading\"`: while the collection is empty, replaces the empty state with a spinner.\n * - `\"loadingMore\"`: shows an inline spinner at the bottom of the listbox (use with `onLoadMore`).\n * - Other values render as `\"idle\"`.\n */\n loadingState?: ComboBoxLoadingState\n /**\n * The interaction that opens the popover.\n * - `\"input\"`: opens when the user enters text in the input.\n * - `\"focus\"`: opens when the user focuses (via click or keyboard) into the input.\n * - `\"manual\"`: opens only via the trigger button or arrow keys.\n * @default \"focus\"\n */\n menuTrigger?: \"focus\" | \"input\" | \"manual\"\n /**\n * Called when the selected value(s) change.\n * Receives `Key[]` when `selectionMode` is `\"multiple\"`, otherwise `Key | null`.\n */\n onChange?: ((value: Key | null) => void) | ((value: Key[]) => void)\n /** Called when the user scrolls near the bottom of the listbox. Pair with `loadingState` for infinite scroll. */\n onLoadMore?: () => void\n /** Placeholder text for the input. */\n placeholder?: string\n /** If `true`, allows the value to be read but not changed. */\n readOnly?: boolean\n /** Content to display when there are no items in the list. Defaults to \"No results\". */\n renderEmptyState?: ReactNode | (() => ReactNode)\n /** If `true`, appends an asterisk at the end of the label text. */\n required?: boolean\n /** The size of the combo box. */\n size?: ComboBoxSize\n}\n\ntype AriaComboBoxPropsToOmit = \"slot\"\n\ntype AriaComboBoxPropsToInclude =\n | \"allowsEmptyCollection\"\n | \"defaultInputValue\"\n | \"defaultItems\"\n | \"defaultValue\"\n | \"disabledKeys\"\n | \"inputValue\"\n | \"items\"\n | \"name\"\n | \"onInputChange\"\n | \"selectionMode\"\n | \"value\"\n\nexport type ComboBoxElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n AriaComboBoxProps<T, \"single\" | \"multiple\">,\n ComboBoxProps<T>,\n AriaComboBoxPropsToOmit,\n AriaComboBoxPropsToInclude\n >\n\nfunction resolveEmptyState(value: ReactNode | (() => ReactNode)): ReactNode {\n return typeof value === \"function\" ? value() : value\n}\n\n/**\n * A combo box combines a text input with a filterable popover\n * listbox, allowing users to type to search and select from a list of options.\n *\n * It supports both single and multiple selection (`selectionMode`), custom filtering,\n * and asynchronous data loading with infinite scroll capabilities (`loadingState` and `onLoadMore`).\n * Collections can be either static or dynamic, managed via the `children`, `items`,\n * or `defaultItems` props. To construct the dropdown list, compose this component\n * with `ComboBoxItem` for individual options and `ComboBoxSection` for grouping.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBox<T extends object>({\n allowsEmptyCollection = true,\n children,\n className,\n description,\n disabled,\n filter,\n hideLabel,\n invalid,\n label,\n loadingState,\n menuTrigger = \"focus\",\n onChange,\n onLoadMore,\n placeholder,\n readOnly,\n renderEmptyState = \"No results\",\n required,\n size = \"md\",\n ...restProps\n}: ComboBoxElementProps<T>) {\n const combinedClassName = classNames(\n \"tds-field tds-combo-box\",\n {\n \"tds-combo-box--lg\": size === \"lg\",\n \"tds-field--lg\": size === \"lg\",\n },\n className\n )\n\n const loadMoreItem = onLoadMore && (\n <ListBoxLoadMoreItem\n className=\"tds-combo-box-load-more\"\n isLoading={loadingState === \"loadingMore\"}\n onLoadMore={onLoadMore}\n >\n <div aria-label=\"Loading more\" role=\"status\">\n <LoadingSpinner />\n </div>\n </ListBoxLoadMoreItem>\n )\n\n const renderChildren = () => {\n if (typeof children === \"function\") {\n return (\n <Collection items={restProps.items ?? restProps.defaultItems}>\n {children}\n </Collection>\n )\n }\n return children\n }\n\n return (\n // React Aria's ComboBox is generic over selection mode (M). We instantiate\n // it with the union \"single\" | \"multiple\" so value/defaultValue/selectionMode\n // accept both shapes. onChange still needs a cast because our type is a union\n // of function types (to allow narrower handlers like\n // `setValue: (Key|null) => void`), which isn't assignable to RAC's\n // single-function signature.\n <AriaComboBox<T, \"single\" | \"multiple\">\n {...restProps}\n allowsEmptyCollection={allowsEmptyCollection}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultFilter={filter}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n menuTrigger={menuTrigger}\n onChange={onChange as (value: Key | Key[] | null) => void}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <Group className=\"tds-field-control tds-combo-box-field\">\n <Input className=\"tds-combo-box-input\" placeholder={placeholder} />\n {menuTrigger !== \"focus\" && !readOnly && (\n <Button className=\"tds-combo-box-button tds-btn tds-btn--infield\">\n <Icon aria-hidden symbol=\"general#down-caret\" />\n </Button>\n )}\n </Group>\n <Popover className=\"tds-combo-box-popover\">\n <ListBox\n className=\"tds-combo-box-list\"\n renderEmptyState={\n allowsEmptyCollection\n ? () => (\n <div\n aria-label={\n loadingState === \"loading\" ? \"Loading\" : undefined\n }\n className=\"tds-combo-box-empty-state\"\n role={loadingState === \"loading\" ? \"status\" : undefined}\n >\n {loadingState === \"loading\" ? (\n <LoadingSpinner />\n ) : (\n resolveEmptyState(renderEmptyState)\n )}\n </div>\n )\n : undefined\n }\n >\n {renderChildren()}\n {loadMoreItem}\n </ListBox>\n </Popover>\n {description && (\n <Text className=\"tds-field-description\" slot=\"description\">\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaComboBox>\n )\n}\n\nexport interface ComboBoxItemProps {\n /** Disables the item. */\n disabled?: boolean\n}\n\ntype AriaListBoxItemPropsToOmit = \"isDisabled\"\n\ntype AriaListBoxItemPropsToInclude = \"onAction\" | \"textValue\" | \"value\"\n\nexport type ComboBoxItemElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxItemProps<T>,\n ComboBoxItemProps,\n AriaListBoxItemPropsToOmit,\n AriaListBoxItemPropsToInclude\n >\n\n/**\n * A selectable option within a {@link ComboBox}. Renders as a listbox item.\n *\n * Provide an `id` (or `key` when rendering from a collection) to identify the\n * option, and `textValue` when the visible children are not plain text so\n * type-ahead and screen readers have a stable label to use.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxItem<T extends object>({\n className,\n disabled,\n ...restProps\n}: ComboBoxItemElementProps<T>) {\n return (\n <ListBoxItem\n {...restProps}\n className={classNames(\"tds-combo-box-list-item\", className)}\n isDisabled={disabled}\n />\n )\n}\n\nexport interface ComboBoxSectionProps {\n /** The items rendered within the section. */\n children: ReactNode\n /** Optional heading text rendered above the section's items. */\n title?: string\n}\n\ntype AriaListBoxSectionPropsToInclude = \"dependencies\"\n\nexport type ComboBoxSectionElementProps<T extends object = object> =\n CombineAriaPropsWithCustomProps<\n ListBoxSectionProps<T>,\n ComboBoxSectionProps,\n never,\n AriaListBoxSectionPropsToInclude\n >\n\n/**\n * A group of related {@link ComboBoxItem}s within a {@link ComboBox}. Renders\n * an optional `title` heading above its items.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-combobox--docs | Storybook Documentation}\n */\nexport function ComboBoxSection<T extends object>({\n children,\n className,\n title,\n ...restProps\n}: ComboBoxSectionElementProps<T>) {\n return (\n <ListBoxSection\n {...restProps}\n className={classNames(\"tds-combo-box-list-section\", className)}\n >\n {title && (\n <Header className=\"tds-combo-box-section-header\">{title}</Header>\n )}\n {children}\n </ListBoxSection>\n )\n}\n"],"names":["React","AriaComboBox"],"mappings":";;;;;;;;AAoHA,SAAS,iBAAiB,CAAC,KAAoC,EAAA;AAC7D,IAAA,OAAO,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,EAAE,GAAG,KAAK;AACtD;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,QAAQ,CAAmB,EACzC,qBAAqB,GAAG,IAAI,EAC5B,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,MAAM,EACN,SAAS,EACT,OAAO,EACP,KAAK,EACL,YAAY,EACZ,WAAW,GAAG,OAAO,EACrB,QAAQ,E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BAEH,SAAS,EAAC,oCAAoC,EAC9C,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACY;AAEnB;AAmBA;;;;;;;;;AASG;AACG,SAAU,YAAY,CAAmB,EAC7C,SAAS,EACT,QAAQ,EACR,GAAG,SAAS,EACgB,EAAA;IAC5B,QACEA,6BAAC,WAAW,EAAA,EAAA,GACN,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,SAAS,CAAC,EAC3D,UAAU,EAAE,QAAQ,EAAA,CACpB;AAEN;AAmBA;;;;;;AAMG;AACG,SAAU,eAAe,CAAmB,EAChD,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,SAAS,EACmB,EAAA;AAC/B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAA,GACT,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAA;QAE7D,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,SAAS,EAAC,8BAA8B,EAAA,EAAE,KAAK,CAAU,CAClE;QACA,QAAQ,CACM;AAErB;;;;"}
@@ -3,13 +3,13 @@ import "../field/index.css";
3
3
  import "./index.css";
4
4
  import { type DateValue } from "@internationalized/date";
5
5
  import type { CombineAriaPropsWithCustomProps } from "../../utilities/reactAriaProps";
6
- import React from "react";
6
+ import React, { type ReactNode } from "react";
7
7
  import { type DatePickerProps as AriaDatePickerProps } from "react-aria-components/DatePicker";
8
8
  export type DatePickerSize = "md" | "lg";
9
9
  export type DatePickerDateValue = DateValue | string;
10
10
  export interface DatePickerProps {
11
11
  /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */
12
- description?: string;
12
+ description?: ReactNode;
13
13
  /** Disables the input and calendar button. */
14
14
  disabled?: boolean;
15
15
  /** Sets the first day of the week in the calendar. Defaults to locale-appropriate value. */
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts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E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mCAAmC;IACnC,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,oEAAoE;IACpE,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACnC;AAED,KAAK,yBAAyB,GAC1B,UAAU,GACV,aAAa,GACb,cAAc,GACd,aAAa,GACb,cAAc,GACd,WAAW,GACX,cAAc,GACd,kBAAkB,GAClB,qBAAqB,GACrB,yBAAyB,GACzB,MAAM,CAAA;AAEV,KAAK,4BAA4B,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAA;AAEtE,MAAM,MAAM,sBAAsB,GAAG,+BAA+B,CAClE,mBAAmB,CAAC,SAAS,CAAC,EAC9B,eAAe,EACf,yBAAyB,EACzB,4BAA4B,CAC7B,CAAA;AAoOD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAW,EACX,KAAK,EACL,GAAG,SAAS,EACb,EAAE,sBAAsB,qBAwFxB;yBAzGe,UAAU"}
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,aAAa,CAAA;AAEpB,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAA;AAEnE,OAAO,EAUL,KAAK,eAAe,IAAI,mBAAmB,EAM5C,MAAM,kCAAkC,CAAA;AAYzC,M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