@uva-glass/component-library 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/InputField.css +1 -1
- package/dist/assets/InputField2.css +1 -1
- package/dist/assets/OverlayCloseButton.css +1 -0
- package/dist/assets/OverlayCloseButton2.css +1 -0
- package/dist/components/{InputField/components → FieldHint}/FieldHint.d.ts +2 -3
- package/dist/components/{InputField/components → FieldHint}/FieldHint.js +2 -2
- package/dist/components/FieldHint/FieldHint.js.map +1 -0
- package/dist/components/FieldHint/FieldHint.stories.d.ts +6 -0
- package/dist/components/FieldHint/FieldHint.stories.js +33 -0
- package/dist/components/FieldHint/FieldHint.stories.js.map +1 -0
- package/dist/components/InputField/InputField.d.ts +0 -4
- package/dist/components/InputField/InputField.js +19 -23
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.d.ts +0 -2
- package/dist/components/InputField/InputField.stories.js +14 -42
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.d.ts +7 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js +25 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +5 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +25 -0
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -0
- package/dist/components/OverlayCloseButton/index.d.ts +1 -0
- package/dist/components/OverlayCloseButton/index.js +5 -0
- package/dist/components/OverlayCloseButton/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +17 -15
- package/dist/components/index.js.map +1 -1
- package/dist/index-Ca2Q7D5u.js.map +1 -1
- package/dist/index.js +17 -15
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/dist/components/InputField/components/FieldHint.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._input-field_16tae_1{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:1px solid;border-radius:.5rem;color:var(--color-black);font-family:inherit;font-size:inherit;height:2.75rem;margin:0;padding:0 .5rem;text-align:inherit}._input-field--large_16tae_15{height:3rem}._input-field_16tae_1:disabled{color:var(--color-scarpa-flow)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.form{width:20%}.form-field{display:flex;flex-direction:column;gap:.5rem 1rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.btn-container{height:100px;position:relative;width:100px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._overlay-close-button_1uqum_1{align-items:center;background-color:transparent;border:1px solid transparent;border-radius:.25rem;color:var(--color-black);display:inline-flex;height:1.5rem;justify-content:center;position:absolute;right:.125rem;top:.125rem;transition:var(--transition-colors);width:1.5rem}._overlay-close-button_1uqum_1:focus-visible{outline:.125rem dotted var(--color-cobalt);outline-offset:.125rem}._overlay-close-button_1uqum_1:hover{background-color:var(--color-lavender);cursor:pointer;outline:0}._overlay-close-button_1uqum_1:after{bottom:-.625rem;content:" ";left:-.625rem;position:absolute;right:-.625rem;top:-.625rem}@media (min-width: 28rem) and (min-height: 28rem){._overlay-close-button--padded_1uqum_39{right:1rem;top:1rem}}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
interface
|
|
1
|
+
export interface FieldHintProps {
|
|
2
2
|
value?: string;
|
|
3
3
|
spinnerAriaValueText: string;
|
|
4
4
|
loading?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare function FieldHint({ value, spinnerAriaValueText, loading }:
|
|
7
|
-
export {};
|
|
6
|
+
export declare function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { Spinner as f } from "
|
|
3
|
-
import '
|
|
2
|
+
import { Spinner as f } from "../Spinner/Spinner.js";
|
|
3
|
+
import '../../assets/FieldHint.css';const l = {
|
|
4
4
|
"field-hint": "_field-hint_f5ej1_1"
|
|
5
5
|
};
|
|
6
6
|
function m({ value: i, spinnerAriaValueText: e, loading: t }) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHint.js","sources":["../../../src/components/FieldHint/FieldHint.tsx"],"sourcesContent":["import styles from './FieldHint.module.css';\n\nimport { Spinner } from 'components/Spinner/Spinner';\n\nexport interface FieldHintProps {\n value?: string;\n spinnerAriaValueText: string;\n loading?: boolean;\n}\n\nexport function FieldHint({ value, spinnerAriaValueText, loading }: FieldHintProps) {\n return (\n <span className={styles['field-hint']}>\n {value && <>{value}</>}\n {!value && loading && <Spinner ariaValueText={spinnerAriaValueText} />}\n </span>\n );\n}\n"],"names":["FieldHint","value","spinnerAriaValueText","loading","jsxs","styles","jsx","Spinner"],"mappings":";;;;;AAUO,SAASA,EAAU,EAAE,OAAAC,GAAO,sBAAAC,GAAsB,SAAAC,KAA2B;AAClF,SACG,gBAAAC,EAAA,QAAA,EAAK,WAAWC,EAAO,YAAY,GACjC,UAAA;AAAA,IAAAJ,4BAAY,UAAMA,EAAA,CAAA;AAAA,IAClB,CAACA,KAASE,KAAY,gBAAAG,EAAAC,GAAA,EAAQ,eAAeL,GAAsB;AAAA,EACtE,EAAA,CAAA;AAEJ;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldHintProps } from './FieldHint';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, FieldHintProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const FieldHintExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FieldHintProps>;
|
|
6
|
+
export declare const LoadingFieldHint: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, FieldHintProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { FieldHint as t } from "./FieldHint.js";
|
|
3
|
+
const d = {
|
|
4
|
+
title: "Atoms/FieldHint",
|
|
5
|
+
component: t,
|
|
6
|
+
argTypes: {
|
|
7
|
+
value: {
|
|
8
|
+
control: "text"
|
|
9
|
+
},
|
|
10
|
+
spinnerAriaValueText: {
|
|
11
|
+
control: "text"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}, e = (n) => /* @__PURE__ */ l(t, { ...n }), i = {
|
|
15
|
+
spinnerAriaValueText: "FieldHint Loading"
|
|
16
|
+
}, o = e.bind({});
|
|
17
|
+
o.args = {
|
|
18
|
+
value: "This is a FieldHint",
|
|
19
|
+
loading: !1,
|
|
20
|
+
...i
|
|
21
|
+
};
|
|
22
|
+
const a = e.bind({});
|
|
23
|
+
a.args = {
|
|
24
|
+
value: "",
|
|
25
|
+
loading: !0,
|
|
26
|
+
...i
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
o as FieldHintExample,
|
|
30
|
+
a as LoadingFieldHint,
|
|
31
|
+
d as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=FieldHint.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHint.stories.js","sources":["../../../src/components/FieldHint/FieldHint.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { FieldHintProps } from './FieldHint';\n\nimport { FieldHint } from './FieldHint';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/FieldHint',\n component: FieldHint,\n argTypes: {\n value: {\n control: 'text',\n },\n spinnerAriaValueText: {\n control: 'text',\n },\n },\n} as Meta<FieldHintProps>;\n\nconst Template: StoryFn<FieldHintProps> = (args) => <FieldHint {...args} />;\n\nconst defaultArgs: Partial<FieldHintProps> = {\n spinnerAriaValueText: 'FieldHint Loading',\n};\n\nexport const FieldHintExample = Template.bind({});\nFieldHintExample.args = {\n value: 'This is a FieldHint',\n loading: false,\n ...defaultArgs,\n};\n\nexport const LoadingFieldHint = Template.bind({});\nLoadingFieldHint.args = {\n value: '',\n loading: true,\n ...defaultArgs,\n};\n"],"names":["FieldHint_stories","FieldHint","Template","args","jsx","defaultArgs","FieldHintExample","LoadingFieldHint"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAoC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAW,GAAGE,EAAM,CAAA,GAEnEE,IAAuC;AAAA,EAC3C,sBAAsB;AACxB,GAEaC,IAAmBJ,EAAS,KAAK,EAAE;AAChDI,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,GAAGF;AACL;"}
|
|
@@ -2,11 +2,7 @@ import { InputHTMLAttributes } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {
|
|
4
4
|
variant?: 'large';
|
|
5
|
-
hint?: string;
|
|
6
|
-
spinnerAriaValueText: string;
|
|
7
|
-
isHintLoading?: boolean;
|
|
8
5
|
type?: 'text' | 'search' | 'password' | 'email';
|
|
9
|
-
autoComplete?: 'off';
|
|
10
6
|
id: string;
|
|
11
7
|
}
|
|
12
8
|
export declare const InputField: import('react').ForwardRefExoticComponent<InputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
import
|
|
5
|
-
import '../../assets/InputField2.css';const i = {
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { c as a } from "../../clsx-DB4S2d7J.js";
|
|
4
|
+
import '../../assets/InputField.css';const e = {
|
|
6
5
|
"input-field": "_input-field_16tae_1",
|
|
7
6
|
"input-field--large": "_input-field--large_16tae_15"
|
|
8
|
-
},
|
|
9
|
-
({ autoComplete:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
),
|
|
23
|
-
(e || t) && /* @__PURE__ */ r(_, { loading: t, spinnerAriaValueText: p, value: e })
|
|
24
|
-
] })
|
|
7
|
+
}, m = o(
|
|
8
|
+
({ autoComplete: t = "off", id: i, variant: r, type: f = "text", ...l }, p) => /* @__PURE__ */ n(
|
|
9
|
+
"input",
|
|
10
|
+
{
|
|
11
|
+
...l,
|
|
12
|
+
autoComplete: t,
|
|
13
|
+
ref: p,
|
|
14
|
+
id: i,
|
|
15
|
+
className: a(e["input-field"], {
|
|
16
|
+
[e["input-field--large"]]: r === "large"
|
|
17
|
+
}),
|
|
18
|
+
type: f
|
|
19
|
+
}
|
|
20
|
+
)
|
|
25
21
|
);
|
|
26
22
|
export {
|
|
27
|
-
|
|
23
|
+
m as InputField
|
|
28
24
|
};
|
|
29
25
|
//# sourceMappingURL=InputField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes } from 'react';\n\nimport styles from './InputField.module.css';\
|
|
1
|
+
{"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes } from 'react';\n\nimport styles from './InputField.module.css';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n type?: 'text' | 'search' | 'password' | 'email';\n id: string;\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n ({ autoComplete = 'off', id, variant, type = 'text', ...restProps }: InputFieldProps, forwardedRef) => {\n return (\n <input\n {...restProps}\n autoComplete={autoComplete}\n ref={forwardedRef}\n id={id}\n className={clsx(styles['input-field'], {\n [styles['input-field--large']]: variant === 'large',\n })}\n type={type}\n />\n );\n }\n);\n"],"names":["InputField","forwardRef","autoComplete","id","variant","type","restProps","forwardedRef","jsx","clsx","styles"],"mappings":";;;;;;GAaaA,IAAaC;AAAA,EACxB,CAAC,EAAE,cAAAC,IAAe,OAAO,IAAAC,GAAI,SAAAC,GAAS,MAAAC,IAAO,QAAQ,GAAGC,EAAU,GAAoBC,MAElF,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,cAAAJ;AAAA,MACA,KAAKK;AAAA,MACL,IAAAJ;AAAA,MACA,WAAWM,EAAKC,EAAO,aAAa,GAAG;AAAA,QACrC,CAACA,EAAO,oBAAoB,CAAC,GAAGN,MAAY;AAAA,MAAA,CAC7C;AAAA,MACD,MAAAC;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -3,5 +3,3 @@ import { InputFieldProps } from './InputField';
|
|
|
3
3
|
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, InputFieldProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const InputFieldExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
|
|
6
|
-
export declare const WithHint: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
|
|
7
|
-
export declare const WithLoadingHint: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, InputFieldProps>;
|
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { InputField as
|
|
3
|
-
import '../../assets/
|
|
4
|
-
const
|
|
5
|
-
return { ...t, variant:
|
|
6
|
-
},
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { InputField as o } from "./InputField.js";
|
|
3
|
+
import '../../assets/InputField2.css';const a = (t) => {
|
|
4
|
+
const r = t.variant ?? [];
|
|
5
|
+
return { ...t, variant: r.toString() };
|
|
6
|
+
}, d = {
|
|
7
7
|
title: "Atoms/InputField",
|
|
8
|
-
component:
|
|
8
|
+
component: o,
|
|
9
9
|
argTypes: {
|
|
10
10
|
variant: {
|
|
11
11
|
options: ["large"],
|
|
12
12
|
control: "check"
|
|
13
13
|
},
|
|
14
|
-
hint: {
|
|
15
|
-
control: "text"
|
|
16
|
-
},
|
|
17
|
-
spinnerAriaValueText: {
|
|
18
|
-
control: "text"
|
|
19
|
-
},
|
|
20
|
-
isHintLoading: {
|
|
21
|
-
control: Boolean,
|
|
22
|
-
table: {
|
|
23
|
-
disable: !0
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
14
|
type: {
|
|
27
15
|
control: "radio",
|
|
28
16
|
options: ["text", "search", "password", "email"]
|
|
@@ -31,35 +19,19 @@ import '../../assets/InputField.css';const r = (t) => {
|
|
|
31
19
|
control: "text"
|
|
32
20
|
},
|
|
33
21
|
autoComplete: {
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
table: {
|
|
23
|
+
disable: !0
|
|
24
|
+
}
|
|
36
25
|
}
|
|
37
26
|
}
|
|
38
|
-
},
|
|
27
|
+
}, i = (t) => /* @__PURE__ */ e("div", { className: "form", children: /* @__PURE__ */ e("div", { className: "form-field", children: /* @__PURE__ */ e(o, { ...a(t) }) }) }), n = i.bind({});
|
|
28
|
+
n.args = {
|
|
39
29
|
type: "text",
|
|
40
30
|
variant: void 0,
|
|
41
|
-
hint: void 0,
|
|
42
|
-
spinnerAriaValueText: "Loading",
|
|
43
|
-
autoComplete: "off",
|
|
44
31
|
id: "4f9ca77d"
|
|
45
|
-
}, s = n.bind({});
|
|
46
|
-
s.args = {
|
|
47
|
-
...i
|
|
48
|
-
};
|
|
49
|
-
const l = n.bind({});
|
|
50
|
-
l.args = {
|
|
51
|
-
...i,
|
|
52
|
-
hint: "Example hint"
|
|
53
|
-
};
|
|
54
|
-
const d = n.bind({});
|
|
55
|
-
d.args = {
|
|
56
|
-
...i,
|
|
57
|
-
isHintLoading: !0
|
|
58
32
|
};
|
|
59
33
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
d as WithLoadingHint,
|
|
63
|
-
m as default
|
|
34
|
+
n as InputFieldExample,
|
|
35
|
+
d as default
|
|
64
36
|
};
|
|
65
37
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport './InputField.stories.css';\n\nimport { InputField } from './InputField';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport './InputField.stories.css';\n\nimport { InputField } from './InputField';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'search', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => (\n <div className=\"form\">\n <div className=\"form-field\">\n <InputField {...transformArgs(args)} />\n </div>\n </div>\n);\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","jsx","InputFieldExample"],"mappings":";;AAOA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,UAAU,YAAY,OAAO;AAAA,IACjD;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,wBACzC,OAAI,EAAA,WAAU,QACb,UAAC,gBAAAK,EAAA,OAAA,EAAI,WAAU,cACb,4BAACF,GAAY,EAAA,GAAGJ,EAAcC,CAAI,EAAG,CAAA,GACvC,EACF,CAAA,GAGWM,IAAoBF,EAAS,KAAK,EAAE;AACjDE,EAAkB,OAAO;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface OverlayCloseButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
|
|
4
|
+
'aria-label': string;
|
|
5
|
+
paddedModal?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const OverlayCloseButton: import('react').ForwardRefExoticComponent<OverlayCloseButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../clsx-DB4S2d7J.js";
|
|
3
|
+
import { forwardRef as a } from "react";
|
|
4
|
+
import { Icon as n } from "../Icon/Icon.js";
|
|
5
|
+
import '../../assets/OverlayCloseButton2.css';const t = {
|
|
6
|
+
"overlay-close-button": "_overlay-close-button_1uqum_1",
|
|
7
|
+
"overlay-close-button--padded": "_overlay-close-button--padded_1uqum_39"
|
|
8
|
+
}, p = a(
|
|
9
|
+
({ paddedModal: e, ...r }, s) => /* @__PURE__ */ o(
|
|
10
|
+
"button",
|
|
11
|
+
{
|
|
12
|
+
...r,
|
|
13
|
+
type: "button",
|
|
14
|
+
ref: s,
|
|
15
|
+
className: l(t["overlay-close-button"], {
|
|
16
|
+
[t["overlay-close-button--padded"]]: e
|
|
17
|
+
}),
|
|
18
|
+
children: /* @__PURE__ */ o(n, { name: "Cross", size: 24 })
|
|
19
|
+
}
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
export {
|
|
23
|
+
p as OverlayCloseButton
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=OverlayCloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayCloseButton.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport styles from './OverlayCloseButton.module.css';\n\nimport { Icon } from 'components/Icon';\n\nexport interface OverlayCloseButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {\n 'aria-label': string; // mandatory\n paddedModal?: boolean;\n}\n\nexport const OverlayCloseButton = forwardRef<HTMLButtonElement, OverlayCloseButtonProps>(\n ({ paddedModal, ...restProps }, forwardedRef) => (\n <button\n {...restProps}\n type=\"button\"\n ref={forwardedRef}\n className={clsx(styles['overlay-close-button'], {\n [styles['overlay-close-button--padded']]: paddedModal,\n })}\n >\n <Icon name=\"Cross\" size={24} />\n </button>\n )\n);\n"],"names":["OverlayCloseButton","forwardRef","paddedModal","restProps","forwardedRef","jsx","clsx","styles","Icon"],"mappings":";;;;;;;GAcaA,IAAqBC;AAAA,EAChC,CAAC,EAAE,aAAAC,GAAa,GAAGC,KAAaC,MAC9B,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,MAAK;AAAA,MACL,KAAKC;AAAA,MACL,WAAWE,EAAKC,EAAO,sBAAsB,GAAG;AAAA,QAC9C,CAACA,EAAO,8BAA8B,CAAC,GAAGL;AAAA,MAAA,CAC3C;AAAA,MAED,UAAC,gBAAAG,EAAAG,GAAA,EAAK,MAAK,SAAQ,MAAM,IAAI;AAAA,IAAA;AAAA,EAC/B;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OverlayCloseButtonProps } from './OverlayCloseButton';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, OverlayCloseButtonProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const OverlayCloseButtonExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, OverlayCloseButtonProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { f as a } from "../../index-Ca2Q7D5u.js";
|
|
3
|
+
import { OverlayCloseButton as e } from "./OverlayCloseButton.js";
|
|
4
|
+
import '../../assets/OverlayCloseButton.css';const i = {
|
|
5
|
+
title: "Atoms/OverlayCloseButton",
|
|
6
|
+
component: e,
|
|
7
|
+
argTypes: {
|
|
8
|
+
paddedModal: {
|
|
9
|
+
control: "boolean"
|
|
10
|
+
},
|
|
11
|
+
"aria-label": {
|
|
12
|
+
control: "text"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}, l = (t) => /* @__PURE__ */ o("div", { className: "btn-container", children: /* @__PURE__ */ o(e, { ...t }) }), r = l.bind({});
|
|
16
|
+
r.args = {
|
|
17
|
+
paddedModal: !1,
|
|
18
|
+
"aria-label": "Close",
|
|
19
|
+
onClick: a()
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
r as OverlayCloseButtonExample,
|
|
23
|
+
i as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=OverlayCloseButton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayCloseButton.stories.js","sources":["../../../src/components/OverlayCloseButton/OverlayCloseButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { OverlayCloseButtonProps } from './OverlayCloseButton';\n\nimport { OverlayCloseButton } from './OverlayCloseButton';\n\nimport './OverlayCloseButton.stories.css';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/OverlayCloseButton',\n component: OverlayCloseButton,\n argTypes: {\n paddedModal: {\n control: 'boolean',\n },\n 'aria-label': {\n control: 'text',\n },\n },\n} as Meta<OverlayCloseButtonProps>;\n\nconst Template: StoryFn<OverlayCloseButtonProps> = (args) => {\n return (\n <div className=\"btn-container\">\n <OverlayCloseButton {...args} />\n </div>\n );\n};\n\nexport const OverlayCloseButtonExample = Template.bind({});\nOverlayCloseButtonExample.args = {\n paddedModal: false,\n 'aria-label': 'Close',\n onClick: fn(),\n};\n"],"names":["OverlayCloseButton_stories","OverlayCloseButton","Template","args","jsx","OverlayCloseButtonExample","fn"],"mappings":";;;AAUA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,aAAa;AAAA,MACX,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAA6C,CAACC,MAEhD,gBAAAC,EAAC,SAAI,WAAU,iBACb,4BAACH,GAAoB,EAAA,GAAGE,EAAM,CAAA,EAChC,CAAA,GAISE,IAA4BH,EAAS,KAAK,EAAE;AACzDG,EAA0B,OAAO;AAAA,EAC/B,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAASC,EAAG;AACd;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OverlayCloseButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -7,6 +7,7 @@ export * from './InfoMessage';
|
|
|
7
7
|
export * from './Input';
|
|
8
8
|
export * from './InputField';
|
|
9
9
|
export * from './Label';
|
|
10
|
+
export * from './OverlayCloseButton';
|
|
10
11
|
export * from './RadioButton';
|
|
11
12
|
export * from './SectionNotification';
|
|
12
13
|
export * from './SelectListbox';
|
package/dist/components/index.js
CHANGED
|
@@ -3,14 +3,15 @@ import { Button as p } from "./Button/Button.js";
|
|
|
3
3
|
import { Card as x } from "./Card/Card.js";
|
|
4
4
|
import { Icon as n } from "./Icon/Icon.js";
|
|
5
5
|
import { IconButton as a } from "./IconButton/IconButton.js";
|
|
6
|
-
import { InfoMessage as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { InputField as
|
|
9
|
-
import { Label as
|
|
6
|
+
import { InfoMessage as c } from "./InfoMessage/InfoMessage.js";
|
|
7
|
+
import { Input as s } from "./Input/Input.js";
|
|
8
|
+
import { InputField as B } from "./InputField/InputField.js";
|
|
9
|
+
import { Label as d } from "./Label/Label.js";
|
|
10
|
+
import { OverlayCloseButton as v } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
10
11
|
import { RadioButton as L } from "./RadioButton/RadioButton.js";
|
|
11
|
-
import { SectionNotification as
|
|
12
|
-
import { SelectListbox as
|
|
13
|
-
import { SelectProvider as
|
|
12
|
+
import { SectionNotification as y } from "./SectionNotification/SectionNotification.js";
|
|
13
|
+
import { SelectListbox as F } from "./SelectListbox/SelectListbox.js";
|
|
14
|
+
import { SelectProvider as N, useSelect as O } from "./SelectListbox/SelectProvider.js";
|
|
14
15
|
import { Spinner as R } from "./Spinner/Spinner.js";
|
|
15
16
|
export {
|
|
16
17
|
t as AppStatusBar,
|
|
@@ -18,15 +19,16 @@ export {
|
|
|
18
19
|
x as Card,
|
|
19
20
|
n as Icon,
|
|
20
21
|
a as IconButton,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
c as InfoMessage,
|
|
23
|
+
s as Input,
|
|
24
|
+
B as InputField,
|
|
25
|
+
d as Label,
|
|
26
|
+
v as OverlayCloseButton,
|
|
25
27
|
L as RadioButton,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
y as SectionNotification,
|
|
29
|
+
F as SelectListbox,
|
|
30
|
+
N as SelectProvider,
|
|
29
31
|
R as Spinner,
|
|
30
|
-
|
|
32
|
+
O as useSelect
|
|
31
33
|
};
|
|
32
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|