@clubmed/trident-ui 1.0.1 → 1.1.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/BeachView-D7jbrjhw.js +6 -0
- package/BeachView-D7jbrjhw.js.map +1 -0
- package/CHANGELOG.md +15 -0
- package/GardenView-C4ezQxpq.js +6 -0
- package/GardenView-C4ezQxpq.js.map +1 -0
- package/PoolView-P2ZBXZA9.js +6 -0
- package/PoolView-P2ZBXZA9.js.map +1 -0
- package/README.md +4 -22
- package/SnowSerenity-DQAGaSZc.js +6 -0
- package/SnowSerenity-DQAGaSZc.js.map +1 -0
- package/SunView-D_XYC3V5.js +6 -0
- package/SunView-D_XYC3V5.js.map +1 -0
- package/Twitter-B4o_qFxz.js +6 -0
- package/Twitter-B4o_qFxz.js.map +1 -0
- package/WithView-CM90ePcH.js +6 -0
- package/WithView-CM90ePcH.js.map +1 -0
- package/assets/icons/Services/SnowSerenity.svg +8 -0
- package/assets/icons/Socials/Twitter.svg +3 -4
- package/assets/icons/Utilities/BeachView.svg +3 -0
- package/assets/icons/Utilities/GardenView.svg +3 -0
- package/assets/icons/Utilities/PoolView.svg +3 -0
- package/assets/icons/Utilities/SunView.svg +3 -0
- package/assets/icons/Utilities/WithView.svg +3 -0
- package/assets/style.css +1 -1
- package/atoms/Icons/Iconics.d.ts +2 -2
- package/atoms/Icons/svg/Services.js +4 -0
- package/atoms/Icons/svg/Services.js.map +1 -1
- package/atoms/Icons/svg/Socials.js +1 -1
- package/atoms/Icons/svg/Utilities.js +20 -0
- package/atoms/Icons/svg/Utilities.js.map +1 -1
- package/atoms/Icons/svg-use/Services.js +33 -28
- package/atoms/Icons/svg-use/Services.js.map +1 -1
- package/atoms/Icons/svg-use/Utilities.js +100 -75
- package/atoms/Icons/svg-use/Utilities.js.map +1 -1
- package/hooks/useSafeBoop.js +1 -1
- package/hooks/useValue.d.ts +1 -1
- package/hooks/useValue.js +18 -20
- package/hooks/useValue.js.map +1 -1
- package/molecules/Backdrop.js +1 -1
- package/molecules/Buttons/Button.js +1 -1
- package/molecules/Buttons/ButtonAnchor.js +1 -1
- package/molecules/ElasticHeight.js +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +1 -1
- package/molecules/Forms/DateField.js +41 -39
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +1 -1
- package/molecules/Forms/FormControl.d.ts +1 -1
- package/molecules/Forms/FormControl.js +23 -12
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/FormLabel.d.ts +2 -1
- package/molecules/Forms/FormLabel.js +20 -19
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +8 -7
- package/molecules/Forms/NumberField.js +42 -40
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Forms/Password/Password.js +23 -21
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Radios/Radio.js +1 -1
- package/molecules/Forms/Range.js +2 -4
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.js +18 -16
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/Switch.js +1 -1
- package/molecules/Forms/TextField.d.ts +2 -0
- package/molecules/Forms/TextField.js +33 -30
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/HamburgerIcon.js +1 -1
- package/molecules/Loader.js +1 -1
- package/molecules/Popin.js +1 -1
- package/molecules/Tabs/TabsHeader.js +1 -1
- package/molecules/Tabs/TabsHeading.js +1 -1
- package/molecules/Tabs/TabsPanel.js +1 -1
- package/package.json +16 -21
- package/{react-spring_web.modern-BPtZcx1z.js → react-spring_web.modern-DyRwH83_.js} +1275 -1781
- package/{react-spring_web.modern-BPtZcx1z.js.map → react-spring_web.modern-DyRwH83_.js.map} +1 -1
- package/Twitter-DtXFJEB1.js +0 -6
- package/Twitter-DtXFJEB1.js.map +0 -1
- package/atoms/Icons/fonts/Actions.d.ts +0 -2
- package/atoms/Icons/fonts/Actions.js +0 -113
- package/atoms/Icons/fonts/Actions.js.map +0 -1
- package/atoms/Icons/fonts/Activities.d.ts +0 -2
- package/atoms/Icons/fonts/Activities.js +0 -145
- package/atoms/Icons/fonts/Activities.js.map +0 -1
- package/atoms/Icons/fonts/Brand.d.ts +0 -2
- package/atoms/Icons/fonts/Brand.js +0 -92
- package/atoms/Icons/fonts/Brand.js.map +0 -1
- package/atoms/Icons/fonts/Covid.d.ts +0 -2
- package/atoms/Icons/fonts/Covid.js +0 -61
- package/atoms/Icons/fonts/Covid.js.map +0 -1
- package/atoms/Icons/fonts/FontIcon.d.ts +0 -5
- package/atoms/Icons/fonts/FontIcon.js +0 -24
- package/atoms/Icons/fonts/FontIcon.js.map +0 -1
- package/atoms/Icons/fonts/FontIconResolver.d.ts +0 -3
- package/atoms/Icons/fonts/FontIconResolver.js +0 -14
- package/atoms/Icons/fonts/FontIconResolver.js.map +0 -1
- package/atoms/Icons/fonts/Food.d.ts +0 -2
- package/atoms/Icons/fonts/Food.js +0 -106
- package/atoms/Icons/fonts/Food.js.map +0 -1
- package/atoms/Icons/fonts/HappyToCare.d.ts +0 -2
- package/atoms/Icons/fonts/HappyToCare.js +0 -58
- package/atoms/Icons/fonts/HappyToCare.js.map +0 -1
- package/atoms/Icons/fonts/Places.d.ts +0 -2
- package/atoms/Icons/fonts/Places.js +0 -61
- package/atoms/Icons/fonts/Places.js.map +0 -1
- package/atoms/Icons/fonts/Room.d.ts +0 -2
- package/atoms/Icons/fonts/Room.js +0 -115
- package/atoms/Icons/fonts/Room.js.map +0 -1
- package/atoms/Icons/fonts/Services.d.ts +0 -2
- package/atoms/Icons/fonts/Services.js +0 -73
- package/atoms/Icons/fonts/Services.js.map +0 -1
- package/atoms/Icons/fonts/Socials.d.ts +0 -2
- package/atoms/Icons/fonts/Socials.js +0 -73
- package/atoms/Icons/fonts/Socials.js.map +0 -1
- package/atoms/Icons/fonts/Transports.d.ts +0 -2
- package/atoms/Icons/fonts/Transports.js +0 -49
- package/atoms/Icons/fonts/Transports.js.map +0 -1
- package/atoms/Icons/fonts/Utilities.d.ts +0 -2
- package/atoms/Icons/fonts/Utilities.js +0 -154
- package/atoms/Icons/fonts/Utilities.js.map +0 -1
- package/atoms/Icons/fonts/index.d.ts +0 -2
- package/atoms/Icons/fonts/index.js +0 -7
- package/atoms/Icons/fonts/index.js.map +0 -1
- package/button-l0sNRNKZ.js +0 -2
- package/button-l0sNRNKZ.js.map +0 -1
- package/controls-l0sNRNKZ.js +0 -2
- package/controls-l0sNRNKZ.js.map +0 -1
- package/fonts/Actions/tui-actions.css +0 -52
- package/fonts/Actions/tui-actions.eot +0 -0
- package/fonts/Actions/tui-actions.less +0 -49
- package/fonts/Actions/tui-actions.module.less +0 -52
- package/fonts/Actions/tui-actions.scss +0 -84
- package/fonts/Actions/tui-actions.styl +0 -49
- package/fonts/Actions/tui-actions.svg +0 -111
- package/fonts/Actions/tui-actions.symbol.svg +0 -67
- package/fonts/Actions/tui-actions.ttf +0 -0
- package/fonts/Actions/tui-actions.woff +0 -0
- package/fonts/Actions/tui-actions.woff2 +0 -0
- package/fonts/Activities/tui-activities.css +0 -64
- package/fonts/Activities/tui-activities.eot +0 -0
- package/fonts/Activities/tui-activities.less +0 -61
- package/fonts/Activities/tui-activities.module.less +0 -64
- package/fonts/Activities/tui-activities.scss +0 -108
- package/fonts/Activities/tui-activities.styl +0 -61
- package/fonts/Activities/tui-activities.svg +0 -147
- package/fonts/Activities/tui-activities.symbol.svg +0 -91
- package/fonts/Activities/tui-activities.ttf +0 -0
- package/fonts/Activities/tui-activities.woff +0 -0
- package/fonts/Activities/tui-activities.woff2 +0 -0
- package/fonts/Brand/tui-brand.css +0 -36
- package/fonts/Brand/tui-brand.eot +0 -0
- package/fonts/Brand/tui-brand.less +0 -33
- package/fonts/Brand/tui-brand.module.less +0 -36
- package/fonts/Brand/tui-brand.scss +0 -52
- package/fonts/Brand/tui-brand.styl +0 -33
- package/fonts/Brand/tui-brand.svg +0 -63
- package/fonts/Brand/tui-brand.symbol.svg +0 -59
- package/fonts/Brand/tui-brand.ttf +0 -0
- package/fonts/Brand/tui-brand.woff +0 -0
- package/fonts/Brand/tui-brand.woff2 +0 -0
- package/fonts/Covid/tui-covid.css +0 -36
- package/fonts/Covid/tui-covid.eot +0 -0
- package/fonts/Covid/tui-covid.less +0 -33
- package/fonts/Covid/tui-covid.module.less +0 -36
- package/fonts/Covid/tui-covid.scss +0 -52
- package/fonts/Covid/tui-covid.styl +0 -33
- package/fonts/Covid/tui-covid.svg +0 -63
- package/fonts/Covid/tui-covid.symbol.svg +0 -36
- package/fonts/Covid/tui-covid.ttf +0 -0
- package/fonts/Covid/tui-covid.woff +0 -0
- package/fonts/Covid/tui-covid.woff2 +0 -0
- package/fonts/Food/tui-food.css +0 -51
- package/fonts/Food/tui-food.eot +0 -0
- package/fonts/Food/tui-food.less +0 -48
- package/fonts/Food/tui-food.module.less +0 -51
- package/fonts/Food/tui-food.scss +0 -82
- package/fonts/Food/tui-food.styl +0 -48
- package/fonts/Food/tui-food.svg +0 -108
- package/fonts/Food/tui-food.symbol.svg +0 -65
- package/fonts/Food/tui-food.ttf +0 -0
- package/fonts/Food/tui-food.woff +0 -0
- package/fonts/Food/tui-food.woff2 +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.css +0 -35
- package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.less +0 -32
- package/fonts/HappyToCare/tui-happy-to-care.module.less +0 -35
- package/fonts/HappyToCare/tui-happy-to-care.scss +0 -50
- package/fonts/HappyToCare/tui-happy-to-care.styl +0 -32
- package/fonts/HappyToCare/tui-happy-to-care.svg +0 -60
- package/fonts/HappyToCare/tui-happy-to-care.symbol.svg +0 -34
- package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
- package/fonts/Places/tui-places.css +0 -36
- package/fonts/Places/tui-places.eot +0 -0
- package/fonts/Places/tui-places.less +0 -33
- package/fonts/Places/tui-places.module.less +0 -36
- package/fonts/Places/tui-places.scss +0 -52
- package/fonts/Places/tui-places.styl +0 -33
- package/fonts/Places/tui-places.svg +0 -63
- package/fonts/Places/tui-places.symbol.svg +0 -35
- package/fonts/Places/tui-places.ttf +0 -0
- package/fonts/Places/tui-places.woff +0 -0
- package/fonts/Places/tui-places.woff2 +0 -0
- package/fonts/Room/tui-room.css +0 -54
- package/fonts/Room/tui-room.eot +0 -0
- package/fonts/Room/tui-room.less +0 -51
- package/fonts/Room/tui-room.module.less +0 -54
- package/fonts/Room/tui-room.scss +0 -88
- package/fonts/Room/tui-room.styl +0 -51
- package/fonts/Room/tui-room.svg +0 -117
- package/fonts/Room/tui-room.symbol.svg +0 -156
- package/fonts/Room/tui-room.ttf +0 -0
- package/fonts/Room/tui-room.woff +0 -0
- package/fonts/Room/tui-room.woff2 +0 -0
- package/fonts/Services/tui-services.css +0 -40
- package/fonts/Services/tui-services.eot +0 -0
- package/fonts/Services/tui-services.less +0 -37
- package/fonts/Services/tui-services.module.less +0 -40
- package/fonts/Services/tui-services.scss +0 -60
- package/fonts/Services/tui-services.styl +0 -37
- package/fonts/Services/tui-services.svg +0 -75
- package/fonts/Services/tui-services.symbol.svg +0 -106
- package/fonts/Services/tui-services.ttf +0 -0
- package/fonts/Services/tui-services.woff +0 -0
- package/fonts/Services/tui-services.woff2 +0 -0
- package/fonts/Socials/tui-socials.css +0 -36
- package/fonts/Socials/tui-socials.eot +0 -0
- package/fonts/Socials/tui-socials.less +0 -33
- package/fonts/Socials/tui-socials.module.less +0 -36
- package/fonts/Socials/tui-socials.scss +0 -52
- package/fonts/Socials/tui-socials.styl +0 -33
- package/fonts/Socials/tui-socials.svg +0 -63
- package/fonts/Socials/tui-socials.symbol.svg +0 -78
- package/fonts/Socials/tui-socials.ttf +0 -0
- package/fonts/Socials/tui-socials.woff +0 -0
- package/fonts/Socials/tui-socials.woff2 +0 -0
- package/fonts/Transports/tui-transports.css +0 -32
- package/fonts/Transports/tui-transports.eot +0 -0
- package/fonts/Transports/tui-transports.less +0 -29
- package/fonts/Transports/tui-transports.module.less +0 -32
- package/fonts/Transports/tui-transports.scss +0 -44
- package/fonts/Transports/tui-transports.styl +0 -29
- package/fonts/Transports/tui-transports.svg +0 -51
- package/fonts/Transports/tui-transports.symbol.svg +0 -53
- package/fonts/Transports/tui-transports.ttf +0 -0
- package/fonts/Transports/tui-transports.woff +0 -0
- package/fonts/Transports/tui-transports.woff2 +0 -0
- package/fonts/Utilities/tui-utilities.css +0 -67
- package/fonts/Utilities/tui-utilities.eot +0 -0
- package/fonts/Utilities/tui-utilities.less +0 -64
- package/fonts/Utilities/tui-utilities.module.less +0 -67
- package/fonts/Utilities/tui-utilities.scss +0 -114
- package/fonts/Utilities/tui-utilities.styl +0 -64
- package/fonts/Utilities/tui-utilities.svg +0 -156
- package/fonts/Utilities/tui-utilities.symbol.svg +0 -287
- package/fonts/Utilities/tui-utilities.ttf +0 -0
- package/fonts/Utilities/tui-utilities.woff +0 -0
- package/fonts/Utilities/tui-utilities.woff2 +0 -0
@@ -1,42 +1,42 @@
|
|
1
1
|
import { jsx as m, jsxs as C } from "react/jsx-runtime";
|
2
|
-
import { c as
|
2
|
+
import { c as g } from "../../index-Cu0xwYjD.js";
|
3
3
|
import { useId as y } from "react";
|
4
4
|
import { useValue as I } from "../../hooks/useValue.js";
|
5
|
-
import { Button as
|
5
|
+
import { Button as v } from "../Buttons/Button.js";
|
6
6
|
import { FormControl as w } from "./FormControl.js";
|
7
7
|
const F = { width: "28px", height: "28px" };
|
8
|
-
function
|
8
|
+
function S(o) {
|
9
9
|
const e = y(), {
|
10
10
|
id: n = e,
|
11
|
-
name:
|
12
|
-
value:
|
13
|
-
onChange:
|
11
|
+
name: r = n,
|
12
|
+
value: d = 0,
|
13
|
+
onChange: c,
|
14
14
|
min: t = 0,
|
15
|
-
max:
|
16
|
-
disabled:
|
15
|
+
max: i = 10,
|
16
|
+
disabled: l = !1,
|
17
17
|
dataTestId: u = "NumberField",
|
18
18
|
...f
|
19
19
|
} = o, { value: a, setValue: s } = I({
|
20
|
-
name:
|
21
|
-
defaultValue:
|
20
|
+
name: r,
|
21
|
+
defaultValue: d,
|
22
22
|
formatter: Number,
|
23
|
-
onChange:
|
23
|
+
onChange: c
|
24
24
|
});
|
25
25
|
return {
|
26
26
|
...f,
|
27
27
|
id: n,
|
28
28
|
min: t,
|
29
|
-
max:
|
30
|
-
name:
|
29
|
+
max: i,
|
30
|
+
name: r,
|
31
31
|
value: a,
|
32
32
|
dataTestId: u,
|
33
|
-
disabled:
|
34
|
-
handleChange: (
|
35
|
-
const
|
36
|
-
|
33
|
+
disabled: l,
|
34
|
+
handleChange: (h) => {
|
35
|
+
const N = Number(h.target.value);
|
36
|
+
N >= t && N <= i && s(Number(N));
|
37
37
|
},
|
38
38
|
increase: () => {
|
39
|
-
a <
|
39
|
+
a < i && s(a + 1);
|
40
40
|
},
|
41
41
|
decrease: () => {
|
42
42
|
a > t && s(a - 1);
|
@@ -47,42 +47,44 @@ const k = (o) => {
|
|
47
47
|
const {
|
48
48
|
disabled: e,
|
49
49
|
min: n,
|
50
|
-
max:
|
51
|
-
label:
|
52
|
-
description:
|
50
|
+
max: r,
|
51
|
+
label: d,
|
52
|
+
description: c,
|
53
53
|
id: t,
|
54
|
-
dataTestId:
|
55
|
-
value:
|
54
|
+
dataTestId: i,
|
55
|
+
value: l,
|
56
56
|
handleChange: u,
|
57
57
|
increase: f,
|
58
58
|
decrease: a,
|
59
59
|
errorMessage: s,
|
60
|
-
validationStatus:
|
60
|
+
validationStatus: x,
|
61
|
+
hideRequiredStar: p,
|
61
62
|
required: b,
|
62
|
-
...
|
63
|
-
} =
|
63
|
+
...h
|
64
|
+
} = S(o);
|
64
65
|
return /* @__PURE__ */ m(
|
65
66
|
w,
|
66
67
|
{
|
67
68
|
id: t,
|
68
|
-
label:
|
69
|
-
description:
|
70
|
-
className:
|
69
|
+
label: d,
|
70
|
+
description: c,
|
71
|
+
className: g("flex items-center justify-between", o.className),
|
71
72
|
dataName: "NumberField",
|
72
|
-
dataTestId:
|
73
|
+
dataTestId: i,
|
73
74
|
errorMessage: s,
|
74
|
-
validationStatus:
|
75
|
+
validationStatus: x,
|
75
76
|
disabled: e,
|
76
77
|
required: b,
|
78
|
+
hideRequiredStar: p,
|
77
79
|
layout: "vertical",
|
78
80
|
children: /* @__PURE__ */ C("div", { className: "flex items-center gap-x-8", children: [
|
79
81
|
/* @__PURE__ */ m(
|
80
|
-
|
82
|
+
v,
|
81
83
|
{
|
82
84
|
theme: "yellow",
|
83
85
|
onClick: a,
|
84
86
|
variant: "icon",
|
85
|
-
disabled:
|
87
|
+
disabled: l <= n || e,
|
86
88
|
icon: "MinusDefault",
|
87
89
|
label: "MINUS"
|
88
90
|
}
|
@@ -90,8 +92,8 @@ const k = (o) => {
|
|
90
92
|
/* @__PURE__ */ m(
|
91
93
|
"input",
|
92
94
|
{
|
93
|
-
...
|
94
|
-
className:
|
95
|
+
...h,
|
96
|
+
className: g("text-b2 text-center font-normal outline-none", {
|
95
97
|
"bg-pearl text-grey": e
|
96
98
|
}),
|
97
99
|
style: F,
|
@@ -100,18 +102,18 @@ const k = (o) => {
|
|
100
102
|
onChange: u,
|
101
103
|
disabled: e,
|
102
104
|
required: b,
|
103
|
-
value:
|
105
|
+
value: l,
|
104
106
|
min: n,
|
105
|
-
max:
|
107
|
+
max: r
|
106
108
|
}
|
107
109
|
),
|
108
110
|
/* @__PURE__ */ m(
|
109
|
-
|
111
|
+
v,
|
110
112
|
{
|
111
113
|
theme: "yellow",
|
112
114
|
onClick: f,
|
113
115
|
variant: "icon",
|
114
|
-
disabled:
|
116
|
+
disabled: l >= r || e,
|
115
117
|
icon: "PlusDefault",
|
116
118
|
label: "PLUS"
|
117
119
|
}
|
@@ -122,6 +124,6 @@ const k = (o) => {
|
|
122
124
|
};
|
123
125
|
export {
|
124
126
|
k as NumberField,
|
125
|
-
|
127
|
+
S as useNumberField
|
126
128
|
};
|
127
129
|
//# sourceMappingURL=NumberField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NumberField.js","sources":["../../../lib/molecules/Forms/NumberField.tsx"],"sourcesContent":["import classnames from 'classnames';\n\nimport { ChangeEvent, useId } from 'react';\n\nimport { useValue } from '@/hooks/useValue.js';\nimport { Button } from '../Buttons/Button';\nimport { FormControl, FormControlProps } from './FormControl.js';\n\ninterface NumberFieldProps extends FormControlProps<number> {\n min?: number;\n max?: number;\n}\n\nconst INPUT_STYLE = { width: '28px', height: '28px' };\n\nexport function useNumberField(props: NumberFieldProps) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n value: initialValue = 0,\n onChange,\n min = 0,\n max = 10,\n disabled = false,\n dataTestId = 'NumberField',\n ...rest\n } = props;\n\n const { value, setValue } = useValue<number, string | number | boolean>({\n name: name!,\n defaultValue: initialValue,\n formatter: Number,\n onChange,\n });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = Number(e.target.value);\n\n if (newValue >= min && newValue <= max) {\n setValue(Number(newValue));\n }\n };\n\n const increase = () => {\n if (value < max) {\n setValue(value + 1);\n }\n };\n\n const decrease = () => {\n if (value > min) {\n setValue(value - 1);\n }\n };\n\n return {\n ...rest,\n id,\n min,\n max,\n name,\n value,\n dataTestId,\n disabled,\n handleChange,\n increase,\n decrease,\n };\n}\n\nexport const NumberField = (props: NumberFieldProps) => {\n const {\n disabled,\n min,\n max,\n label,\n description,\n id,\n dataTestId,\n value,\n handleChange,\n increase,\n decrease,\n errorMessage,\n validationStatus,\n required,\n ...rest\n } = useNumberField(props);\n\n return (\n <FormControl\n id={id}\n label={label}\n description={description}\n className={classnames('flex items-center justify-between', props.className)}\n dataName=\"NumberField\"\n dataTestId={dataTestId}\n errorMessage={errorMessage}\n validationStatus={validationStatus}\n disabled={disabled}\n required={required}\n layout=\"vertical\"\n >\n <div className=\"flex items-center gap-x-8\">\n <Button\n theme=\"yellow\"\n onClick={decrease}\n variant=\"icon\"\n disabled={value <= min || disabled}\n icon=\"MinusDefault\"\n // TODO have this from prop at some time\n label=\"MINUS\"\n />\n <input\n {...rest}\n className={classnames('text-b2 text-center font-normal outline-none', {\n 'bg-pearl text-grey': disabled,\n })}\n style={INPUT_STYLE}\n type=\"number\"\n id={id}\n onChange={handleChange}\n disabled={disabled}\n required={required}\n value={value}\n min={min}\n max={max}\n />\n <Button\n theme=\"yellow\"\n onClick={increase}\n variant=\"icon\"\n disabled={value >= max || disabled}\n icon=\"PlusDefault\"\n // TODO have this from prop at some time\n label=\"PLUS\"\n />\n </div>\n </FormControl>\n );\n};\n"],"names":["INPUT_STYLE","useNumberField","props","internalId","useId","id","name","initialValue","onChange","min","max","disabled","dataTestId","rest","value","setValue","useValue","e","newValue","NumberField","label","description","handleChange","increase","decrease","errorMessage","validationStatus","required","jsx","FormControl","classnames","jsxs","Button"],"mappings":";;;;;;AAaA,MAAMA,IAAc,EAAE,OAAO,QAAQ,QAAQ,OAAO;AAE7C,SAASC,EAAeC,GAAyB;AACtD,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,OAAOE,IAAe;AAAA,IACtB,UAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,KAAAC,IAAM;AAAA,IACN,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,GAAGC;AAAA,EACD,IAAAX,GAEE,EAAE,OAAAY,GAAO,UAAAC,EAAS,IAAIC,EAA4C;AAAA,IACtE,MAAAV;AAAA,IACA,cAAcC;AAAA,IACd,WAAW;AAAA,IACX,UAAAC;AAAA,EAAA,CACD;AAsBM,SAAA;AAAA,IACL,GAAGK;AAAA,IACH,IAAAR;AAAA,IACA,KAAAI;AAAA,IACA,KAAAC;AAAA,IACA,MAAAJ;AAAA,IACA,OAAAQ;AAAA,IACA,YAAAF;AAAA,IACA,UAAAD;AAAA,IACA,cA7BmB,CAACM,MAAqC;AACzD,YAAMC,IAAW,OAAOD,EAAE,OAAO,KAAK;AAElC,MAAAC,KAAYT,KAAOS,KAAYR,KACxBK,EAAA,OAAOG,CAAQ,CAAC;AAAA,IAC3B;AAAA,IAyBA,UAtBe,MAAM;AACrB,MAAIJ,IAAQJ,KACVK,EAASD,IAAQ,CAAC;AAAA,IACpB;AAAA,IAoBA,UAjBe,MAAM;AACrB,MAAIA,IAAQL,KACVM,EAASD,IAAQ,CAAC;AAAA,IACpB;AAAA,EAcA;AAEJ;AAEa,MAAAK,IAAc,CAACjB,MAA4B;AAChD,QAAA;AAAA,IACJ,UAAAS;AAAA,IACA,KAAAF;AAAA,IACA,KAAAC;AAAA,IACA,OAAAU;AAAA,IACA,aAAAC;AAAA,IACA,IAAAhB;AAAA,IACA,YAAAO;AAAA,IACA,OAAAE;AAAA,IACA,cAAAQ;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,
|
1
|
+
{"version":3,"file":"NumberField.js","sources":["../../../lib/molecules/Forms/NumberField.tsx"],"sourcesContent":["import classnames from 'classnames';\n\nimport { ChangeEvent, useId } from 'react';\n\nimport { useValue } from '@/hooks/useValue.js';\nimport { Button } from '../Buttons/Button';\nimport { FormControl, FormControlProps } from './FormControl.js';\n\ninterface NumberFieldProps extends FormControlProps<number> {\n min?: number;\n max?: number;\n}\n\nconst INPUT_STYLE = { width: '28px', height: '28px' };\n\nexport function useNumberField(props: NumberFieldProps) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n value: initialValue = 0,\n onChange,\n min = 0,\n max = 10,\n disabled = false,\n dataTestId = 'NumberField',\n ...rest\n } = props;\n\n const { value, setValue } = useValue<number, string | number | boolean>({\n name: name!,\n defaultValue: initialValue,\n formatter: Number,\n onChange,\n });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = Number(e.target.value);\n\n if (newValue >= min && newValue <= max) {\n setValue(Number(newValue));\n }\n };\n\n const increase = () => {\n if (value < max) {\n setValue(value + 1);\n }\n };\n\n const decrease = () => {\n if (value > min) {\n setValue(value - 1);\n }\n };\n\n return {\n ...rest,\n id,\n min,\n max,\n name,\n value,\n dataTestId,\n disabled,\n handleChange,\n increase,\n decrease,\n };\n}\n\nexport const NumberField = (props: NumberFieldProps) => {\n const {\n disabled,\n min,\n max,\n label,\n description,\n id,\n dataTestId,\n value,\n handleChange,\n increase,\n decrease,\n errorMessage,\n validationStatus,\n hideRequiredStar,\n required,\n ...rest\n } = useNumberField(props);\n\n return (\n <FormControl\n id={id}\n label={label}\n description={description}\n className={classnames('flex items-center justify-between', props.className)}\n dataName=\"NumberField\"\n dataTestId={dataTestId}\n errorMessage={errorMessage}\n validationStatus={validationStatus}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n layout=\"vertical\"\n >\n <div className=\"flex items-center gap-x-8\">\n <Button\n theme=\"yellow\"\n onClick={decrease}\n variant=\"icon\"\n disabled={value <= min || disabled}\n icon=\"MinusDefault\"\n // TODO have this from prop at some time\n label=\"MINUS\"\n />\n <input\n {...rest}\n className={classnames('text-b2 text-center font-normal outline-none', {\n 'bg-pearl text-grey': disabled,\n })}\n style={INPUT_STYLE}\n type=\"number\"\n id={id}\n onChange={handleChange}\n disabled={disabled}\n required={required}\n value={value}\n min={min}\n max={max}\n />\n <Button\n theme=\"yellow\"\n onClick={increase}\n variant=\"icon\"\n disabled={value >= max || disabled}\n icon=\"PlusDefault\"\n // TODO have this from prop at some time\n label=\"PLUS\"\n />\n </div>\n </FormControl>\n );\n};\n"],"names":["INPUT_STYLE","useNumberField","props","internalId","useId","id","name","initialValue","onChange","min","max","disabled","dataTestId","rest","value","setValue","useValue","e","newValue","NumberField","label","description","handleChange","increase","decrease","errorMessage","validationStatus","hideRequiredStar","required","jsx","FormControl","classnames","jsxs","Button"],"mappings":";;;;;;AAaA,MAAMA,IAAc,EAAE,OAAO,QAAQ,QAAQ,OAAO;A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x as a } from "react/jsx-runtime";
|
2
2
|
import { c as m } from "../../../index-Cu0xwYjD.js";
|
3
|
-
import { useId as M, useState as P, useEffect as
|
4
|
-
import { useValue as
|
3
|
+
import { useId as M, useState as P, useEffect as T } from "react";
|
4
|
+
import { useValue as q } from "../../../hooks/useValue.js";
|
5
5
|
import { FormControl as D } from "../FormControl.js";
|
6
6
|
import { Icon as n } from "../../../atoms/Icons/Icon.js";
|
7
7
|
import "../../../atoms/Icons/contexts/IconsContext.js";
|
@@ -11,49 +11,51 @@ function K(f) {
|
|
11
11
|
id: r = b,
|
12
12
|
name: o = r,
|
13
13
|
label: x,
|
14
|
-
value:
|
14
|
+
value: h,
|
15
15
|
disabled: d = !1,
|
16
16
|
required: c = !1,
|
17
|
+
hideRequiredStar: g,
|
17
18
|
validationStatus: e = "default",
|
18
|
-
errorMessage:
|
19
|
+
errorMessage: v,
|
19
20
|
validationMessages: p = [],
|
20
21
|
withoutFieldValidation: s = !1,
|
21
|
-
className:
|
22
|
-
onChange:
|
23
|
-
dataTestId:
|
24
|
-
...
|
25
|
-
} = f, { value:
|
22
|
+
className: w,
|
23
|
+
onChange: y,
|
24
|
+
dataTestId: N = "Password",
|
25
|
+
...C
|
26
|
+
} = f, { value: V, setValue: k } = q({
|
26
27
|
name: o,
|
27
|
-
initialValue:
|
28
|
-
onChange:
|
28
|
+
initialValue: h,
|
29
|
+
onChange: y
|
29
30
|
}), [t, u] = P("password");
|
30
|
-
|
31
|
-
const
|
31
|
+
T(() => u(t), [t]);
|
32
|
+
const I = () => u(t === "password" ? "text" : "password");
|
32
33
|
return /* @__PURE__ */ i(
|
33
34
|
D,
|
34
35
|
{
|
35
|
-
className:
|
36
|
+
className: w,
|
36
37
|
id: r,
|
37
38
|
label: x,
|
38
39
|
dataName: "Password",
|
39
|
-
dataTestId:
|
40
|
+
dataTestId: N,
|
40
41
|
disabled: d,
|
41
42
|
required: c,
|
43
|
+
hideRequiredStar: g,
|
42
44
|
validationStatus: s ? "default" : e,
|
43
|
-
errorMessage:
|
45
|
+
errorMessage: v,
|
44
46
|
children: [
|
45
47
|
/* @__PURE__ */ i("div", { className: "relative", children: [
|
46
48
|
/* @__PURE__ */ a(
|
47
49
|
"input",
|
48
50
|
{
|
49
|
-
...
|
51
|
+
...C,
|
50
52
|
id: r,
|
51
53
|
name: o,
|
52
54
|
type: t,
|
53
|
-
value:
|
55
|
+
value: V,
|
54
56
|
disabled: d,
|
55
57
|
required: c,
|
56
|
-
onChange: (l) =>
|
58
|
+
onChange: (l) => k(l.target.value),
|
57
59
|
className: m(
|
58
60
|
"text-b3 rounded-pill w-full border ps-20 py-[11px] font-normal outline-none bg-white text-black",
|
59
61
|
{
|
@@ -80,7 +82,7 @@ function K(f) {
|
|
80
82
|
{
|
81
83
|
type: "button",
|
82
84
|
className: "pointer-events-auto size-24 inline-flex",
|
83
|
-
onClick:
|
85
|
+
onClick: I,
|
84
86
|
children: /* @__PURE__ */ a(n, { name: t === "password" ? "Invisible" : "Visible", width: "24px", type: "svg" })
|
85
87
|
}
|
86
88
|
)
|
@@ -88,7 +90,7 @@ function K(f) {
|
|
88
90
|
}
|
89
91
|
)
|
90
92
|
] }),
|
91
|
-
p.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-col gap-[10px] mt-8", children: p.map(({ label: l, status:
|
93
|
+
p.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-col gap-[10px] mt-8", children: p.map(({ label: l, status: S }, j) => /* @__PURE__ */ a(F, { label: l, status: S }, j)) })
|
92
94
|
]
|
93
95
|
}
|
94
96
|
);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Password.js","sources":["../../../../lib/molecules/Forms/Password/Password.tsx"],"sourcesContent":["import classnames from 'classnames';\n\nimport { HTMLInputTypeAttribute, useEffect, useId, useState } from 'react';\n\nimport { useValue } from '@/hooks/useValue';\nimport { FormControl, FormControlProps } from '../FormControl';\nimport { Icon } from '@/atoms/Icons';\nimport { ValidationMessage } from './ValidationMessage';\n\nexport interface PasswordProps<Value> extends FormControlProps<Value> {\n validationMessages?: ValidationMessage[];\n withoutFieldValidation?: boolean;\n}\n\nexport function Password<Value = string>(props: PasswordProps<Value>) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n disabled = false,\n required = false,\n validationStatus = 'default',\n errorMessage,\n validationMessages = [],\n withoutFieldValidation = false,\n className,\n onChange,\n dataTestId = 'Password',\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({\n name,\n initialValue,\n onChange,\n });\n const [type, setType] = useState<HTMLInputTypeAttribute>('password');\n\n useEffect(() => setType(type), [type]);\n\n const toggleType = () => setType(type === 'password' ? 'text' : 'password');\n\n return (\n <FormControl\n className={className}\n id={id}\n label={label}\n dataName=\"Password\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n validationStatus={withoutFieldValidation ? 'default' : validationStatus}\n errorMessage={errorMessage}\n >\n <div className=\"relative\">\n <input\n {...rest}\n id={id}\n name={name}\n type={type}\n value={value as any}\n disabled={disabled}\n required={required}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border ps-20 py-[11px] font-normal outline-none bg-white text-black',\n {\n 'border-lightGrey focus:border-black active:border-black pe-[52px]':\n withoutFieldValidation || validationStatus === 'default',\n 'pe-[84px]':\n !withoutFieldValidation &&\n (validationStatus === 'error' || validationStatus === 'success'),\n 'border-red': !withoutFieldValidation && validationStatus === 'error',\n 'border-green': !withoutFieldValidation && validationStatus === 'success',\n },\n )}\n aria-label={name}\n />\n\n <div\n className={classnames(\n 'pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12',\n )}\n >\n <span className=\"ms-auto flex gap-x-8\">\n {!withoutFieldValidation && validationStatus === 'error' && (\n <Icon name=\"CrossDefault\" color=\"red\" width=\"24px\" />\n )}\n\n {!withoutFieldValidation && validationStatus === 'success' && (\n <Icon name=\"CheckDefault\" color=\"green\" width=\"24px\" />\n )}\n\n <button\n type=\"button\"\n className=\"pointer-events-auto size-24 inline-flex\"\n onClick={toggleType}\n >\n <Icon name={type === 'password' ? 'Invisible' : 'Visible'} width=\"24px\" type=\"svg\" />\n </button>\n </span>\n </div>\n </div>\n\n {validationMessages.length > 0 && (\n <div className=\"flex flex-col gap-[10px] mt-8\">\n {validationMessages.map(({ label, status }, index) => (\n <ValidationMessage label={label} status={status} key={index} />\n ))}\n </div>\n )}\n </FormControl>\n );\n}\n"],"names":["Password","props","internalId","useId","id","name","label","initialValue","disabled","required","validationStatus","errorMessage","validationMessages","withoutFieldValidation","className","onChange","dataTestId","rest","value","setValue","useValue","type","setType","useState","useEffect","toggleType","jsxs","FormControl","jsx","e","classnames","Icon","status","index","ValidationMessage"],"mappings":";;;;;;;;AAcO,SAASA,EAAyBC,GAA6B;AACpE,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,OAAAE;AAAA,IACA,OAAOC;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,kBAAAC,IAAmB;AAAA,IACnB,cAAAC;AAAA,IACA,oBAAAC,IAAqB,CAAC;AAAA,IACtB,wBAAAC,IAAyB;AAAA,IACzB,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,GAAGC;AAAA,EACD,
|
1
|
+
{"version":3,"file":"Password.js","sources":["../../../../lib/molecules/Forms/Password/Password.tsx"],"sourcesContent":["import classnames from 'classnames';\n\nimport { HTMLInputTypeAttribute, useEffect, useId, useState } from 'react';\n\nimport { useValue } from '@/hooks/useValue';\nimport { FormControl, FormControlProps } from '../FormControl';\nimport { Icon } from '@/atoms/Icons';\nimport { ValidationMessage } from './ValidationMessage';\n\nexport interface PasswordProps<Value> extends FormControlProps<Value> {\n validationMessages?: ValidationMessage[];\n withoutFieldValidation?: boolean;\n}\n\nexport function Password<Value = string>(props: PasswordProps<Value>) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n disabled = false,\n required = false,\n hideRequiredStar,\n validationStatus = 'default',\n errorMessage,\n validationMessages = [],\n withoutFieldValidation = false,\n className,\n onChange,\n dataTestId = 'Password',\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({\n name,\n initialValue,\n onChange,\n });\n const [type, setType] = useState<HTMLInputTypeAttribute>('password');\n\n useEffect(() => setType(type), [type]);\n\n const toggleType = () => setType(type === 'password' ? 'text' : 'password');\n\n return (\n <FormControl\n className={className}\n id={id}\n label={label}\n dataName=\"Password\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n validationStatus={withoutFieldValidation ? 'default' : validationStatus}\n errorMessage={errorMessage}\n >\n <div className=\"relative\">\n <input\n {...rest}\n id={id}\n name={name}\n type={type}\n value={value as any}\n disabled={disabled}\n required={required}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border ps-20 py-[11px] font-normal outline-none bg-white text-black',\n {\n 'border-lightGrey focus:border-black active:border-black pe-[52px]':\n withoutFieldValidation || validationStatus === 'default',\n 'pe-[84px]':\n !withoutFieldValidation &&\n (validationStatus === 'error' || validationStatus === 'success'),\n 'border-red': !withoutFieldValidation && validationStatus === 'error',\n 'border-green': !withoutFieldValidation && validationStatus === 'success',\n },\n )}\n aria-label={name}\n />\n\n <div\n className={classnames(\n 'pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12',\n )}\n >\n <span className=\"ms-auto flex gap-x-8\">\n {!withoutFieldValidation && validationStatus === 'error' && (\n <Icon name=\"CrossDefault\" color=\"red\" width=\"24px\" />\n )}\n\n {!withoutFieldValidation && validationStatus === 'success' && (\n <Icon name=\"CheckDefault\" color=\"green\" width=\"24px\" />\n )}\n\n <button\n type=\"button\"\n className=\"pointer-events-auto size-24 inline-flex\"\n onClick={toggleType}\n >\n <Icon name={type === 'password' ? 'Invisible' : 'Visible'} width=\"24px\" type=\"svg\" />\n </button>\n </span>\n </div>\n </div>\n\n {validationMessages.length > 0 && (\n <div className=\"flex flex-col gap-[10px] mt-8\">\n {validationMessages.map(({ label, status }, index) => (\n <ValidationMessage label={label} status={status} key={index} />\n ))}\n </div>\n )}\n </FormControl>\n );\n}\n"],"names":["Password","props","internalId","useId","id","name","label","initialValue","disabled","required","hideRequiredStar","validationStatus","errorMessage","validationMessages","withoutFieldValidation","className","onChange","dataTestId","rest","value","setValue","useValue","type","setType","useState","useEffect","toggleType","jsxs","FormControl","jsx","e","classnames","Icon","status","index","ValidationMessage"],"mappings":";;;;;;;;AAcO,SAASA,EAAyBC,GAA6B;AACpE,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,OAAAE;AAAA,IACA,OAAOC;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,kBAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,cAAAC;AAAA,IACA,oBAAAC,IAAqB,CAAC;AAAA,IACtB,wBAAAC,IAAyB;AAAA,IACzB,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,GAAGC;AAAA,EACD,IAAAjB,GAEE,EAAE,OAAAkB,GAAO,UAAAC,EAAS,IAAIC,EAAgB;AAAA,IAC1C,MAAAhB;AAAA,IACA,cAAAE;AAAA,IACA,UAAAS;AAAA,EAAA,CACD,GACK,CAACM,GAAMC,CAAO,IAAIC,EAAiC,UAAU;AAEnE,EAAAC,EAAU,MAAMF,EAAQD,CAAI,GAAG,CAACA,CAAI,CAAC;AAErC,QAAMI,IAAa,MAAMH,EAAQD,MAAS,aAAa,SAAS,UAAU;AAGxE,SAAA,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAb;AAAA,MACA,IAAAX;AAAA,MACA,OAAAE;AAAA,MACA,UAAS;AAAA,MACT,YAAAW;AAAA,MACA,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cAAc,WAAW,OAAM,QAAO,MAAK,MAAM,CAAA;AAAA,kBAAA;AAAA,gBACrF;AAAA,cAAA,GACF;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,QAECT,EAAmB,SAAS,KAC3B,gBAAAgB,EAAC,SAAI,WAAU,iCACZ,UAAmBhB,EAAA,IAAI,CAAC,EAAE,OAAAP,GAAO,QAAA2B,EAAU,GAAAC,MACzC,gBAAAL,EAAAM,GAAA,EAAkB,OAAO7B,GAAO,QAAA2B,EAAA,GAAqBC,CAAO,CAC9D,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { c as b } from "../../../index-Cu0xwYjD.js";
|
3
3
|
import { useId as k } from "react";
|
4
4
|
import { useValue as w } from "../../../hooks/useValue.js";
|
5
|
-
|
5
|
+
/* empty css */
|
6
6
|
function R(d) {
|
7
7
|
const n = k(), {
|
8
8
|
id: o = n,
|
package/molecules/Forms/Range.js
CHANGED
@@ -339,8 +339,7 @@ function Pe(e) {
|
|
339
339
|
N(() => (f.current = !0, () => void (f.current = !1)));
|
340
340
|
const [T, m, h] = de(() => {
|
341
341
|
const c = () => {
|
342
|
-
if (!o.current.element)
|
343
|
-
return;
|
342
|
+
if (!o.current.element) return;
|
344
343
|
const {
|
345
344
|
left: z,
|
346
345
|
top: B,
|
@@ -399,8 +398,7 @@ function Fe(e, t) {
|
|
399
398
|
}
|
400
399
|
function ve(e) {
|
401
400
|
const t = [];
|
402
|
-
if (!e || e === document.body)
|
403
|
-
return t;
|
401
|
+
if (!e || e === document.body) return t;
|
404
402
|
const {
|
405
403
|
overflow: r,
|
406
404
|
overflowX: n,
|