@pibit.ai/cure-design-system 0.6.7 → 0.6.9
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/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +298 -282
- package/dist/patterns/accordion/accordion.d.ts +75 -0
- package/dist/patterns/accordion/accordion.d.ts.map +1 -0
- package/dist/patterns/accordion/accordion.js +151 -0
- package/dist/patterns/accordion/collapsible.d.ts +29 -0
- package/dist/patterns/accordion/collapsible.d.ts.map +1 -0
- package/dist/patterns/accordion/collapsible.js +30 -0
- package/dist/patterns/accordion/expandable-card.d.ts +30 -0
- package/dist/patterns/accordion/expandable-card.d.ts.map +1 -0
- package/dist/patterns/accordion/expandable-card.js +99 -0
- package/dist/patterns/accordion/index.d.ts +4 -0
- package/dist/patterns/accordion/index.d.ts.map +1 -0
- package/dist/patterns/table/toolbar/GroupByDropdown.js +1 -1
- package/dist/patterns/table/toolbar/ToolbarRadio.d.ts +5 -17
- package/dist/patterns/table/toolbar/ToolbarRadio.d.ts.map +1 -1
- package/dist/primitives/radio/index.d.ts +2 -0
- package/dist/primitives/radio/index.d.ts.map +1 -0
- package/dist/primitives/radio/radio.d.ts +61 -0
- package/dist/primitives/radio/radio.d.ts.map +1 -0
- package/dist/primitives/radio/radio.js +75 -0
- package/dist/primitives/textarea/index.d.ts +2 -0
- package/dist/primitives/textarea/index.d.ts.map +1 -0
- package/dist/primitives/textarea/textarea.d.ts +56 -0
- package/dist/primitives/textarea/textarea.d.ts.map +1 -0
- package/dist/primitives/textarea/textarea.js +107 -0
- package/dist/styles/components.css +1 -1
- package/package.json +1 -1
- package/dist/patterns/table/toolbar/ToolbarRadio.js +0 -64
package/package.json
CHANGED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as c, Fragment as u } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as f, useContext as p } from "react";
|
|
3
|
-
import { RadioGroup as g, Radio as b } from "react-aria-components";
|
|
4
|
-
import { cx as a } from "../../../utils/cn.js";
|
|
5
|
-
const l = f(null), x = ({
|
|
6
|
-
className: r,
|
|
7
|
-
isFocusVisible: o,
|
|
8
|
-
isSelected: e,
|
|
9
|
-
isDisabled: i,
|
|
10
|
-
size: t = "sm"
|
|
11
|
-
}) => /* @__PURE__ */ n(
|
|
12
|
-
"div",
|
|
13
|
-
{
|
|
14
|
-
className: a(
|
|
15
|
-
"flex size-4 min-h-4 min-w-4 cursor-pointer appearance-none items-center justify-center rounded-full bg-primary ring-1 ring-primary ring-inset",
|
|
16
|
-
t === "md" && "size-5 min-h-5 min-w-5",
|
|
17
|
-
e && !i && "bg-brand-solid ring-bg-brand-solid",
|
|
18
|
-
i && "cursor-not-allowed border-disabled bg-disabled_subtle",
|
|
19
|
-
o && "outline-2 outline-offset-2 outline-focus-ring",
|
|
20
|
-
r
|
|
21
|
-
),
|
|
22
|
-
children: /* @__PURE__ */ n(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: a(
|
|
26
|
-
"size-1.5 rounded-full bg-fg-white opacity-0 transition-inherit-all",
|
|
27
|
-
t === "md" && "size-2",
|
|
28
|
-
i && "bg-fg-disabled_subtle",
|
|
29
|
-
e && "opacity-100"
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
), w = ({ label: r, className: o, size: e = "sm", ...i }) => {
|
|
35
|
-
const t = p(l);
|
|
36
|
-
return e = (t == null ? void 0 : t.size) ?? e, /* @__PURE__ */ n(
|
|
37
|
-
b,
|
|
38
|
-
{
|
|
39
|
-
...i,
|
|
40
|
-
className: (s) => a(
|
|
41
|
-
// `relative` keeps React Aria's hidden input inside the label, so focusing it never scrolls the page.
|
|
42
|
-
"relative flex items-center gap-2",
|
|
43
|
-
s.isDisabled && "cursor-not-allowed",
|
|
44
|
-
typeof o == "function" ? o(s) : o
|
|
45
|
-
),
|
|
46
|
-
children: ({ isSelected: s, isDisabled: d, isFocusVisible: m }) => /* @__PURE__ */ c(u, { children: [
|
|
47
|
-
/* @__PURE__ */ n(
|
|
48
|
-
x,
|
|
49
|
-
{
|
|
50
|
-
size: e,
|
|
51
|
-
isSelected: s,
|
|
52
|
-
isDisabled: d,
|
|
53
|
-
isFocusVisible: m
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
r && /* @__PURE__ */ n("p", { className: "text-sm font-medium text-secondary select-none", children: r })
|
|
57
|
-
] })
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}, G = ({ children: r, className: o, size: e = "sm", ...i }) => /* @__PURE__ */ n(l.Provider, { value: { size: e }, children: /* @__PURE__ */ n(g, { ...i, className: a("flex flex-col gap-4", o), children: r }) });
|
|
61
|
-
export {
|
|
62
|
-
w as RadioButton,
|
|
63
|
-
G as RadioGroup
|
|
64
|
-
};
|