@companix/uikit 0.1.4 → 0.1.6
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/Radio/index.d.ts +1 -0
- package/dist/Table/index.d.ts +1 -1
- package/dist/bundle.es21.js +19 -18
- package/dist/bundle.es42.js +5 -5
- package/package.json +1 -1
package/dist/Radio/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface RadioGroupProps<T> {
|
|
|
8
8
|
value: T | null;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
required?: boolean;
|
|
11
|
+
className?: string;
|
|
11
12
|
size?: 'sm' | 'md';
|
|
12
13
|
}
|
|
13
14
|
export declare const RadioGroup: <T extends string>(props: RadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Table/index.d.ts
CHANGED
package/dist/bundle.es21.js
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import h from "classnames";
|
|
3
|
+
import { useId as N } from "react";
|
|
3
4
|
import * as l from "@radix-ui/react-radio-group";
|
|
4
5
|
import { attr as s } from "@companix/utils-browser";
|
|
5
|
-
const
|
|
6
|
-
const { options: m, value: a, onChange: r, disabled:
|
|
6
|
+
const R = (t) => {
|
|
7
|
+
const { options: m, value: a, onChange: r, disabled: i, required: e, size: n, className: c } = t;
|
|
7
8
|
return /* @__PURE__ */ o(
|
|
8
9
|
l.Root,
|
|
9
10
|
{
|
|
10
|
-
className: "radio-group",
|
|
11
|
-
disabled:
|
|
11
|
+
className: h("radio-group", c),
|
|
12
|
+
disabled: i,
|
|
12
13
|
"data-required": s(e && !a),
|
|
13
14
|
"data-v": a,
|
|
14
15
|
value: a,
|
|
15
|
-
onValueChange: (
|
|
16
|
-
children: m.map((
|
|
17
|
-
|
|
16
|
+
onValueChange: (d) => r(d),
|
|
17
|
+
children: m.map((d, u) => /* @__PURE__ */ o(
|
|
18
|
+
f,
|
|
18
19
|
{
|
|
19
|
-
...
|
|
20
|
+
...d,
|
|
20
21
|
size: n,
|
|
21
|
-
disabled:
|
|
22
|
+
disabled: i,
|
|
22
23
|
required: e && !a
|
|
23
24
|
},
|
|
24
|
-
`radio-${
|
|
25
|
+
`radio-${d.value}-${u}`
|
|
25
26
|
))
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
|
-
},
|
|
29
|
-
const e =
|
|
30
|
-
return /* @__PURE__ */
|
|
29
|
+
}, f = ({ value: t, label: m, size: a = "md", disabled: r, required: i }) => {
|
|
30
|
+
const e = N();
|
|
31
|
+
return /* @__PURE__ */ p(
|
|
31
32
|
"span",
|
|
32
33
|
{
|
|
33
34
|
className: "radio",
|
|
34
35
|
"data-disabled": s(r),
|
|
35
36
|
"data-size": a,
|
|
36
|
-
"data-required": s(
|
|
37
|
+
"data-required": s(i),
|
|
37
38
|
children: [
|
|
38
39
|
/* @__PURE__ */ o(l.Item, { className: "radio-box", value: t, disabled: r, id: e, children: /* @__PURE__ */ o(l.Indicator, { className: "radio-mark" }) }),
|
|
39
40
|
/* @__PURE__ */ o("label", { className: "radio-label", htmlFor: e, "data-disabled": s(r), children: m })
|
|
@@ -42,6 +43,6 @@ const q = (t) => {
|
|
|
42
43
|
);
|
|
43
44
|
};
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
f as Radio,
|
|
47
|
+
R as RadioGroup
|
|
47
48
|
};
|
package/dist/bundle.es42.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
const b = ({ header: c, items: e, getItemLayout: d, className: o, onRowClick: h }) => /* @__PURE__ */
|
|
3
|
-
/* @__PURE__ */ r("colgroup", { children: c.map(({ style:
|
|
4
|
-
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: c.map(({ content:
|
|
5
|
-
/* @__PURE__ */ r("tbody", { children: e.map((
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const b = ({ header: c, items: e, getItemLayout: d, className: o, onRowClick: h }) => /* @__PURE__ */ p("table", { className: o, children: [
|
|
3
|
+
/* @__PURE__ */ r("colgroup", { children: c.map(({ style: t }, l) => /* @__PURE__ */ r("col", { style: t }, `colgroup-col-${l}`)) }),
|
|
4
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: c.map(({ content: t }, l) => /* @__PURE__ */ r("th", { children: t }, `header-th-${l}`)) }) }),
|
|
5
|
+
/* @__PURE__ */ r("tbody", { children: e.map((t, l) => /* @__PURE__ */ r("tr", { onClick: () => h?.(t), children: d(t, l).map((n, a) => /* @__PURE__ */ r("td", { children: n }, `table-td-${l}-${a}`)) }, `table-tr-${l}`)) })
|
|
6
6
|
] });
|
|
7
7
|
export {
|
|
8
8
|
b as Table
|