@clubmed/trident-ui 1.1.0-beta.1 → 1.1.0-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/Apple-CwLXpmBT.js +6 -0
- package/Apple-CwLXpmBT.js.map +1 -0
- package/BeachView-ry-ythkU.js +6 -0
- package/BeachView-ry-ythkU.js.map +1 -0
- package/CHANGELOG.md +19 -0
- package/ExternalLinks-DO38o8kH.js +6 -0
- package/ExternalLinks-DO38o8kH.js.map +1 -0
- package/GardenView-uPCuti_v.js +6 -0
- package/GardenView-uPCuti_v.js.map +1 -0
- package/Google-D8VLbOAU.js +6 -0
- package/Google-D8VLbOAU.js.map +1 -0
- package/Grid-CtPxKCyt.js +6 -0
- package/Grid-CtPxKCyt.js.map +1 -0
- package/List-eMF4HM0u.js +6 -0
- package/List-eMF4HM0u.js.map +1 -0
- package/PoolView-D96KUdMQ.js +6 -0
- package/PoolView-D96KUdMQ.js.map +1 -0
- package/README.md +4 -22
- package/SnowSerenity-DQAGaSZc.js +6 -0
- package/SnowSerenity-DQAGaSZc.js.map +1 -0
- package/SunView-BDd5oDX7.js +6 -0
- package/SunView-BDd5oDX7.js.map +1 -0
- package/Twitter-DC4BiwII.js +6 -0
- package/Twitter-DC4BiwII.js.map +1 -0
- package/WithView-BkQ3hCTo.js +6 -0
- package/WithView-BkQ3hCTo.js.map +1 -0
- package/assets/icons/Services/SnowSerenity.svg +8 -0
- package/assets/icons/Socials/Apple.svg +5 -0
- package/assets/icons/Socials/Google.svg +5 -10
- package/assets/icons/Socials/Twitter.svg +3 -4
- package/assets/icons/Utilities/BeachView.svg +5 -0
- package/assets/icons/Utilities/ExternalLinks.svg +5 -0
- package/assets/icons/Utilities/GardenView.svg +5 -0
- package/assets/icons/Utilities/Grid.svg +5 -0
- package/assets/icons/Utilities/List.svg +5 -0
- package/assets/icons/Utilities/PoolView.svg +5 -0
- package/assets/icons/Utilities/SunView.svg +5 -0
- package/assets/icons/Utilities/WithView.svg +5 -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 +6 -9
- package/atoms/Icons/svg/Socials.js.map +1 -1
- package/atoms/Icons/svg/Utilities.js +34 -2
- 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/Socials.js +31 -34
- package/atoms/Icons/svg-use/Socials.js.map +1 -1
- package/atoms/Icons/svg-use/Utilities.js +124 -84
- 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 +9 -9
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +1 -1
- package/molecules/Forms/FormControl.js +28 -28
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +7 -7
- 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/Switch.js +1 -1
- package/molecules/Forms/TextField.d.ts +2 -0
- package/molecules/Forms/TextField.js +25 -24
- 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/Google-zu7VfXWy.js +0 -6
- package/Google-zu7VfXWy.js.map +0 -1
- package/GoogleMonogram-CwYTrMF3.js +0 -6
- package/GoogleMonogram-CwYTrMF3.js.map +0 -1
- package/Twitter-DtXFJEB1.js +0 -6
- package/Twitter-DtXFJEB1.js.map +0 -1
- package/assets/icons/Socials/GoogleMonogram.svg +0 -8
- 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,13 +1,13 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import { c as
|
3
|
-
import { useValue as
|
4
|
-
import { useInternalStatus as
|
5
|
-
import { FormControl as
|
6
|
-
import { Icon as
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
2
|
+
import { c as m } from "../../index-Cu0xwYjD.js";
|
3
|
+
import { useValue as F } from "../../hooks/useValue.js";
|
4
|
+
import { useInternalStatus as S } from "../../hooks/useInternalStatus.js";
|
5
|
+
import { FormControl as j } from "./FormControl.js";
|
6
|
+
import { Icon as i } from "../../atoms/Icons/Icon.js";
|
7
7
|
import "../../atoms/Icons/contexts/IconsContext.js";
|
8
|
-
import { useId as
|
9
|
-
const
|
10
|
-
const p =
|
8
|
+
import { useId as D } from "react";
|
9
|
+
const E = (u) => {
|
10
|
+
const p = D(), {
|
11
11
|
id: t = p,
|
12
12
|
name: a = t,
|
13
13
|
label: x,
|
@@ -23,13 +23,14 @@ const B = (m) => {
|
|
23
23
|
className: v,
|
24
24
|
dataTestId: y = "TextField",
|
25
25
|
onChange: w,
|
26
|
-
|
27
|
-
|
26
|
+
formatter: N,
|
27
|
+
...C
|
28
|
+
} = u, { value: I, setValue: T } = F({ name: a, initialValue: b, onChange: w, formatter: N }), e = S({
|
28
29
|
isDisabled: l,
|
29
30
|
validationStatus: n
|
30
31
|
});
|
31
32
|
return /* @__PURE__ */ r(
|
32
|
-
|
33
|
+
j,
|
33
34
|
{
|
34
35
|
id: t,
|
35
36
|
label: x,
|
@@ -42,18 +43,18 @@ const B = (m) => {
|
|
42
43
|
hideRequiredStar: g,
|
43
44
|
validationStatus: n,
|
44
45
|
errorMessage: h,
|
45
|
-
children: /* @__PURE__ */
|
46
|
+
children: /* @__PURE__ */ o("div", { className: "relative", children: [
|
46
47
|
/* @__PURE__ */ r(
|
47
48
|
"input",
|
48
49
|
{
|
49
|
-
...
|
50
|
+
...C,
|
50
51
|
id: t,
|
51
52
|
name: a,
|
52
53
|
disabled: l,
|
53
54
|
required: c,
|
54
|
-
value:
|
55
|
-
onChange: (
|
56
|
-
className:
|
55
|
+
value: I,
|
56
|
+
onChange: (k) => T(k.target.value),
|
57
|
+
className: m(
|
57
58
|
"text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none",
|
58
59
|
{
|
59
60
|
"border-lightGrey focus:border-black active:border-black": e === "default",
|
@@ -68,10 +69,10 @@ const B = (m) => {
|
|
68
69
|
"aria-label": a
|
69
70
|
}
|
70
71
|
),
|
71
|
-
/* @__PURE__ */
|
72
|
+
/* @__PURE__ */ o(
|
72
73
|
"div",
|
73
74
|
{
|
74
|
-
className:
|
75
|
+
className: m(
|
75
76
|
"pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12",
|
76
77
|
{
|
77
78
|
"text-grey": e === "disabled",
|
@@ -80,10 +81,10 @@ const B = (m) => {
|
|
80
81
|
}
|
81
82
|
),
|
82
83
|
children: [
|
83
|
-
s && /* @__PURE__ */ r(
|
84
|
-
/* @__PURE__ */
|
85
|
-
e === "error" && /* @__PURE__ */ r(
|
86
|
-
e === "success" && /* @__PURE__ */ r(
|
84
|
+
s && /* @__PURE__ */ r(i, { name: s, width: "24px" }),
|
85
|
+
/* @__PURE__ */ o("span", { className: "ms-auto flex gap-x-8", children: [
|
86
|
+
e === "error" && /* @__PURE__ */ r(i, { name: "CrossDefault", width: "24px", type: d }),
|
87
|
+
e === "success" && /* @__PURE__ */ r(i, { name: "CheckDefault", width: "24px", type: d })
|
87
88
|
] })
|
88
89
|
]
|
89
90
|
}
|
@@ -93,6 +94,6 @@ const B = (m) => {
|
|
93
94
|
);
|
94
95
|
};
|
95
96
|
export {
|
96
|
-
|
97
|
+
E as TextField
|
97
98
|
};
|
98
99
|
//# sourceMappingURL=TextField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../../../lib/molecules/Forms/TextField.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, FormControlProps } from './FormControl.js';\nimport { Icon, IconicNames, IconicTypes } from '@/atoms/Icons';\nimport { useId } from 'react';\n\nexport interface TextFieldProps<Value> extends FormControlProps<Value> {\n description?: string;\n icon?: IconicNames;\n iconType?: IconicTypes;\n errorMessage?: string;\n dataTestId?: string;\n}\n\nexport const TextField = <Value = string,>(props: TextFieldProps<Value>) => {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n description,\n validationStatus = 'default',\n icon,\n iconType,\n errorMessage,\n disabled = false,\n required = false,\n hideRequiredStar,\n className,\n dataTestId = 'TextField',\n onChange,\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({ name, initialValue, onChange });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n return (\n <FormControl\n id={id}\n label={label}\n className={className}\n description={description}\n dataName=\"TextField\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n validationStatus={validationStatus}\n errorMessage={errorMessage}\n >\n <div className=\"relative\">\n <input\n {...rest}\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n value={value as any}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none',\n {\n 'border-lightGrey focus:border-black active:border-black':\n internalStatus === 'default',\n 'ps-[52px]': icon,\n 'pe-[52px]': internalStatus === 'error' || internalStatus === 'success',\n 'bg-white text-black': internalStatus !== 'disabled',\n 'bg-pearl text-grey': internalStatus === 'disabled',\n 'border-red': internalStatus === 'error',\n 'border-green': internalStatus === '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 'text-grey': internalStatus === 'disabled',\n 'text-red': internalStatus === 'error',\n 'text-green': internalStatus === 'success',\n },\n )}\n >\n {icon && <Icon name={icon} width=\"24px\" />}\n\n <span className=\"ms-auto flex gap-x-8\">\n {internalStatus === 'error' && (\n <Icon name=\"CrossDefault\" width=\"24px\" type={iconType} />\n )}\n\n {internalStatus === 'success' && (\n <Icon name=\"CheckDefault\" width=\"24px\" type={iconType} />\n )}\n </span>\n </div>\n </div>\n </FormControl>\n );\n};\n"],"names":["TextField","props","internalId","useId","id","name","label","initialValue","description","validationStatus","icon","iconType","errorMessage","disabled","required","hideRequiredStar","className","dataTestId","onChange","rest","value","setValue","useValue","internalStatus","useInternalStatus","jsx","FormControl","jsxs","e","classnames","Icon"],"mappings":";;;;;;;;
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../../../lib/molecules/Forms/TextField.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useValue, UseValueProps } from '@/hooks/useValue';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\nimport { FormControl, FormControlProps } from './FormControl.js';\nimport { Icon, IconicNames, IconicTypes } from '@/atoms/Icons';\nimport { useId } from 'react';\n\nexport interface TextFieldProps<Value> extends FormControlProps<Value> {\n description?: string;\n icon?: IconicNames;\n iconType?: IconicTypes;\n errorMessage?: string;\n dataTestId?: string;\n formatter?: UseValueProps<Value>['formatter'];\n}\n\nexport const TextField = <Value = string,>(props: TextFieldProps<Value>) => {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n label,\n value: initialValue,\n description,\n validationStatus = 'default',\n icon,\n iconType,\n errorMessage,\n disabled = false,\n required = false,\n hideRequiredStar,\n className,\n dataTestId = 'TextField',\n onChange,\n formatter,\n ...rest\n } = props;\n\n const { value, setValue } = useValue<Value>({ name, initialValue, onChange, formatter });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n return (\n <FormControl\n id={id}\n label={label}\n className={className}\n description={description}\n dataName=\"TextField\"\n dataTestId={dataTestId}\n disabled={disabled}\n required={required}\n hideRequiredStar={hideRequiredStar}\n validationStatus={validationStatus}\n errorMessage={errorMessage}\n >\n <div className=\"relative\">\n <input\n {...rest}\n id={id}\n name={name}\n disabled={disabled}\n required={required}\n value={value as any}\n onChange={(e) => setValue(e.target.value as Value)}\n className={classnames(\n 'text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none',\n {\n 'border-lightGrey focus:border-black active:border-black':\n internalStatus === 'default',\n 'ps-[52px]': icon,\n 'pe-[52px]': internalStatus === 'error' || internalStatus === 'success',\n 'bg-white text-black': internalStatus !== 'disabled',\n 'bg-pearl text-grey': internalStatus === 'disabled',\n 'border-red': internalStatus === 'error',\n 'border-green': internalStatus === '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 'text-grey': internalStatus === 'disabled',\n 'text-red': internalStatus === 'error',\n 'text-green': internalStatus === 'success',\n },\n )}\n >\n {icon && <Icon name={icon} width=\"24px\" />}\n\n <span className=\"ms-auto flex gap-x-8\">\n {internalStatus === 'error' && (\n <Icon name=\"CrossDefault\" width=\"24px\" type={iconType} />\n )}\n\n {internalStatus === 'success' && (\n <Icon name=\"CheckDefault\" width=\"24px\" type={iconType} />\n )}\n </span>\n </div>\n </div>\n </FormControl>\n );\n};\n"],"names":["TextField","props","internalId","useId","id","name","label","initialValue","description","validationStatus","icon","iconType","errorMessage","disabled","required","hideRequiredStar","className","dataTestId","onChange","formatter","rest","value","setValue","useValue","internalStatus","useInternalStatus","jsx","FormControl","jsxs","e","classnames","Icon"],"mappings":";;;;;;;;AAgBa,MAAAA,IAAY,CAAkBC,MAAiC;AAC1E,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,OAAAE;AAAA,IACA,OAAOC;AAAA,IACP,aAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,kBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAnB,GAEE,EAAE,OAAAoB,GAAO,UAAAC,EAAA,IAAaC,EAAgB,EAAE,MAAAlB,GAAM,cAAAE,GAAc,UAAAW,GAAU,WAAAC,EAAA,CAAW,GACjFK,IAAiBC,EAAkB;AAAA,IACvC,YAAYZ;AAAA,IACZ,kBAAAJ;AAAA,EAAA,CACD;AAGC,SAAA,gBAAAiB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAAvB;AAAA,MACA,OAAAE;AAAA,MACA,WAAAU;AAAA,MACA,aAAAR;AAAA,MACA,UAAS;AAAA,MACT,YAAAS;AAAA,MACA,UAAAJ;AAAA,MACA,UAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAN;AAAA,MACA,cAAAG;AAAA,MAEA,UAAA,gBAAAgB,EAAC,OAAI,EAAA,WAAU,YACb,UAAA;AAAA,QAAA,gBAAAF;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAGN;AAAA,YACJ,IAAAhB;AAAA,YACA,MAAAC;AAAA,YACA,UAAAQ;AAAA,YACA,UAAAC;AAAA,YACA,OAAAO;AAAA,YACA,UAAU,CAACQ,MAAMP,EAASO,EAAE,OAAO,KAAc;AAAA,YACjD,WAAWC;AAAA,cACT;AAAA,cACA;AAAA,gBACE,2DACEN,MAAmB;AAAA,gBACrB,aAAad;AAAA,gBACb,aAAac,MAAmB,WAAWA,MAAmB;AAAA,gBAC9D,uBAAuBA,MAAmB;AAAA,gBAC1C,sBAAsBA,MAAmB;AAAA,gBACzC,cAAcA,MAAmB;AAAA,gBACjC,gBAAgBA,MAAmB;AAAA,cACrC;AAAA,YACF;AAAA,YACA,cAAYnB;AAAA,UAAA;AAAA,QACd;AAAA,QAEA,gBAAAuB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWE;AAAA,cACT;AAAA,cACA;AAAA,gBACE,aAAaN,MAAmB;AAAA,gBAChC,YAAYA,MAAmB;AAAA,gBAC/B,cAAcA,MAAmB;AAAA,cACnC;AAAA,YACF;AAAA,YAEC,UAAA;AAAA,cAAAd,KAAS,gBAAAgB,EAAAK,GAAA,EAAK,MAAMrB,GAAM,OAAM,QAAO;AAAA,cAExC,gBAAAkB,EAAC,QAAK,EAAA,WAAU,wBACb,UAAA;AAAA,gBAAmBJ,MAAA,6BACjBO,GAAK,EAAA,MAAK,gBAAe,OAAM,QAAO,MAAMpB,EAAU,CAAA;AAAA,gBAGxDa,MAAmB,aACjB,gBAAAE,EAAAK,GAAA,EAAK,MAAK,gBAAe,OAAM,QAAO,MAAMpB,EAAU,CAAA;AAAA,cAAA,GAE3D;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/molecules/Loader.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use client";
|
2
2
|
import { jsx as l, jsxs as a } from "react/jsx-runtime";
|
3
|
-
import { c as n, b as r } from "../react-spring_web.modern-
|
3
|
+
import { c as n, b as r } from "../react-spring_web.modern-DyRwH83_.js";
|
4
4
|
import { Backdrop as o } from "./Backdrop.js";
|
5
5
|
const h = /* @__PURE__ */ a("svg", { viewBox: "0 0 140 140", width: 140, children: [
|
6
6
|
/* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l(
|
package/molecules/Popin.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
2
|
-
import { c as f, b as p, d as x } from "../react-spring_web.modern-
|
2
|
+
import { c as f, b as p, d as x } from "../react-spring_web.modern-DyRwH83_.js";
|
3
3
|
import { Backdrop as h } from "./Backdrop.js";
|
4
4
|
import { Button as u } from "./Buttons/Button.js";
|
5
5
|
import { c as v } from "../index-Cu0xwYjD.js";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { jsx as r, jsxs as w } from "react/jsx-runtime";
|
3
3
|
import { c as l } from "../../index-Cu0xwYjD.js";
|
4
4
|
import { useRef as f, useEffect as v } from "react";
|
5
|
-
import { a as b, b as h } from "../../react-spring_web.modern-
|
5
|
+
import { a as b, b as h } from "../../react-spring_web.modern-DyRwH83_.js";
|
6
6
|
import { useActiveTabControl as L } from "./hooks/tabControl.js";
|
7
7
|
const k = ({
|
8
8
|
className: n,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { jsx as u, jsxs as B } from "react/jsx-runtime";
|
3
3
|
import { c as d } from "../../index-Cu0xwYjD.js";
|
4
4
|
import { useRef as m, useEffect as H, useCallback as r } from "react";
|
5
|
-
import { b as I } from "../../react-spring_web.modern-
|
5
|
+
import { b as I } from "../../react-spring_web.modern-DyRwH83_.js";
|
6
6
|
import { useActiveTab as _, useRegisterTabControl as z } from "./hooks/tabControl.js";
|
7
7
|
import { getTheme as G } from "./theme.js";
|
8
8
|
import { useSafeBoop as M } from "../../hooks/useSafeBoop.js";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { jsx as p } from "react/jsx-runtime";
|
3
3
|
import { c as d } from "../../index-Cu0xwYjD.js";
|
4
4
|
import { useRef as l, useEffect as f } from "react";
|
5
|
-
import { a as b, b as u } from "../../react-spring_web.modern-
|
5
|
+
import { a as b, b as u } from "../../react-spring_web.modern-DyRwH83_.js";
|
6
6
|
import { useActiveTab as y } from "./hooks/tabControl.js";
|
7
7
|
const r = {
|
8
8
|
opacity: 0,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@clubmed/trident-ui",
|
3
|
-
"version": "1.1.0-beta.
|
3
|
+
"version": "1.1.0-beta.3",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Shared ClubMed React UI components",
|
6
6
|
"keywords": [
|
@@ -41,11 +41,6 @@
|
|
41
41
|
"import": "./atoms/Icons/svg-use/index.js",
|
42
42
|
"default": "./atoms/Icons/svg-use/index.js"
|
43
43
|
},
|
44
|
-
"./atoms/Icons/fonts": {
|
45
|
-
"types": "./atoms/Icons/fonts/index.d.ts",
|
46
|
-
"import": "./atoms/Icons/fonts/index.js",
|
47
|
-
"default": "./atoms/Icons/fonts/index.js"
|
48
|
-
},
|
49
44
|
"./molecules/Tabs": {
|
50
45
|
"types": "./molecules/Tabs/index.d.ts",
|
51
46
|
"import": "./molecules/Tabs/index.js",
|
@@ -125,18 +120,18 @@
|
|
125
120
|
"@commitlint/cli": "18.6.1",
|
126
121
|
"@commitlint/config-conventional": "18.6.2",
|
127
122
|
"@netsells/storybook-mockdate": "^0.3.2",
|
128
|
-
"@storybook/addon-a11y": "8.
|
129
|
-
"@storybook/addon-actions": "8.
|
130
|
-
"@storybook/addon-essentials": "8.
|
131
|
-
"@storybook/addon-interactions": "8.
|
132
|
-
"@storybook/addon-links": "8.
|
133
|
-
"@storybook/addon-mdx-gfm": "8.
|
123
|
+
"@storybook/addon-a11y": "8.3.5",
|
124
|
+
"@storybook/addon-actions": "8.3.5",
|
125
|
+
"@storybook/addon-essentials": "8.3.5",
|
126
|
+
"@storybook/addon-interactions": "8.3.5",
|
127
|
+
"@storybook/addon-links": "8.3.5",
|
128
|
+
"@storybook/addon-mdx-gfm": "8.3.5",
|
134
129
|
"@storybook/addon-styling": "1.3.7",
|
135
|
-
"@storybook/addon-viewport": "8.
|
136
|
-
"@storybook/blocks": "8.
|
137
|
-
"@storybook/react": "8.
|
138
|
-
"@storybook/react-vite": "8.
|
139
|
-
"@storybook/test": "8.
|
130
|
+
"@storybook/addon-viewport": "8.3.5",
|
131
|
+
"@storybook/blocks": "8.3.5",
|
132
|
+
"@storybook/react": "8.3.5",
|
133
|
+
"@storybook/react-vite": "8.3.5",
|
134
|
+
"@storybook/test": "8.3.5",
|
140
135
|
"@svgr/rollup": "8.1.0",
|
141
136
|
"@testing-library/jest-dom": "^6.3.0",
|
142
137
|
"@testing-library/react": "^14.1.2",
|
@@ -148,7 +143,7 @@
|
|
148
143
|
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
149
144
|
"@typescript-eslint/parser": "^6.19.1",
|
150
145
|
"@vitejs/plugin-react": "^4.2.1",
|
151
|
-
"@vitest/coverage-v8": "
|
146
|
+
"@vitest/coverage-v8": "2.1.2",
|
152
147
|
"add": "^2.0.6",
|
153
148
|
"autoprefixer": "^10.4.17",
|
154
149
|
"change-case": "^5.4.3",
|
@@ -171,16 +166,16 @@
|
|
171
166
|
"react-dom": "^18.2.0",
|
172
167
|
"react-syntax-highlighter": "^15.5.0",
|
173
168
|
"rollup-preserve-directives": "^1.1.1",
|
174
|
-
"storybook": "8.
|
169
|
+
"storybook": "8.3.5",
|
175
170
|
"svgtofont": "^4.2.0",
|
176
171
|
"tailwindcss": "^3.3.5",
|
177
172
|
"ts-node": "^10.9.2",
|
178
173
|
"typescript": "^5.2.2",
|
179
|
-
"vite": "
|
174
|
+
"vite": "5.4.8",
|
180
175
|
"vite-plugin-dts": "^3.6.4",
|
181
176
|
"vite-plugin-static-copy": "1.0.1",
|
182
177
|
"vite-plugin-svgr": "^4.2.0",
|
183
|
-
"vitest": "^1.
|
178
|
+
"vitest": "^2.1.2"
|
184
179
|
},
|
185
180
|
"dependencies": {
|
186
181
|
"@juggle/resize-observer": "^3.4.0",
|