jenosize-ui 0.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.
- package/LICENSE +28 -0
- package/README.md +100 -0
- package/THIRD-PARTY-NOTICES.md +163 -0
- package/dist/Button-Bt7pzM4R.d.ts +82 -0
- package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
- package/dist/Select-CVbEQ2Ep.d.ts +118 -0
- package/dist/TagInput-CTJYOB4J.d.ts +90 -0
- package/dist/avatar.d.ts +161 -0
- package/dist/avatar.js +11 -0
- package/dist/badge.d.ts +109 -0
- package/dist/badge.js +10 -0
- package/dist/breadcrumb.d.ts +58 -0
- package/dist/breadcrumb.js +7 -0
- package/dist/button.d.ts +54 -0
- package/dist/button.js +14 -0
- package/dist/calendar.d.ts +368 -0
- package/dist/calendar.js +21 -0
- package/dist/callout.d.ts +70 -0
- package/dist/callout.js +16 -0
- package/dist/card-nWicloNi.d.ts +80 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +7 -0
- package/dist/checkbox.d.ts +133 -0
- package/dist/checkbox.js +11 -0
- package/dist/chunk-24TO7E32.js +42 -0
- package/dist/chunk-3Y5X7B5C.js +146 -0
- package/dist/chunk-4OLULPQG.js +202 -0
- package/dist/chunk-4P2NBLBW.js +103 -0
- package/dist/chunk-52IFGFTL.js +11 -0
- package/dist/chunk-5FATN5YD.js +115 -0
- package/dist/chunk-5NOBSXJN.js +297 -0
- package/dist/chunk-5RAPA22E.js +106 -0
- package/dist/chunk-7EUAMHMU.js +16 -0
- package/dist/chunk-7EWQKTNQ.js +1336 -0
- package/dist/chunk-7HOIZ3UO.js +110 -0
- package/dist/chunk-7IU5TMFL.js +452 -0
- package/dist/chunk-7JBNLEJ7.js +29 -0
- package/dist/chunk-7S2TBALK.js +23 -0
- package/dist/chunk-BJUZVYQC.js +188 -0
- package/dist/chunk-BVJWBYIG.js +66 -0
- package/dist/chunk-CME4DIML.js +65 -0
- package/dist/chunk-CYPPEUX5.js +73 -0
- package/dist/chunk-D5BTFSL7.js +71 -0
- package/dist/chunk-D6TPWNRK.js +387 -0
- package/dist/chunk-DJSXIAFH.js +66 -0
- package/dist/chunk-DRZCJCBO.js +46 -0
- package/dist/chunk-DWKILXHE.js +17 -0
- package/dist/chunk-E7ZSWBAK.js +70 -0
- package/dist/chunk-EDSK6FEH.js +8 -0
- package/dist/chunk-F2K7VJUV.js +114 -0
- package/dist/chunk-F6NLE6XJ.js +40 -0
- package/dist/chunk-FHHAPGCR.js +32 -0
- package/dist/chunk-FXIBGTS5.js +14 -0
- package/dist/chunk-GCVA3OIV.js +72 -0
- package/dist/chunk-GFOAJVW5.js +336 -0
- package/dist/chunk-GRLSUQQE.js +136 -0
- package/dist/chunk-GTHJWR3Q.js +77 -0
- package/dist/chunk-HMUZE6EK.js +67 -0
- package/dist/chunk-I7WU4GTY.js +503 -0
- package/dist/chunk-J2BCKBHC.js +151 -0
- package/dist/chunk-J36M3KRX.js +1315 -0
- package/dist/chunk-J7ZQQFPT.js +113 -0
- package/dist/chunk-JP26LPCY.js +234 -0
- package/dist/chunk-JTNFJLIY.js +1046 -0
- package/dist/chunk-JVJRHBTD.js +50 -0
- package/dist/chunk-JYGR44ZC.js +133 -0
- package/dist/chunk-KDLPXXD2.js +173 -0
- package/dist/chunk-KMSYEE23.js +224 -0
- package/dist/chunk-KNYKWUYX.js +52 -0
- package/dist/chunk-LME57Z6J.js +138 -0
- package/dist/chunk-MFJP5FA7.js +20 -0
- package/dist/chunk-MKC5HNA7.js +1692 -0
- package/dist/chunk-MQGD2OUF.js +39 -0
- package/dist/chunk-MUFHLP4S.js +566 -0
- package/dist/chunk-O2LG3PNI.js +74 -0
- package/dist/chunk-O4GRKO3I.js +66 -0
- package/dist/chunk-OHUFNYGN.js +791 -0
- package/dist/chunk-PWKWNDBS.js +243 -0
- package/dist/chunk-QA74ITR4.js +103 -0
- package/dist/chunk-R6RGJF4L.js +170 -0
- package/dist/chunk-S7NNXWIN.js +7 -0
- package/dist/chunk-SV56BSUQ.js +162 -0
- package/dist/chunk-T7FCG7XV.js +435 -0
- package/dist/chunk-THC2ISYP.js +57 -0
- package/dist/chunk-VWC72TR3.js +115 -0
- package/dist/chunk-W46K56XU.js +216 -0
- package/dist/chunk-W5GGOUUI.js +75 -0
- package/dist/chunk-WEUJYDCV.js +269 -0
- package/dist/chunk-WFY7DKQD.js +279 -0
- package/dist/chunk-WZQFC7ZN.js +448 -0
- package/dist/chunk-Z3ETJN5G.js +136 -0
- package/dist/chunk-ZOOX3TUB.js +192 -0
- package/dist/chunk-ZSNJ6UA3.js +42 -0
- package/dist/chunk-ZZA2LUTL.js +130 -0
- package/dist/chunk-ZZT2E5VT.js +24 -0
- package/dist/color-CtSxc1Rh.d.ts +6 -0
- package/dist/combobox.d.ts +184 -0
- package/dist/combobox.js +21 -0
- package/dist/date-input.d.ts +83 -0
- package/dist/date-input.js +16 -0
- package/dist/date-picker.d.ts +249 -0
- package/dist/date-picker.js +29 -0
- package/dist/date-utils-7hTFTXNK.d.ts +34 -0
- package/dist/date-vMJBKAFK.d.ts +22 -0
- package/dist/dialog.d.ts +86 -0
- package/dist/dialog.js +15 -0
- package/dist/drawer.d.ts +77 -0
- package/dist/drawer.js +14 -0
- package/dist/dropdown-menu.d.ts +218 -0
- package/dist/dropdown-menu.js +10 -0
- package/dist/file-trigger.d.ts +42 -0
- package/dist/file-trigger.js +3 -0
- package/dist/form.d.ts +487 -0
- package/dist/form.js +1179 -0
- package/dist/header-navigation.d.ts +74 -0
- package/dist/header-navigation.js +23 -0
- package/dist/icons/app.d.ts +48 -0
- package/dist/icons/app.js +282 -0
- package/dist/icons/flag.d.ts +817 -0
- package/dist/icons/flag.js +58336 -0
- package/dist/icons/integration.d.ts +36 -0
- package/dist/icons/integration.js +531 -0
- package/dist/icons/payment.d.ts +116 -0
- package/dist/icons/payment.js +2418 -0
- package/dist/icons.d.ts +2013 -0
- package/dist/icons.js +2012 -0
- package/dist/illustration.d.ts +48 -0
- package/dist/illustration.js +4 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +73 -0
- package/dist/indicator.d.ts +51 -0
- package/dist/indicator.js +7 -0
- package/dist/input.d.ts +66 -0
- package/dist/input.js +15 -0
- package/dist/multi-value-CJb_tnvi.d.ts +8 -0
- package/dist/nav-Bla0o_-1.d.ts +98 -0
- package/dist/number-input.d.ts +80 -0
- package/dist/number-input.js +15 -0
- package/dist/options-CPEIgjtd.d.ts +68 -0
- package/dist/overflow-Df0h42Oi.d.ts +29 -0
- package/dist/pagination.d.ts +77 -0
- package/dist/pagination.js +17 -0
- package/dist/payment-input.d.ts +7 -0
- package/dist/payment-input.js +15 -0
- package/dist/popover.d.ts +60 -0
- package/dist/popover.js +14 -0
- package/dist/progress.d.ts +87 -0
- package/dist/progress.js +5 -0
- package/dist/radio.d.ts +77 -0
- package/dist/radio.js +12 -0
- package/dist/select.d.ts +68 -0
- package/dist/select.js +24 -0
- package/dist/shared-BNXAdgh2.d.ts +9 -0
- package/dist/shared-BYXJPnsN.d.ts +11 -0
- package/dist/shared-Dc-GgA16.d.ts +42 -0
- package/dist/sidebar-navigation.d.ts +129 -0
- package/dist/sidebar-navigation.js +15 -0
- package/dist/styles.css +2 -0
- package/dist/switch.d.ts +23 -0
- package/dist/switch.js +7 -0
- package/dist/table.d.ts +692 -0
- package/dist/table.js +44 -0
- package/dist/tabs.d.ts +111 -0
- package/dist/tabs.js +8 -0
- package/dist/tag-input.d.ts +12 -0
- package/dist/tag-input.js +19 -0
- package/dist/tag.d.ts +98 -0
- package/dist/tag.js +9 -0
- package/dist/textarea.d.ts +40 -0
- package/dist/textarea.js +12 -0
- package/dist/theme-script.d.ts +29 -0
- package/dist/theme-script.js +15 -0
- package/dist/theme.css +929 -0
- package/dist/theme.d.ts +71 -0
- package/dist/theme.js +15 -0
- package/dist/toast.d.ts +242 -0
- package/dist/toast.js +15 -0
- package/dist/tooltip.d.ts +70 -0
- package/dist/tooltip.js +6 -0
- package/dist/tree.d.ts +308 -0
- package/dist/tree.js +11 -0
- package/package.json +352 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TooltipExport } from './chunk-ZZA2LUTL.js';
|
|
2
|
+
import { warnNeedsName } from './chunk-GCVA3OIV.js';
|
|
3
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
4
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
5
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
6
|
+
import 'react';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var BASE = "group relative inline-flex h-max cursor-pointer items-center justify-center rounded-md p-1.5 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:transition-colors [&_svg]:duration-100 [&_svg]:ease-linear";
|
|
10
|
+
var VARIANT = {
|
|
11
|
+
secondary: "bg-primary text-fg-quaternary shadow-skeuomorphic ring-1 ring-inset ring-primary hover:bg-secondary hover:text-fg-quaternary_hover disabled:shadow-xs",
|
|
12
|
+
// A TRANSLUCENT wash, not a ramp stop — the one role in the token layer that has to be, because
|
|
13
|
+
// a ghost rests with no fill and its hover must read as one step above whatever it sits ON.
|
|
14
|
+
// Chasing that with fixed stops does not converge: `bg-subtle` (gray-50) matched the hover fill
|
|
15
|
+
// of every row it sits in (Table's, SidebarNavigation's), so stepping to `bg-muted` (gray-100) fixed it —
|
|
16
|
+
// and then matched a STRIPED table's row hover exactly, which is `bg-muted` too, so a row-action
|
|
17
|
+
// icon on the row the pointer was actually on washed to the row's own colour and looked dead
|
|
18
|
+
// again. `bg-ghost-hover` composites instead of replacing, so it steps relative to all of them,
|
|
19
|
+
// and on a selected row it deepens the brand wash instead of painting gray over it. Over a
|
|
20
|
+
// resting surface it lands on gray-100, i.e. exactly where this used to be.
|
|
21
|
+
tertiary: "text-fg-quaternary hover:bg-ghost-hover hover:text-fg-quaternary_hover"
|
|
22
|
+
};
|
|
23
|
+
var SIZE = {
|
|
24
|
+
xs: "[&_svg]:size-4",
|
|
25
|
+
sm: "[&_svg]:size-5"
|
|
26
|
+
};
|
|
27
|
+
function ButtonUtility(props) {
|
|
28
|
+
const { render, variant = "secondary", size = "sm", icon, tooltip, tooltipSide = "top", disabled = false, type = "button", className, ...rest } = props;
|
|
29
|
+
warnNeedsName("ButtonUtility", Boolean(tooltip) || "aria-label" in rest || "aria-labelledby" in rest, "a `tooltip`, `aria-label`, or `aria-labelledby`");
|
|
30
|
+
const element = useRender({
|
|
31
|
+
defaultTagName: "button",
|
|
32
|
+
render,
|
|
33
|
+
props: mergeProps(
|
|
34
|
+
{
|
|
35
|
+
type,
|
|
36
|
+
className: cn(BASE, VARIANT[variant], SIZE[size], className),
|
|
37
|
+
children: icon,
|
|
38
|
+
disabled,
|
|
39
|
+
"aria-label": tooltip
|
|
40
|
+
},
|
|
41
|
+
rest
|
|
42
|
+
)
|
|
43
|
+
});
|
|
44
|
+
if (!tooltip) return element;
|
|
45
|
+
return /* @__PURE__ */ jsx(TooltipExport, { content: tooltip, side: tooltipSide, disabled, children: element });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { ButtonUtility };
|
|
49
|
+
//# sourceMappingURL=chunk-JVJRHBTD.js.map
|
|
50
|
+
//# sourceMappingURL=chunk-JVJRHBTD.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
+
import { FieldShell } from './chunk-QA74ITR4.js';
|
|
3
|
+
import { useFieldValidity, FieldFrame } from './chunk-J2BCKBHC.js';
|
|
4
|
+
import { PlusIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon } from './chunk-24TO7E32.js';
|
|
5
|
+
import { warnPositiveNumber } from './chunk-GCVA3OIV.js';
|
|
6
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
7
|
+
import { NumberField } from '@base-ui/react/number-field';
|
|
8
|
+
import 'react';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var STEP_GAP = { sm: "gap-3", md: "gap-3", lg: "gap-3.5" };
|
|
12
|
+
var STEP_BTN = "inline-flex shrink-0 cursor-pointer items-center justify-center self-stretch text-tertiary outline-none transition-colors duration-100 ease-linear enabled:hover:bg-secondary enabled:hover:text-secondary disabled:cursor-not-allowed disabled:[&_svg]:opacity-50 [&_svg]:size-5";
|
|
13
|
+
var STEP_PX = { sm: "px-2", md: "px-2.5", lg: "px-3" };
|
|
14
|
+
var CHEVRON_BTN = "flex flex-1 cursor-pointer items-center justify-center text-fg-quaternary outline-none transition-colors duration-100 ease-linear enabled:hover:bg-secondary enabled:hover:text-fg-quaternary_hover disabled:cursor-not-allowed disabled:[&_svg]:opacity-50";
|
|
15
|
+
var CHEVRON_ICON = {
|
|
16
|
+
sm: "[&_svg]:size-3 [&_svg]:[stroke-width:3px]",
|
|
17
|
+
md: "[&_svg]:size-3 [&_svg]:[stroke-width:3px]",
|
|
18
|
+
lg: "[&_svg]:size-3.5 [&_svg]:[stroke-width:2.57px]"
|
|
19
|
+
};
|
|
20
|
+
function NumberInput(props) {
|
|
21
|
+
const {
|
|
22
|
+
size = "md",
|
|
23
|
+
leading,
|
|
24
|
+
trailing,
|
|
25
|
+
leadingAddon,
|
|
26
|
+
trailingAddon,
|
|
27
|
+
variant = "vertical",
|
|
28
|
+
label,
|
|
29
|
+
tooltip,
|
|
30
|
+
tooltipDescription,
|
|
31
|
+
hint,
|
|
32
|
+
invalid = false,
|
|
33
|
+
error,
|
|
34
|
+
disabled = false,
|
|
35
|
+
readOnly = false,
|
|
36
|
+
required = false,
|
|
37
|
+
hideRequiredIndicator = false,
|
|
38
|
+
fullWidth = true,
|
|
39
|
+
scrollFade = false,
|
|
40
|
+
placeholder,
|
|
41
|
+
name,
|
|
42
|
+
id,
|
|
43
|
+
value,
|
|
44
|
+
defaultValue,
|
|
45
|
+
min,
|
|
46
|
+
max,
|
|
47
|
+
step,
|
|
48
|
+
smallStep,
|
|
49
|
+
largeStep,
|
|
50
|
+
format,
|
|
51
|
+
onValueChange,
|
|
52
|
+
className,
|
|
53
|
+
"aria-label": ariaLabel
|
|
54
|
+
} = props;
|
|
55
|
+
warnPositiveNumber("NumberInput", "step", step === "any" ? void 0 : step);
|
|
56
|
+
warnPositiveNumber("NumberInput", "smallStep", smallStep);
|
|
57
|
+
warnPositiveNumber("NumberInput", "largeStep", largeStep);
|
|
58
|
+
const { isInvalid, showError } = useFieldValidity(invalid, error);
|
|
59
|
+
const { ref: fadeRef, style: fadeStyle } = useControlScrollFade(scrollFade);
|
|
60
|
+
const input = "min-w-0 flex-1 bg-transparent outline-none placeholder:text-quaternary autofill:rounded-lg autofill:text-primary disabled:cursor-not-allowed";
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
FieldFrame,
|
|
63
|
+
{
|
|
64
|
+
label,
|
|
65
|
+
tooltip,
|
|
66
|
+
tooltipDescription,
|
|
67
|
+
required,
|
|
68
|
+
hideRequiredIndicator,
|
|
69
|
+
hint,
|
|
70
|
+
error,
|
|
71
|
+
isInvalid,
|
|
72
|
+
showError,
|
|
73
|
+
size,
|
|
74
|
+
disabled,
|
|
75
|
+
fullWidth,
|
|
76
|
+
className,
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
NumberField.Root,
|
|
79
|
+
{
|
|
80
|
+
id,
|
|
81
|
+
name,
|
|
82
|
+
value,
|
|
83
|
+
defaultValue,
|
|
84
|
+
min,
|
|
85
|
+
max,
|
|
86
|
+
step,
|
|
87
|
+
smallStep,
|
|
88
|
+
largeStep,
|
|
89
|
+
format,
|
|
90
|
+
required,
|
|
91
|
+
disabled,
|
|
92
|
+
readOnly,
|
|
93
|
+
onValueChange,
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
FieldShell,
|
|
96
|
+
{
|
|
97
|
+
render: /* @__PURE__ */ jsx(NumberField.Group, {}),
|
|
98
|
+
size,
|
|
99
|
+
invalid: isInvalid,
|
|
100
|
+
disabled,
|
|
101
|
+
leading,
|
|
102
|
+
trailing,
|
|
103
|
+
leadingAddon,
|
|
104
|
+
trailingAddon,
|
|
105
|
+
segmentDivider: variant !== "horizontal",
|
|
106
|
+
segmentLeading: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": "Decrease", className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(MinusIcon, {}) }) : null,
|
|
107
|
+
segmentTrailing: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": "Increase", className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(PlusIcon, {}) }) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col self-stretch", size === "lg" ? "w-7.5" : "w-7"), children: [
|
|
108
|
+
/* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": "Increase", className: cn(CHEVRON_BTN, CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }),
|
|
109
|
+
/* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": "Decrease", className: cn(CHEVRON_BTN, "border-t border-primary", CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
|
|
110
|
+
] }),
|
|
111
|
+
className: STEP_GAP[size],
|
|
112
|
+
children: /* @__PURE__ */ jsx(
|
|
113
|
+
NumberField.Input,
|
|
114
|
+
{
|
|
115
|
+
ref: fadeRef,
|
|
116
|
+
style: fadeStyle,
|
|
117
|
+
placeholder,
|
|
118
|
+
"aria-label": ariaLabel,
|
|
119
|
+
"aria-invalid": isInvalid || void 0,
|
|
120
|
+
className: input
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export { NumberInput };
|
|
132
|
+
//# sourceMappingURL=chunk-JYGR44ZC.js.map
|
|
133
|
+
//# sourceMappingURL=chunk-JYGR44ZC.js.map
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { useControlScrollFade } from './chunk-7EUAMHMU.js';
|
|
2
|
+
import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
|
|
3
|
+
import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-J2BCKBHC.js';
|
|
4
|
+
import { warnNeedsName, warnPositiveInt, devWarn } from './chunk-GCVA3OIV.js';
|
|
5
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
6
|
+
import { Field } from '@base-ui/react/field';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var SIZE = {
|
|
11
|
+
sm: `px-3 py-3 ${CONTROL_TEXT.sm} ${CONTROL_RADIUS}`,
|
|
12
|
+
md: `px-3.5 py-3 ${CONTROL_TEXT.md} ${CONTROL_RADIUS}`,
|
|
13
|
+
lg: `px-4 py-3 ${CONTROL_TEXT.lg} ${CONTROL_RADIUS}`
|
|
14
|
+
};
|
|
15
|
+
var PAD_TEXT = {
|
|
16
|
+
sm: `px-3 py-3 ${CONTROL_TEXT.sm}`,
|
|
17
|
+
md: `px-3.5 py-3 ${CONTROL_TEXT.md}`,
|
|
18
|
+
lg: `px-4 py-3 ${CONTROL_TEXT.lg}`
|
|
19
|
+
};
|
|
20
|
+
var ROWS = {
|
|
21
|
+
sm: 3,
|
|
22
|
+
md: 4,
|
|
23
|
+
lg: 5
|
|
24
|
+
};
|
|
25
|
+
function minRows(rows, size, autoResize) {
|
|
26
|
+
return rows ?? (autoResize ? 1 : ROWS[size]);
|
|
27
|
+
}
|
|
28
|
+
function Textarea(props) {
|
|
29
|
+
const {
|
|
30
|
+
size = "md",
|
|
31
|
+
rows,
|
|
32
|
+
fullWidth = true,
|
|
33
|
+
label,
|
|
34
|
+
tooltip,
|
|
35
|
+
tooltipDescription,
|
|
36
|
+
hint,
|
|
37
|
+
invalid = false,
|
|
38
|
+
error,
|
|
39
|
+
autoResize = false,
|
|
40
|
+
resize = "vertical",
|
|
41
|
+
scrollFade = false,
|
|
42
|
+
disabled = false,
|
|
43
|
+
required = false,
|
|
44
|
+
hideRequiredIndicator = false,
|
|
45
|
+
readOnly = false,
|
|
46
|
+
name,
|
|
47
|
+
id,
|
|
48
|
+
className,
|
|
49
|
+
onInput,
|
|
50
|
+
// Pulled OUT of `rest` on purpose: it is applied to the control explicitly (merged under the
|
|
51
|
+
// scroll-fade mask) so a caller declaration and an internal one can never silently replace
|
|
52
|
+
// each other on the same node. See `docs/type-safety-policy.md`.
|
|
53
|
+
style,
|
|
54
|
+
...rest
|
|
55
|
+
} = props;
|
|
56
|
+
const textareaRef = React.useRef(null);
|
|
57
|
+
const { isInvalid, showError } = useFieldValidity(invalid, error);
|
|
58
|
+
const { style: fadeStyle } = useControlScrollFade(scrollFade, "vertical", textareaRef);
|
|
59
|
+
warnNeedsName("Textarea", Boolean(label) || "aria-label" in rest || "aria-labelledby" in rest, "a `label`, `aria-label`, or `aria-labelledby`");
|
|
60
|
+
warnPositiveInt("Textarea", "rows", rows);
|
|
61
|
+
if (autoResize && style?.height != null) {
|
|
62
|
+
devWarn("<Textarea autoResize> owns the height \u2014 a `style.height` is overwritten on the next input. Drop one of the two.");
|
|
63
|
+
}
|
|
64
|
+
const resizeToFit = React.useCallback(() => {
|
|
65
|
+
const el = textareaRef.current;
|
|
66
|
+
if (!el) return;
|
|
67
|
+
el.style.height = "auto";
|
|
68
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
69
|
+
}, []);
|
|
70
|
+
const controlledValue = rest.value;
|
|
71
|
+
useIsomorphicLayoutEffect(() => {
|
|
72
|
+
if (autoResize) resizeToFit();
|
|
73
|
+
}, [autoResize, resizeToFit, controlledValue, rows, size]);
|
|
74
|
+
useIsomorphicLayoutEffect(() => {
|
|
75
|
+
if (autoResize) return;
|
|
76
|
+
const el = textareaRef.current;
|
|
77
|
+
if (el) el.style.height = "";
|
|
78
|
+
}, [autoResize, rows, size, resize]);
|
|
79
|
+
const handleInput = React.useCallback(
|
|
80
|
+
(event) => {
|
|
81
|
+
if (autoResize) resizeToFit();
|
|
82
|
+
onInput?.(event);
|
|
83
|
+
},
|
|
84
|
+
[autoResize, resizeToFit, onInput]
|
|
85
|
+
);
|
|
86
|
+
const resizeClass = autoResize || resize === "none" ? "resize-none" : "resize-y";
|
|
87
|
+
const control = cn(
|
|
88
|
+
// Untitled UI: the resting edge IS an inset ring; focus widens it to 2px and recolors it to
|
|
89
|
+
// brand — one clean line, no gray border underneath. Animated via transition-shadow.
|
|
90
|
+
// `scroll-py-3` keeps text off the top/bottom edge when the content overflows.
|
|
91
|
+
"w-full scroll-py-3 bg-primary text-primary shadow-xs ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset",
|
|
92
|
+
"placeholder:text-quaternary autofill:rounded-lg autofill:text-primary",
|
|
93
|
+
"focus-visible:ring-2",
|
|
94
|
+
// Custom resize grip drawn into the native ::-webkit-resizer corner (webkit only),
|
|
95
|
+
// replacing the OS default handle — the SVG glyph token lives in theme.css and only
|
|
96
|
+
// renders while the control is resizable (resize-y).
|
|
97
|
+
"[&::-webkit-resizer]:bg-[image:var(--textarea-resize-handle)] [&::-webkit-resizer]:bg-contain",
|
|
98
|
+
SIZE[size],
|
|
99
|
+
resizeClass,
|
|
100
|
+
// read-only keeps the default resting ring (Untitled UI does not style read-only) — the
|
|
101
|
+
// `readOnly` attribute still locks editing.
|
|
102
|
+
// UUI disabled is ONLY cursor-not-allowed + opacity-50 — the resize grip stays
|
|
103
|
+
// visible, faded to 50% with the rest of the control (no resize-none).
|
|
104
|
+
// Ring COLOUR and the disabled fade are independent clauses, exactly as FieldShell composes
|
|
105
|
+
// them. As one ternary the disabled branch REPLACED the colour — and `ring-1` is still in the
|
|
106
|
+
// base, so `--tw-ring-color` fell back to `currentcolor` (= `text-primary`): a disabled field drew
|
|
107
|
+
// its edge in the TEXT colour. Light: gray-900 at 50%, darker than an enabled field. Dark:
|
|
108
|
+
// `--color-text-primary` is gray-50, so a near-WHITE ring. It also made `invalid + disabled` unreachable,
|
|
109
|
+
// since that branch could never be taken — the one control in the family that re-derived this
|
|
110
|
+
// composition is the one that got it wrong.
|
|
111
|
+
isInvalid ? "ring-error_subtle focus-visible:ring-focus-ring-error" : "ring-primary focus-visible:ring-focus-ring",
|
|
112
|
+
disabled && "cursor-not-allowed opacity-50"
|
|
113
|
+
);
|
|
114
|
+
const chrome = cn(
|
|
115
|
+
"bg-primary shadow-xs ring-1 transition-shadow duration-100 ease-linear ring-inset focus-within:ring-2",
|
|
116
|
+
CONTROL_RADIUS,
|
|
117
|
+
isInvalid ? "ring-error_subtle focus-within:ring-focus-ring-error" : "ring-primary focus-within:ring-focus-ring",
|
|
118
|
+
disabled && "cursor-not-allowed opacity-50"
|
|
119
|
+
);
|
|
120
|
+
const controlBare = cn(
|
|
121
|
+
// `block` removes the inline-block descender gap under the textarea inside the wrapper.
|
|
122
|
+
"block w-full scroll-py-3 overflow-y-auto bg-transparent text-primary outline-none",
|
|
123
|
+
"placeholder:text-quaternary autofill:text-primary",
|
|
124
|
+
"[&::-webkit-resizer]:bg-[image:var(--textarea-resize-handle)] [&::-webkit-resizer]:bg-contain",
|
|
125
|
+
PAD_TEXT[size],
|
|
126
|
+
resizeClass,
|
|
127
|
+
disabled && "cursor-not-allowed"
|
|
128
|
+
);
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
FieldFrame,
|
|
131
|
+
{
|
|
132
|
+
label,
|
|
133
|
+
tooltip,
|
|
134
|
+
tooltipDescription,
|
|
135
|
+
required,
|
|
136
|
+
hideRequiredIndicator,
|
|
137
|
+
hint,
|
|
138
|
+
error,
|
|
139
|
+
isInvalid,
|
|
140
|
+
showError,
|
|
141
|
+
size,
|
|
142
|
+
disabled,
|
|
143
|
+
name,
|
|
144
|
+
fullWidth,
|
|
145
|
+
className: cn("min-w-48", className),
|
|
146
|
+
children: scrollFade ? /* @__PURE__ */ jsx("div", { className: chrome, children: /* @__PURE__ */ jsx(
|
|
147
|
+
Field.Control,
|
|
148
|
+
{
|
|
149
|
+
id,
|
|
150
|
+
required,
|
|
151
|
+
readOnly,
|
|
152
|
+
className: controlBare,
|
|
153
|
+
style: { ...style, ...fadeStyle },
|
|
154
|
+
render: /* @__PURE__ */ jsx("textarea", { ref: textareaRef, rows: minRows(rows, size, autoResize), onInput: handleInput, ...rest })
|
|
155
|
+
}
|
|
156
|
+
) }) : /* @__PURE__ */ jsx(
|
|
157
|
+
Field.Control,
|
|
158
|
+
{
|
|
159
|
+
id,
|
|
160
|
+
required,
|
|
161
|
+
readOnly,
|
|
162
|
+
className: control,
|
|
163
|
+
style,
|
|
164
|
+
render: /* @__PURE__ */ jsx("textarea", { ref: textareaRef, rows: minRows(rows, size, autoResize), onInput: handleInput, ...rest })
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export { Textarea };
|
|
172
|
+
//# sourceMappingURL=chunk-KDLPXXD2.js.map
|
|
173
|
+
//# sourceMappingURL=chunk-KDLPXXD2.js.map
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { nearestScrollport, scrollportScrolls } from './chunk-GCVA3OIV.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
function snapToStep(value, step) {
|
|
5
|
+
if (!Number.isFinite(step) || step <= 0) return value;
|
|
6
|
+
return Math.round(value / step) * step;
|
|
7
|
+
}
|
|
8
|
+
function pointOf(ev) {
|
|
9
|
+
if ("touches" in ev) {
|
|
10
|
+
const touch = ev.touches[0] ?? ev.changedTouches[0];
|
|
11
|
+
return touch ? { x: touch.clientX, y: touch.clientY } : null;
|
|
12
|
+
}
|
|
13
|
+
return { x: ev.clientX, y: ev.clientY };
|
|
14
|
+
}
|
|
15
|
+
function useDrag(cfg) {
|
|
16
|
+
const [draft, setDraft] = React.useState(null);
|
|
17
|
+
const run = React.useRef({ draft: null, origin: { x: 0, y: 0 }, active: false, touchId: null, longPress: null, detach: null });
|
|
18
|
+
const cfgRef = React.useRef(cfg);
|
|
19
|
+
cfgRef.current = cfg;
|
|
20
|
+
const teardown = React.useCallback(() => {
|
|
21
|
+
const r = run.current;
|
|
22
|
+
if (r.longPress !== null) {
|
|
23
|
+
clearTimeout(r.longPress);
|
|
24
|
+
r.longPress = null;
|
|
25
|
+
}
|
|
26
|
+
r.detach?.();
|
|
27
|
+
r.detach = null;
|
|
28
|
+
r.draft = null;
|
|
29
|
+
r.active = false;
|
|
30
|
+
r.touchId = null;
|
|
31
|
+
setDraft(null);
|
|
32
|
+
}, []);
|
|
33
|
+
const cancel = React.useCallback(() => {
|
|
34
|
+
const wasActive = run.current.active;
|
|
35
|
+
teardown();
|
|
36
|
+
if (wasActive) cfgRef.current.onCancel?.();
|
|
37
|
+
}, [teardown]);
|
|
38
|
+
const commit = React.useCallback(() => {
|
|
39
|
+
const r = run.current;
|
|
40
|
+
if (!r.active || r.draft === null) {
|
|
41
|
+
teardown();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const final = r.draft;
|
|
45
|
+
teardown();
|
|
46
|
+
cfgRef.current.onEnd(final);
|
|
47
|
+
}, [teardown]);
|
|
48
|
+
const advance = React.useCallback((pt, ev) => {
|
|
49
|
+
const r = run.current;
|
|
50
|
+
if (!r.active) {
|
|
51
|
+
const threshold = cfgRef.current.threshold ?? 4;
|
|
52
|
+
if (Math.hypot(pt.x - r.origin.x, pt.y - r.origin.y) < threshold) return false;
|
|
53
|
+
const started = cfgRef.current.onStart(r.origin, ev);
|
|
54
|
+
if (started === null) return false;
|
|
55
|
+
r.active = true;
|
|
56
|
+
const next2 = cfgRef.current.onMove(started, pt);
|
|
57
|
+
r.draft = next2;
|
|
58
|
+
setDraft(next2);
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
const next = cfgRef.current.onMove(r.draft, pt);
|
|
62
|
+
r.draft = next;
|
|
63
|
+
setDraft(next);
|
|
64
|
+
return true;
|
|
65
|
+
}, []);
|
|
66
|
+
const onMouseDown = React.useCallback(
|
|
67
|
+
(e) => {
|
|
68
|
+
if (e.button !== 0) return;
|
|
69
|
+
const r = run.current;
|
|
70
|
+
if (r.detach !== null) return;
|
|
71
|
+
r.origin = { x: e.clientX, y: e.clientY };
|
|
72
|
+
r.active = false;
|
|
73
|
+
r.draft = null;
|
|
74
|
+
const onMouseMove = (ev) => {
|
|
75
|
+
const pt = pointOf(ev);
|
|
76
|
+
if (pt) advance(pt, ev);
|
|
77
|
+
};
|
|
78
|
+
const onMouseUp = () => commit();
|
|
79
|
+
const onKeyDown = (ev) => {
|
|
80
|
+
if (ev.key !== "Escape") return;
|
|
81
|
+
ev.preventDefault();
|
|
82
|
+
cancel();
|
|
83
|
+
};
|
|
84
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
85
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
86
|
+
document.addEventListener("keydown", onKeyDown);
|
|
87
|
+
r.detach = () => {
|
|
88
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
89
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
90
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
[advance, commit, cancel]
|
|
94
|
+
);
|
|
95
|
+
const onTouchStart = React.useCallback(
|
|
96
|
+
(e) => {
|
|
97
|
+
const r = run.current;
|
|
98
|
+
if (r.detach !== null) return;
|
|
99
|
+
if (e.touches.length > 1) return;
|
|
100
|
+
const touch = e.touches[0];
|
|
101
|
+
if (!touch) return;
|
|
102
|
+
r.origin = { x: touch.clientX, y: touch.clientY };
|
|
103
|
+
r.active = false;
|
|
104
|
+
r.draft = null;
|
|
105
|
+
r.touchId = touch.identifier;
|
|
106
|
+
const target = e.currentTarget;
|
|
107
|
+
const ownTouch = (ev) => {
|
|
108
|
+
const list = ev.touches.length > 0 ? ev.touches : ev.changedTouches;
|
|
109
|
+
for (let i = 0; i < list.length; i += 1) {
|
|
110
|
+
const t = list.item(i);
|
|
111
|
+
if (t && t.identifier === r.touchId) return t;
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
};
|
|
115
|
+
const onTouchMove = (ev) => {
|
|
116
|
+
const t = ownTouch(ev);
|
|
117
|
+
if (!t) return;
|
|
118
|
+
const pt = { x: t.clientX, y: t.clientY };
|
|
119
|
+
if (!r.active) {
|
|
120
|
+
if (Math.hypot(pt.x - r.origin.x, pt.y - r.origin.y) >= (cfgRef.current.threshold ?? 4)) teardown();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (ev.cancelable) ev.preventDefault();
|
|
124
|
+
advance(pt, ev);
|
|
125
|
+
};
|
|
126
|
+
const onTouchEnd = (ev) => {
|
|
127
|
+
if (r.touchId !== null && ownTouch(ev) === null) return;
|
|
128
|
+
commit();
|
|
129
|
+
};
|
|
130
|
+
const onTouchCancel = () => cancel();
|
|
131
|
+
const onKeyDown = (ev) => {
|
|
132
|
+
if (ev.key === "Escape") cancel();
|
|
133
|
+
};
|
|
134
|
+
target.addEventListener("touchmove", onTouchMove, { passive: false });
|
|
135
|
+
target.addEventListener("touchend", onTouchEnd);
|
|
136
|
+
target.addEventListener("touchcancel", onTouchCancel);
|
|
137
|
+
document.addEventListener("keydown", onKeyDown);
|
|
138
|
+
r.longPress = setTimeout(() => {
|
|
139
|
+
r.longPress = null;
|
|
140
|
+
if (r.active) return;
|
|
141
|
+
const started = cfgRef.current.onStart(r.origin, e.nativeEvent);
|
|
142
|
+
if (started === null) {
|
|
143
|
+
teardown();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
r.active = true;
|
|
147
|
+
r.draft = started;
|
|
148
|
+
setDraft(started);
|
|
149
|
+
}, cfgRef.current.longPressMs ?? 250);
|
|
150
|
+
r.detach = () => {
|
|
151
|
+
target.removeEventListener("touchmove", onTouchMove);
|
|
152
|
+
target.removeEventListener("touchend", onTouchEnd);
|
|
153
|
+
target.removeEventListener("touchcancel", onTouchCancel);
|
|
154
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
[advance, commit, cancel, teardown]
|
|
158
|
+
);
|
|
159
|
+
React.useEffect(
|
|
160
|
+
() => () => {
|
|
161
|
+
const r = run.current;
|
|
162
|
+
if (r.longPress !== null) clearTimeout(r.longPress);
|
|
163
|
+
r.detach?.();
|
|
164
|
+
},
|
|
165
|
+
[]
|
|
166
|
+
);
|
|
167
|
+
const handlers = React.useMemo(() => ({ onMouseDown, onTouchStart }), [onMouseDown, onTouchStart]);
|
|
168
|
+
return { handlers, draft };
|
|
169
|
+
}
|
|
170
|
+
function useAutoScroll(ref, opts) {
|
|
171
|
+
const optsRef = React.useRef(opts);
|
|
172
|
+
optsRef.current = opts;
|
|
173
|
+
const state = React.useRef({
|
|
174
|
+
frame: null,
|
|
175
|
+
pointer: null,
|
|
176
|
+
onPointer: null
|
|
177
|
+
});
|
|
178
|
+
const disarm = React.useCallback(() => {
|
|
179
|
+
const s = state.current;
|
|
180
|
+
if (s.frame !== null) {
|
|
181
|
+
cancelAnimationFrame(s.frame);
|
|
182
|
+
s.frame = null;
|
|
183
|
+
}
|
|
184
|
+
if (s.onPointer) {
|
|
185
|
+
document.removeEventListener("mousemove", s.onPointer);
|
|
186
|
+
document.removeEventListener("touchmove", s.onPointer);
|
|
187
|
+
s.onPointer = null;
|
|
188
|
+
}
|
|
189
|
+
s.pointer = null;
|
|
190
|
+
}, []);
|
|
191
|
+
const arm = React.useCallback(() => {
|
|
192
|
+
const s = state.current;
|
|
193
|
+
if (s.frame !== null) return;
|
|
194
|
+
const port = nearestScrollport(ref.current);
|
|
195
|
+
if (port === null || !scrollportScrolls(port)) return;
|
|
196
|
+
const box = port.el;
|
|
197
|
+
const onPointer = (ev) => {
|
|
198
|
+
const pt = pointOf(ev);
|
|
199
|
+
if (pt) s.pointer = pt;
|
|
200
|
+
};
|
|
201
|
+
document.addEventListener("mousemove", onPointer);
|
|
202
|
+
document.addEventListener("touchmove", onPointer, { passive: true });
|
|
203
|
+
s.onPointer = onPointer;
|
|
204
|
+
const tick = () => {
|
|
205
|
+
s.frame = requestAnimationFrame(tick);
|
|
206
|
+
const pt = s.pointer;
|
|
207
|
+
if (!pt) return;
|
|
208
|
+
const rect = box.getBoundingClientRect();
|
|
209
|
+
const edge = optsRef.current?.edge ?? 48;
|
|
210
|
+
const maxPx = optsRef.current?.maxPx ?? 14;
|
|
211
|
+
const overTop = rect.top + edge - pt.y;
|
|
212
|
+
const overBottom = pt.y - (rect.bottom - edge);
|
|
213
|
+
if (overTop > 0) box.scrollTop -= maxPx * Math.min(1, overTop / edge);
|
|
214
|
+
else if (overBottom > 0) box.scrollTop += maxPx * Math.min(1, overBottom / edge);
|
|
215
|
+
};
|
|
216
|
+
s.frame = requestAnimationFrame(tick);
|
|
217
|
+
}, [ref]);
|
|
218
|
+
React.useEffect(() => disarm, [disarm]);
|
|
219
|
+
return React.useMemo(() => ({ arm, disarm }), [arm, disarm]);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { snapToStep, useAutoScroll, useDrag };
|
|
223
|
+
//# sourceMappingURL=chunk-KMSYEE23.js.map
|
|
224
|
+
//# sourceMappingURL=chunk-KMSYEE23.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { devWarn } from './chunk-GCVA3OIV.js';
|
|
2
|
+
import { cn } from './chunk-ZSNJ6UA3.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
var SEAMLESS_COLOR = "bg-current/10 text-inherit ring-1 ring-inset ring-current/20";
|
|
6
|
+
var SEAMLESS_CHIP = {
|
|
7
|
+
sm: "min-h-4.5 min-w-4.5",
|
|
8
|
+
// 18px — the text-xs line box
|
|
9
|
+
md: "min-h-5 min-w-5",
|
|
10
|
+
// 20px — the text-sm line box
|
|
11
|
+
lg: "min-h-5 min-w-5"
|
|
12
|
+
// 20px — text-sm too; only the horizontal pad steps at lg
|
|
13
|
+
};
|
|
14
|
+
var SEAMLESS_DOT = { box: "size-1.5", fill: "bg-current" };
|
|
15
|
+
var SEAMLESS_CHIP_PX = {
|
|
16
|
+
sm: "px-1",
|
|
17
|
+
// 4px — UUI tag count, sm
|
|
18
|
+
md: "px-1.25",
|
|
19
|
+
// 5px — UUI tag count, md
|
|
20
|
+
lg: "px-1.5"
|
|
21
|
+
// 6px — UUI tag count, lg
|
|
22
|
+
};
|
|
23
|
+
var SEAMLESS_CHIP_NUM = "tabular-nums";
|
|
24
|
+
var SeamlessContext = React.createContext(null);
|
|
25
|
+
var SeamlessProvider = SeamlessContext.Provider;
|
|
26
|
+
function useSeamlessSlot() {
|
|
27
|
+
return React.useContext(SeamlessContext);
|
|
28
|
+
}
|
|
29
|
+
function seamlessBleed(side, size) {
|
|
30
|
+
if (side === "leading") return size === "lg" ? "-ml-3.5" : "-ml-3";
|
|
31
|
+
return size === "lg" ? "-mr-3.5" : "-mr-3";
|
|
32
|
+
}
|
|
33
|
+
function seamlessDivider(side) {
|
|
34
|
+
return side === "leading" ? "border-r border-primary" : "border-l border-primary";
|
|
35
|
+
}
|
|
36
|
+
var SEAMLESS_BOX = "rounded-none shadow-none ring-0 bg-transparent";
|
|
37
|
+
var SEAMLESS_CONTROL = `h-auto self-stretch hover:bg-transparent data-[loading]:bg-transparent before:hidden ${SEAMLESS_BOX}`;
|
|
38
|
+
var SEAMLESS_FILL_COUPLED_FG = /* @__PURE__ */ new Set(["primary"]);
|
|
39
|
+
var SEAMLESS_INHERIT_FG = "text-inherit [&_svg]:text-inherit hover:text-inherit hover:[&_svg]:text-inherit";
|
|
40
|
+
function addonSlotClasses(side, size) {
|
|
41
|
+
return cn("flex shrink-0 items-stretch self-stretch text-tertiary", seamlessDivider(side), seamlessBleed(side, size));
|
|
42
|
+
}
|
|
43
|
+
function warnSeamlessFieldChrome(component, chrome) {
|
|
44
|
+
const dropped = ["label", "hint", "error"].filter((key) => chrome[key] != null && chrome[key] !== "");
|
|
45
|
+
if (dropped.length === 0) return;
|
|
46
|
+
const names = dropped.map((key) => `\`${key}\``).join(", ");
|
|
47
|
+
devWarn(`<${component} seamless> drops the field chrome \u2014 ${names} ${dropped.length > 1 ? "are" : "is"} ignored; use \`aria-label\`.`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { SEAMLESS_BOX, SEAMLESS_CHIP, SEAMLESS_CHIP_NUM, SEAMLESS_CHIP_PX, SEAMLESS_COLOR, SEAMLESS_CONTROL, SEAMLESS_DOT, SEAMLESS_FILL_COUPLED_FG, SEAMLESS_INHERIT_FG, SeamlessProvider, addonSlotClasses, useSeamlessSlot, warnSeamlessFieldChrome };
|
|
51
|
+
//# sourceMappingURL=chunk-KNYKWUYX.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-KNYKWUYX.js.map
|