@epilot/zenith-react 0.1.0 → 0.2.0-next.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.
@@ -1,103 +1,106 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import * as Z from "react";
3
- import { SLOT_ATTR as _, mergeClasses as b } from "@epilot/zenith-runtime/v1";
4
- import { Field as q, FieldLabel as w, FieldError as z } from "../field/field.js";
5
- import { makeZenithStyles as B } from "../../styles/make-styles.js";
6
- import { DateTimePickerRoot as G } from "./date-time-picker-context.js";
7
- import { DateTimePickerInput as H } from "./date-time-picker-input.js";
8
- import { DateTimePickerPopover as J } from "./date-time-picker-popover.js";
9
- import { DateTimePickerPanel as K } from "./date-time-picker-panel.js";
10
- const Q = B({
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { SLOT_ATTR as w, mergeClasses as z } from "@epilot/zenith-runtime/v1";
4
+ import { Field as G, FieldLabel as H, FieldError as J } from "../field/field.js";
5
+ import { makeZenithStyles as K } from "../../styles/make-styles.js";
6
+ import { DateTimePickerRoot as Q } from "./date-time-picker-context.js";
7
+ import { DateTimePickerLabelProvider as U, DateTimePickerInput as W } from "./date-time-picker-input.js";
8
+ import { DateTimePickerPopover as X } from "./date-time-picker-popover.js";
9
+ import { DateTimePickerPanel as Y } from "./date-time-picker-panel.js";
10
+ const $ = K({
11
11
  root: {
12
12
  width: "100%"
13
13
  }
14
- }), ie = Z.forwardRef(
14
+ }), se = o.forwardRef(
15
15
  function({
16
- value: m,
17
- onChange: a,
18
- onBlur: d,
19
- disabled: l = !1,
20
- disablePast: s = !1,
21
- label: o,
22
- error: t,
23
- placeholder: c,
24
- format: n,
25
- locale: f,
26
- className: p,
27
- keyboardIcon: y,
28
- okLabel: h,
29
- cancelLabel: k,
30
- inputAriaLabel: v,
31
- openPickerAriaLabel: P,
32
- previousMonthLabel: T,
33
- nextMonthLabel: u,
34
- hoursLabel: D,
35
- minutesLabel: F,
36
- showTodayButton: M,
37
- todayLabel: R,
38
- showWeekNumbers: g,
39
- testId: x,
40
- currentTimeInTimezone: S,
41
- timePickerPosition: j,
42
- showTimePicker: r = !0,
43
- editable: L,
44
- iconPosition: A,
45
- minuteStep: C
46
- }, E) {
47
- const I = Q(), N = t ? "destructive" : "highlight", O = n ?? (r ? void 0 : "dd/MM/yyyy"), V = c ?? (r ? void 0 : "dd/MM/yyyy");
16
+ value: a,
17
+ onChange: c,
18
+ onBlur: n,
19
+ disabled: f = !1,
20
+ disablePast: p = !1,
21
+ label: t,
22
+ error: r,
23
+ placeholder: h,
24
+ format: y,
25
+ locale: u,
26
+ className: v,
27
+ keyboardIcon: P,
28
+ okLabel: k,
29
+ cancelLabel: T,
30
+ inputAriaLabel: i,
31
+ openPickerAriaLabel: D,
32
+ previousMonthLabel: F,
33
+ nextMonthLabel: I,
34
+ hoursLabel: M,
35
+ minutesLabel: g,
36
+ showTodayButton: R,
37
+ todayLabel: x,
38
+ showWeekNumbers: S,
39
+ testId: j,
40
+ currentTimeInTimezone: L,
41
+ timePickerPosition: B,
42
+ showTimePicker: d = !0,
43
+ editable: C,
44
+ iconPosition: E,
45
+ minuteStep: N
46
+ }, O) {
47
+ const V = $(), Z = r ? "destructive" : "highlight", m = o.useId(), l = o.useId(), _ = o.useMemo(
48
+ () => t ? { inputId: m, labelId: l, namedByLabel: i === void 0 } : null,
49
+ [t, m, l, i]
50
+ ), b = y ?? (d ? void 0 : "dd/MM/yyyy"), q = h ?? (d ? void 0 : "dd/MM/yyyy");
48
51
  return /* @__PURE__ */ e(
49
- G,
52
+ Q,
50
53
  {
51
- currentTimeInTimezone: S,
52
- disabled: l,
53
- disablePast: s,
54
- format: O,
55
- locale: f,
56
- onBlur: d,
57
- onChange: a,
58
- value: m,
59
- children: /* @__PURE__ */ i(
60
- q,
54
+ currentTimeInTimezone: L,
55
+ disabled: f,
56
+ disablePast: p,
57
+ format: b,
58
+ locale: u,
59
+ onBlur: n,
60
+ onChange: c,
61
+ value: a,
62
+ children: /* @__PURE__ */ s(
63
+ G,
61
64
  {
62
- className: b(I.root, p),
65
+ className: z(V.root, v),
63
66
  "data-slot": "datetimepicker",
64
- [_]: "datetimepicker",
65
- ref: E,
66
- variant: N,
67
+ [w]: "datetimepicker",
68
+ ref: O,
69
+ variant: Z,
67
70
  children: [
68
- o && /* @__PURE__ */ e(w, { children: o }),
69
- /* @__PURE__ */ i(J, { children: [
71
+ t && /* @__PURE__ */ e(H, { id: l, htmlFor: m, children: t }),
72
+ /* @__PURE__ */ e(U, { value: _, children: /* @__PURE__ */ s(X, { children: [
70
73
  /* @__PURE__ */ e(
71
- H,
74
+ W,
72
75
  {
73
- editable: L,
74
- iconPosition: A,
75
- inputAriaLabel: v,
76
- keyboardIcon: y,
77
- openPickerAriaLabel: P,
78
- placeholder: V,
79
- testId: x
76
+ editable: C,
77
+ iconPosition: E,
78
+ inputAriaLabel: i,
79
+ keyboardIcon: P,
80
+ openPickerAriaLabel: D,
81
+ placeholder: q,
82
+ testId: j
80
83
  }
81
84
  ),
82
85
  /* @__PURE__ */ e(
83
- K,
86
+ Y,
84
87
  {
85
- cancelLabel: k,
86
- hoursLabel: D,
87
- minuteStep: C,
88
- minutesLabel: F,
89
- nextMonthLabel: u,
90
- okLabel: h,
91
- previousMonthLabel: T,
92
- showTimePicker: r,
93
- showTodayButton: M,
94
- showWeekNumbers: g,
95
- timePickerPosition: j,
96
- todayLabel: R
88
+ cancelLabel: T,
89
+ hoursLabel: M,
90
+ minuteStep: N,
91
+ minutesLabel: g,
92
+ nextMonthLabel: I,
93
+ okLabel: k,
94
+ previousMonthLabel: F,
95
+ showTimePicker: d,
96
+ showTodayButton: R,
97
+ showWeekNumbers: S,
98
+ timePickerPosition: B,
99
+ todayLabel: x
97
100
  }
98
101
  )
99
- ] }),
100
- t && /* @__PURE__ */ e(z, { children: t })
102
+ ] }) }),
103
+ r && /* @__PURE__ */ e(J, { children: r })
101
104
  ]
102
105
  }
103
106
  )
@@ -106,10 +109,10 @@ const Q = B({
106
109
  }
107
110
  );
108
111
  export {
109
- ie as DateTimePicker,
110
- H as DateTimePickerInput,
111
- K as DateTimePickerPanel,
112
- J as DateTimePickerPopover,
113
- G as DateTimePickerRoot
112
+ se as DateTimePicker,
113
+ W as DateTimePickerInput,
114
+ Y as DateTimePickerPanel,
115
+ X as DateTimePickerPopover,
116
+ Q as DateTimePickerRoot
114
117
  };
115
118
  //# sourceMappingURL=date-time-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-picker.js","sources":["../../../src/components/date-time-picker/date-time-picker.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeClasses } from \"@epilot/zenith-runtime/v1\"\n\nimport { Field, FieldError, FieldLabel } from \"../field/field\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\n\nimport { DateTimePickerRoot } from \"./date-time-picker-context\"\nimport type { DateTimePickerRootProps } from \"./date-time-picker-context\"\nimport { DateTimePickerInput } from \"./date-time-picker-input\"\nimport type { DateTimePickerInputProps } from \"./date-time-picker-input\"\nimport { DateTimePickerPopover } from \"./date-time-picker-popover\"\nimport type { DateTimePickerPopoverProps } from \"./date-time-picker-popover\"\nimport { DateTimePickerPanel } from \"./date-time-picker-panel\"\nimport type { DateTimePickerPanelProps } from \"./date-time-picker-panel\"\nimport { Calendar } from \"./calendar\"\nimport type { CalendarProps } from \"./calendar\"\nimport { TimePicker } from \"./time-picker\"\nimport type { TimePickerProps } from \"./time-picker\"\nimport type { DateTimePickerLocale } from \"./date-time-picker-utils\"\n\ntype DateTimePickerProps = {\n value: Date | null\n onChange: (date: Date | null) => void\n onBlur?: () => void\n disabled?: boolean\n disablePast?: boolean\n label?: string\n error?: string\n placeholder?: string\n format?: string\n locale?: DateTimePickerLocale\n className?: string\n keyboardIcon?: React.ReactNode\n okLabel?: string\n cancelLabel?: string\n inputAriaLabel?: string\n openPickerAriaLabel?: string\n previousMonthLabel?: string\n nextMonthLabel?: string\n hoursLabel?: string\n minutesLabel?: string\n showTodayButton?: boolean\n todayLabel?: string\n showWeekNumbers?: boolean\n testId?: string\n currentTimeInTimezone?: Date\n timePickerPosition?: \"bottom\" | \"side\"\n showTimePicker?: boolean\n editable?: boolean\n iconPosition?: \"start\" | \"end\"\n minuteStep?: number\n}\n\nconst useStyles = makeZenithStyles({\n root: {\n width: \"100%\",\n },\n})\n\nconst DateTimePicker = React.forwardRef<HTMLDivElement, DateTimePickerProps>(\n function DateTimePicker(\n {\n value,\n onChange,\n onBlur,\n disabled = false,\n disablePast = false,\n label,\n error,\n placeholder,\n format,\n locale,\n className,\n keyboardIcon,\n okLabel,\n cancelLabel,\n inputAriaLabel,\n openPickerAriaLabel,\n previousMonthLabel,\n nextMonthLabel,\n hoursLabel,\n minutesLabel,\n showTodayButton,\n todayLabel,\n showWeekNumbers,\n testId,\n currentTimeInTimezone,\n timePickerPosition,\n showTimePicker = true,\n editable,\n iconPosition,\n minuteStep,\n },\n ref\n ) {\n const styles = useStyles()\n const fieldVariant = error ? \"destructive\" : \"highlight\"\n const resolvedFormat = format ?? (showTimePicker ? undefined : \"dd/MM/yyyy\")\n const resolvedPlaceholder =\n placeholder ?? (showTimePicker ? undefined : \"dd/MM/yyyy\")\n\n return (\n <DateTimePickerRoot\n currentTimeInTimezone={currentTimeInTimezone}\n disabled={disabled}\n disablePast={disablePast}\n format={resolvedFormat}\n locale={locale}\n onBlur={onBlur}\n onChange={onChange}\n value={value}\n >\n <Field\n className={mergeClasses(styles.root, className)}\n data-slot=\"datetimepicker\"\n {...{ [SLOT_ATTR]: \"datetimepicker\" }}\n ref={ref}\n variant={fieldVariant}\n >\n {label && <FieldLabel>{label}</FieldLabel>}\n <DateTimePickerPopover>\n <DateTimePickerInput\n editable={editable}\n iconPosition={iconPosition}\n inputAriaLabel={inputAriaLabel}\n keyboardIcon={keyboardIcon}\n openPickerAriaLabel={openPickerAriaLabel}\n placeholder={resolvedPlaceholder}\n testId={testId}\n />\n <DateTimePickerPanel\n cancelLabel={cancelLabel}\n hoursLabel={hoursLabel}\n minuteStep={minuteStep}\n minutesLabel={minutesLabel}\n nextMonthLabel={nextMonthLabel}\n okLabel={okLabel}\n previousMonthLabel={previousMonthLabel}\n showTimePicker={showTimePicker}\n showTodayButton={showTodayButton}\n showWeekNumbers={showWeekNumbers}\n timePickerPosition={timePickerPosition}\n todayLabel={todayLabel}\n />\n </DateTimePickerPopover>\n {error && <FieldError>{error}</FieldError>}\n </Field>\n </DateTimePickerRoot>\n )\n }\n)\n\nexport {\n DateTimePicker,\n DateTimePickerRoot,\n DateTimePickerInput,\n DateTimePickerPopover,\n DateTimePickerPanel,\n Calendar,\n TimePicker,\n}\n\nexport type {\n DateTimePickerProps,\n DateTimePickerRootProps,\n DateTimePickerInputProps,\n DateTimePickerPopoverProps,\n DateTimePickerPanelProps,\n CalendarProps,\n TimePickerProps,\n DateTimePickerLocale,\n}\n"],"names":["useStyles","makeZenithStyles","DateTimePicker","React","value","onChange","onBlur","disabled","disablePast","label","error","placeholder","format","locale","className","keyboardIcon","okLabel","cancelLabel","inputAriaLabel","openPickerAriaLabel","previousMonthLabel","nextMonthLabel","hoursLabel","minutesLabel","showTodayButton","todayLabel","showWeekNumbers","testId","currentTimeInTimezone","timePickerPosition","showTimePicker","editable","iconPosition","minuteStep","ref","styles","fieldVariant","resolvedFormat","resolvedPlaceholder","jsx","DateTimePickerRoot","jsxs","Field","mergeClasses","SLOT_ATTR","FieldLabel","DateTimePickerPopover","DateTimePickerInput","DateTimePickerPanel","FieldError"],"mappings":";;;;;;;;;AAsDA,MAAMA,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,OAAO;AAAA,EAAA;AAEX,CAAC,GAEKC,KAAiBC,EAAM;AAAA,EAC3B,SACE;AAAA,IACE,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,aAAAC,IAA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;AAAA,oBACA,cAAAH;AAAA,oBACA,qBAAAI;AAAA,oBACA,aAAamB;AAAA,oBACb,QAAAX;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEF,gBAAAY;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,aAAA/B;AAAA,oBACA,YAAAK;AAAA,oBACA,YAAAW;AAAA,oBACA,cAAAV;AAAA,oBACA,gBAAAF;AAAA,oBACA,SAAAL;AAAA,oBACA,oBAAAI;AAAA,oBACA,gBAAAU;AAAA,oBACA,iBAAAN;AAAA,oBACA,iBAAAE;AAAA,oBACA,oBAAAG;AAAA,oBACA,YAAAJ;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF,GACF;AAAA,cACCf,KAAS,gBAAA6B,EAACU,GAAA,EAAY,UAAAvC,EAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC/B;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"date-time-picker.js","sources":["../../../src/components/date-time-picker/date-time-picker.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { mergeClasses } from \"@epilot/zenith-runtime/v1\"\n\nimport { Field, FieldError, FieldLabel } from \"../field/field\"\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeZenithStyles } from \"../../styles/make-styles\"\n\nimport { DateTimePickerRoot } from \"./date-time-picker-context\"\nimport type { DateTimePickerRootProps } from \"./date-time-picker-context\"\nimport {\n DateTimePickerInput,\n DateTimePickerLabelProvider,\n} from \"./date-time-picker-input\"\nimport type { DateTimePickerInputProps } from \"./date-time-picker-input\"\nimport { DateTimePickerPopover } from \"./date-time-picker-popover\"\nimport type { DateTimePickerPopoverProps } from \"./date-time-picker-popover\"\nimport { DateTimePickerPanel } from \"./date-time-picker-panel\"\nimport type { DateTimePickerPanelProps } from \"./date-time-picker-panel\"\nimport { Calendar } from \"./calendar\"\nimport type { CalendarProps } from \"./calendar\"\nimport { TimePicker } from \"./time-picker\"\nimport type { TimePickerProps } from \"./time-picker\"\nimport type { DateTimePickerLocale } from \"./date-time-picker-utils\"\n\ntype DateTimePickerProps = {\n value: Date | null\n onChange: (date: Date | null) => void\n onBlur?: () => void\n disabled?: boolean\n disablePast?: boolean\n label?: string\n error?: string\n placeholder?: string\n format?: string\n locale?: DateTimePickerLocale\n className?: string\n keyboardIcon?: React.ReactNode\n okLabel?: string\n cancelLabel?: string\n inputAriaLabel?: string\n openPickerAriaLabel?: string\n previousMonthLabel?: string\n nextMonthLabel?: string\n hoursLabel?: string\n minutesLabel?: string\n showTodayButton?: boolean\n todayLabel?: string\n showWeekNumbers?: boolean\n testId?: string\n currentTimeInTimezone?: Date\n timePickerPosition?: \"bottom\" | \"side\"\n showTimePicker?: boolean\n editable?: boolean\n iconPosition?: \"start\" | \"end\"\n minuteStep?: number\n}\n\nconst useStyles = makeZenithStyles({\n root: {\n width: \"100%\",\n },\n})\n\nconst DateTimePicker = React.forwardRef<HTMLDivElement, DateTimePickerProps>(\n function DateTimePicker(\n {\n value,\n onChange,\n onBlur,\n disabled = false,\n disablePast = false,\n label,\n error,\n placeholder,\n format,\n locale,\n className,\n keyboardIcon,\n okLabel,\n cancelLabel,\n inputAriaLabel,\n openPickerAriaLabel,\n previousMonthLabel,\n nextMonthLabel,\n hoursLabel,\n minutesLabel,\n showTodayButton,\n todayLabel,\n showWeekNumbers,\n testId,\n currentTimeInTimezone,\n timePickerPosition,\n showTimePicker = true,\n editable,\n iconPosition,\n minuteStep,\n },\n ref\n ) {\n const styles = useStyles()\n const fieldVariant = error ? \"destructive\" : \"highlight\"\n // This component renders both the label and the input, so it connects them (#16).\n const inputId = React.useId()\n const labelId = React.useId()\n const labelling = React.useMemo(\n () =>\n label\n ? { inputId, labelId, namedByLabel: inputAriaLabel === undefined }\n : null,\n [label, inputId, labelId, inputAriaLabel]\n )\n const resolvedFormat = format ?? (showTimePicker ? undefined : \"dd/MM/yyyy\")\n const resolvedPlaceholder =\n placeholder ?? (showTimePicker ? undefined : \"dd/MM/yyyy\")\n\n return (\n <DateTimePickerRoot\n currentTimeInTimezone={currentTimeInTimezone}\n disabled={disabled}\n disablePast={disablePast}\n format={resolvedFormat}\n locale={locale}\n onBlur={onBlur}\n onChange={onChange}\n value={value}\n >\n <Field\n className={mergeClasses(styles.root, className)}\n data-slot=\"datetimepicker\"\n {...{ [SLOT_ATTR]: \"datetimepicker\" }}\n ref={ref}\n variant={fieldVariant}\n >\n {label && (\n <FieldLabel id={labelId} htmlFor={inputId}>\n {label}\n </FieldLabel>\n )}\n <DateTimePickerLabelProvider value={labelling}>\n <DateTimePickerPopover>\n <DateTimePickerInput\n editable={editable}\n iconPosition={iconPosition}\n inputAriaLabel={inputAriaLabel}\n keyboardIcon={keyboardIcon}\n openPickerAriaLabel={openPickerAriaLabel}\n placeholder={resolvedPlaceholder}\n testId={testId}\n />\n <DateTimePickerPanel\n cancelLabel={cancelLabel}\n hoursLabel={hoursLabel}\n minuteStep={minuteStep}\n minutesLabel={minutesLabel}\n nextMonthLabel={nextMonthLabel}\n okLabel={okLabel}\n previousMonthLabel={previousMonthLabel}\n showTimePicker={showTimePicker}\n showTodayButton={showTodayButton}\n showWeekNumbers={showWeekNumbers}\n timePickerPosition={timePickerPosition}\n todayLabel={todayLabel}\n />\n </DateTimePickerPopover>\n </DateTimePickerLabelProvider>\n {error && <FieldError>{error}</FieldError>}\n </Field>\n </DateTimePickerRoot>\n )\n }\n)\n\nexport {\n DateTimePicker,\n DateTimePickerRoot,\n DateTimePickerInput,\n DateTimePickerPopover,\n DateTimePickerPanel,\n Calendar,\n TimePicker,\n}\n\nexport type {\n DateTimePickerProps,\n DateTimePickerRootProps,\n DateTimePickerInputProps,\n DateTimePickerPopoverProps,\n DateTimePickerPanelProps,\n CalendarProps,\n TimePickerProps,\n DateTimePickerLocale,\n}\n"],"names":["useStyles","makeZenithStyles","DateTimePicker","React","value","onChange","onBlur","disabled","disablePast","label","error","placeholder","format","locale","className","keyboardIcon","okLabel","cancelLabel","inputAriaLabel","openPickerAriaLabel","previousMonthLabel","nextMonthLabel","hoursLabel","minutesLabel","showTodayButton","todayLabel","showWeekNumbers","testId","currentTimeInTimezone","timePickerPosition","showTimePicker","editable","iconPosition","minuteStep","ref","styles","fieldVariant","inputId","labelId","labelling","resolvedFormat","resolvedPlaceholder","jsx","DateTimePickerRoot","jsxs","Field","mergeClasses","SLOT_ATTR","FieldLabel","DateTimePickerLabelProvider","DateTimePickerPopover","DateTimePickerInput","DateTimePickerPanel","FieldError"],"mappings":";;;;;;;;;AAyDA,MAAMA,IAAYC,EAAiB;AAAA,EACjC,MAAM;AAAA,IACJ,OAAO;AAAA,EAAA;AAEX,CAAC,GAEKC,KAAiBC,EAAM;AAAA,EAC3B,SACE;AAAA,IACE,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,aAAAC,IAAc;AAAA,IACd,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,GAEFC,GACA;AACA,UAAMC,IAASnC,EAAA,GACToC,IAAe1B,IAAQ,gBAAgB,aAEvC2B,IAAUlC,EAAM,MAAA,GAChBmC,IAAUnC,EAAM,MAAA,GAChBoC,IAAYpC,EAAM;AAAA,MACtB,MACEM,IACI,EAAE,SAAA4B,GAAS,SA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A,gBAAA;AAAA,cACF,EAAA,CACF,EAAA,CACF;AAAA,cACCf,KAAS,gBAAAgC,EAACW,GAAA,EAAY,UAAA3C,EAAA,CAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC/B;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as e, jsxs as x } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Root as b, Close as y, Content as v, Description as z, Overlay as R, Portal as S, Title as W, Trigger as L } from "../../vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js";
3
+ import { Root as z, Close as y, Content as R, Description as S, Overlay as W, Portal as L, Title as N, Trigger as T } from "../../vendor/.bun/@radix-ui_react-dialog@1.1.15_2b23df507bdda662/vendor/@radix-ui/react-dialog/dist/index.js";
4
4
  import { mergeClasses as d, SLOT_ATTR as l, shorthands as s } from "@epilot/zenith-runtime/v1";
5
- import { useAppearanceAttributes as N } from "../appearance-boundary/appearance-boundary.js";
6
- import { useDensity as T } from "../density-provider/density-provider.js";
7
- import { makeZenithStyles as A } from "../../styles/make-styles.js";
8
- import { leadingSm as O, textSm as F, grayA11 as I, grayA12 as k, fontWeightSemibold as P, leadingLg as H, textLg as X, focusRing as h, accentSoft as j, accentA11 as B, spacingGroup2 as f, container5xl as E, container4xl as _, container3xl as M, container2xl as Z, containerXl as G, containerLg as q, containerMd as J, containerSm as K, body as Q, spacingElement2 as p, grayA1 as U, radiusXl as V, spacingLayout1 as Y } from "../../tokens/index.js";
9
- const c = A({
5
+ import { useAppearanceAttributes as D } from "../appearance-boundary/appearance-boundary.js";
6
+ import { useDensity as A } from "../density-provider/density-provider.js";
7
+ import { makeZenithStyles as O } from "../../styles/make-styles.js";
8
+ import { leadingSm as F, textSm as I, grayA11 as k, grayA12 as P, fontWeightSemibold as H, leadingLg as X, textLg as j, focusRing as h, accentSoft as B, accentA11 as E, spacingGroup2 as f, container5xl as _, container4xl as M, container3xl as Z, container2xl as G, containerXl as q, containerLg as J, containerMd as K, containerSm as Q, body as U, spacingElement2 as p, grayA1 as V, radiusXl as Y, spacingLayout1 as $ } from "../../tokens/index.js";
9
+ const c = O({
10
10
  overlay: {
11
11
  position: "fixed",
12
12
  ...s.inset(0),
@@ -41,7 +41,7 @@ const c = A({
41
41
  }
42
42
  },
43
43
  content: {
44
- backgroundColor: Q,
44
+ backgroundColor: U,
45
45
  position: "fixed",
46
46
  top: "50%",
47
47
  left: "50%",
@@ -51,9 +51,9 @@ const c = A({
51
51
  width: "100%",
52
52
  maxWidth: "calc(100% - 2rem)",
53
53
  transform: "translate(-50%, -50%)",
54
- ...s.gap(Y),
55
- ...s.borderRadius(V),
56
- ...s.border("1px", "solid", U),
54
+ ...s.gap($),
55
+ ...s.borderRadius(Y),
56
+ ...s.border("1px", "solid", V),
57
57
  // v1 shadow-lg; elevation has no token in this package.
58
58
  boxShadow: "0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",
59
59
  "@media (prefers-reduced-motion: reduce)": {
@@ -94,14 +94,14 @@ const c = A({
94
94
  animationDuration: "150ms",
95
95
  animationTimingFunction: "cubic-bezier(0.4, 0, 1, 1)"
96
96
  },
97
- "&[data-size='sm']": { maxWidth: K },
98
- "&[data-size='md']": { maxWidth: J },
99
- "&[data-size='lg']": { maxWidth: q },
100
- "&[data-size='xl']": { maxWidth: G },
101
- "&[data-size='2xl']": { maxWidth: Z },
102
- "&[data-size='3xl']": { maxWidth: M },
103
- "&[data-size='4xl']": { maxWidth: _ },
104
- "&[data-size='5xl']": { maxWidth: E },
97
+ "&[data-size='sm']": { maxWidth: Q },
98
+ "&[data-size='md']": { maxWidth: K },
99
+ "&[data-size='lg']": { maxWidth: J },
100
+ "&[data-size='xl']": { maxWidth: q },
101
+ "&[data-size='2xl']": { maxWidth: G },
102
+ "&[data-size='3xl']": { maxWidth: Z },
103
+ "&[data-size='4xl']": { maxWidth: M },
104
+ "&[data-size='5xl']": { maxWidth: _ },
105
105
  "&[data-size='full-width']": { maxWidth: "100%" }
106
106
  },
107
107
  contentPadding: {
@@ -123,9 +123,9 @@ const c = A({
123
123
  // v1 rounded-full; no full-radius token exists in this package.
124
124
  borderRadius: "9999px",
125
125
  cursor: "pointer",
126
- color: B,
126
+ color: E,
127
127
  ":hover": {
128
- backgroundColor: j
128
+ backgroundColor: B
129
129
  },
130
130
  ":focus-visible": {
131
131
  outlineWidth: "2px",
@@ -155,15 +155,15 @@ const c = A({
155
155
  justifyContent: "flex-end"
156
156
  },
157
157
  title: {
158
- fontSize: X,
159
- lineHeight: H,
160
- fontWeight: P,
161
- color: k
158
+ fontSize: j,
159
+ lineHeight: X,
160
+ fontWeight: H,
161
+ color: P
162
162
  },
163
163
  description: {
164
- color: I,
165
- fontSize: F,
166
- lineHeight: O
164
+ color: k,
165
+ fontSize: I,
166
+ lineHeight: F
167
167
  },
168
168
  srOnly: {
169
169
  position: "absolute",
@@ -175,7 +175,7 @@ const c = A({
175
175
  clip: "rect(0, 0, 0, 0)",
176
176
  whiteSpace: "nowrap"
177
177
  }
178
- }), $ = n.forwardRef(
178
+ }), tt = n.forwardRef(
179
179
  function(t, o) {
180
180
  return /* @__PURE__ */ e(
181
181
  "svg",
@@ -197,13 +197,13 @@ const c = A({
197
197
  }
198
198
  );
199
199
  }
200
- ), lt = n.forwardRef(
200
+ ), st = n.forwardRef(
201
201
  function(t, o) {
202
- return /* @__PURE__ */ e(b, { "data-slot": "dialog", ...t });
202
+ return /* @__PURE__ */ e(z, { "data-slot": "dialog", ...t });
203
203
  }
204
- ), st = n.forwardRef(function({ className: t, ...o }, a) {
204
+ ), dt = n.forwardRef(function({ className: t, ...o }, a) {
205
205
  return /* @__PURE__ */ e(
206
- L,
206
+ T,
207
207
  {
208
208
  ref: a,
209
209
  "data-slot": "dialog-trigger",
@@ -212,10 +212,10 @@ const c = A({
212
212
  ...o
213
213
  }
214
214
  );
215
- }), dt = n.forwardRef(
215
+ }), ct = n.forwardRef(
216
216
  function(t, o) {
217
217
  return /* @__PURE__ */ e(
218
- S,
218
+ L,
219
219
  {
220
220
  "data-slot": "dialog-portal",
221
221
  [l]: "dialog-portal",
@@ -223,42 +223,44 @@ const c = A({
223
223
  }
224
224
  );
225
225
  }
226
- ), ct = n.forwardRef(function({ className: t, ...o }, a) {
227
- const i = c();
226
+ ), mt = n.forwardRef(function({ className: t, ...o }, a) {
227
+ const i = c(), m = D();
228
228
  return /* @__PURE__ */ e(
229
- R,
229
+ W,
230
230
  {
231
231
  ref: a,
232
232
  "data-slot": "dialog-overlay",
233
233
  [l]: "dialog-overlay",
234
+ ...m,
234
235
  className: d(i.overlay, t),
235
236
  ...o
236
237
  }
237
238
  );
238
- }), mt = n.forwardRef(function({
239
+ }), gt = n.forwardRef(function({
239
240
  className: t,
240
241
  children: o,
241
242
  showCloseButton: a = !0,
242
- flush: i = !1,
243
- size: g = "lg",
244
- ...D
245
- }, C) {
246
- const m = c(), u = T(), w = N();
243
+ closeButtonLabel: i = "Close",
244
+ flush: m = !1,
245
+ size: C = "lg",
246
+ ...w
247
+ }, b) {
248
+ const g = c(), u = A(), v = D();
247
249
  return /* @__PURE__ */ x(
248
- v,
250
+ R,
249
251
  {
250
- ref: C,
252
+ ref: b,
251
253
  "data-slot": "dialog-content",
252
254
  [l]: "dialog-content",
253
255
  ...u !== void 0 ? { "data-density": u } : {},
254
- ...w,
255
- "data-size": g,
256
+ ...v,
257
+ "data-size": C,
256
258
  className: d(
257
- m.content,
258
- !i && m.contentPadding,
259
+ g.content,
260
+ !m && g.contentPadding,
259
261
  t
260
262
  ),
261
- ...D,
263
+ ...w,
262
264
  children: [
263
265
  o,
264
266
  a && /* @__PURE__ */ x(
@@ -266,30 +268,30 @@ const c = A({
266
268
  {
267
269
  "data-slot": "dialog-close",
268
270
  [l]: "dialog-close",
269
- className: m.closeButton,
271
+ className: g.closeButton,
270
272
  children: [
271
- /* @__PURE__ */ e($, {}),
272
- /* @__PURE__ */ e("span", { className: m.srOnly, children: "Close" })
273
+ /* @__PURE__ */ e(tt, {}),
274
+ /* @__PURE__ */ e("span", { className: g.srOnly, children: i })
273
275
  ]
274
276
  }
275
277
  )
276
278
  ]
277
279
  }
278
280
  );
279
- }), gt = n.forwardRef(function({ className: t, children: o, ...a }, i) {
280
- const g = c();
281
+ }), ft = n.forwardRef(function({ className: t, children: o, ...a }, i) {
282
+ const m = c();
281
283
  return /* @__PURE__ */ e(
282
284
  y,
283
285
  {
284
286
  ref: i,
285
287
  "data-slot": "dialog-close",
286
288
  [l]: "dialog-close",
287
- className: d(g.close, t),
289
+ className: d(m.close, t),
288
290
  ...a,
289
291
  children: o
290
292
  }
291
293
  );
292
- }), ft = n.forwardRef(
294
+ }), pt = n.forwardRef(
293
295
  function({ className: t, ...o }, a) {
294
296
  const i = c();
295
297
  return /* @__PURE__ */ e(
@@ -303,7 +305,7 @@ const c = A({
303
305
  }
304
306
  );
305
307
  }
306
- ), pt = n.forwardRef(
308
+ ), ut = n.forwardRef(
307
309
  function({ className: t, ...o }, a) {
308
310
  const i = c();
309
311
  return /* @__PURE__ */ e(
@@ -317,10 +319,10 @@ const c = A({
317
319
  }
318
320
  );
319
321
  }
320
- ), ut = n.forwardRef(function({ className: t, ...o }, a) {
322
+ ), xt = n.forwardRef(function({ className: t, ...o }, a) {
321
323
  const i = c();
322
324
  return /* @__PURE__ */ e(
323
- W,
325
+ N,
324
326
  {
325
327
  ref: a,
326
328
  "data-slot": "dialog-title",
@@ -329,10 +331,10 @@ const c = A({
329
331
  ...o
330
332
  }
331
333
  );
332
- }), xt = n.forwardRef(function({ className: t, ...o }, a) {
334
+ }), ht = n.forwardRef(function({ className: t, ...o }, a) {
333
335
  const i = c();
334
336
  return /* @__PURE__ */ e(
335
- z,
337
+ S,
336
338
  {
337
339
  ref: a,
338
340
  "data-slot": "dialog-description",
@@ -343,15 +345,15 @@ const c = A({
343
345
  );
344
346
  });
345
347
  export {
346
- lt as Dialog,
347
- gt as DialogClose,
348
- mt as DialogContent,
349
- xt as DialogDescription,
350
- pt as DialogFooter,
351
- ft as DialogHeader,
352
- ct as DialogOverlay,
353
- dt as DialogPortal,
354
- ut as DialogTitle,
355
- st as DialogTrigger
348
+ st as Dialog,
349
+ ft as DialogClose,
350
+ gt as DialogContent,
351
+ ht as DialogDescription,
352
+ ut as DialogFooter,
353
+ pt as DialogHeader,
354
+ mt as DialogOverlay,
355
+ ct as DialogPortal,
356
+ xt as DialogTitle,
357
+ dt as DialogTrigger
356
358
  };
357
359
  //# sourceMappingURL=dialog.js.map