@uisatin/ui 0.3.0 → 0.5.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/CHANGELOG.md +19 -0
- package/{chunk-NQL6SIIB.js → chunk-2643HEXD.js} +1 -1
- package/{chunk-UZ4DXU6W.js → chunk-3VVO5MY5.js} +4 -4
- package/{chunk-EF5GT4OG.js → chunk-47DDBME3.js} +3 -3
- package/{chunk-JBKBRAC4.js → chunk-5663JVE5.js} +3 -3
- package/chunk-67CBFB6Y.js +99 -0
- package/{chunk-T6L32XXH.js → chunk-6DWLTGRQ.js} +30 -7
- package/{chunk-S7QHBVPX.js → chunk-6GNMUJQ4.js} +3 -3
- package/{chunk-Z7S2KQZS.js → chunk-6JTSZAGO.js} +1 -1
- package/chunk-6RLSRMB5.js +14 -0
- package/{chunk-GI2SMFZL.js → chunk-6Y6CY2DP.js} +1 -1
- package/{chunk-XUOSJMEJ.js → chunk-7NV53EL5.js} +1 -1
- package/{chunk-LFGUJHFF.js → chunk-7SVMERPH.js} +2 -2
- package/chunk-A52HUWVM.js +24 -0
- package/chunk-AKEZCWNW.js +29 -0
- package/{chunk-NH3EHMIL.js → chunk-APRVUOD6.js} +1 -1
- package/{chunk-DPYIBFQD.js → chunk-C435UD7V.js} +4 -3
- package/{chunk-5XTUFBZI.js → chunk-C6WRJ7DG.js} +1 -1
- package/{chunk-X66KTATQ.js → chunk-CQFAMWZI.js} +2 -2
- package/{chunk-YJK4MGSI.js → chunk-DAKVTPYZ.js} +4 -4
- package/{chunk-W472DBMT.js → chunk-DMZW4LGU.js} +3 -3
- package/chunk-EBZHGRM5.js +46 -0
- package/{chunk-O46O6LFQ.js → chunk-EHEXE2UV.js} +20 -1
- package/{chunk-UCCNXGLG.js → chunk-EQAFDIPE.js} +9 -7
- package/{chunk-LB37KTJH.js → chunk-EXKSKYG3.js} +2 -2
- package/chunk-FB6DG3LR.js +35 -0
- package/chunk-GH2DEOGO.js +67 -0
- package/{chunk-J7RMFN54.js → chunk-GKDMCY2S.js} +1 -1
- package/chunk-GTFUAA6H.js +42 -0
- package/{chunk-SAYNV7B3.js → chunk-HI6QIG55.js} +4 -4
- package/{chunk-SDOTDMYG.js → chunk-HZV7EXGU.js} +2 -2
- package/{chunk-RHQHDYTE.js → chunk-IKJIR6VL.js} +2 -2
- package/{chunk-ISYKZCPJ.js → chunk-INJWE2LD.js} +2 -2
- package/chunk-J5UQPROI.js +56 -0
- package/{chunk-5725MFGQ.js → chunk-JCR5TWTF.js} +4 -4
- package/chunk-JKOBDLP3.js +25 -0
- package/{chunk-FAJ3OVL4.js → chunk-JR3VVDV6.js} +1 -1
- package/{chunk-CVNRZ2YV.js → chunk-JYGCZWET.js} +1 -1
- package/{chunk-SPGUZMCC.js → chunk-K5G5OEV5.js} +2 -2
- package/{chunk-GMETYACH.js → chunk-KDU7AT2T.js} +2 -2
- package/chunk-KITXKIYW.js +104 -0
- package/{chunk-JYOZUQNU.js → chunk-KQNA22D3.js} +2 -2
- package/{chunk-OURZQM27.js → chunk-L5PPN42A.js} +11 -4
- package/{chunk-HK6WINL6.js → chunk-LAOE6Y57.js} +3 -3
- package/{chunk-ZBZ3ZQRB.js → chunk-LI5VYDLN.js} +4 -4
- package/{chunk-M2HEVFQ3.js → chunk-LKSFTNPF.js} +1 -1
- package/chunk-LLW3X4ZJ.js +39 -0
- package/{chunk-5KTBSMQU.js → chunk-LWRB4DED.js} +1 -1
- package/{chunk-LB7Z6BSK.js → chunk-M7RILZVW.js} +6 -6
- package/{chunk-674SRBZK.js → chunk-MOGWOUCN.js} +3 -3
- package/chunk-NCIRJ5V2.js +108 -0
- package/{chunk-SSOFFQ5T.js → chunk-NTSU44FY.js} +8 -1
- package/{chunk-BR2B4OIT.js → chunk-P36KBUYD.js} +3 -3
- package/{chunk-3DHJXU45.js → chunk-P6RHT2VM.js} +1 -1
- package/{chunk-WLQD5BN2.js → chunk-PD2KD5OR.js} +1 -1
- package/{chunk-OVKPPXK5.js → chunk-PP46SY7M.js} +2 -2
- package/{chunk-FB5HTCO2.js → chunk-PTK4QAOQ.js} +4 -4
- package/{chunk-IKO3GQFE.js → chunk-Q7KVC5B4.js} +3 -3
- package/{chunk-UUCVRIVP.js → chunk-R3DTMBDT.js} +3 -3
- package/{chunk-UGIVCXGN.js → chunk-R4KPFBMK.js} +1 -1
- package/{chunk-XH56JGYC.js → chunk-R5TQ3HNB.js} +1 -1
- package/chunk-RFSPJECL.js +84 -0
- package/chunk-RPL6FRVX.js +88 -0
- package/{chunk-SZJIVBOD.js → chunk-STYOBAC7.js} +3 -3
- package/{chunk-W4RDTP6W.js → chunk-SVUWR3HD.js} +3 -3
- package/{chunk-7Q76HLRQ.js → chunk-T7P3OEBP.js} +4 -4
- package/{chunk-TT2N5752.js → chunk-TB3ZRV3Y.js} +2 -2
- package/{chunk-BN7FDKCJ.js → chunk-TOY6YPTG.js} +2 -2
- package/{chunk-PHNR6ZQ7.js → chunk-U6X6ODDJ.js} +2 -2
- package/{chunk-6VKV36OK.js → chunk-UAJ6M34K.js} +4 -4
- package/{chunk-PD6YPFYN.js → chunk-W2EH6RY5.js} +1 -1
- package/{chunk-X2GNMNZQ.js → chunk-W2QQQWNE.js} +2 -2
- package/{chunk-JCXI7VQL.js → chunk-WALANB3V.js} +2 -2
- package/{chunk-NL574STL.js → chunk-WCUR44O6.js} +2 -2
- package/{chunk-PUWSL5XW.js → chunk-WJYJMX5S.js} +1 -1
- package/{chunk-AIMQNLPY.js → chunk-WZSLDYUU.js} +6 -29
- package/chunk-XU6JJDMZ.js +117 -0
- package/{chunk-57QEOCDZ.js → chunk-XWPH7C2W.js} +1 -1
- package/{chunk-73Z7NMQQ.js → chunk-YXWXSRXG.js} +5 -5
- package/{chunk-CGOH5IYX.js → chunk-YY236ZSJ.js} +3 -3
- package/components/accordion.js +2 -2
- package/components/action-button.d.ts +37 -0
- package/components/action-button.js +5 -0
- package/components/agent-loading.js +2 -2
- package/components/agent-picker.js +5 -4
- package/components/agent-suggestion.js +5 -5
- package/components/alert.d.ts +37 -0
- package/components/alert.js +5 -0
- package/components/announcement-bar.js +6 -5
- package/components/attachment.js +5 -4
- package/components/avatar.js +4 -4
- package/components/badge.js +2 -2
- package/components/banner.d.ts +3 -2
- package/components/banner.js +5 -3
- package/components/bar-chart.js +9 -9
- package/components/breadcrumb.js +5 -5
- package/components/button-group.d.ts +26 -0
- package/components/button-group.js +5 -0
- package/components/button.d.ts +13 -1
- package/components/button.js +4 -2
- package/components/card.js +5 -3
- package/components/channel-chart.js +9 -9
- package/components/chart.js +8 -8
- package/components/checkbox.js +2 -2
- package/components/chip.js +2 -2
- package/components/citations.js +4 -4
- package/components/code-block.js +5 -3
- package/components/combobox.js +10 -9
- package/components/command-menu.js +5 -5
- package/components/context-menu.js +5 -5
- package/components/cookie-consent.js +5 -3
- package/components/date-picker.js +9 -8
- package/components/decision-card.js +6 -5
- package/components/dialog.d.ts +2 -7
- package/components/dialog.js +6 -4
- package/components/donut-chart.js +9 -9
- package/components/dot.js +2 -2
- package/components/dropdown.js +4 -4
- package/components/empty-state.js +2 -2
- package/components/field-group.d.ts +27 -0
- package/components/field-group.js +3 -0
- package/components/file-upload.js +7 -6
- package/components/form-field.d.ts +38 -1
- package/components/form-field.js +2 -2
- package/components/form.d.ts +47 -0
- package/components/form.js +3 -0
- package/components/hover-card.js +2 -2
- package/components/input-group.d.ts +21 -0
- package/components/input-group.js +6 -0
- package/components/input-otp.js +7 -7
- package/components/input.d.ts +5 -1
- package/components/input.js +3 -3
- package/components/kbd.js +2 -2
- package/components/labels.d.ts +7 -0
- package/components/labels.js +1 -1
- package/components/line-chart.js +10 -10
- package/components/link.d.ts +20 -0
- package/components/link.js +3 -0
- package/components/list.d.ts +46 -0
- package/components/list.js +2 -0
- package/components/message-actions.js +5 -4
- package/components/message.js +8 -7
- package/components/number-input.js +7 -7
- package/components/pagination.js +5 -3
- package/components/password-input.d.ts +16 -0
- package/components/password-input.js +7 -0
- package/components/popover.js +3 -3
- package/components/progress.js +2 -2
- package/components/prompt-bar.js +6 -5
- package/components/radio.js +2 -2
- package/components/search-bar.js +3 -3
- package/components/segmented-control.js +2 -2
- package/components/select.d.ts +2 -1
- package/components/select.js +6 -6
- package/components/selectable-card.d.ts +37 -0
- package/components/selectable-card.js +2 -0
- package/components/selectable-checkbox.d.ts +14 -0
- package/components/selectable-checkbox.js +4 -0
- package/components/selectable-radio.d.ts +16 -0
- package/components/selectable-radio.js +3 -0
- package/components/separator.d.ts +18 -0
- package/components/separator.js +2 -0
- package/components/sheet.js +7 -5
- package/components/sidebar.js +2 -2
- package/components/skeleton.js +2 -2
- package/components/slider.js +7 -7
- package/components/spinner.d.ts +18 -0
- package/components/spinner.js +3 -0
- package/components/split-button.d.ts +24 -0
- package/components/split-button.js +8 -0
- package/components/streaming-text.js +2 -2
- package/components/switch.js +2 -2
- package/components/table.js +4 -4
- package/components/tabs.js +2 -2
- package/components/textarea.js +3 -3
- package/components/thinking.js +3 -3
- package/components/toast.js +5 -4
- package/components/toggle.js +2 -2
- package/components/tooltip.js +3 -3
- package/index.d.ts +16 -2
- package/index.js +80 -65
- package/lib/utils.js +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
- package/theme/create-theme.d.ts +2 -1
- package/theme/index.js +1 -1
- package/chunk-VUOAPWTF.js +0 -86
package/theme/create-theme.d.ts
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* white text reads at 4.5:1 on rest and hover, in Light and Dark. Labels stay white for
|
|
13
13
|
* every brand, so buttons look the same family whatever the colour.
|
|
14
14
|
* - `radius` scales every corner token, pill-shaped controls included; 1 is Satin's own, 0 is
|
|
15
|
-
* square. Circles (avatars, dots, switch and radio
|
|
15
|
+
* square, and pills become fully round only at 1.5. Circles (avatars, dots, switch and radio
|
|
16
|
+
* marks) stay round.
|
|
16
17
|
*
|
|
17
18
|
* `themeVars()` returns the variables per mode; `themeCss()` the same as a stylesheet to load
|
|
18
19
|
* after `@uisatin/ui/styles.css`.
|
package/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use client';export { contrast, defaultTheme, randomTheme, themeCss, themeVars } from '../chunk-
|
|
1
|
+
'use client';export { contrast, defaultTheme, randomTheme, themeCss, themeVars } from '../chunk-2643HEXD.js';
|
package/chunk-VUOAPWTF.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-O46O6LFQ.js';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var FormFieldContext = React.createContext(null);
|
|
6
|
-
function useFormField() {
|
|
7
|
-
return React.useContext(FormFieldContext);
|
|
8
|
-
}
|
|
9
|
-
function FormField({
|
|
10
|
-
label,
|
|
11
|
-
description,
|
|
12
|
-
error,
|
|
13
|
-
layout = "vertical",
|
|
14
|
-
disabled = false,
|
|
15
|
-
required = false,
|
|
16
|
-
htmlFor,
|
|
17
|
-
className,
|
|
18
|
-
children,
|
|
19
|
-
...props
|
|
20
|
-
}) {
|
|
21
|
-
const autoId = React.useId();
|
|
22
|
-
const id = htmlFor ?? autoId;
|
|
23
|
-
const invalid = Boolean(error);
|
|
24
|
-
const messageId = invalid ? `${id}-error` : description ? `${id}-description` : void 0;
|
|
25
|
-
const context = React.useMemo(
|
|
26
|
-
() => ({ id, describedBy: messageId, invalid, disabled, required }),
|
|
27
|
-
[id, messageId, invalid, disabled, required]
|
|
28
|
-
);
|
|
29
|
-
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
"data-slot": "form-field",
|
|
33
|
-
"data-layout": layout,
|
|
34
|
-
"data-invalid": invalid || void 0,
|
|
35
|
-
"data-disabled": disabled || void 0,
|
|
36
|
-
className: cn("sa:flex sa:w-full sa:items-start", layout === "vertical" ? "sa:flex-col sa:gap-2" : "sa:gap-6", className),
|
|
37
|
-
...props,
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsxs(
|
|
40
|
-
"label",
|
|
41
|
-
{
|
|
42
|
-
htmlFor: id,
|
|
43
|
-
className: cn(
|
|
44
|
-
"sa:flex sa:items-start sa:gap-0.5 sa:text-sm sa:leading-[18px] sa:font-medium sa:text-text-default",
|
|
45
|
-
layout === "horizontal" && "sa:w-40 sa:shrink-0",
|
|
46
|
-
disabled && "sa:opacity-50"
|
|
47
|
-
),
|
|
48
|
-
children: [
|
|
49
|
-
label,
|
|
50
|
-
required && // The required mark from Figma (the `sparkle 2` glyph in _label), 6px, in the label colour.
|
|
51
|
-
/* @__PURE__ */ jsx("svg", { width: "6", height: "6", viewBox: "0 0 6 6", fill: "currentColor", "aria-hidden": true, className: "sa:shrink-0", children: /* @__PURE__ */ jsx("path", { d: "M3.63636 2.18023L5.55372 1.41279L6 2.75581L4.04959 3.43605L5.27273 5.14535L4.18182 6L2.95868 4.20349L1.80165 6L0.694215 5.14535L1.91736 3.43605L0 2.75581L0.446281 1.41279L2.31405 2.18023V0H3.63636V2.18023Z" }) })
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
/* @__PURE__ */ jsxs("div", { className: "sa:flex sa:w-full sa:min-w-0 sa:flex-1 sa:flex-col sa:gap-1.5", children: [
|
|
56
|
-
children,
|
|
57
|
-
invalid ? /* @__PURE__ */ jsxs("p", { id: messageId, className: "sa:flex sa:items-start sa:gap-1.5 sa:text-sm sa:text-action-destructive-bg", children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(
|
|
59
|
-
"svg",
|
|
60
|
-
{
|
|
61
|
-
width: "14",
|
|
62
|
-
height: "14",
|
|
63
|
-
viewBox: "0 0 14 14",
|
|
64
|
-
fill: "none",
|
|
65
|
-
stroke: "currentColor",
|
|
66
|
-
strokeWidth: "1.09375",
|
|
67
|
-
strokeLinecap: "round",
|
|
68
|
-
strokeLinejoin: "round",
|
|
69
|
-
"aria-hidden": true,
|
|
70
|
-
className: "sa:mt-[2.75px] sa:shrink-0",
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ jsx("path", { d: "M7 4.67613V7.25806" }),
|
|
73
|
-
/* @__PURE__ */ jsx("path", { d: "M7 9.32422L7.0059 9.31766" }),
|
|
74
|
-
/* @__PURE__ */ jsx("path", { d: "M6.99995 12.1638C9.85184 12.1638 12.1638 9.85184 12.1638 6.99995C12.1638 4.14803 9.85184 1.83609 6.99995 1.83609C4.14803 1.83609 1.83609 4.14803 1.83609 6.99995C1.83609 9.85184 4.14803 12.1638 6.99995 12.1638Z" })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsx("span", { children: error })
|
|
79
|
-
] }) : description && /* @__PURE__ */ jsx("p", { id: messageId, className: cn("sa:text-sm sa:text-text-muted", disabled && "sa:opacity-50"), children: description })
|
|
80
|
-
] })
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
) });
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export { FormField, useFormField };
|