@tedi-design-system/react 19.1.0-rc.9 → 19.1.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/bundle-stats.html +1 -1
  2. package/community.cjs.js +1 -1
  3. package/community.es.js +215 -223
  4. package/component.manifest.json +63 -20
  5. package/external/@floating-ui/core/dist/floating-ui.core.es.js +1 -1
  6. package/external/@floating-ui/dom/dist/floating-ui.dom.es.js +2 -2
  7. package/external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +5 -5
  8. package/external/@mui/x-date-pickers/DatePicker/shared.es.js +1 -1
  9. package/external/@mui/x-date-pickers/DateTimePicker/shared.es.js +1 -1
  10. package/index.css +1 -1
  11. package/package.json +2 -2
  12. package/src/community/components/accordion/accordion.cjs.js +1 -1
  13. package/src/community/components/accordion/accordion.es.js +14 -9
  14. package/src/community/components/card/card-notification/card-notification.cjs.js +1 -1
  15. package/src/community/components/card/card-notification/card-notification.es.js +10 -8
  16. package/src/community/components/dock-panel/dock-panel.cjs.js +2 -0
  17. package/src/community/components/dock-panel/dock-panel.d.ts +110 -0
  18. package/src/community/components/dock-panel/dock-panel.es.js +138 -0
  19. package/src/community/components/dock-panel/dock-panel.module.scss.cjs.js +1 -0
  20. package/src/community/components/dock-panel/dock-panel.module.scss.es.js +18 -0
  21. package/src/community/components/dropdown/dropdown.cjs.js +1 -1
  22. package/src/community/components/dropdown/dropdown.es.js +34 -32
  23. package/src/community/components/form/category-search/category-search.cjs.js +1 -0
  24. package/src/community/components/form/category-search/category-search.d.ts +9 -0
  25. package/src/community/components/form/category-search/category-search.es.js +297 -0
  26. package/src/community/components/form/category-search/category-search.module.scss.cjs.js +1 -0
  27. package/src/community/components/form/category-search/category-search.module.scss.es.js +21 -0
  28. package/src/community/components/form/category-search/category-search.types.d.ts +162 -0
  29. package/src/community/components/form/category-search/define-category-search-category.cjs.js +1 -0
  30. package/src/community/components/form/category-search/define-category-search-category.d.ts +7 -0
  31. package/src/community/components/form/category-search/define-category-search-category.es.js +25 -0
  32. package/src/community/components/form/category-search/index.d.ts +3 -0
  33. package/src/community/components/form/category-search/use-category-search.cjs.js +1 -0
  34. package/src/community/components/form/category-search/use-category-search.d.ts +17 -0
  35. package/src/community/components/form/category-search/use-category-search.es.js +64 -0
  36. package/src/community/components/form/file-upload/file-upload.cjs.js +1 -1
  37. package/src/community/components/form/file-upload/file-upload.es.js +43 -41
  38. package/src/community/components/form/pickers/calendar/calendar.cjs.js +1 -1
  39. package/src/community/components/form/pickers/calendar/calendar.es.js +41 -39
  40. package/src/community/components/form/pickers/timepicker/timepicker.cjs.js +1 -1
  41. package/src/community/components/form/pickers/timepicker/timepicker.es.js +33 -31
  42. package/src/community/components/form/toggle/toggle.cjs.js +1 -1
  43. package/src/community/components/form/toggle/toggle.es.js +30 -28
  44. package/src/community/components/map-components/base-map-selection/base-map-selection.cjs.js +1 -1
  45. package/src/community/components/map-components/base-map-selection/base-map-selection.es.js +19 -19
  46. package/src/community/components/map-components/carousel/carousel.cjs.js +1 -1
  47. package/src/community/components/map-components/carousel/carousel.es.js +19 -17
  48. package/src/community/components/map-components/map-button/map-button.cjs.js +1 -1
  49. package/src/community/components/map-components/map-button/map-button.d.ts +10 -1
  50. package/src/community/components/map-components/map-button/map-button.es.js +31 -29
  51. package/src/community/components/status/status.cjs.js +1 -1
  52. package/src/community/components/status/status.es.js +14 -12
  53. package/src/community/components/stepper/stepper.cjs.js +1 -1
  54. package/src/community/components/stepper/stepper.es.js +33 -31
  55. package/src/community/components/table/table.cjs.js +1 -1
  56. package/src/community/components/table/table.es.js +9 -9
  57. package/src/community/components/table-of-contents/table-of-contents.cjs.js +1 -1
  58. package/src/community/components/table-of-contents/table-of-contents.es.js +21 -19
  59. package/src/community/components/tabs/tabs/tabs.cjs.js +1 -1
  60. package/src/community/components/tabs/tabs/tabs.es.js +29 -27
  61. package/src/community/components/vertical-stepper/vertical-stepper.cjs.js +1 -1
  62. package/src/community/components/vertical-stepper/vertical-stepper.es.js +8 -6
  63. package/src/community/deprecated-exports.cjs.js +1 -0
  64. package/src/community/deprecated-exports.d.ts +19 -0
  65. package/src/community/deprecated-exports.es.js +112 -0
  66. package/src/community/index.d.ts +3 -0
  67. package/src/tedi/components/content/card/card.d.ts +4 -0
  68. package/src/tedi/components/content/carousel/carousel.cjs.js +1 -1
  69. package/src/tedi/components/content/carousel/carousel.d.ts +5 -0
  70. package/src/tedi/components/content/carousel/carousel.es.js +20 -20
  71. package/src/tedi/components/content/carousel/use-carousel.cjs.js +1 -1
  72. package/src/tedi/components/content/carousel/use-carousel.d.ts +1 -1
  73. package/src/tedi/components/content/carousel/use-carousel.es.js +127 -127
  74. package/src/tedi/components/content/table-card/index.d.ts +1 -0
  75. package/src/tedi/components/content/table-card/table-card.cjs.js +1 -0
  76. package/src/tedi/components/content/table-card/table-card.d.ts +131 -0
  77. package/src/tedi/components/content/table-card/table-card.es.js +206 -0
  78. package/src/tedi/components/content/table-card/table-card.module.scss.cjs.js +1 -0
  79. package/src/tedi/components/content/table-card/table-card.module.scss.es.js +18 -0
  80. package/src/tedi/components/content/text-group/text-group-list/text-group-list.cjs.js +1 -1
  81. package/src/tedi/components/content/text-group/text-group-list/text-group-list.d.ts +42 -0
  82. package/src/tedi/components/content/text-group/text-group-list/text-group-list.es.js +41 -23
  83. package/src/tedi/components/content/text-group/text-group.cjs.js +1 -1
  84. package/src/tedi/components/content/text-group/text-group.d.ts +10 -0
  85. package/src/tedi/components/content/text-group/text-group.es.js +14 -13
  86. package/src/tedi/components/content/text-group/text-group.module.scss.cjs.js +1 -1
  87. package/src/tedi/components/content/text-group/text-group.module.scss.es.js +5 -1
  88. package/src/tedi/components/form/date-field/date-field-helpers.cjs.js +1 -1
  89. package/src/tedi/components/form/date-field/date-field-helpers.d.ts +12 -19
  90. package/src/tedi/components/form/date-field/date-field-helpers.es.js +27 -21
  91. package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
  92. package/src/tedi/components/form/date-field/date-field.d.ts +1 -1
  93. package/src/tedi/components/form/date-field/date-field.es.js +169 -164
  94. package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
  95. package/src/tedi/components/form/date-time-field/date-time-field.es.js +181 -176
  96. package/src/tedi/components/form/search/index.d.ts +1 -0
  97. package/src/tedi/components/form/search/search.cjs.js +1 -1
  98. package/src/tedi/components/form/search/search.d.ts +92 -1
  99. package/src/tedi/components/form/search/search.es.js +265 -69
  100. package/src/tedi/components/form/search/search.module.scss.cjs.js +1 -1
  101. package/src/tedi/components/form/search/search.module.scss.es.js +9 -1
  102. package/src/tedi/components/form/slider/slider.cjs.js +1 -1
  103. package/src/tedi/components/form/slider/slider.es.js +38 -38
  104. package/src/tedi/components/form/slider/slider.module.scss.cjs.js +1 -1
  105. package/src/tedi/components/form/slider/slider.module.scss.es.js +0 -1
  106. package/src/tedi/components/form/textfield/textfield.cjs.js +1 -1
  107. package/src/tedi/components/form/textfield/textfield.es.js +21 -21
  108. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.cjs.js +1 -1
  109. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.d.ts +1 -1
  110. package/src/tedi/components/layout/mobile-nav/components/mobile-nav-toggle/mobile-nav-toggle.es.js +28 -27
  111. package/src/tedi/components/layout/mobile-nav/mobile-nav.cjs.js +1 -1
  112. package/src/tedi/components/layout/mobile-nav/mobile-nav.d.ts +1 -1
  113. package/src/tedi/components/layout/mobile-nav/mobile-nav.es.js +124 -92
  114. package/src/tedi/components/layout/sidenav/sidenav.module.scss.cjs.js +1 -1
  115. package/src/tedi/components/layout/sidenav/sidenav.module.scss.es.js +1 -0
  116. package/src/tedi/components/navigation/tabs/tabs-helpers.cjs.js +1 -1
  117. package/src/tedi/components/navigation/tabs/tabs-helpers.d.ts +5 -0
  118. package/src/tedi/components/navigation/tabs/tabs-helpers.es.js +7 -4
  119. package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.cjs.js +1 -1
  120. package/src/tedi/components/navigation/tabs/tabs-trigger/tabs-trigger.es.js +17 -17
  121. package/src/tedi/components/overlays/dropdown/dropdown.cjs.js +1 -1
  122. package/src/tedi/components/overlays/dropdown/dropdown.es.js +8 -6
  123. package/src/tedi/helpers/warn-deprecated/warn-deprecated.cjs.js +1 -0
  124. package/src/tedi/helpers/warn-deprecated/warn-deprecated.d.ts +12 -0
  125. package/src/tedi/helpers/warn-deprecated/warn-deprecated.es.js +11 -0
  126. package/src/tedi/index.d.ts +2 -1
  127. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  128. package/src/tedi/providers/label-provider/labels-map.d.ts +30 -2
  129. package/src/tedi/providers/label-provider/labels-map.es.js +29 -1
  130. package/tedi.cjs.js +1 -1
  131. package/tedi.es.js +326 -324
