mimir-ui-kit 1.24.1 → 1.24.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/CheckboxMimir.css +1 -0
- package/dist/components/{Switch/Switch.d.ts → CheckboxMimir/CheckboxMimir.d.ts} +2 -2
- package/dist/components/{Switch/Switch.js → CheckboxMimir/CheckboxMimir.js} +9 -8
- package/dist/components/CheckboxMimir/index.d.ts +2 -0
- package/dist/components/CheckboxMimir/index.js +4 -0
- package/dist/components/Steps/Steps.js +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/assets/Switch.css +0 -1
- package/dist/components/Switch/index.d.ts +0 -2
- package/dist/components/Switch/index.js +0 -4
@@ -0,0 +1 @@
|
|
1
|
+
._container_ktju1_2{display:flex;gap:var(--space-xs);align-items:flex-start}._checkbox_ktju1_8{position:relative;display:inline-block;flex-shrink:0;width:24px;height:24px;padding:var(--space-2xs);vertical-align:middle;background-color:var(--sapphire-20);border-radius:var(--control-radius-xs);cursor:pointer}._checkbox_ktju1_8 svg{display:none}._checkbox_ktju1_8 svg path{fill:var(--white)}._label_ktju1_27{padding-top:var(--space-2xs)}._enabled_ktju1_31{background-color:var(--sapphire-100)}._enabled_ktju1_31 svg{display:block}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { CheckboxProps } from '@headlessui/react';
|
2
2
|
import { ReactNode } from 'react';
|
3
3
|
|
4
|
-
export type
|
4
|
+
export type TCheckboxMimirProps = CheckboxProps & {
|
5
5
|
children?: ReactNode;
|
6
6
|
};
|
7
|
-
export declare const
|
7
|
+
export declare const CheckboxMimir: import('react').ForwardRefExoticComponent<{
|
8
8
|
suppressHydrationWarning?: boolean | undefined;
|
9
9
|
color?: string | undefined;
|
10
10
|
id?: string | undefined;
|
@@ -6,7 +6,7 @@ import { u, a, l, T, I, G, j, p as p$1, z, U, b as l$1, f, W as W$1, K } from ".
|
|
6
6
|
import { r } from "../../bugs-CSBdWk0R.js";
|
7
7
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
8
8
|
import { Icon } from "../../icons/Icon.js";
|
9
|
-
import '../../assets/
|
9
|
+
import '../../assets/CheckboxMimir.css';let se = "span";
|
10
10
|
function ie(T$1, h) {
|
11
11
|
let C = useId(), k = u(), x = a(), { id: g = k || `headlessui-checkbox-${C}`, disabled: e = x || false, autoFocus: s = false, checked: E, defaultChecked: v, onChange: P, name: d, value: D$1, form: R, indeterminate: n = false, ...A2 } = T$1, r$1 = l(v), [a$1, t] = T(E, P, r$1 != null ? r$1 : false), F = I(), K2 = G(), _ = p(), [p$2, c] = useState(false), u$1 = o(() => {
|
12
12
|
c(true), t == null || t(!a$1), _.nextFrame(() => {
|
@@ -29,16 +29,17 @@ function L(d, l2) {
|
|
29
29
|
return React__default.createElement(l$1, { value: e }, React__default.createElement(p2, { value: s }, React__default.createElement(a$1, { value: n }, React__default.createElement(f, { id: t }, H$1({ ourProps: { ref: l2, disabled: e || void 0, "aria-disabled": e || void 0 }, theirProps: { ...o2, children: React__default.createElement(W$1, null, typeof o2.children == "function" ? o2.children(i) : o2.children) }, slot: i, defaultTag: A, name: "Field" })))));
|
30
30
|
}
|
31
31
|
let H = W(L);
|
32
|
-
const container = "
|
33
|
-
const
|
34
|
-
const
|
32
|
+
const container = "_container_ktju1_2";
|
33
|
+
const checkbox = "_checkbox_ktju1_8";
|
34
|
+
const label = "_label_ktju1_27";
|
35
|
+
const enabled = "_enabled_ktju1_31";
|
35
36
|
const cls = {
|
36
37
|
container,
|
37
|
-
|
38
|
+
checkbox,
|
38
39
|
label,
|
39
40
|
enabled
|
40
41
|
};
|
41
|
-
const
|
42
|
+
const CheckboxMimir = forwardRef(
|
42
43
|
(props, ref) => {
|
43
44
|
const { checked, onChange, children, id, ...restProps } = props;
|
44
45
|
const [enabled2, setEnabled] = useState(checked);
|
@@ -57,7 +58,7 @@ const Switch = forwardRef(
|
|
57
58
|
ref,
|
58
59
|
checked: enabled2,
|
59
60
|
onChange: handleChange,
|
60
|
-
className: classNames(cls.
|
61
|
+
className: classNames(cls.checkbox, {
|
61
62
|
[cls.enabled]: enabled2
|
62
63
|
}),
|
63
64
|
...restProps,
|
@@ -69,5 +70,5 @@ const Switch = forwardRef(
|
|
69
70
|
}
|
70
71
|
);
|
71
72
|
export {
|
72
|
-
|
73
|
+
CheckboxMimir
|
73
74
|
};
|
@@ -75,7 +75,7 @@ const Steps = forwardRef(
|
|
75
75
|
return /* @__PURE__ */ jsx(
|
76
76
|
"button",
|
77
77
|
{
|
78
|
-
style: { backgroundColor: resizable2 ? color : void 0 },
|
78
|
+
style: { backgroundColor: resizable2 ? color : void 0, color },
|
79
79
|
id: `${idPrefix}${ID_SEPARATOR}${idx}`,
|
80
80
|
className: classNames(cls.step, cls[size], stepClassName, {
|
81
81
|
[cls.editable]: editable2 && !disabled,
|
@@ -23,8 +23,8 @@ export { Steps, EStepsSize, EStepColor, type TCommonStepsProps } from './Steps';
|
|
23
23
|
export { Vote, EVoteSize, type TCommonVoteProps, type TProps } from './Vote';
|
24
24
|
export { SelectSearch, ESelectSearchSize } from './SelectSearch';
|
25
25
|
export type { TSelectSearchProps, TSelectOption } from './SelectSearch';
|
26
|
-
export {
|
27
|
-
export type {
|
26
|
+
export { CheckboxMimir } from './CheckboxMimir';
|
27
|
+
export type { TCheckboxMimirProps } from './CheckboxMimir';
|
28
28
|
export { Tag, ETagSize, ETagType } from './Tag';
|
29
29
|
export { Timer } from './Timer';
|
30
30
|
export { Accordion, AccordionItem, EAccordionSize } from './Accordion';
|
package/dist/components/index.js
CHANGED
@@ -22,7 +22,7 @@ import { Vote } from "./Vote/Vote.js";
|
|
22
22
|
import { EVoteSize } from "./Vote/constants.js";
|
23
23
|
import { SelectSearch } from "./SelectSearch/SelectSearch.js";
|
24
24
|
import { ESelectSearchSize } from "./SelectSearch/constants.js";
|
25
|
-
import {
|
25
|
+
import { CheckboxMimir } from "./CheckboxMimir/CheckboxMimir.js";
|
26
26
|
import { Tag } from "./Tag/Tag.js";
|
27
27
|
import { ETagSize, ETagType } from "./Tag/constants.js";
|
28
28
|
import { Timer } from "./Timer/Timer.js";
|
@@ -47,6 +47,7 @@ export {
|
|
47
47
|
Accordion,
|
48
48
|
AccordionItem,
|
49
49
|
Button,
|
50
|
+
CheckboxMimir,
|
50
51
|
Chip,
|
51
52
|
DatePicker,
|
52
53
|
Drawer,
|
@@ -89,7 +90,6 @@ export {
|
|
89
90
|
SelectSearch,
|
90
91
|
Slider,
|
91
92
|
Steps,
|
92
|
-
Switch,
|
93
93
|
TabTrail,
|
94
94
|
Tag,
|
95
95
|
TextArea,
|
package/dist/index.js
CHANGED
@@ -22,7 +22,7 @@ import { Vote } from "./components/Vote/Vote.js";
|
|
22
22
|
import { EVoteSize } from "./components/Vote/constants.js";
|
23
23
|
import { SelectSearch } from "./components/SelectSearch/SelectSearch.js";
|
24
24
|
import { ESelectSearchSize } from "./components/SelectSearch/constants.js";
|
25
|
-
import {
|
25
|
+
import { CheckboxMimir } from "./components/CheckboxMimir/CheckboxMimir.js";
|
26
26
|
import { Tag } from "./components/Tag/Tag.js";
|
27
27
|
import { ETagSize, ETagType } from "./components/Tag/constants.js";
|
28
28
|
import { Timer } from "./components/Timer/Timer.js";
|
@@ -57,6 +57,7 @@ import './assets/index.css';export {
|
|
57
57
|
Accordion,
|
58
58
|
AccordionItem,
|
59
59
|
Button,
|
60
|
+
CheckboxMimir,
|
60
61
|
Chip,
|
61
62
|
DatePicker,
|
62
63
|
Drawer,
|
@@ -102,7 +103,6 @@ import './assets/index.css';export {
|
|
102
103
|
SelectSearch,
|
103
104
|
Slider,
|
104
105
|
Steps,
|
105
|
-
Switch,
|
106
106
|
TabTrail,
|
107
107
|
Tag,
|
108
108
|
TextArea,
|
package/package.json
CHANGED
package/dist/assets/Switch.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
._container_18cvn_2{display:flex;gap:var(--space-xs);align-items:flex-start}._switch_18cvn_8{position:relative;display:inline-block;flex-shrink:0;width:24px;height:24px;padding:var(--space-2xs);vertical-align:middle;background-color:var(--sapphire-20);border-radius:var(--control-radius-xs);cursor:pointer}._switch_18cvn_8 svg{display:none}._switch_18cvn_8 svg path{fill:var(--white)}._label_18cvn_27{padding-top:var(--space-2xs)}._enabled_18cvn_31{background-color:var(--sapphire-100)}._enabled_18cvn_31 svg{display:block}
|