reactive-bulma 5.0.7 → 5.1.1
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/README.md +9 -5
- package/dist/components/atoms/Button/index.js +57 -75
- package/dist/components/atoms/Button/index.stories.d.ts +1 -0
- package/dist/components/atoms/Icon/index.js +33 -31
- package/dist/components/atoms/Icon/index.stories.d.ts +1 -0
- package/dist/components/atoms/Image/index.js +21 -19
- package/dist/components/atoms/Image/index.stories.d.ts +1 -0
- package/dist/components/atoms/Input/index.js +46 -43
- package/dist/components/atoms/Input/index.stories.d.ts +1 -0
- package/dist/components/atoms/Select/index.js +58 -57
- package/dist/components/atoms/Skeleton/index.d.ts +4 -0
- package/dist/components/atoms/Skeleton/index.js +26 -0
- package/dist/components/atoms/Skeleton/index.stories.d.ts +7 -0
- package/dist/components/atoms/Skeleton/index.test.d.ts +0 -0
- package/dist/components/atoms/Tag/index.js +14 -12
- package/dist/components/atoms/Tag/index.stories.d.ts +1 -0
- package/dist/components/atoms/TextArea/index.js +38 -35
- package/dist/components/atoms/TextArea/index.stories.d.ts +1 -0
- package/dist/components/atoms/Title/index.js +24 -23
- package/dist/components/atoms/Title/index.stories.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +1 -0
- package/dist/components/atoms/index.js +14 -12
- package/dist/components/molecules/Message/index.js +1 -1
- package/dist/components/molecules/NavBarBrand/index.js +1 -1
- package/dist/components/molecules/Notification/index.js +1 -1
- package/dist/components/molecules/TagList/index.js +1 -1
- package/dist/components/molecules/TileBox/index.js +1 -1
- package/dist/components/organisms/FormField/index.js +30 -28
- package/dist/components/organisms/Table/index.js +1 -1
- package/dist/components/organisms/TileGroup/index.js +1 -1
- package/dist/constants/classes.d.ts +4 -0
- package/dist/constants/classes.js +4 -0
- package/dist/index.js +78 -76
- package/dist/interfaces/atomProps.d.ts +18 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -120,6 +120,10 @@ Several quick start options are available:
|
|
|
120
120
|
- Clone the repo: `git clone https://github.com/NicolasOmar/reactive-bulma.git`.
|
|
121
121
|
- Install with [npm](https://www.npmjs.com/package/reactive-bulma): `npm install reactive-bulma@latest`
|
|
122
122
|
- Before cloning this repo, I recommend installing [Node](https://nodejs.org/en/download/) `>=20.10.0` to install packages.
|
|
123
|
+
- Once the package has been installed, add at your's React main application file (`main.jsx/tsx`) the following line to inject bulma's styles:
|
|
124
|
+
```jsx
|
|
125
|
+
import '../node_modules/reactive-bulma/dist/reactive-bulma.css'
|
|
126
|
+
```
|
|
123
127
|
|
|
124
128
|
## Folder structure
|
|
125
129
|
|
|
@@ -148,7 +152,7 @@ Reactive Bulma's documentation, included in this repo in the root directory, is
|
|
|
148
152
|
- Open a console and run `npm install` to install the Node.js dependencies, including Storybook (the site builder).
|
|
149
153
|
- Run `npm start`.
|
|
150
154
|
- Wait until a new tab opens with url <http://localhost:6006/> in your browser.
|
|
151
|
-
- If you want to initiate it in the background, you can run `npm run start:cli
|
|
155
|
+
- If you want to initiate it in the background, you can run `npm run start:cli`.
|
|
152
156
|
|
|
153
157
|
Learn more about `Storybook` by reading its [documentation](https://storybook.js.org/docs/react/get-started/install).
|
|
154
158
|
|
|
@@ -199,14 +203,14 @@ Given the mentioned release logic, `main` is the only static branch, and each de
|
|
|
199
203
|
|
|
200
204
|
## Roadmap
|
|
201
205
|
|
|
202
|
-
From mid-September to the end of November (2025), I updated ReactiveBulma's main tools to their latest major versions ([Bulma v1](https://bulma.io/documentation/start/migrating-to-v1/) and [React v19](https://react.dev/blog/2024/12/05/react-19)), which includes issues and pull requests I wrapped [in version](https://github.com/NicolasOmar/reactive-bulma/milestone/6?closed=1)
|
|
206
|
+
From mid-September to the end of November (2025), I updated ReactiveBulma's main tools to their latest major versions ([Bulma v1](https://bulma.io/documentation/start/migrating-to-v1/) and [React v19](https://react.dev/blog/2024/12/05/react-19)), which includes issues and pull requests I wrapped [in version `v5`](https://github.com/NicolasOmar/reactive-bulma/milestone/6?closed=1).
|
|
203
207
|
|
|
204
|
-
Nowadays, I am updating the rest of the dependencies every week, creating a PR alongside its related branch and PR to maintain track of those updates.
|
|
205
|
-
|
|
206
|
-
For the near future. I will continue with my full-stack app [MyPets](https://github.com/NicolasOmar/my-pets), where I migrated all custom components, leaving me with code I can get rid of and, in the process, finding new opportunities to enhance component usability.
|
|
208
|
+
Nowadays, I am updating the rest of the dependencies every week, creating a PR alongside its related branch and PR to maintain track of those updates.
|
|
207
209
|
|
|
208
210
|
If you want the actual short-term status, go to the [project board](https://github.com/users/NicolasOmar/projects/3) (powered by `GitHub Projects`).
|
|
209
211
|
|
|
212
|
+
During 2026, I will continue with my full-stack app [MyPets](https://github.com/NicolasOmar/my-pets), where I use this library to build its UI.
|
|
213
|
+
|
|
210
214
|
<details>
|
|
211
215
|
<summary>Here is the status table I used to keep track of the worked milestones/versions. (v5 included)</summary>
|
|
212
216
|
|
|
@@ -1,87 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as L } from "react";
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
2
|
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
4
|
-
import { parseClasses as
|
|
5
|
-
const
|
|
6
|
-
testId:
|
|
7
|
-
cssClasses:
|
|
8
|
-
style:
|
|
9
|
-
type:
|
|
10
|
-
isAnAnchor:
|
|
11
|
-
anchorHref:
|
|
12
|
-
text:
|
|
13
|
-
isDisabled:
|
|
14
|
-
color:
|
|
15
|
-
colorMode:
|
|
16
|
-
isInvertedColor:
|
|
17
|
-
isOutlined:
|
|
18
|
-
isRounded:
|
|
19
|
-
isLoading:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
import { parseClasses as v, parseTestId as h } from "../../../functions/parsers.js";
|
|
4
|
+
const B = ({
|
|
5
|
+
testId: E = null,
|
|
6
|
+
cssClasses: I = null,
|
|
7
|
+
style: n = null,
|
|
8
|
+
type: S = "button",
|
|
9
|
+
isAnAnchor: C = !1,
|
|
10
|
+
anchorHref: N = null,
|
|
11
|
+
text: a = null,
|
|
12
|
+
isDisabled: t = !1,
|
|
13
|
+
color: u = null,
|
|
14
|
+
colorMode: e = null,
|
|
15
|
+
isInvertedColor: T = !1,
|
|
16
|
+
isOutlined: m = !1,
|
|
17
|
+
isRounded: b = !1,
|
|
18
|
+
isLoading: c = !1,
|
|
19
|
+
isSkeleton: p = !1,
|
|
20
|
+
isStatic: L = !1,
|
|
21
|
+
isSelected: O = !1,
|
|
22
|
+
isFullWidth: D = !1,
|
|
23
|
+
isResponsive: $ = !1,
|
|
24
|
+
size: o = null,
|
|
25
|
+
onClick: d = null
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
n,
|
|
45
|
-
u,
|
|
46
|
-
m,
|
|
47
|
-
E,
|
|
48
|
-
I,
|
|
49
|
-
d,
|
|
50
|
-
N,
|
|
51
|
-
S,
|
|
52
|
-
T,
|
|
53
|
-
b,
|
|
54
|
-
t,
|
|
55
|
-
e
|
|
56
|
-
]
|
|
57
|
-
), D = L(
|
|
58
|
-
() => s ?? c({ tag: C, parsedClasses: a }),
|
|
59
|
-
[s, a]
|
|
60
|
-
);
|
|
61
|
-
return v ? /* @__PURE__ */ $(
|
|
27
|
+
const f = "button", s = v([
|
|
28
|
+
f,
|
|
29
|
+
u ? `${l.IS}${u}` : null,
|
|
30
|
+
e ? `${l.IS}${e}` : null,
|
|
31
|
+
T ? l.INVERTED : null,
|
|
32
|
+
m ? l.OUTLINED : null,
|
|
33
|
+
b ? l.ROUNDED : null,
|
|
34
|
+
c ? l.LOADING : null,
|
|
35
|
+
p ? l.SKELETON : null,
|
|
36
|
+
L ? l.STATIC : null,
|
|
37
|
+
O ? l.SELECTED : null,
|
|
38
|
+
D ? l.FULL_WIDTH : null,
|
|
39
|
+
$ ? l.RESPONSIVE : null,
|
|
40
|
+
o ? `${l.IS}${o}` : null,
|
|
41
|
+
I
|
|
42
|
+
]), r = E ?? h({ tag: f, parsedClasses: s });
|
|
43
|
+
return C ? /* @__PURE__ */ i(
|
|
62
44
|
"a",
|
|
63
45
|
{
|
|
64
|
-
"data-testid":
|
|
65
|
-
className:
|
|
66
|
-
style:
|
|
67
|
-
"aria-disabled":
|
|
68
|
-
href:
|
|
69
|
-
onClick:
|
|
70
|
-
children:
|
|
46
|
+
"data-testid": r,
|
|
47
|
+
className: s,
|
|
48
|
+
style: n ?? void 0,
|
|
49
|
+
"aria-disabled": t,
|
|
50
|
+
href: N ?? void 0,
|
|
51
|
+
onClick: d ?? void 0,
|
|
52
|
+
children: a
|
|
71
53
|
}
|
|
72
|
-
) : /* @__PURE__ */
|
|
54
|
+
) : /* @__PURE__ */ i(
|
|
73
55
|
"button",
|
|
74
56
|
{
|
|
75
|
-
"data-testid":
|
|
76
|
-
type:
|
|
77
|
-
className:
|
|
78
|
-
style:
|
|
79
|
-
disabled:
|
|
80
|
-
onClick:
|
|
81
|
-
children:
|
|
57
|
+
"data-testid": r,
|
|
58
|
+
type: S,
|
|
59
|
+
className: s,
|
|
60
|
+
style: n ?? void 0,
|
|
61
|
+
disabled: t,
|
|
62
|
+
onClick: d ?? void 0,
|
|
63
|
+
children: a
|
|
82
64
|
}
|
|
83
65
|
);
|
|
84
66
|
};
|
|
85
67
|
export {
|
|
86
|
-
|
|
68
|
+
B as default
|
|
87
69
|
};
|
|
@@ -12,6 +12,7 @@ export declare const InvertedColor: import('storybook/internal/csf').AnnotatedSt
|
|
|
12
12
|
export declare const OutlinedColor: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
13
13
|
export declare const Rounded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
14
14
|
export declare const LoadingState: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
15
|
+
export declare const SkeletonState: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
15
16
|
export declare const LargeSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
16
17
|
export declare const FullWidth: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
17
18
|
export declare const Responsive: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ButtonProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as M, jsx as
|
|
2
|
-
import { IconSizeEnum as
|
|
3
|
-
import { COMMON_CLASSES as
|
|
4
|
-
import { TEST_ID_REGEXP as
|
|
5
|
-
import { parseClasses as
|
|
6
|
-
const
|
|
7
|
-
const r = n ? `${
|
|
8
|
-
tag: `${
|
|
9
|
-
parsedClasses: n ? `${
|
|
10
|
-
rules: [{ regExp:
|
|
1
|
+
import { jsxs as M, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { IconSizeEnum as X } from "../../../types/domTypes.js";
|
|
3
|
+
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
4
|
+
import { TEST_ID_REGEXP as p } from "../../../constants/regExp.js";
|
|
5
|
+
import { parseClasses as I, parseTestId as T } from "../../../functions/parsers.js";
|
|
6
|
+
const e = "icon", s = "mdi", h = (t, n) => {
|
|
7
|
+
const r = n ? `${e}-text-${n}` : `${e}-text`, o = T({
|
|
8
|
+
tag: `${e}-container`,
|
|
9
|
+
parsedClasses: n ? `${l.HAS_TEXT}${n}` : "",
|
|
10
|
+
rules: [{ regExp: p.HAS_TEXT, replacer: "" }]
|
|
11
11
|
});
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ u(
|
|
13
13
|
"span",
|
|
14
14
|
{
|
|
15
15
|
"data-testid": o,
|
|
@@ -23,50 +23,52 @@ const l = "icon", s = "mdi", X = (t, n) => {
|
|
|
23
23
|
cssClasses: r = null,
|
|
24
24
|
containerCssClasses: o = null,
|
|
25
25
|
style: S = null,
|
|
26
|
-
containerStyle:
|
|
27
|
-
iconLabel:
|
|
26
|
+
containerStyle: f = null,
|
|
27
|
+
iconLabel: x,
|
|
28
28
|
text: c = null,
|
|
29
29
|
color: i = null,
|
|
30
30
|
size: a = null,
|
|
31
31
|
colorMode: $ = null,
|
|
32
32
|
isSpinning: _ = !1,
|
|
33
|
+
isSkeleton: g = !1,
|
|
33
34
|
position: d = null
|
|
34
35
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
i ? `${
|
|
38
|
-
a ? `${
|
|
39
|
-
d ? `${
|
|
36
|
+
const N = I([
|
|
37
|
+
e,
|
|
38
|
+
i ? `${l.HAS_TEXT}${i}` : null,
|
|
39
|
+
a ? `${l.IS}${a}` : null,
|
|
40
|
+
d ? `${l.IS}${d}` : null,
|
|
40
41
|
o
|
|
41
|
-
]), m =
|
|
42
|
+
]), m = I([
|
|
42
43
|
s,
|
|
43
|
-
`${s}-${
|
|
44
|
-
$ ? `${s}-${
|
|
44
|
+
`${s}-${x}`,
|
|
45
|
+
$ ? `${s}-${l.IS}${$}` : null,
|
|
45
46
|
_ ? `${s}-spin` : null,
|
|
46
|
-
|
|
47
|
+
g ? l.SKELETON : null,
|
|
48
|
+
a ? `${s}-${X[a]}px` : `${s}-24px`,
|
|
47
49
|
r
|
|
48
50
|
]), C = n ?? T({
|
|
49
|
-
tag:
|
|
51
|
+
tag: e,
|
|
50
52
|
parsedClasses: m,
|
|
51
53
|
rules: [
|
|
52
54
|
{
|
|
53
|
-
regExp:
|
|
55
|
+
regExp: p.MDI,
|
|
54
56
|
replacer: ""
|
|
55
57
|
},
|
|
56
58
|
{
|
|
57
|
-
regExp:
|
|
59
|
+
regExp: p.MDI_EMPTY,
|
|
58
60
|
replacer: "-"
|
|
59
61
|
}
|
|
60
62
|
],
|
|
61
63
|
separator: "-"
|
|
62
|
-
}), A = t ?? `${C}-i`,
|
|
64
|
+
}), A = t ?? `${C}-i`, E = /* @__PURE__ */ M(
|
|
63
65
|
"span",
|
|
64
66
|
{
|
|
65
67
|
"data-testid": C,
|
|
66
|
-
className:
|
|
67
|
-
style:
|
|
68
|
+
className: N,
|
|
69
|
+
style: f ?? void 0,
|
|
68
70
|
children: [
|
|
69
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ u(
|
|
70
72
|
"i",
|
|
71
73
|
{
|
|
72
74
|
"data-testid": A,
|
|
@@ -74,11 +76,11 @@ const l = "icon", s = "mdi", X = (t, n) => {
|
|
|
74
76
|
style: S ?? void 0
|
|
75
77
|
}
|
|
76
78
|
),
|
|
77
|
-
c ? /* @__PURE__ */
|
|
79
|
+
c ? /* @__PURE__ */ u("span", { children: c }) : null
|
|
78
80
|
]
|
|
79
81
|
}
|
|
80
82
|
);
|
|
81
|
-
return c ?
|
|
83
|
+
return c ? h(E, i) : E;
|
|
82
84
|
};
|
|
83
85
|
export {
|
|
84
86
|
y as default
|
|
@@ -7,6 +7,7 @@ export declare const BasicExample: import('storybook/internal/csf').AnnotatedSto
|
|
|
7
7
|
export declare const TextIncluded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
8
8
|
export declare const UsingOtherIcon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
9
9
|
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
10
|
+
export declare const Skeleton: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
10
11
|
export declare const WithBigSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
11
12
|
export declare const DarkMode: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
12
13
|
export declare const Spinning: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IconProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { parseClasses as
|
|
3
|
-
import { COMMON_CLASSES as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { parseClasses as i, parseTestId as E } from "../../../functions/parsers.js";
|
|
3
|
+
import { COMMON_CLASSES as s } from "../../../constants/classes.js";
|
|
4
|
+
const v = ({
|
|
5
5
|
testId: o = null,
|
|
6
6
|
containerTestId: m = null,
|
|
7
7
|
cssClasses: r = null,
|
|
@@ -10,28 +10,30 @@ const T = ({
|
|
|
10
10
|
containerStyle: g = null,
|
|
11
11
|
src: c,
|
|
12
12
|
alt: C = null,
|
|
13
|
-
fixedSize:
|
|
14
|
-
|
|
13
|
+
fixedSize: l = null,
|
|
14
|
+
isSkeleton: p = !1,
|
|
15
|
+
isRounded: f = !1
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const a = "image", e = i([
|
|
18
|
+
a,
|
|
19
|
+
l ? `${s.IS}${l}` : null,
|
|
20
|
+
p ? s.SKELETON : null,
|
|
19
21
|
u
|
|
20
|
-
]),
|
|
21
|
-
|
|
22
|
+
]), I = i([
|
|
23
|
+
f ? s.ROUNDED : null,
|
|
22
24
|
r
|
|
23
|
-
]),
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
]), t = m ?? E({ tag: a, parsedClasses: e }), N = o ?? `${t}-img`;
|
|
26
|
+
return /* @__PURE__ */ n(
|
|
25
27
|
"figure",
|
|
26
28
|
{
|
|
27
|
-
"data-testid":
|
|
28
|
-
className:
|
|
29
|
+
"data-testid": t,
|
|
30
|
+
className: e,
|
|
29
31
|
style: g ?? void 0,
|
|
30
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ n(
|
|
31
33
|
"img",
|
|
32
34
|
{
|
|
33
|
-
"data-testid":
|
|
34
|
-
className:
|
|
35
|
+
"data-testid": N,
|
|
36
|
+
className: I,
|
|
35
37
|
style: d ?? void 0,
|
|
36
38
|
src: c,
|
|
37
39
|
alt: C ?? void 0
|
|
@@ -41,5 +43,5 @@ const T = ({
|
|
|
41
43
|
);
|
|
42
44
|
};
|
|
43
45
|
export {
|
|
44
|
-
|
|
46
|
+
v as default
|
|
45
47
|
};
|
|
@@ -5,5 +5,6 @@ export default _default;
|
|
|
5
5
|
export declare const BasicExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
6
6
|
export declare const WithFixedStyle: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
7
7
|
export declare const FullSized: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
8
|
+
export declare const Skeleton: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
8
9
|
export declare const IsRounded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
9
10
|
export declare const CustomStyle: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../../../interfaces/atomProps').ImageProps>;
|
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { parseClasses as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import { parseClasses as I, parseTestId as T } from "../../../functions/parsers.js";
|
|
3
|
+
import { COMMON_CLASSES as l } from "../../../constants/classes.js";
|
|
4
|
+
const M = ({
|
|
5
|
+
testId: n = null,
|
|
6
|
+
cssClasses: u = null,
|
|
7
|
+
style: e = null,
|
|
8
|
+
type: t,
|
|
9
|
+
value: a = null,
|
|
10
|
+
name: o,
|
|
11
|
+
placeholder: p = null,
|
|
12
|
+
isDisabled: r = !1,
|
|
13
|
+
isReadonly: d = !1,
|
|
14
|
+
isSkeleton: i = !1,
|
|
15
|
+
color: f = null,
|
|
16
|
+
size: m = null,
|
|
17
|
+
isRounded: E = null,
|
|
18
|
+
isHovered: O = null,
|
|
19
|
+
isFocused: C = null,
|
|
20
|
+
onClick: c,
|
|
21
|
+
onChange: S,
|
|
22
|
+
onBlur: v
|
|
21
23
|
}) => {
|
|
22
|
-
const
|
|
24
|
+
const s = I([
|
|
23
25
|
"input",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
f,
|
|
27
|
+
m,
|
|
28
|
+
E ? l.ROUNDED : null,
|
|
29
|
+
O ? l.HOVERED : null,
|
|
30
|
+
C ? l.FOCUSED : null,
|
|
31
|
+
i ? l.SKELETON : null,
|
|
32
|
+
u
|
|
33
|
+
]), D = n ?? T({
|
|
31
34
|
tag: "input",
|
|
32
|
-
parsedClasses:
|
|
35
|
+
parsedClasses: s
|
|
33
36
|
});
|
|
34
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ N(
|
|
35
38
|
"input",
|
|
36
39
|
{
|
|
37
|
-
"data-testid":
|
|
38
|
-
type:
|
|
39
|
-
placeholder:
|
|
40
|
-
value:
|
|
41
|
-
name:
|
|
42
|
-
disabled:
|
|
43
|
-
readOnly:
|
|
44
|
-
className:
|
|
45
|
-
style:
|
|
46
|
-
onClick:
|
|
47
|
-
onChange:
|
|
48
|
-
onBlur:
|
|
40
|
+
"data-testid": D,
|
|
41
|
+
type: t,
|
|
42
|
+
placeholder: p ?? void 0,
|
|
43
|
+
value: a ?? void 0,
|
|
44
|
+
name: o,
|
|
45
|
+
disabled: r,
|
|
46
|
+
readOnly: d,
|
|
47
|
+
className: s,
|
|
48
|
+
style: e ?? void 0,
|
|
49
|
+
onClick: c,
|
|
50
|
+
onChange: S,
|
|
51
|
+
onBlur: v
|
|
49
52
|
}
|
|
50
53
|
);
|
|
51
54
|
};
|
|
52
55
|
export {
|
|
53
|
-
|
|
56
|
+
M as default
|
|
54
57
|
};
|
|
@@ -8,6 +8,7 @@ export declare const WithPlaceholder: import('storybook/internal/csf').Annotated
|
|
|
8
8
|
export declare const WithText: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
9
9
|
export declare const Colored: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
10
10
|
export declare const WithBigSize: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
11
|
+
export declare const Skeleton: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
11
12
|
export declare const Rounded: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
12
13
|
export declare const Hovered: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
13
14
|
export declare const Focused: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputProps>;
|
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as s } from "react";
|
|
3
|
-
import { parseClasses as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { parseClasses as x, parseTestId as I } from "../../../functions/parsers.js";
|
|
4
|
+
import { COMMON_CLASSES as e } from "../../../constants/classes.js";
|
|
5
|
+
const A = ({
|
|
6
|
+
testId: o = null,
|
|
7
|
+
containerTestId: r = null,
|
|
7
8
|
cssClasses: f = null,
|
|
8
9
|
containerCssClasses: u = null,
|
|
9
|
-
style:
|
|
10
|
-
containerStyle:
|
|
11
|
-
isDisabled:
|
|
12
|
-
options:
|
|
13
|
-
selectedValues:
|
|
14
|
-
name:
|
|
15
|
-
showOptions:
|
|
16
|
-
isMultiple:
|
|
17
|
-
color:
|
|
18
|
-
size:
|
|
19
|
-
isRounded:
|
|
10
|
+
style: E = null,
|
|
11
|
+
containerStyle: O = null,
|
|
12
|
+
isDisabled: v,
|
|
13
|
+
options: C = [],
|
|
14
|
+
selectedValues: D,
|
|
15
|
+
name: N,
|
|
16
|
+
showOptions: $ = 1,
|
|
17
|
+
isMultiple: t = !1,
|
|
18
|
+
color: c = null,
|
|
19
|
+
size: i = null,
|
|
20
|
+
isRounded: m = null,
|
|
20
21
|
isHovered: d = null,
|
|
21
|
-
isFocused:
|
|
22
|
-
onClick:
|
|
23
|
-
onChange:
|
|
24
|
-
onBlur:
|
|
22
|
+
isFocused: p = null,
|
|
23
|
+
onClick: g,
|
|
24
|
+
onChange: h,
|
|
25
|
+
onBlur: y
|
|
25
26
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
() =>
|
|
27
|
+
const n = s(
|
|
28
|
+
() => x([
|
|
28
29
|
"select",
|
|
30
|
+
c,
|
|
29
31
|
i,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
m ? "is-focused" : null,
|
|
32
|
+
t ? e.MULTIPLE : null,
|
|
33
|
+
m ? e.ROUNDED : null,
|
|
34
|
+
d ? e.HOVERED : null,
|
|
35
|
+
p ? e.FOCUSED : null,
|
|
35
36
|
u
|
|
36
37
|
]),
|
|
37
38
|
[
|
|
38
|
-
i,
|
|
39
|
-
r,
|
|
40
|
-
e,
|
|
41
39
|
c,
|
|
42
|
-
|
|
40
|
+
i,
|
|
41
|
+
t,
|
|
43
42
|
m,
|
|
43
|
+
d,
|
|
44
|
+
p,
|
|
44
45
|
u
|
|
45
46
|
]
|
|
46
47
|
), l = s(
|
|
47
|
-
() =>
|
|
48
|
+
() => o ?? I({
|
|
48
49
|
tag: "select",
|
|
49
|
-
parsedClasses:
|
|
50
|
+
parsedClasses: n
|
|
50
51
|
}),
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
() =>
|
|
54
|
-
[
|
|
52
|
+
[o, n]
|
|
53
|
+
), L = s(
|
|
54
|
+
() => r ?? `${l}-container`,
|
|
55
|
+
[r, l]
|
|
55
56
|
);
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ a(
|
|
57
58
|
"section",
|
|
58
59
|
{
|
|
59
|
-
"data-testid":
|
|
60
|
-
className:
|
|
61
|
-
style:
|
|
62
|
-
children: /* @__PURE__ */
|
|
60
|
+
"data-testid": L,
|
|
61
|
+
className: n,
|
|
62
|
+
style: O ?? void 0,
|
|
63
|
+
children: /* @__PURE__ */ a(
|
|
63
64
|
"select",
|
|
64
65
|
{
|
|
65
66
|
"data-testid": l,
|
|
66
67
|
className: f ?? void 0,
|
|
67
|
-
style:
|
|
68
|
-
value:
|
|
69
|
-
name:
|
|
70
|
-
disabled:
|
|
71
|
-
multiple:
|
|
72
|
-
size:
|
|
73
|
-
onClick:
|
|
74
|
-
onChange:
|
|
75
|
-
onBlur:
|
|
76
|
-
children:
|
|
68
|
+
style: E ?? void 0,
|
|
69
|
+
value: D,
|
|
70
|
+
name: N,
|
|
71
|
+
disabled: v ?? !1,
|
|
72
|
+
multiple: t,
|
|
73
|
+
size: $,
|
|
74
|
+
onClick: g,
|
|
75
|
+
onChange: h,
|
|
76
|
+
onBlur: y,
|
|
77
|
+
children: C.map(({ id: S, name: T }, U) => /* @__PURE__ */ a(
|
|
77
78
|
"option",
|
|
78
79
|
{
|
|
79
|
-
"data-testid": `${l}-option-${
|
|
80
|
-
value:
|
|
81
|
-
children:
|
|
80
|
+
"data-testid": `${l}-option-${U}`,
|
|
81
|
+
value: S.toString(),
|
|
82
|
+
children: T
|
|
82
83
|
},
|
|
83
|
-
`key-option-${
|
|
84
|
+
`key-option-${S.toString()}`
|
|
84
85
|
))
|
|
85
86
|
}
|
|
86
87
|
)
|
|
@@ -88,5 +89,5 @@ const B = ({
|
|
|
88
89
|
);
|
|
89
90
|
};
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
A as default
|
|
92
93
|
};
|