@@ -0,0 +1,206 @@
1
+ import { jsx as l, jsxs as d, Fragment as Se } from "react/jsx-runtime";
2
+ import c from "../../../../../external/classnames/index.es.js";
3
+ import L from "react";
4
+ import { Icon as ye } from "../../base/icon/icon.es.js";
5
+ import { Text as b } from "../../base/typography/text/text.es.js";
6
+ import { Checkbox as Ae } from "../../form/checkbox/checkbox.es.js";
7
+ import { Card as u } from "../card/card.es.js";
8
+ import { Label as Ne } from "../label/label.es.js";
9
+ import { TextGroupList as D } from "../text-group/text-group-list/text-group-list.es.js";
10
+ import e from "./table-card.module.scss.es.js";
11
+ import { useBreakpointProps as Ce } from "../../../helpers/hooks/use-breakpoint-props.es.js";
12
+ import { useLabels as Le } from "../../../providers/label-provider/use-labels.es.js";
13
+ const xe = {
14
+ horizontal: {
15
+ labelAlign: "right",
16
+ valueAlign: "right",
17
+ labelWidth: "var(--text-group-label-width-sm)",
18
+ rowGap: "0"
19
+ },
20
+ vertical: { labelAlign: "left", valueAlign: "left", labelWidth: "auto", rowGap: "var(--layout-grid-gutters-16)" }
21
+ }, ze = (t) => t.bold ? /* @__PURE__ */ l(b, { element: "span", modifiers: "bold", children: t.value }) : t.value, Te = (t, S) => typeof t == "string" ? /* @__PURE__ */ l(Ne, { isSmall: S, children: t }) : t, Be = (t) => {
22
+ const { getCurrentBreakpointProps: S } = Ce(t.defaultServerBreakpoint), { getLabel: x } = Le(), {
23
+ rows: E,
24
+ title: o,
25
+ subtitle: i,
26
+ endSlot: p,
27
+ titleElement: z = "h3",
28
+ titleModifiers: m,
29
+ collapsible: n = !1,
30
+ defaultOpen: F = !0,
31
+ open: T,
32
+ onOpenChange: y,
33
+ actions: B,
34
+ summary: r,
35
+ selectable: _ = !1,
36
+ selected: k,
37
+ defaultSelected: U = !1,
38
+ onSelectedChange: A,
39
+ labelSize: V = "default",
40
+ selectionLabel: M = x("table-card.select-row"),
41
+ ariaLabel: N,
42
+ id: Y,
43
+ children: w,
44
+ layout: G = "horizontal",
45
+ columns: q = 1,
46
+ labelWidth: J,
47
+ labelAlign: K,
48
+ valueAlign: Q,
49
+ rowAlign: X = "start",
50
+ padding: Z = 1,
51
+ rowGap: C,
52
+ className: ee
53
+ } = S(t), le = G === "horizontal", f = xe[G], ae = K ?? f.labelAlign, te = Q ?? f.valueAlign, H = J ?? f.labelWidth, oe = typeof C == "number" ? `${C}rem` : C ?? f.rowGap, ie = L.useId(), v = Y ?? ie, W = `${v}-body`, [ne, re] = L.useState(F), I = T !== void 0, s = n ? I ? T : ne : !0, se = () => {
54
+ const a = !s;
55
+ I || re(a), y == null || y(a);
56
+ }, [de, ce] = L.useState(U), O = k !== void 0, be = O ? k : de, me = (a) => {
57
+ O || ce(a), A == null || A(a);
58
+ }, $ = z;
59
+ n && !o && !N && console.warn(
60
+ "TableCard: a `collapsible` card needs a `title` or `ariaLabel` so its toggle has an accessible name."
61
+ );
62
+ const pe = !!(_ || o || i || p || n), h = !!B, P = !!r, he = !!w, R = n ? s || h : _, ge = s && !R, ue = P || h || he, _e = h, g = _ && !n && !!o && !i, fe = E.map((a) => ({
63
+ label: Te(a.label, V === "small"),
64
+ value: ze(a),
65
+ ...a.colSpan ? { colSpan: a.colSpan } : {}
66
+ })), j = _ ? /* @__PURE__ */ l(
67
+ Ae,
68
+ {
69
+ id: `${v}-select`,
70
+ name: `${v}-select`,
71
+ value: "selected",
72
+ label: g ? /* @__PURE__ */ l(
73
+ b,
74
+ {
75
+ element: "span",
76
+ color: "primary",
77
+ modifiers: m,
78
+ className: c(e["tedi-table-card__title"], {
79
+ [e["tedi-table-card__title--body"]]: !m
80
+ }),
81
+ children: o
82
+ }
83
+ ) : M,
84
+ hideLabel: !g,
85
+ checked: be,
86
+ onChange: (a, ve) => me(ve)
87
+ }
88
+ ) : null;
89
+ return /* @__PURE__ */ d(u, { padding: 0, className: c(e["tedi-table-card"], ee), "aria-label": N, id: v, children: [
90
+ pe && /* @__PURE__ */ d(
91
+ u.Content,
92
+ {
93
+ padding: ge ? { top: 1, right: 1, bottom: 0, left: 1 } : 1,
94
+ hasSeparator: R,
95
+ className: c(e["tedi-table-card__header"], {
96
+ [e["tedi-table-card__header--select-title"]]: g
97
+ }),
98
+ children: [
99
+ g ? /* @__PURE__ */ l($, { className: e["tedi-table-card__heading"], children: j }) : j,
100
+ n ? /* @__PURE__ */ l($, { className: e["tedi-table-card__heading"], children: /* @__PURE__ */ d(
101
+ "button",
102
+ {
103
+ type: "button",
104
+ className: e["tedi-table-card__toggle"],
105
+ "aria-expanded": s,
106
+ "aria-controls": W,
107
+ "aria-label": o ? void 0 : N ?? x(s ? "close" : "open"),
108
+ onClick: se,
109
+ children: [
110
+ /* @__PURE__ */ d("span", { className: e["tedi-table-card__title-group"], children: [
111
+ o && /* @__PURE__ */ l(
112
+ b,
113
+ {
114
+ element: "span",
115
+ modifiers: m,
116
+ className: c(e["tedi-table-card__title"], {
117
+ [e["tedi-table-card__title--body"]]: !m
118
+ }),
119
+ children: o
120
+ }
121
+ ),
122
+ i && /* @__PURE__ */ l(b, { element: "span", color: "secondary", modifiers: "small", children: i })
123
+ ] }),
124
+ p && /* @__PURE__ */ l("span", { className: e["tedi-table-card__end-slot"], children: p }),
125
+ /* @__PURE__ */ l(
126
+ "span",
127
+ {
128
+ className: c(e["tedi-table-card__chevron"], {
129
+ [e["tedi-table-card__chevron--open"]]: s
130
+ }),
131
+ children: /* @__PURE__ */ l(ye, { name: "expand_more", size: 24, color: "inherit" })
132
+ }
133
+ )
134
+ ]
135
+ }
136
+ ) }) : /* @__PURE__ */ d(Se, { children: [
137
+ (o || i) && !g && /* @__PURE__ */ d("span", { className: e["tedi-table-card__title-group"], children: [
138
+ o && /* @__PURE__ */ l(
139
+ b,
140
+ {
141
+ element: z,
142
+ modifiers: m,
143
+ className: c(e["tedi-table-card__title"], {
144
+ [e["tedi-table-card__title--body"]]: !m
145
+ }),
146
+ children: o
147
+ }
148
+ ),
149
+ i && /* @__PURE__ */ l(b, { element: "span", color: "secondary", modifiers: "small", children: i })
150
+ ] }),
151
+ p && /* @__PURE__ */ l("div", { className: e["tedi-table-card__end-slot"], children: p })
152
+ ] })
153
+ ]
154
+ }
155
+ ),
156
+ /* @__PURE__ */ d(
157
+ "div",
158
+ {
159
+ id: W,
160
+ hidden: n && !s,
161
+ className: c({ [e["tedi-table-card__body--has-footer"]]: h }),
162
+ children: [
163
+ /* @__PURE__ */ l(u.Content, { padding: Z, hasSeparator: ue, children: /* @__PURE__ */ l(
164
+ D,
165
+ {
166
+ columns: q,
167
+ items: fe,
168
+ rowGap: oe,
169
+ ...le ? {
170
+ type: "horizontal",
171
+ labelAlign: ae,
172
+ valueAlign: te,
173
+ labelWidth: H,
174
+ rowAlign: X
175
+ } : {
176
+ type: "vertical",
177
+ labelAlign: "left",
178
+ labelWidth: H
179
+ }
180
+ }
181
+ ) }),
182
+ w,
183
+ P && /* @__PURE__ */ l(u.Content, { padding: 1, background: "tertiary", hasSeparator: _e, children: /* @__PURE__ */ l(
184
+ D,
185
+ {
186
+ type: "horizontal",
187
+ labelAlign: "left",
188
+ valueAlign: "right",
189
+ items: [
190
+ {
191
+ label: r == null ? void 0 : r.label,
192
+ value: /* @__PURE__ */ l(b, { element: "span", modifiers: "bold", children: r == null ? void 0 : r.value })
193
+ }
194
+ ]
195
+ }
196
+ ) })
197
+ ]
198
+ }
199
+ ),
200
+ h && /* @__PURE__ */ l(u.Content, { padding: { vertical: 0.5, horizontal: 1 }, className: e["tedi-table-card__actions"], children: B })
201
+ ] });
202
+ };
203
+ Be.displayName = "TableCard";
204
+ export {
205
+ Be as TableCard
206
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-table-card":"tedi-table-card-891665aa","tedi-table-card__body--has-footer":"tedi-table-card__body--has-footer-fdfe85e8","tedi-table-card__header":"tedi-table-card__header-5b99672d","tedi-table-card__header--select-title":"tedi-table-card__header--select-title-4c3092eb","tedi-table-card__heading":"tedi-table-card__heading-19e529e5","tedi-table-card__toggle":"tedi-table-card__toggle-967a66cb","tedi-table-card__chevron":"tedi-table-card__chevron-2771a16f","tedi-table-card__title-group":"tedi-table-card__title-group-5dba284a","tedi-table-card__title":"tedi-table-card__title-cdc97d8a","tedi-table-card__title--body":"tedi-table-card__title--body-d1a03544","tedi-table-card__chevron--open":"tedi-table-card__chevron--open-5ed89ee0","tedi-table-card__end-slot":"tedi-table-card__end-slot-1c4a8fc1","tedi-table-card__actions":"tedi-table-card__actions-66d83aef"};exports.default=e;
@@ -0,0 +1,18 @@
1
+ const e = {
2
+ "tedi-table-card": "tedi-table-card-891665aa",
3
+ "tedi-table-card__body--has-footer": "tedi-table-card__body--has-footer-fdfe85e8",
4
+ "tedi-table-card__header": "tedi-table-card__header-5b99672d",
5
+ "tedi-table-card__header--select-title": "tedi-table-card__header--select-title-4c3092eb",
6
+ "tedi-table-card__heading": "tedi-table-card__heading-19e529e5",
7
+ "tedi-table-card__toggle": "tedi-table-card__toggle-967a66cb",
8
+ "tedi-table-card__chevron": "tedi-table-card__chevron-2771a16f",
9
+ "tedi-table-card__title-group": "tedi-table-card__title-group-5dba284a",
10
+ "tedi-table-card__title": "tedi-table-card__title-cdc97d8a",
11
+ "tedi-table-card__title--body": "tedi-table-card__title--body-d1a03544",
12
+ "tedi-table-card__chevron--open": "tedi-table-card__chevron--open-5ed89ee0",
13
+ "tedi-table-card__end-slot": "tedi-table-card__end-slot-1c4a8fc1",
14
+ "tedi-table-card__actions": "tedi-table-card__actions-66d83aef"
15
+ };
16
+ export {
17
+ e as default
18
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../../../../external/classnames/index.cjs.js"),v=require("../../label/label.cjs.js"),t=require("../text-group.module.scss.cjs.js"),y=require("../../../../helpers/hooks/use-breakpoint-props.cjs.js"),m=e=>typeof e=="string"?r.jsx(v.Label,{children:e}):e,a=e=>typeof e=="number"?`${e}%`:e,o=e=>{const{getCurrentBreakpointProps:i}=y.useBreakpointProps(e.defaultServerBreakpoint),{items:d,labelWidth:u="auto",className:n,type:c="vertical",labelAlign:p="left"}=i(e),x=s.default(t.default["tedi-text-group"],t.default["tedi-text-group--list"],t.default[`tedi-text-group--${c}`],n),f=a(u);return r.jsx("dl",{className:x,style:{"--label-width":f},children:d.map((l,g)=>{const b=l.labelAlign??p,h=l.labelWidth!==void 0?{"--label-width":a(l.labelWidth)}:void 0;return r.jsxs("div",{className:t.default["tedi-text-group__row"],style:h,children:[r.jsx("dt",{className:s.default(t.default["tedi-text-group__label"],t.default[`tedi-text-group--align-${b}`]),children:m(l.label)}),r.jsx("dd",{className:s.default(t.default["tedi-text-group__value"]),children:l.value})]},g)})})};o.displayName="TextGroup.List";exports.TextGroupList=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../../../../external/classnames/index.cjs.js"),_=require("../../label/label.cjs.js"),t=require("../text-group.module.scss.cjs.js"),j=require("../../../../helpers/hooks/use-breakpoint-props.cjs.js"),A=e=>typeof e=="string"?r.jsx(_.Label,{children:e}):e,u=e=>typeof e=="number"?`${e}%`:e,d=e=>{const{getCurrentBreakpointProps:c}=j.useBreakpointProps(e.defaultServerBreakpoint),{items:p,labelWidth:g="auto",className:x,type:i="vertical",labelAlign:f="left",valueAlign:b="left",columns:o=1,rowGap:a,rowAlign:h="start"}=c(e),v=s.default(t.default["tedi-text-group"],t.default["tedi-text-group--list"],t.default[`tedi-text-group--${i}`],{[t.default["tedi-text-group--columns"]]:o>1},{[t.default["tedi-text-group--row-align-center"]]:i==="horizontal"&&h==="center"},x),y={"--label-width":u(g),...o>1?{"--tedi-text-group-columns":o}:{},...a!==void 0?{"--tedi-text-group-list-gap":typeof a=="number"?`${a}px`:a}:{}};return r.jsx("dl",{className:v,style:y,children:p.map((l,m)=>{const w=l.labelAlign??f,L=l.valueAlign??b,n={};l.labelWidth!==void 0&&(n["--label-width"]=u(l.labelWidth)),o>1&&l.colSpan&&l.colSpan>1&&(n.gridColumn=`span ${Math.min(l.colSpan,o)}`);const S=Object.keys(n).length>0;return r.jsxs("div",{className:t.default["tedi-text-group__row"],style:S?n:void 0,children:[r.jsx("dt",{className:s.default(t.default["tedi-text-group__label"],t.default[`tedi-text-group--align-${w}`]),children:A(l.label)}),r.jsx("dd",{className:s.default(t.default["tedi-text-group__value"],t.default[`tedi-text-group__value--align-${L}`]),children:l.value})]},m)})})};d.displayName="TextGroup.List";exports.TextGroupList=d;
@@ -11,12 +11,25 @@ type TextGroupListBreakpointProps = {
11
11
  * @default left
12
12
  */
13
13
  labelAlign?: TextAlign;
14
+ /**
15
+ * Alignment for the value text. `'right'` grows the value so it sits flush
16
+ * against the trailing edge (numeric / summary columns). Horizontal only.
17
+ * @default left
18
+ */
19
+ valueAlign?: TextAlign;
14
20
  /**
15
21
  * Width for the label column (e.g., `'200px'`, `'30%'`, or a `number`
16
22
  * interpreted as a percent).
17
23
  * @default auto
18
24
  */
19
25
  labelWidth?: string | number;
26
+ /**
27
+ * Vertical alignment of the label against its value within each row.
28
+ * `'center'` aligns them on the cross axis (useful when a value is taller,
29
+ * e.g. a `StatusBadge`). Horizontal layout only.
30
+ * @default 'start'
31
+ */
32
+ rowAlign?: 'start' | 'center';
20
33
  } | {
21
34
  /**
22
35
  * Type of text group layout.
@@ -28,6 +41,14 @@ type TextGroupListBreakpointProps = {
28
41
  * @default left
29
42
  */
30
43
  labelAlign?: 'left';
44
+ /**
45
+ * Value alignment is horizontal-only; not available in vertical layout.
46
+ */
47
+ valueAlign?: never;
48
+ /**
49
+ * Row alignment is horizontal-only; not available in vertical layout.
50
+ */
51
+ rowAlign?: never;
31
52
  /**
32
53
  * Width for the label column (e.g., `'200px'`, `'30%'`, or a `number`
33
54
  * interpreted as a percent).
@@ -51,11 +72,21 @@ export interface TextGroupListItem {
51
72
  * value when omitted.
52
73
  */
53
74
  labelAlign?: TextAlign;
75
+ /**
76
+ * Per-row override of the list-level `valueAlign`. Falls back to the list's
77
+ * value when omitted.
78
+ */
79
+ valueAlign?: TextAlign;
54
80
  /**
55
81
  * Per-row override of the list-level `labelWidth`. Falls back to the list's
56
82
  * value when omitted.
57
83
  */
58
84
  labelWidth?: string | number;
85
+ /**
86
+ * In a multi-column layout (`columns > 1`), span this row across N grid
87
+ * columns. Ignored in single-column layouts. Clamped to the column count.
88
+ */
89
+ colSpan?: number;
59
90
  }
60
91
  export type TextGroupListProps = BreakpointSupport<TextGroupListBreakpointProps> & {
61
92
  /**
@@ -64,6 +95,17 @@ export type TextGroupListProps = BreakpointSupport<TextGroupListBreakpointProps>
64
95
  * `<TextGroup>`s would break.
65
96
  */
66
97
  items: TextGroupListItem[];
98
+ /**
99
+ * Lay the pairs out in this many equal-width columns (CSS grid, filling
100
+ * left-to-right, top-to-bottom). `1` keeps the plain stacked list.
101
+ * @default 1
102
+ */
103
+ columns?: number;
104
+ /**
105
+ * Vertical gap between rows. Accepts any CSS length (a `number` is treated as
106
+ * pixels). Defaults to the component's compact spacing.
107
+ */
108
+ rowGap?: string | number;
67
109
  /**
68
110
  * Additional class name(s) to apply to the root `<dl>` element.
69
111
  */
@@ -1,30 +1,48 @@
1
- import { jsx as l, jsxs as h } from "react/jsx-runtime";
2
- import o from "../../../../../../external/classnames/index.es.js";
3
- import { Label as f } from "../../label/label.es.js";
1
+ import { jsx as s, jsxs as _ } from "react/jsx-runtime";
2
+ import n from "../../../../../../external/classnames/index.es.js";
3
+ import { Label as A } from "../../label/label.es.js";
4
4
  import e from "../text-group.module.scss.es.js";
5
- import { useBreakpointProps as v } from "../../../../helpers/hooks/use-breakpoint-props.es.js";
6
- const y = (t) => typeof t == "string" ? /* @__PURE__ */ l(f, { children: t }) : t, s = (t) => typeof t == "number" ? `${t}%` : t, L = (t) => {
7
- const { getCurrentBreakpointProps: i } = v(t.defaultServerBreakpoint), {
8
- items: a,
9
- labelWidth: n = "auto",
10
- className: d,
11
- type: p = "vertical",
12
- labelAlign: c = "left"
13
- } = i(t), u = o(
5
+ import { useBreakpointProps as N } from "../../../../helpers/hooks/use-breakpoint-props.es.js";
6
+ const S = (t) => typeof t == "string" ? /* @__PURE__ */ s(A, { children: t }) : t, p = (t) => typeof t == "number" ? `${t}%` : t, $ = (t) => {
7
+ const { getCurrentBreakpointProps: d } = N(t.defaultServerBreakpoint), {
8
+ items: c,
9
+ labelWidth: u = "auto",
10
+ className: g,
11
+ type: a = "vertical",
12
+ labelAlign: m = "left",
13
+ valueAlign: x = "left",
14
+ columns: o = 1,
15
+ rowGap: r,
16
+ rowAlign: h = "start"
17
+ } = d(t), b = n(
14
18
  e["tedi-text-group"],
15
19
  e["tedi-text-group--list"],
16
- e[`tedi-text-group--${p}`],
17
- d
18
- ), m = s(n);
19
- return /* @__PURE__ */ l("dl", { className: u, style: { "--label-width": m }, children: a.map((r, g) => {
20
- const x = r.labelAlign ?? c, b = r.labelWidth !== void 0 ? { "--label-width": s(r.labelWidth) } : void 0;
21
- return /* @__PURE__ */ h("div", { className: e["tedi-text-group__row"], style: b, children: [
22
- /* @__PURE__ */ l("dt", { className: o(e["tedi-text-group__label"], e[`tedi-text-group--align-${x}`]), children: y(r.label) }),
23
- /* @__PURE__ */ l("dd", { className: o(e["tedi-text-group__value"]), children: r.value })
24
- ] }, g);
20
+ e[`tedi-text-group--${a}`],
21
+ { [e["tedi-text-group--columns"]]: o > 1 },
22
+ { [e["tedi-text-group--row-align-center"]]: a === "horizontal" && h === "center" },
23
+ g
24
+ ), f = {
25
+ "--label-width": p(u),
26
+ ...o > 1 ? { "--tedi-text-group-columns": o } : {},
27
+ ...r !== void 0 ? { "--tedi-text-group-list-gap": typeof r == "number" ? `${r}px` : r } : {}
28
+ };
29
+ return /* @__PURE__ */ s("dl", { className: b, style: f, children: c.map((l, v) => {
30
+ const y = l.labelAlign ?? m, w = l.valueAlign ?? x, i = {};
31
+ l.labelWidth !== void 0 && (i["--label-width"] = p(l.labelWidth)), o > 1 && l.colSpan && l.colSpan > 1 && (i.gridColumn = `span ${Math.min(l.colSpan, o)}`);
32
+ const L = Object.keys(i).length > 0;
33
+ return /* @__PURE__ */ _("div", { className: e["tedi-text-group__row"], style: L ? i : void 0, children: [
34
+ /* @__PURE__ */ s("dt", { className: n(e["tedi-text-group__label"], e[`tedi-text-group--align-${y}`]), children: S(l.label) }),
35
+ /* @__PURE__ */ s(
36
+ "dd",
37
+ {
38
+ className: n(e["tedi-text-group__value"], e[`tedi-text-group__value--align-${w}`]),
39
+ children: l.value
40
+ }
41
+ )
42
+ ] }, v);
25
43
  }) });
26
44
  };
27
- L.displayName = "TextGroup.List";
45
+ $.displayName = "TextGroup.List";
28
46
  export {
29
- L as TextGroupList
47
+ $ as TextGroupList
30
48
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),f=require("../label/label.cjs.js"),t=require("./text-group.module.scss.cjs.js"),g=require("./text-group-list/text-group-list.cjs.js"),b=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),m=e=>typeof e=="string"?r.jsx(f.Label,{children:e}):e,y=e=>typeof e=="number"?`${e}%`:e,o=e=>{const{getCurrentBreakpointProps:l}=b.useBreakpointProps(e.defaultServerBreakpoint),{label:u,value:a,labelWidth:n="auto",className:i,type:d="vertical",labelAlign:c="left"}=l(e),p=s.default(t.default["tedi-text-group"],t.default[`tedi-text-group--${d}`],i),x=y(n);return r.jsxs("dl",{className:p,style:{"--label-width":x},children:[r.jsx("dt",{className:s.default(t.default["tedi-text-group__label"],t.default[`tedi-text-group--align-${c}`]),children:m(u)}),r.jsx("dd",{className:s.default(t.default["tedi-text-group__value"]),children:a})]})};o.displayName="TextGroup";const G=Object.assign(o,{List:g.TextGroupList});exports.TextGroup=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("../../../../../external/classnames/index.cjs.js"),g=require("../label/label.cjs.js"),t=require("./text-group.module.scss.cjs.js"),b=require("./text-group-list/text-group-list.cjs.js"),m=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),v=e=>typeof e=="string"?r.jsx(g.Label,{children:e}):e,y=e=>typeof e=="number"?`${e}%`:e,u=e=>{const{getCurrentBreakpointProps:o}=m.useBreakpointProps(e.defaultServerBreakpoint),{label:s,value:a,labelWidth:i="auto",className:n,type:d="vertical",labelAlign:c="left",valueAlign:p="left"}=o(e),x=l.default(t.default["tedi-text-group"],t.default[`tedi-text-group--${d}`],n),f=y(i);return r.jsxs("dl",{className:x,style:{"--label-width":f},children:[r.jsx("dt",{className:l.default(t.default["tedi-text-group__label"],t.default[`tedi-text-group--align-${c}`]),children:v(s)}),r.jsx("dd",{className:l.default(t.default["tedi-text-group__value"],t.default[`tedi-text-group__value--align-${p}`]),children:a})]})};u.displayName="TextGroup";const G=Object.assign(u,{List:b.TextGroupList});exports.TextGroup=G;
@@ -11,6 +11,12 @@ type TextGroupBreakpointProps = {
11
11
  * @default left
12
12
  */
13
13
  labelAlign?: TextAlign;
14
+ /**
15
+ * Alignment for the value text. `'right'` grows the value so it sits flush
16
+ * against the trailing edge. Horizontal only.
17
+ * @default 'left'
18
+ */
19
+ valueAlign?: TextAlign;
14
20
  /**
15
21
  * Width for the label (e.g., '200px', '30%', etc.)
16
22
  * @default auto
@@ -26,6 +32,10 @@ type TextGroupBreakpointProps = {
26
32
  * @default left
27
33
  */
28
34
  labelAlign?: 'left';
35
+ /**
36
+ * Value alignment is horizontal-only; not available in vertical layout.
37
+ */
38
+ valueAlign?: never;
29
39
  /**
30
40
  * Width for the label (e.g., '200px', '30%', etc.)
31
41
  * @default auto
@@ -1,27 +1,28 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
2
  import r from "../../../../../external/classnames/index.es.js";
3
3
  import { Label as f } from "../label/label.es.js";
4
4
  import e from "./text-group.module.scss.es.js";
5
- import { TextGroupList as g } from "./text-group-list/text-group-list.es.js";
6
- import { useBreakpointProps as b } from "../../../helpers/hooks/use-breakpoint-props.es.js";
5
+ import { TextGroupList as b } from "./text-group-list/text-group-list.es.js";
6
+ import { useBreakpointProps as v } from "../../../helpers/hooks/use-breakpoint-props.es.js";
7
7
  const y = (t) => typeof t == "string" ? /* @__PURE__ */ o(f, { children: t }) : t, h = (t) => typeof t == "number" ? `${t}%` : t, s = (t) => {
8
- const { getCurrentBreakpointProps: l } = b(t.defaultServerBreakpoint), {
8
+ const { getCurrentBreakpointProps: l } = v(t.defaultServerBreakpoint), {
9
9
  label: a,
10
10
  value: i,
11
11
  labelWidth: n = "auto",
12
12
  className: p,
13
- type: c = "vertical",
14
- labelAlign: m = "left"
15
- } = l(t), d = r(e["tedi-text-group"], e[`tedi-text-group--${c}`], p), u = h(n);
16
- return /* @__PURE__ */ x("dl", { className: d, style: { "--label-width": u }, children: [
17
- /* @__PURE__ */ o("dt", { className: r(e["tedi-text-group__label"], e[`tedi-text-group--align-${m}`]), children: y(a) }),
18
- /* @__PURE__ */ o("dd", { className: r(e["tedi-text-group__value"]), children: i })
13
+ type: u = "vertical",
14
+ labelAlign: c = "left",
15
+ valueAlign: d = "left"
16
+ } = l(t), m = r(e["tedi-text-group"], e[`tedi-text-group--${u}`], p), x = h(n);
17
+ return /* @__PURE__ */ g("dl", { className: m, style: { "--label-width": x }, children: [
18
+ /* @__PURE__ */ o("dt", { className: r(e["tedi-text-group__label"], e[`tedi-text-group--align-${c}`]), children: y(a) }),
19
+ /* @__PURE__ */ o("dd", { className: r(e["tedi-text-group__value"], e[`tedi-text-group__value--align-${d}`]), children: i })
19
20
  ] });
20
21
  };
21
22
  s.displayName = "TextGroup";
22
- const _ = Object.assign(s, {
23
- List: g
23
+ const $ = Object.assign(s, {
24
+ List: b
24
25
  });
25
26
  export {
26
- _ as TextGroup
27
+ $ as TextGroup
27
28
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-text-group":"tedi-text-group-be3b15d8","tedi-text-group--horizontal":"tedi-text-group--horizontal-9d91c910","tedi-text-group__label":"tedi-text-group__label-a8904597","tedi-text-group__value":"tedi-text-group__value-4bbf1a22","tedi-text-group--align-left":"tedi-text-group--align-left-cc82fd31","tedi-text-group--align-right":"tedi-text-group--align-right-0eebe973","tedi-text-group--list":"tedi-text-group--list-bd143f34","tedi-text-group__row":"tedi-text-group__row-fc6928bf"};exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-text-group":"tedi-text-group-be3b15d8","tedi-text-group--horizontal":"tedi-text-group--horizontal-9d91c910","tedi-text-group__label":"tedi-text-group__label-a8904597","tedi-text-group__value":"tedi-text-group__value-4bbf1a22","tedi-text-group__value--align-right":"tedi-text-group__value--align-right-b93b121e","tedi-text-group__value--align-left":"tedi-text-group__value--align-left-ed3950e5","tedi-text-group--align-left":"tedi-text-group--align-left-cc82fd31","tedi-text-group--align-right":"tedi-text-group--align-right-0eebe973","tedi-text-group--list":"tedi-text-group--list-bd143f34","tedi-text-group--columns":"tedi-text-group--columns-d5214f99","tedi-text-group__row":"tedi-text-group__row-fc6928bf","tedi-text-group--row-align-center":"tedi-text-group--row-align-center-df365a32"};exports.default=t;
@@ -3,10 +3,14 @@ const t = {
3
3
  "tedi-text-group--horizontal": "tedi-text-group--horizontal-9d91c910",
4
4
  "tedi-text-group__label": "tedi-text-group__label-a8904597",
5
5
  "tedi-text-group__value": "tedi-text-group__value-4bbf1a22",
6
+ "tedi-text-group__value--align-right": "tedi-text-group__value--align-right-b93b121e",
7
+ "tedi-text-group__value--align-left": "tedi-text-group__value--align-left-ed3950e5",
6
8
  "tedi-text-group--align-left": "tedi-text-group--align-left-cc82fd31",
7
9
  "tedi-text-group--align-right": "tedi-text-group--align-right-0eebe973",
8
10
  "tedi-text-group--list": "tedi-text-group--list-bd143f34",
9
- "tedi-text-group__row": "tedi-text-group__row-fc6928bf"
11
+ "tedi-text-group--columns": "tedi-text-group--columns-d5214f99",
12
+ "tedi-text-group__row": "tedi-text-group__row-fc6928bf",
13
+ "tedi-text-group--row-align-center": "tedi-text-group--row-align-center-df365a32"
10
14
  };
11
15
  export {
12
16
  t as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=4,c=8,l=e=>!!e&&!Array.isArray(e)&&!(e instanceof Date)&&"from"in e,f=(e,a,t)=>t&&l(a)&&a.from&&a.to?{from:t,to:void 0}:l(e)?e:void 0,D=e=>{const a=[];return e.disabled&&(Array.isArray(e.disabled)?a.push(...e.disabled):a.push(e.disabled)),e.minDate&&a.push({before:e.minDate}),e.maxDate&&a.push({after:e.maxDate}),e.disablePast&&a.push({before:new Date}),e.disableFuture&&a.push({after:new Date}),e.shouldDisableMonth&&a.push(t=>{var r;return((r=e.shouldDisableMonth)==null?void 0:r.call(e,t))??!1}),e.shouldDisableYear&&a.push(t=>{var r;return((r=e.shouldDisableYear)==null?void 0:r.call(e,t))??!1}),a},h=e=>{const a=new Date(2099,11,31),t=e.formatToParts(a),r=[],s=[];for(const o of t)o.type==="day"||o.type==="month"||o.type==="year"?r.push(o.type):o.type==="literal"&&r.length>0&&s.length<2&&s.push(o.value);return{fieldOrder:r,separators:s}},n=({fieldOrder:e,separators:a})=>{const t=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.map((r,s)=>{const o=r==="year"?"\\d{4}":"\\d{2}";return`${s>0?t(a[s-1]??""):""}(${o})`}).join("")};exports.CALENDAR_POPOVER_OFFSET=d;exports.CALENDAR_POPOVER_PADDING=c;exports.buildDateRegexSource=n;exports.buildDisabledMatchers=D;exports.getLocaleDateParts=h;exports.resolveRangeSelection=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=4,n=8,l=e=>!!e&&!Array.isArray(e)&&!(e instanceof Date)&&"from"in e,D=(e,a,t)=>{if(t&&l(a)&&a.from&&a.to)return{from:t,to:void 0};if(!l(e))return;const r=!!e.from&&!!e.to&&e.from.getTime()===e.to.getTime(),o=l(a)&&!!a.from&&!a.to;return r&&!o?{from:e.from,to:void 0}:e},c=e=>{const a=[];return e.disabled&&(Array.isArray(e.disabled)?a.push(...e.disabled):a.push(e.disabled)),e.minDate&&a.push({before:e.minDate}),e.maxDate&&a.push({after:e.maxDate}),e.disablePast&&a.push({before:new Date}),e.disableFuture&&a.push({after:new Date}),e.shouldDisableMonth&&a.push(t=>{var r;return((r=e.shouldDisableMonth)==null?void 0:r.call(e,t))??!1}),e.shouldDisableYear&&a.push(t=>{var r;return((r=e.shouldDisableYear)==null?void 0:r.call(e,t))??!1}),a},d=e=>{const a=new Date(2099,11,31),t=e.formatToParts(a),r=[],o=[];for(const s of t)s.type==="day"||s.type==="month"||s.type==="year"?r.push(s.type):s.type==="literal"&&r.length>0&&o.length<2&&o.push(s.value);return{fieldOrder:r,separators:o}},i=({fieldOrder:e,separators:a})=>{const t=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.map((r,o)=>{const s=r==="year"?"\\d{4}":"\\d{2}";return`${o>0?t(a[o-1]??""):""}(${s})`}).join("")};exports.CALENDAR_POPOVER_OFFSET=f;exports.CALENDAR_POPOVER_PADDING=n;exports.buildDateRegexSource=i;exports.buildDisabledMatchers=c;exports.getLocaleDateParts=d;exports.resolveRangeSelection=D;
@@ -13,27 +13,22 @@ export declare const CALENDAR_POPOVER_OFFSET = 4;
13
13
  export declare const CALENDAR_POPOVER_PADDING = 8;
14
14
  export type SelectedValueLike = Date | Date[] | DateRange | undefined;
15
15
  /**
16
- * Range-selection click resolver. react-day-picker's default `addToRange`
17
- * keeps a completed `{ from, to }` range and only moves one of its ends when
18
- * the user clicks again — so after picking a start and an end, clicking a new
19
- * start instead drags the existing end. That surprises users who expect a
20
- * fresh click to begin a new range.
16
+ * Range-selection click resolver that fixes two quirks in react-day-picker's default `addToRange`:
17
+ * clicking on a completed range drags an existing end instead of starting over, and the first click
18
+ * on an empty range returns a same-day `{ from, to }` that reads as already-complete (issue #813).
21
19
  *
22
- * This normalises that: once a range is complete, the next click starts over
23
- * with `from` set to the clicked day and `to` cleared. While the range is
24
- * still being built (or empty), DayPicker's own result is passed through.
20
+ * So: a click on a complete range starts a new one (`from` set, `to` cleared); the first click on an
21
+ * empty range becomes a `to`-less start (re-clicking the same day keeps a single-day range);
22
+ * otherwise DayPicker's result passes through.
25
23
  *
26
24
  * @param computed - the range react-day-picker derived from the click
27
- * @param previous - the range that was selected before this click
28
- * @param clickedDay - the day the user just clicked
25
+ * @param previous - the range selected before this click
26
+ * @param clickedDay - the day just clicked
29
27
  */
30
28
  export declare const resolveRangeSelection: (computed: SelectedValueLike, previous: SelectedValueLike, clickedDay: Date | undefined) => DateRange | undefined;
31
29
  /**
32
- * Resolves the month the calendar should start on for any selection
33
- * shape. Used by both `DateField` (single / multiple / range Date(s)) and
34
- * `DateTimeField` (single Date or `{from, to}` range). For arrays the
35
- * earliest date wins; for ranges the `from` (or `to` if `from` is unset)
36
- * wins. Falls back to the explicit `fallback` and finally `new Date()`.
30
+ * Resolves the month the calendar should open on for any selection shape: a single `Date`, an array
31
+ * (earliest date wins), or a range (`from`, else `to`). Falls back to `fallback`, then `new Date()`.
37
32
  */
38
33
  export declare const getInitialMonth: (val: SelectedValueLike, fallback?: Date) => Date;
39
34
  /**
@@ -58,10 +53,8 @@ export interface DisabledMatcherInputs {
58
53
  */
59
54
  export declare const buildDisabledMatchers: (inputs: DisabledMatcherInputs) => Matcher[];
60
55
  /**
61
- * Field order + literal separators extracted from a locale's date format,
62
- * derived via `Intl.DateTimeFormat.formatToParts`. Used by parsers in
63
- * `DateField` (date-only) and `DateTimeField` (date + " HH:mm") to build
64
- * a regex that round-trips the displayed value in any locale.
56
+ * Field order + literal separators extracted from a locale's date format (via
57
+ * `Intl.DateTimeFormat.formatToParts`), used to build a locale-aware parsing regex.
65
58
  */
66
59
  export interface LocaleDateParts {
67
60
  fieldOrder: ('day' | 'month' | 'year')[];
@@ -1,29 +1,35 @@
1
- const d = 4, c = 8, l = (e) => !!e && !Array.isArray(e) && !(e instanceof Date) && "from" in e, h = (e, a, o) => o && l(a) && a.from && a.to ? { from: o, to: void 0 } : l(e) ? e : void 0, D = (e) => {
1
+ const n = 4, h = 8, f = (e) => !!e && !Array.isArray(e) && !(e instanceof Date) && "from" in e, D = (e, a, t) => {
2
+ if (t && f(a) && a.from && a.to)
3
+ return { from: t, to: void 0 };
4
+ if (!f(e)) return;
5
+ const r = !!e.from && !!e.to && e.from.getTime() === e.to.getTime(), o = f(a) && !!a.from && !a.to;
6
+ return r && !o ? { from: e.from, to: void 0 } : e;
7
+ }, d = (e) => {
2
8
  const a = [];
3
- return e.disabled && (Array.isArray(e.disabled) ? a.push(...e.disabled) : a.push(e.disabled)), e.minDate && a.push({ before: e.minDate }), e.maxDate && a.push({ after: e.maxDate }), e.disablePast && a.push({ before: /* @__PURE__ */ new Date() }), e.disableFuture && a.push({ after: /* @__PURE__ */ new Date() }), e.shouldDisableMonth && a.push((o) => {
9
+ return e.disabled && (Array.isArray(e.disabled) ? a.push(...e.disabled) : a.push(e.disabled)), e.minDate && a.push({ before: e.minDate }), e.maxDate && a.push({ after: e.maxDate }), e.disablePast && a.push({ before: /* @__PURE__ */ new Date() }), e.disableFuture && a.push({ after: /* @__PURE__ */ new Date() }), e.shouldDisableMonth && a.push((t) => {
4
10
  var r;
5
- return ((r = e.shouldDisableMonth) == null ? void 0 : r.call(e, o)) ?? !1;
6
- }), e.shouldDisableYear && a.push((o) => {
11
+ return ((r = e.shouldDisableMonth) == null ? void 0 : r.call(e, t)) ?? !1;
12
+ }), e.shouldDisableYear && a.push((t) => {
7
13
  var r;
8
- return ((r = e.shouldDisableYear) == null ? void 0 : r.call(e, o)) ?? !1;
14
+ return ((r = e.shouldDisableYear) == null ? void 0 : r.call(e, t)) ?? !1;
9
15
  }), a;
10
- }, n = (e) => {
11
- const a = new Date(2099, 11, 31), o = e.formatToParts(a), r = [], s = [];
12
- for (const t of o)
13
- t.type === "day" || t.type === "month" || t.type === "year" ? r.push(t.type) : t.type === "literal" && r.length > 0 && s.length < 2 && s.push(t.value);
14
- return { fieldOrder: r, separators: s };
15
- }, b = ({ fieldOrder: e, separators: a }) => {
16
- const o = (r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
17
- return e.map((r, s) => {
18
- const t = r === "year" ? "\\d{4}" : "\\d{2}";
19
- return `${s > 0 ? o(a[s - 1] ?? "") : ""}(${t})`;
16
+ }, c = (e) => {
17
+ const a = new Date(2099, 11, 31), t = e.formatToParts(a), r = [], o = [];
18
+ for (const s of t)
19
+ s.type === "day" || s.type === "month" || s.type === "year" ? r.push(s.type) : s.type === "literal" && r.length > 0 && o.length < 2 && o.push(s.value);
20
+ return { fieldOrder: r, separators: o };
21
+ }, i = ({ fieldOrder: e, separators: a }) => {
22
+ const t = (r) => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
23
+ return e.map((r, o) => {
24
+ const s = r === "year" ? "\\d{4}" : "\\d{2}";
25
+ return `${o > 0 ? t(a[o - 1] ?? "") : ""}(${s})`;
20
26
  }).join("");
21
27
  };
22
28
  export {
23
- d as CALENDAR_POPOVER_OFFSET,
24
- c as CALENDAR_POPOVER_PADDING,
25
- b as buildDateRegexSource,
26
- D as buildDisabledMatchers,
27
- n as getLocaleDateParts,
28
- h as resolveRangeSelection
29
+ n as CALENDAR_POPOVER_OFFSET,
30
+ h as CALENDAR_POPOVER_PADDING,
31
+ i as buildDateRegexSource,
32
+ d as buildDisabledMatchers,
33
+ c as getLocaleDateParts,
34
+ D as resolveRangeSelection
29
35
  };