@companix/uikit 0.0.33 → 0.0.34
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/Avatar/Avatar.scss +64 -0
- package/dist/Avatar/helpers.d.ts +10 -0
- package/dist/Avatar/index.d.ts +8 -0
- package/dist/Avatar/types.d.ts +2 -0
- package/dist/Icon/index.d.ts +2 -3
- package/dist/Segments/Segments.scss +57 -0
- package/dist/Segments/index.d.ts +11 -0
- package/dist/bundle.es.js +86 -80
- package/dist/bundle.es10.js +78 -39
- package/dist/bundle.es11.js +26 -36
- package/dist/bundle.es12.js +75 -56
- package/dist/bundle.es13.js +39 -19
- package/dist/bundle.es14.js +36 -33
- package/dist/bundle.es15.js +54 -23
- package/dist/bundle.es16.js +21 -45
- package/dist/bundle.es17.js +29 -19
- package/dist/bundle.es18.js +21 -25
- package/dist/bundle.es19.js +45 -38
- package/dist/bundle.es2.js +42 -45
- package/dist/bundle.es20.js +21 -14
- package/dist/bundle.es21.js +28 -33
- package/dist/bundle.es22.js +38 -21
- package/dist/bundle.es23.js +12 -38
- package/dist/bundle.es24.js +32 -114
- package/dist/bundle.es25.js +20 -120
- package/dist/bundle.es26.js +40 -72
- package/dist/bundle.es27.js +115 -32
- package/dist/bundle.es28.js +120 -11
- package/dist/bundle.es29.js +71 -83
- package/dist/bundle.es3.js +2 -8
- package/dist/bundle.es30.js +31 -20
- package/dist/bundle.es31.js +11 -6
- package/dist/bundle.es32.js +83 -32
- package/dist/bundle.es33.js +21 -21
- package/dist/bundle.es34.js +6 -10
- package/dist/bundle.es35.js +33 -23
- package/dist/bundle.es36.js +20 -37
- package/dist/bundle.es37.js +10 -50
- package/dist/bundle.es38.js +22 -40
- package/dist/bundle.es39.js +38 -8
- package/dist/bundle.es4.js +44 -10
- package/dist/bundle.es40.js +48 -21
- package/dist/bundle.es41.js +42 -86
- package/dist/bundle.es42.js +8 -17
- package/dist/bundle.es43.js +24 -19
- package/dist/bundle.es44.js +24 -24
- package/dist/bundle.es45.js +77 -29
- package/dist/bundle.es46.js +18 -3
- package/dist/bundle.es47.js +20 -5
- package/dist/bundle.es48.js +24 -14
- package/dist/bundle.es49.js +39 -14
- package/dist/bundle.es5.js +8 -85
- package/dist/bundle.es50.js +3 -3
- package/dist/bundle.es51.js +5 -3
- package/dist/bundle.es52.js +13 -69
- package/dist/bundle.es53.js +13 -67
- package/dist/bundle.es54.js +3 -70
- package/dist/bundle.es55.js +3 -12
- package/dist/bundle.es56.js +68 -41
- package/dist/bundle.es57.js +67 -14
- package/dist/bundle.es58.js +69 -31
- package/dist/bundle.es59.js +12 -70
- package/dist/bundle.es6.js +11 -85
- package/dist/bundle.es60.js +43 -20
- package/dist/bundle.es61.js +15 -2
- package/dist/bundle.es62.js +32 -14
- package/dist/bundle.es63.js +69 -19
- package/dist/bundle.es64.js +76 -2
- package/dist/bundle.es65.js +49 -21
- package/dist/bundle.es66.js +14 -2
- package/dist/bundle.es67.js +9 -9
- package/dist/bundle.es68.js +2 -76
- package/dist/bundle.es69.js +20 -49
- package/dist/bundle.es7.js +84 -79
- package/dist/bundle.es70.js +2 -2
- package/dist/bundle.es71.js +21 -14
- package/dist/bundle.es72.js +2 -3
- package/dist/bundle.es73.js +20 -3
- package/dist/bundle.es74.js +3 -20
- package/dist/bundle.es75.js +3 -2
- package/dist/bundle.es76.js +14 -20
- package/dist/bundle.es77.js +2 -2
- package/dist/bundle.es78.js +22 -0
- package/dist/bundle.es79.js +4 -0
- package/dist/bundle.es8.js +83 -24
- package/dist/bundle.es80.js +22 -0
- package/dist/bundle.es81.js +4 -0
- package/dist/bundle.es9.js +20 -73
- package/dist/index.d.ts +6 -0
- package/dist/index.scss +2 -0
- package/package.json +1 -1
package/dist/bundle.es9.js
CHANGED
|
@@ -1,77 +1,24 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { SelectOptions as D } from "./bundle.es43.js";
|
|
8
|
-
import { mergeRefs as j } from "react-merge-refs";
|
|
9
|
-
const G = (a) => {
|
|
10
|
-
const {
|
|
11
|
-
options: n,
|
|
12
|
-
onChange: i,
|
|
13
|
-
value: r,
|
|
14
|
-
minimalOptions: m,
|
|
15
|
-
matchTarget: f = "width",
|
|
16
|
-
children: u,
|
|
17
|
-
disabled: p,
|
|
18
|
-
scrollRef: d,
|
|
19
|
-
popoverRef: v,
|
|
20
|
-
clearButton: s,
|
|
21
|
-
...h
|
|
22
|
-
} = a, t = F(() => {
|
|
23
|
-
const o = r === null ? -1 : n.findIndex((e) => e.value === r);
|
|
24
|
-
return {
|
|
25
|
-
index: o,
|
|
26
|
-
option: n[o]
|
|
27
|
-
};
|
|
28
|
-
}, [n, r]), x = t.option?.value ?? null, { popoverRef: R, froozePopoverPosition: C, handleAnimationEnd: g } = b(), { scrollToElement: c, optionsWrapperRef: O, scrollBoxRef: P } = B();
|
|
29
|
-
I(d, () => ({
|
|
30
|
-
scrollTo: (o) => c(o, "top")
|
|
31
|
-
}));
|
|
32
|
-
const S = (o, e) => {
|
|
33
|
-
C(), i(o), e();
|
|
34
|
-
}, A = (o) => {
|
|
35
|
-
o.stopPropagation(), s && i(null);
|
|
36
|
-
}, E = () => {
|
|
37
|
-
t.index !== -1 && c(t.index, "center");
|
|
1
|
+
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { attr as d } from "@companix/utils-browser";
|
|
3
|
+
const u = ({ value: t, onChange: i, options: r }) => {
|
|
4
|
+
const n = r.findIndex((e) => e.value === t), a = {
|
|
5
|
+
"--uikit--current-index": String(n),
|
|
6
|
+
"--uikit--options": String(r.length)
|
|
38
7
|
};
|
|
39
|
-
return /* @__PURE__ */ l(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
options: n,
|
|
54
|
-
active: x,
|
|
55
|
-
scrollboxRef: P,
|
|
56
|
-
optionsWrapperRef: O,
|
|
57
|
-
minimalOptions: m,
|
|
58
|
-
onOpened: E,
|
|
59
|
-
onSelect: (e) => S(e, o)
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
children: u ?? /* @__PURE__ */ l(
|
|
63
|
-
z,
|
|
64
|
-
{
|
|
65
|
-
...h,
|
|
66
|
-
disabled: p,
|
|
67
|
-
clearButton: s,
|
|
68
|
-
value: t.option?.title ?? "",
|
|
69
|
-
onClear: A
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
);
|
|
8
|
+
return /* @__PURE__ */ s("div", { className: "segments-container", children: /* @__PURE__ */ l("div", { role: "radiogroup", className: "segments", children: [
|
|
9
|
+
n > -1 && /* @__PURE__ */ s("div", { "aria-hidden": !0, className: "segments-slider", style: a }),
|
|
10
|
+
r.map((e) => /* @__PURE__ */ s(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
onClick: () => i(e.value),
|
|
14
|
+
className: "segments-option",
|
|
15
|
+
"data-active": d(e.value === t),
|
|
16
|
+
children: e.label
|
|
17
|
+
},
|
|
18
|
+
`segment-${e.value}`
|
|
19
|
+
))
|
|
20
|
+
] }) });
|
|
74
21
|
};
|
|
75
22
|
export {
|
|
76
|
-
|
|
23
|
+
u as Segments
|
|
77
24
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export { Avatar } from './Avatar';
|
|
2
|
+
export type { AvatarProps } from './Avatar';
|
|
3
|
+
export type { AvatarSize } from './Avatar/types';
|
|
4
|
+
export { avatarSizes } from './Avatar/types';
|
|
1
5
|
export { Button } from './Button';
|
|
2
6
|
export type { ButtonProps, Appearance, Mode, Size } from './Button';
|
|
3
7
|
export { ButtonGroup } from './ButtonGroup';
|
|
@@ -7,6 +11,8 @@ export type { SpinnerProps } from './Spinner';
|
|
|
7
11
|
export { Scrollable } from './Scrollable';
|
|
8
12
|
export { ImitateScroll } from './Scrollable/ImitateScroll';
|
|
9
13
|
export type { ImitateScrollProps } from './Scrollable/ImitateScroll';
|
|
14
|
+
export { Segments } from './Segments';
|
|
15
|
+
export type { SegmentsProps } from './Segments';
|
|
10
16
|
export { Popover } from './Popover';
|
|
11
17
|
export type { PopoverProps } from './Popover';
|
|
12
18
|
export { Tooltip } from './Tooltip';
|
package/dist/index.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use './Avatar/Avatar.scss';
|
|
1
2
|
@use './Button/Button.scss';
|
|
2
3
|
@use './Icon/icon.scss';
|
|
3
4
|
@use './Popover/Popover.scss';
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
@use './Switch/Switch.scss';
|
|
22
23
|
@use './Spinner/Spinner.scss';
|
|
23
24
|
@use './ButtonGroup/ButtonGroup.scss';
|
|
25
|
+
@use './Segments/Segments.scss';
|
|
24
26
|
@use './Scrollable/Scrollable.scss';
|
|
25
27
|
@use './FormGroup/FormGroup.scss';
|
|
26
28
|
@use './Progress/Progress.scss';
|