@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.
- package/README.md +34 -0
- package/dist/components/alert-dialog/alert-dialog.js +48 -47
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/callout/callout.js +51 -49
- package/dist/components/callout/callout.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +194 -184
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker-input.js +127 -114
- package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
- package/dist/components/date-time-picker/date-time-picker.js +91 -88
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
- package/dist/components/dialog/dialog.js +74 -72
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +69 -67
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/field/field.js +215 -184
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/tabs/tabs.js +131 -76
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/tokens.json +1 -1
- package/package.json +3 -3
|
@@ -1,103 +1,106 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { SLOT_ATTR as
|
|
4
|
-
import { Field as
|
|
5
|
-
import { makeZenithStyles as
|
|
6
|
-
import { DateTimePickerRoot as
|
|
7
|
-
import { DateTimePickerInput as
|
|
8
|
-
import { DateTimePickerPopover as
|
|
9
|
-
import { DateTimePickerPanel as
|
|
10
|
-
const
|
|
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
|
-
}),
|
|
14
|
+
}), se = o.forwardRef(
|
|
15
15
|
function({
|
|
16
|
-
value:
|
|
17
|
-
onChange:
|
|
18
|
-
onBlur:
|
|
19
|
-
disabled:
|
|
20
|
-
disablePast:
|
|
21
|
-
label:
|
|
22
|
-
error:
|
|
23
|
-
placeholder:
|
|
24
|
-
format:
|
|
25
|
-
locale:
|
|
26
|
-
className:
|
|
27
|
-
keyboardIcon:
|
|
28
|
-
okLabel:
|
|
29
|
-
cancelLabel:
|
|
30
|
-
inputAriaLabel:
|
|
31
|
-
openPickerAriaLabel:
|
|
32
|
-
previousMonthLabel:
|
|
33
|
-
nextMonthLabel:
|
|
34
|
-
hoursLabel:
|
|
35
|
-
minutesLabel:
|
|
36
|
-
showTodayButton:
|
|
37
|
-
todayLabel:
|
|
38
|
-
showWeekNumbers:
|
|
39
|
-
testId:
|
|
40
|
-
currentTimeInTimezone:
|
|
41
|
-
timePickerPosition:
|
|
42
|
-
showTimePicker:
|
|
43
|
-
editable:
|
|
44
|
-
iconPosition:
|
|
45
|
-
minuteStep:
|
|
46
|
-
},
|
|
47
|
-
const
|
|
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
|
-
|
|
52
|
+
Q,
|
|
50
53
|
{
|
|
51
|
-
currentTimeInTimezone:
|
|
52
|
-
disabled:
|
|
53
|
-
disablePast:
|
|
54
|
-
format:
|
|
55
|
-
locale:
|
|
56
|
-
onBlur:
|
|
57
|
-
onChange:
|
|
58
|
-
value:
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
|
|
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:
|
|
65
|
+
className: z(V.root, v),
|
|
63
66
|
"data-slot": "datetimepicker",
|
|
64
|
-
[
|
|
65
|
-
ref:
|
|
66
|
-
variant:
|
|
67
|
+
[w]: "datetimepicker",
|
|
68
|
+
ref: O,
|
|
69
|
+
variant: Z,
|
|
67
70
|
children: [
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
74
|
+
W,
|
|
72
75
|
{
|
|
73
|
-
editable:
|
|
74
|
-
iconPosition:
|
|
75
|
-
inputAriaLabel:
|
|
76
|
-
keyboardIcon:
|
|
77
|
-
openPickerAriaLabel:
|
|
78
|
-
placeholder:
|
|
79
|
-
testId:
|
|
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
|
-
|
|
86
|
+
Y,
|
|
84
87
|
{
|
|
85
|
-
cancelLabel:
|
|
86
|
-
hoursLabel:
|
|
87
|
-
minuteStep:
|
|
88
|
-
minutesLabel:
|
|
89
|
-
nextMonthLabel:
|
|
90
|
-
okLabel:
|
|
91
|
-
previousMonthLabel:
|
|
92
|
-
showTimePicker:
|
|
93
|
-
showTodayButton:
|
|
94
|
-
showWeekNumbers:
|
|
95
|
-
timePickerPosition:
|
|
96
|
-
todayLabel:
|
|
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
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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 {
|
|
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,SAAAC,GAAS,cAAcpB,MAAmB,WACrD;AAAA,MACN,CAACT,GAAO4B,GAASC,GAASpB,CAAc;AAAA,IAAA,GAEpCsB,IAAiB5B,MAAWkB,IAAiB,SAAY,eACzDW,IACJ9B,MAAgBmB,IAAiB,SAAY;AAE/C,WACE,gBAAAY;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,uBAAAf;AAAA,QACA,UAAArB;AAAA,QACA,aAAAC;AAAA,QACA,QAAQgC;AAAA,QACR,QAAA3B;AAAA,QACA,QAAAP;AAAA,QACA,UAAAD;AAAA,QACA,OAAAD;AAAA,QAEA,UAAA,gBAAAwC;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAaX,EAAO,MAAMrB,CAAS;AAAA,YAC9C,aAAU;AAAA,YACJ,CAACiC,CAAS,GAAG;AAAA,YACnB,KAAAb;AAAA,YACA,SAASE;AAAA,YAER,UAAA;AAAA,cAAA3B,uBACEuC,GAAA,EAAW,IAAIV,GAAS,SAASD,GAC/B,UAAA5B,GACH;AAAA,cAEF,gBAAAiC,EAACO,GAAA,EAA4B,OAAOV,GAClC,4BAACW,GAAA,EACC,UAAA;AAAA,gBAAA,gBAAAR;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,UAAApB;AAAA,oBACA,cAAAC;AAAA,oBACA,gBAAAd;AAAA,oBACA,cAAAH;AAAA,oBACA,qBAAAI;AAAA,oBACA,aAAasB;AAAA,oBACb,QAAAd;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEF,gBAAAe;AAAA,kBAACU;AAAA,kBAAA;AAAA,oBACC,aAAAnC;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,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
|
|
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
|
|
6
|
-
import { useDensity as
|
|
7
|
-
import { makeZenithStyles as
|
|
8
|
-
import { leadingSm as
|
|
9
|
-
const c =
|
|
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:
|
|
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(
|
|
55
|
-
...s.borderRadius(
|
|
56
|
-
...s.border("1px", "solid",
|
|
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:
|
|
98
|
-
"&[data-size='md']": { maxWidth:
|
|
99
|
-
"&[data-size='lg']": { maxWidth:
|
|
100
|
-
"&[data-size='xl']": { maxWidth:
|
|
101
|
-
"&[data-size='2xl']": { maxWidth:
|
|
102
|
-
"&[data-size='3xl']": { maxWidth:
|
|
103
|
-
"&[data-size='4xl']": { maxWidth:
|
|
104
|
-
"&[data-size='5xl']": { maxWidth:
|
|
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:
|
|
126
|
+
color: E,
|
|
127
127
|
":hover": {
|
|
128
|
-
backgroundColor:
|
|
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:
|
|
159
|
-
lineHeight:
|
|
160
|
-
fontWeight:
|
|
161
|
-
color:
|
|
158
|
+
fontSize: j,
|
|
159
|
+
lineHeight: X,
|
|
160
|
+
fontWeight: H,
|
|
161
|
+
color: P
|
|
162
162
|
},
|
|
163
163
|
description: {
|
|
164
|
-
color:
|
|
165
|
-
fontSize:
|
|
166
|
-
lineHeight:
|
|
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
|
-
}),
|
|
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
|
-
),
|
|
200
|
+
), st = n.forwardRef(
|
|
201
201
|
function(t, o) {
|
|
202
|
-
return /* @__PURE__ */ e(
|
|
202
|
+
return /* @__PURE__ */ e(z, { "data-slot": "dialog", ...t });
|
|
203
203
|
}
|
|
204
|
-
),
|
|
204
|
+
), dt = n.forwardRef(function({ className: t, ...o }, a) {
|
|
205
205
|
return /* @__PURE__ */ e(
|
|
206
|
-
|
|
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
|
-
}),
|
|
215
|
+
}), ct = n.forwardRef(
|
|
216
216
|
function(t, o) {
|
|
217
217
|
return /* @__PURE__ */ e(
|
|
218
|
-
|
|
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
|
-
),
|
|
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
|
-
|
|
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
|
-
}),
|
|
239
|
+
}), gt = n.forwardRef(function({
|
|
239
240
|
className: t,
|
|
240
241
|
children: o,
|
|
241
242
|
showCloseButton: a = !0,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
-
|
|
250
|
+
R,
|
|
249
251
|
{
|
|
250
|
-
ref:
|
|
252
|
+
ref: b,
|
|
251
253
|
"data-slot": "dialog-content",
|
|
252
254
|
[l]: "dialog-content",
|
|
253
255
|
...u !== void 0 ? { "data-density": u } : {},
|
|
254
|
-
...
|
|
255
|
-
"data-size":
|
|
256
|
+
...v,
|
|
257
|
+
"data-size": C,
|
|
256
258
|
className: d(
|
|
257
|
-
|
|
258
|
-
!
|
|
259
|
+
g.content,
|
|
260
|
+
!m && g.contentPadding,
|
|
259
261
|
t
|
|
260
262
|
),
|
|
261
|
-
...
|
|
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:
|
|
271
|
+
className: g.closeButton,
|
|
270
272
|
children: [
|
|
271
|
-
/* @__PURE__ */ e(
|
|
272
|
-
/* @__PURE__ */ e("span", { className:
|
|
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
|
-
}),
|
|
280
|
-
const
|
|
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(
|
|
289
|
+
className: d(m.close, t),
|
|
288
290
|
...a,
|
|
289
291
|
children: o
|
|
290
292
|
}
|
|
291
293
|
);
|
|
292
|
-
}),
|
|
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
|
-
),
|
|
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
|
-
),
|
|
322
|
+
), xt = n.forwardRef(function({ className: t, ...o }, a) {
|
|
321
323
|
const i = c();
|
|
322
324
|
return /* @__PURE__ */ e(
|
|
323
|
-
|
|
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
|
-
}),
|
|
334
|
+
}), ht = n.forwardRef(function({ className: t, ...o }, a) {
|
|
333
335
|
const i = c();
|
|
334
336
|
return /* @__PURE__ */ e(
|
|
335
|
-
|
|
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
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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
|