@uva-glass/component-library 3.2.2 → 3.4.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/RadioGroup.css +1 -0
- package/dist/assets/TextArea.css +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +19 -0
- package/dist/components/RadioGroup/RadioGroup.js +52 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +5 -0
- package/dist/components/RadioGroup/RadioGroup.stories.js +48 -0
- package/dist/components/RadioGroup/RadioGroup.stories.js.map +1 -0
- package/dist/components/RadioGroup/Radiogroup.test.d.ts +0 -0
- package/dist/components/RadioGroup/Radiogroup.test.js +24 -0
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/RadioGroup/index.js +5 -0
- package/dist/components/RadioGroup/index.js.map +1 -0
- package/dist/components/TextArea/TextArea.d.ts +9 -0
- package/dist/components/TextArea/TextArea.js +39 -0
- package/dist/components/TextArea/TextArea.js.map +1 -0
- package/dist/components/TextArea/TextArea.stories.d.ts +5 -0
- package/dist/components/TextArea/TextArea.stories.js +30 -0
- package/dist/components/TextArea/TextArea.stories.js.map +1 -0
- package/dist/components/TextArea/TextArea.test.d.ts +0 -0
- package/dist/components/TextArea/TextArea.test.js +25 -0
- package/dist/components/TextArea/TextArea.test.js.map +1 -0
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/TextArea/index.js +5 -0
- package/dist/components/TextArea/index.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +52 -48
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +52 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._radio-group__wrapper_1khqv_1{display:flex;flex-direction:column;gap:.5rem}._radio-group__header_1khqv_7{font-family:inherit;font-size:inherit;line-height:var(--line-height-s);margin:0}._radio-group_1khqv_1{background-color:var(--color-white);border:1px solid var(--color-grey-400);border-radius:.25rem;overflow:hidden}._radio-group__option_1khqv_21{cursor:pointer;display:flex;gap:1rem;padding:1rem}._radio-group__option_1khqv_21:not(:last-of-type){border-bottom:1px solid var(--color-grey-200)}._radio-group__option_1khqv_21:hover{background-color:var(--color-grey-100)}._radio-group__option--disabled_1khqv_36{cursor:default;pointer-events:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._text-area__wrapper_13ivw_1{display:flex;flex-direction:column;gap:.5rem}._text-area__header_13ivw_7{align-items:baseline;display:flex;justify-content:space-between}._text-area__label_13ivw_13{font-family:inherit;font-size:inherit;font-weight:var(--semibold);line-height:var(--line-height-s)}._text-area__word-count_13ivw_20{color:var(--color-grey-400);font-size:var(--font-size-text-non-essential)}._text-area__word-count--alert_13ivw_25{color:var(--color-red-500);font-weight:700}._text-area_13ivw_1{border-radius:.25rem;font-family:inherit;font-size:inherit;min-height:5.25rem;overflow:hidden;padding:.5rem;resize:none;white-space:pre-wrap;width:100%;word-wrap:break-word}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type Option = {
|
|
2
|
+
id: string;
|
|
3
|
+
titleLabel: string;
|
|
4
|
+
descriptionLabel?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
export interface RadioGroupProps {
|
|
8
|
+
/** The label of the radio group */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Radio options. */
|
|
11
|
+
options: Option[];
|
|
12
|
+
/** Returns selected values as string */
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
/** If true, the whole group will be disabled. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Represents a component for dispalying grouped styled radio buttons. */
|
|
18
|
+
export declare const RadioGroup: ({ label, options, onChange, disabled }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
|
+
import { c as m } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { RadioButton as k } from "../RadioButton/RadioButton.js";
|
|
5
|
+
import '../../assets/RadioGroup.css';const r = {
|
|
6
|
+
"radio-group__wrapper": "_radio-group__wrapper_1khqv_1",
|
|
7
|
+
"radio-group__header": "_radio-group__header_1khqv_7",
|
|
8
|
+
"radio-group": "_radio-group_1khqv_1",
|
|
9
|
+
"radio-group__option": "_radio-group__option_1khqv_21",
|
|
10
|
+
"radio-group__option--disabled": "_radio-group__option--disabled_1khqv_36"
|
|
11
|
+
}, x = ({ label: d, options: t, onChange: n, disabled: _ }) => {
|
|
12
|
+
const [s, c] = h(null), p = (o) => {
|
|
13
|
+
_ || (c(o), n(o));
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ u("div", { className: r["radio-group__wrapper"], children: [
|
|
16
|
+
/* @__PURE__ */ i("h2", { className: r["radio-group__header"], children: d }),
|
|
17
|
+
/* @__PURE__ */ i("div", { className: r["radio-group"], children: t.map(({ id: o, descriptionLabel: g, titleLabel: l, value: e }) => /* @__PURE__ */ i(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: m(r["radio-group__option"], {
|
|
21
|
+
[r["radio-group__option--disabled"]]: _
|
|
22
|
+
}),
|
|
23
|
+
onClick: () => p(e),
|
|
24
|
+
onKeyDown: (a) => {
|
|
25
|
+
(a.key === "Enter" || a.key === " ") && p(e);
|
|
26
|
+
},
|
|
27
|
+
role: "presentation",
|
|
28
|
+
children: /* @__PURE__ */ i(
|
|
29
|
+
k,
|
|
30
|
+
{
|
|
31
|
+
id: o,
|
|
32
|
+
label: l,
|
|
33
|
+
description: g,
|
|
34
|
+
name: d,
|
|
35
|
+
onChange: (a) => {
|
|
36
|
+
p(a.target.value);
|
|
37
|
+
},
|
|
38
|
+
value: e,
|
|
39
|
+
checked: s === e,
|
|
40
|
+
disabled: _,
|
|
41
|
+
gap: "large"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
o
|
|
46
|
+
)) })
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
x as RadioGroup
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './RadioGroup.module.css';\n\nimport { RadioButton } from 'components/RadioButton/RadioButton';\n\ntype Option = {\n id: string;\n titleLabel: string;\n descriptionLabel?: string;\n value: string;\n};\n\nexport interface RadioGroupProps {\n /** The label of the radio group */\n label: string;\n /** Radio options. */\n options: Option[];\n /** Returns selected values as string */\n onChange: (value: string) => void;\n /** If true, the whole group will be disabled. */\n disabled?: boolean;\n}\n\n/** Represents a component for dispalying grouped styled radio buttons. */\nexport const RadioGroup = ({ label, options, onChange, disabled }: RadioGroupProps) => {\n const [selectedValue, setSelectedValue] = useState<string | null>(null);\n\n const handleSelection = (value: string) => {\n if (!disabled) {\n setSelectedValue(value);\n onChange(value);\n }\n };\n\n return (\n <div className={styles['radio-group__wrapper']}>\n <h2 className={styles['radio-group__header']}>{label}</h2>\n <div className={styles['radio-group']}>\n {options.map(({ id, descriptionLabel, titleLabel, value }) => (\n <div\n className={clsx(styles['radio-group__option'], {\n [styles['radio-group__option--disabled']]: disabled,\n })}\n key={id}\n onClick={() => handleSelection(value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleSelection(value);\n }\n }}\n role=\"presentation\"\n >\n <RadioButton\n id={id}\n label={titleLabel}\n description={descriptionLabel}\n name={label}\n onChange={(event) => {\n handleSelection(event.target.value);\n }}\n value={value}\n checked={selectedValue === value}\n disabled={disabled}\n gap=\"large\"\n />\n </div>\n ))}\n </div>\n </div>\n );\n};\n"],"names":["RadioGroup","label","options","onChange","disabled","selectedValue","setSelectedValue","useState","handleSelection","value","jsxs","styles","jsx","id","descriptionLabel","titleLabel","clsx","event","RadioButton"],"mappings":";;;;;;;;;;GA0BaA,IAAa,CAAC,EAAE,OAAAC,GAAO,SAAAC,GAAS,UAAAC,GAAU,UAAAC,QAAgC;AACrF,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAwB,IAAI,GAEhEC,IAAkB,CAACC,MAAkB;AACzC,IAAKL,MACHE,EAAiBG,CAAK,GACtBN,EAASM,CAAK;AAAA,EAElB;AAEA,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,sBAAsB,GAC3C,UAAA;AAAA,IAAA,gBAAAC,EAAC,MAAG,EAAA,WAAWD,EAAO,qBAAqB,GAAI,UAAMV,GAAA;AAAA,IACpD,gBAAAW,EAAA,OAAA,EAAI,WAAWD,EAAO,aAAa,GACjC,UAAAT,EAAQ,IAAI,CAAC,EAAE,IAAAW,GAAI,kBAAAC,GAAkB,YAAAC,GAAY,OAAAN,QAChD,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWI,EAAKL,EAAO,qBAAqB,GAAG;AAAA,UAC7C,CAACA,EAAO,+BAA+B,CAAC,GAAGP;AAAA,QAAA,CAC5C;AAAA,QAED,SAAS,MAAMI,EAAgBC,CAAK;AAAA,QACpC,WAAW,CAACQ,MAAU;AACpB,WAAIA,EAAM,QAAQ,WAAWA,EAAM,QAAQ,QACzCT,EAAgBC,CAAK;AAAA,QAEzB;AAAA,QACA,MAAK;AAAA,QAEL,UAAA,gBAAAG;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,IAAAL;AAAA,YACA,OAAOE;AAAA,YACP,aAAaD;AAAA,YACb,MAAMb;AAAA,YACN,UAAU,CAACgB,MAAU;AACH,cAAAT,EAAAS,EAAM,OAAO,KAAK;AAAA,YACpC;AAAA,YACA,OAAAR;AAAA,YACA,SAASJ,MAAkBI;AAAA,YAC3B,UAAAL;AAAA,YACA,KAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MACN;AAAA,MArBKS;AAAA,IAAA,CAuBR,EACH,CAAA;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { RadioGroupProps } from './RadioGroup';
|
|
3
|
+
declare const _default: Meta<RadioGroupProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const RadioGroupExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RadioGroupProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { fn as a } from "../../index-DXR-TB1d.js";
|
|
3
|
+
import { RadioGroup as o } from "./RadioGroup.js";
|
|
4
|
+
const l = `
|
|
5
|
+
<RadioGroup label={label} options={options}
|
|
6
|
+
onChange={onChangeFunction} disabled={disabled} /> `, b = {
|
|
7
|
+
title: "Molecules/RadioGroup",
|
|
8
|
+
component: o,
|
|
9
|
+
argTypes: {
|
|
10
|
+
label: {
|
|
11
|
+
control: "text"
|
|
12
|
+
},
|
|
13
|
+
disabled: {
|
|
14
|
+
control: "boolean"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
inspectComponent: o,
|
|
19
|
+
codeString: l
|
|
20
|
+
}
|
|
21
|
+
}, n = [
|
|
22
|
+
{
|
|
23
|
+
id: "1",
|
|
24
|
+
titleLabel: "Option 1",
|
|
25
|
+
value: "option1"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "2",
|
|
29
|
+
titleLabel: "Option 2",
|
|
30
|
+
value: "option2"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "3",
|
|
34
|
+
titleLabel: "Option 3",
|
|
35
|
+
value: "option3"
|
|
36
|
+
}
|
|
37
|
+
], i = (e) => /* @__PURE__ */ t(o, { ...e }), p = i.bind({});
|
|
38
|
+
p.args = {
|
|
39
|
+
disabled: !1,
|
|
40
|
+
label: "Sample label",
|
|
41
|
+
options: n,
|
|
42
|
+
onChange: a()
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
p as RadioGroupExample,
|
|
46
|
+
b as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=RadioGroup.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.stories.js","sources":["../../../src/components/RadioGroup/RadioGroup.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { RadioGroupProps } from './RadioGroup';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst codeString = `\n <RadioGroup label={label} options={options} \n onChange={onChangeFunction} disabled={disabled} /> `;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/RadioGroup',\n component: RadioGroup,\n argTypes: {\n label: {\n control: 'text',\n },\n disabled: {\n control: 'boolean',\n },\n },\n parameters: {\n inspectComponent: RadioGroup,\n codeString: codeString,\n },\n} as Meta<RadioGroupProps>;\n\nconst mockData = [\n {\n id: '1',\n titleLabel: 'Option 1',\n value: 'option1',\n },\n {\n id: '2',\n titleLabel: 'Option 2',\n value: 'option2',\n },\n {\n id: '3',\n titleLabel: 'Option 3',\n value: 'option3',\n },\n];\n\nconst Template: StoryFn<RadioGroupProps> = (args) => <RadioGroup {...args} />;\n\nexport const RadioGroupExample = Template.bind({});\nRadioGroupExample.args = {\n disabled: false,\n label: 'Sample label',\n options: mockData,\n onChange: fn(),\n};\n"],"names":["codeString","RadioGroup_stories","RadioGroup","mockData","Template","args","jsx","RadioGroupExample","fn"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA,0DAKJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAW;AAAA,EACf;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,EAAA;AAEX,GAEMC,IAAqC,CAACC,MAAU,gBAAAC,EAAAJ,GAAA,EAAY,GAAGG,GAAM,GAE9DE,IAAoBH,EAAS,KAAK,CAAE,CAAA;AACjDG,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAASJ;AAAA,EACT,UAAUK,EAAG;AACf;"}
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r as l, s as t, f as s } from "../../react.esm-B8teOYlo.js";
|
|
4
|
+
import { RadioGroup as a } from "./RadioGroup.js";
|
|
5
|
+
const i = [
|
|
6
|
+
{ id: "1", titleLabel: "Option 1", value: "option1" },
|
|
7
|
+
{ id: "2", titleLabel: "Option 2", value: "option2" }
|
|
8
|
+
];
|
|
9
|
+
describe("RadioGroup", () => {
|
|
10
|
+
it("should render correctly", () => {
|
|
11
|
+
l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: jest.fn() })), expect(t.getByText("Test Label")).toBeInTheDocument(), expect(t.getByText("Option 1")).toBeInTheDocument(), expect(t.getByText("Option 2")).toBeInTheDocument();
|
|
12
|
+
}), it("should call onChange when an option is selected", () => {
|
|
13
|
+
const e = jest.fn();
|
|
14
|
+
l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: e }));
|
|
15
|
+
const o = t.getByLabelText("Option 1");
|
|
16
|
+
s.click(o), expect(e).toHaveBeenCalledWith("option1");
|
|
17
|
+
}), it("should not allow selection when disabled", () => {
|
|
18
|
+
const e = jest.fn();
|
|
19
|
+
l(/* @__PURE__ */ n(a, { label: "Test Label", options: i, onChange: e, disabled: !0 }));
|
|
20
|
+
const o = t.getByLabelText("Option 1");
|
|
21
|
+
s.click(o), expect(e).not.toHaveBeenCalled();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=Radiogroup.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radiogroup.test.js","sources":["../../../src/components/RadioGroup/Radiogroup.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\n\nimport { RadioGroup } from './RadioGroup';\n\nconst options = [\n { id: '1', titleLabel: 'Option 1', value: 'option1' },\n { id: '2', titleLabel: 'Option 2', value: 'option2' },\n];\n\ndescribe('RadioGroup', () => {\n it('should render correctly', () => {\n render(<RadioGroup label=\"Test Label\" options={options} onChange={jest.fn()} />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n expect(screen.getByText('Option 1')).toBeInTheDocument();\n expect(screen.getByText('Option 2')).toBeInTheDocument();\n });\n\n it('should call onChange when an option is selected', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).toHaveBeenCalledWith('option1');\n });\n\n it('should not allow selection when disabled', () => {\n const handleChange = jest.fn();\n render(<RadioGroup label=\"Test Label\" options={options} onChange={handleChange} disabled />);\n\n const option1 = screen.getByLabelText('Option 1');\n fireEvent.click(option1);\n expect(handleChange).not.toHaveBeenCalled();\n });\n});\n"],"names":["options","render","jsx","RadioGroup","screen","handleChange","option1","fireEvent"],"mappings":";;;;AAKA,MAAMA,IAAU;AAAA,EACd,EAAE,IAAI,KAAK,YAAY,YAAY,OAAO,UAAU;AAAA,EACpD,EAAE,IAAI,KAAK,YAAY,YAAY,OAAO,UAAU;AACtD;AAEA,SAAS,cAAc,MAAM;AAC3B,KAAG,2BAA2B,MAAM;AAC3B,IAAAC,EAAA,gBAAAC,EAACC,KAAW,OAAM,cAAa,SAAAH,GAAkB,UAAU,KAAK,GAAG,EAAG,CAAA,CAAE,GAC/E,OAAOI,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAkB,GACzD,OAAOA,EAAO,UAAU,UAAU,CAAC,EAAE,kBAAkB,GACvD,OAAOA,EAAO,UAAU,UAAU,CAAC,EAAE,kBAAkB;AAAA,EAAA,CACxD,GAED,GAAG,mDAAmD,MAAM;AACpD,UAAAC,IAAe,KAAK,GAAG;AAC7B,IAAAJ,oBAAQE,GAAW,EAAA,OAAM,cAAa,SAAAH,GAAkB,UAAUK,GAAc,CAAE;AAE5E,UAAAC,IAAUF,EAAO,eAAe,UAAU;AAChD,IAAAG,EAAU,MAAMD,CAAO,GAChB,OAAAD,CAAY,EAAE,qBAAqB,SAAS;AAAA,EAAA,CACpD,GAED,GAAG,4CAA4C,MAAM;AAC7C,UAAAA,IAAe,KAAK,GAAG;AACtB,IAAAJ,EAAA,gBAAAC,EAACC,KAAW,OAAM,cAAa,SAAAH,GAAkB,UAAUK,GAAc,UAAQ,GAAC,CAAA,CAAE;AAErF,UAAAC,IAAUF,EAAO,eAAe,UAAU;AAChD,IAAAG,EAAU,MAAMD,CAAO,GAChB,OAAAD,CAAY,EAAE,IAAI,iBAAiB;AAAA,EAAA,CAC3C;AACH,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RadioGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TextAreaProps {
|
|
2
|
+
/** Returns entered values as trimmed string */
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
/** The label for the text area */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** The max amount of allowed charecters in the text area */
|
|
7
|
+
maxCharacters?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function TextArea({ onChange, label, maxCharacters }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs as r, jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useState as i } from "react";
|
|
3
|
+
import { c as x } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import '../../assets/TextArea.css';const t = {
|
|
5
|
+
"text-area__wrapper": "_text-area__wrapper_13ivw_1",
|
|
6
|
+
"text-area__header": "_text-area__header_13ivw_7",
|
|
7
|
+
"text-area__label": "_text-area__label_13ivw_13",
|
|
8
|
+
"text-area__word-count": "_text-area__word-count_13ivw_20",
|
|
9
|
+
"text-area__word-count--alert": "_text-area__word-count--alert_13ivw_25",
|
|
10
|
+
"text-area": "_text-area_13ivw_1"
|
|
11
|
+
};
|
|
12
|
+
function h({ onChange: l, label: c, maxCharacters: a = 0 }) {
|
|
13
|
+
const e = u(null), [n, o] = i(0), s = () => {
|
|
14
|
+
e.current && (e.current.style.height = "auto", e.current.style.height = `${e.current.scrollHeight}px`, o(e.current.value.length), l(e.current.value.trim()));
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ r("div", { className: t["text-area__wrapper"], children: [
|
|
17
|
+
/* @__PURE__ */ r("div", { className: t["text-area__header"], children: [
|
|
18
|
+
/* @__PURE__ */ _("span", { className: t["text-area__label"], children: c }),
|
|
19
|
+
a > 0 && /* @__PURE__ */ r("div", { className: t["text-area__word-count"], children: [
|
|
20
|
+
/* @__PURE__ */ _("span", { className: x({ [t["text-area__word-count--alert"]]: n === a }), children: n }),
|
|
21
|
+
" / ",
|
|
22
|
+
a
|
|
23
|
+
] })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ _(
|
|
26
|
+
"textarea",
|
|
27
|
+
{
|
|
28
|
+
ref: e,
|
|
29
|
+
className: t["text-area"],
|
|
30
|
+
maxLength: a > 0 ? a : void 0,
|
|
31
|
+
onInput: s
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
h as TextArea
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './TextArea.module.css';\n\nexport interface TextAreaProps {\n /** Returns entered values as trimmed string */\n onChange: (value: string) => void;\n /** The label for the text area */\n label?: string;\n /** The max amount of allowed charecters in the text area */\n maxCharacters?: number;\n}\n\nexport function TextArea({ onChange, label, maxCharacters = 0 }: TextAreaProps) {\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n const [characterCount, setCharacterCount] = useState(0);\n\n const handleInput = () => {\n if (textAreaRef.current) {\n textAreaRef.current.style.height = 'auto';\n textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`;\n\n setCharacterCount(textAreaRef.current.value.length);\n onChange(textAreaRef.current.value.trim());\n }\n };\n\n return (\n <div className={styles['text-area__wrapper']}>\n <div className={styles['text-area__header']}>\n <span className={styles['text-area__label']}>{label}</span>\n {maxCharacters > 0 && (\n <div className={styles['text-area__word-count']}>\n <span className={clsx({ [styles['text-area__word-count--alert']]: characterCount === maxCharacters })}>\n {characterCount}\n </span>\n / {maxCharacters}\n </div>\n )}\n </div>\n\n <textarea\n ref={textAreaRef}\n className={styles['text-area']}\n maxLength={maxCharacters > 0 ? maxCharacters : undefined}\n onInput={handleInput}\n />\n </div>\n );\n}\n"],"names":["TextArea","onChange","label","maxCharacters","textAreaRef","useRef","characterCount","setCharacterCount","useState","handleInput","jsxs","styles","jsx","clsx"],"mappings":";;;;;;;;;;;AAcO,SAASA,EAAS,EAAE,UAAAC,GAAU,OAAAC,GAAO,eAAAC,IAAgB,KAAoB;AACxE,QAAAC,IAAcC,EAA4B,IAAI,GAC9C,CAACC,GAAgBC,CAAiB,IAAIC,EAAS,CAAC,GAEhDC,IAAc,MAAM;AACxB,IAAIL,EAAY,YACFA,EAAA,QAAQ,MAAM,SAAS,QACnCA,EAAY,QAAQ,MAAM,SAAS,GAAGA,EAAY,QAAQ,YAAY,MAEpDG,EAAAH,EAAY,QAAQ,MAAM,MAAM,GAClDH,EAASG,EAAY,QAAQ,MAAM,KAAA,CAAM;AAAA,EAE7C;AAEA,SACG,gBAAAM,EAAA,OAAA,EAAI,WAAWC,EAAO,oBAAoB,GACzC,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAI,EAAA,WAAWC,EAAO,mBAAmB,GACxC,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWD,EAAO,kBAAkB,GAAI,UAAMT,GAAA;AAAA,MACnDC,IAAgB,KACf,gBAAAO,EAAC,SAAI,WAAWC,EAAO,uBAAuB,GAC5C,UAAA;AAAA,QAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWC,EAAK,EAAE,CAACF,EAAO,8BAA8B,CAAC,GAAGL,MAAmBH,EAAc,CAAC,GACjG,UACHG,EAAA,CAAA;AAAA,QAAO;AAAA,QACOH;AAAA,MAAA,EAChB,CAAA;AAAA,IAAA,GAEJ;AAAA,IAEA,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKR;AAAA,QACL,WAAWO,EAAO,WAAW;AAAA,QAC7B,WAAWR,IAAgB,IAAIA,IAAgB;AAAA,QAC/C,SAASM;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GACF;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { TextAreaProps } from './TextArea';
|
|
3
|
+
declare const _default: Meta<TextAreaProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextAreaExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, TextAreaProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { fn as r } from "../../index-DXR-TB1d.js";
|
|
3
|
+
import { TextArea as e } from "./TextArea.js";
|
|
4
|
+
const o = `
|
|
5
|
+
<TextArea label={label} maxCharacters={maxCharacters} /> `, x = {
|
|
6
|
+
title: "Atoms/TextArea",
|
|
7
|
+
component: e,
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
control: "text"
|
|
11
|
+
},
|
|
12
|
+
maxCharacters: {
|
|
13
|
+
control: "number"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
inspectComponent: e,
|
|
18
|
+
codeString: o
|
|
19
|
+
}
|
|
20
|
+
}, m = (a) => /* @__PURE__ */ t(e, { ...a }), n = m.bind({});
|
|
21
|
+
n.args = {
|
|
22
|
+
label: "Sample label",
|
|
23
|
+
maxCharacters: 140,
|
|
24
|
+
onChange: r()
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
n as TextAreaExample,
|
|
28
|
+
x as default
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=TextArea.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.stories.js","sources":["../../../src/components/TextArea/TextArea.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { TextAreaProps } from './TextArea';\n\nimport { TextArea } from './TextArea';\n\nconst codeString = `\n <TextArea label={label} maxCharacters={maxCharacters} /> `;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/TextArea',\n component: TextArea,\n argTypes: {\n label: {\n control: 'text',\n },\n maxCharacters: {\n control: 'number',\n },\n },\n parameters: {\n inspectComponent: TextArea,\n codeString: codeString,\n },\n} as Meta<TextAreaProps>;\n\nconst Template: StoryFn<TextAreaProps> = (args) => <TextArea {...args} />;\n\nexport const TextAreaExample = Template.bind({});\nTextAreaExample.args = {\n label: 'Sample label',\n maxCharacters: 140,\n onChange: fn(),\n};\n"],"names":["codeString","TextArea_stories","TextArea","Template","args","jsx","TextAreaExample","fn"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA,8DAIJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,SAAS;AAAA,IAAA;AAAA,EAEb;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAmC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAU,GAAGE,GAAM,GAE1DE,IAAkBH,EAAS,KAAK,CAAE,CAAA;AAC/CG,EAAgB,OAAO;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAUC,EAAG;AACf;"}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-Z7qwJmRM.js";
|
|
3
|
+
import { r as n, s as t, f as r } from "../../react.esm-B8teOYlo.js";
|
|
4
|
+
import { userEvent as s } from "../../index-DXR-TB1d.js";
|
|
5
|
+
import { TextArea as o } from "./TextArea.js";
|
|
6
|
+
describe("TextArea", () => {
|
|
7
|
+
it("should render correctly with label", () => {
|
|
8
|
+
n(/* @__PURE__ */ a(o, { onChange: jest.fn(), label: "Test Label" })), expect(t.getByText("Test Label")).toBeInTheDocument();
|
|
9
|
+
}), it("should call onChange when text is entered", () => {
|
|
10
|
+
const e = jest.fn();
|
|
11
|
+
n(/* @__PURE__ */ a(o, { onChange: e }));
|
|
12
|
+
const l = t.getByRole("textbox");
|
|
13
|
+
r.input(l, { target: { value: "Hello" } }), expect(e).toHaveBeenCalledWith("Hello");
|
|
14
|
+
}), it("should update character count", () => {
|
|
15
|
+
n(/* @__PURE__ */ a(o, { onChange: jest.fn(), label: "Test", maxCharacters: 10 }));
|
|
16
|
+
const e = t.getByRole("textbox");
|
|
17
|
+
r.input(e, { target: { value: "Test" } }), expect(t.getByText("4")).toBeInTheDocument(), expect(t.getByText("/ 10")).toBeInTheDocument();
|
|
18
|
+
}), it("should not exceed max characters limit", async () => {
|
|
19
|
+
const e = jest.fn();
|
|
20
|
+
n(/* @__PURE__ */ a(o, { onChange: e, maxCharacters: 5 }));
|
|
21
|
+
const l = t.getByRole("textbox");
|
|
22
|
+
await s.type(l, "ExceedsLimit"), expect(e).toHaveBeenCalled(), expect(e.mock.calls[e.mock.calls.length - 1][0].length).toBe(5);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=TextArea.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.test.js","sources":["../../../src/components/TextArea/TextArea.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\nimport { render, screen, fireEvent } from '@testing-library/react';\nimport { userEvent } from '@storybook/test';\n\nimport { TextArea } from './TextArea';\n\ndescribe('TextArea', () => {\n it('should render correctly with label', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test Label\" />);\n expect(screen.getByText('Test Label')).toBeInTheDocument();\n });\n\n it('should call onChange when text is entered', () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Hello' } });\n expect(handleChange).toHaveBeenCalledWith('Hello');\n });\n\n it('should update character count', () => {\n render(<TextArea onChange={jest.fn()} label=\"Test\" maxCharacters={10} />);\n\n const textarea = screen.getByRole('textbox');\n fireEvent.input(textarea, { target: { value: 'Test' } });\n\n expect(screen.getByText('4')).toBeInTheDocument();\n expect(screen.getByText('/ 10')).toBeInTheDocument();\n });\n\n it('should not exceed max characters limit', async () => {\n const handleChange = jest.fn();\n render(<TextArea onChange={handleChange} maxCharacters={5} />);\n\n const textarea = screen.getByRole('textbox');\n\n await userEvent.type(textarea, 'ExceedsLimit');\n\n expect(handleChange).toHaveBeenCalled();\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n expect(handleChange.mock.calls[handleChange.mock.calls.length - 1][0].length).toBe(5);\n });\n});\n"],"names":["render","jsx","TextArea","screen","handleChange","textarea","fireEvent","userEvent"],"mappings":";;;;;AAMA,SAAS,YAAY,MAAM;AACzB,KAAG,sCAAsC,MAAM;AACtC,IAAAA,EAAA,gBAAAC,EAACC,KAAS,UAAU,KAAK,MAAM,OAAM,cAAa,CAAE,GAC3D,OAAOC,EAAO,UAAU,YAAY,CAAC,EAAE,kBAAkB;AAAA,EAAA,CAC1D,GAED,GAAG,6CAA6C,MAAM;AAC9C,UAAAC,IAAe,KAAK,GAAG;AAC7B,IAAAJ,EAAQ,gBAAAC,EAAAC,GAAA,EAAS,UAAUE,EAAc,CAAA,CAAE;AAErC,UAAAC,IAAWF,EAAO,UAAU,SAAS;AACjC,IAAAG,EAAA,MAAMD,GAAU,EAAE,QAAQ,EAAE,OAAO,QAAA,GAAW,GACjD,OAAAD,CAAY,EAAE,qBAAqB,OAAO;AAAA,EAAA,CAClD,GAED,GAAG,iCAAiC,MAAM;AACjC,IAAAJ,EAAA,gBAAAC,EAACC,GAAS,EAAA,UAAU,KAAK,MAAM,OAAM,QAAO,eAAe,GAAI,CAAA,CAAE;AAElE,UAAAG,IAAWF,EAAO,UAAU,SAAS;AACjC,IAAAG,EAAA,MAAMD,GAAU,EAAE,QAAQ,EAAE,OAAO,OAAA,GAAU,GAEvD,OAAOF,EAAO,UAAU,GAAG,CAAC,EAAE,kBAAkB,GAChD,OAAOA,EAAO,UAAU,MAAM,CAAC,EAAE,kBAAkB;AAAA,EAAA,CACpD,GAED,GAAG,0CAA0C,YAAY;AACjD,UAAAC,IAAe,KAAK,GAAG;AAC7B,IAAAJ,oBAAQE,GAAS,EAAA,UAAUE,GAAc,eAAe,GAAG,CAAE;AAEvD,UAAAC,IAAWF,EAAO,UAAU,SAAS;AAErC,UAAAI,EAAU,KAAKF,GAAU,cAAc,GAEtC,OAAAD,CAAY,EAAE,iBAAiB,GAEtC,OAAOA,EAAa,KAAK,MAAMA,EAAa,KAAK,MAAM,SAAS,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC;AAAA,EAAA,CACrF;AACH,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextArea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -39,6 +39,7 @@ export * from './Periods';
|
|
|
39
39
|
export * from './PeriodSelector';
|
|
40
40
|
export * from './ProgrammeCard';
|
|
41
41
|
export * from './RadioButton';
|
|
42
|
+
export * from './RadioGroup';
|
|
42
43
|
export * from './Repeater';
|
|
43
44
|
export * from './RteEditor';
|
|
44
45
|
export * from './SectionNotification';
|
|
@@ -48,6 +49,7 @@ export * from './Sortable';
|
|
|
48
49
|
export * from './Spinner';
|
|
49
50
|
export * from './StatusBadge';
|
|
50
51
|
export * from './StatusPill';
|
|
52
|
+
export * from './TextArea';
|
|
51
53
|
export * from './Timeline';
|
|
52
54
|
export * from './ToggleSwitch';
|
|
53
55
|
export * from './Tooltip';
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accordion as t } from "./Accordion/Accordion.js";
|
|
2
2
|
import { AccordionCard as p } from "./AccordionCard/AccordionCard.js";
|
|
3
|
-
import { ActionList as
|
|
3
|
+
import { ActionList as m } from "./ActionList/ActionList.js";
|
|
4
4
|
import { AppStatusBar as a } from "./AppStatusBar/AppStatusBar.js";
|
|
5
5
|
import { Attention as n } from "./Attention/Attention.js";
|
|
6
6
|
import { Backdrop as c } from "./Backdrop/Backdrop.js";
|
|
@@ -11,11 +11,11 @@ import { MenuButton as C } from "./Buttons/MenuButton.js";
|
|
|
11
11
|
import { Card as g } from "./Card/Card.js";
|
|
12
12
|
import { Checkbox as L } from "./Checkbox/Checkbox.js";
|
|
13
13
|
import { CheckboxButton as h } from "./CheckboxButton/CheckboxButton.js";
|
|
14
|
-
import { CheckboxButtonBar as
|
|
15
|
-
import { CheckboxTree as
|
|
16
|
-
import { Chip as
|
|
14
|
+
import { CheckboxButtonBar as P } from "./CheckboxButtonBar/CheckboxButtonBar.js";
|
|
15
|
+
import { CheckboxTree as y } from "./CheckboxTree/CheckboxTree.js";
|
|
16
|
+
import { Chip as T } from "./Chip/Chip.js";
|
|
17
17
|
import { Drawer as w } from "./Drawer/Drawer.js";
|
|
18
|
-
import { EmptyStateDataDisplay as
|
|
18
|
+
import { EmptyStateDataDisplay as O } from "./EmptyStateDataDisplay/EmptyStateDataDisplay.js";
|
|
19
19
|
import { FeedbackBar as H } from "./FeedbackBar/FeedbackBar.js";
|
|
20
20
|
import { FeedbackBox as N } from "./FeedbackBox/FeedbackBox.js";
|
|
21
21
|
import { FieldHint as j } from "./FieldHint/FieldHint.js";
|
|
@@ -27,7 +27,7 @@ import { HorizontalList as _ } from "./HorizontalList/HorizontalList.js";
|
|
|
27
27
|
import { Icon as oo } from "./Icon/Icon.js";
|
|
28
28
|
import { IconButton as to } from "./IconButton/IconButton.js";
|
|
29
29
|
import { InfoMessage as po } from "./InfoMessage/InfoMessage.js";
|
|
30
|
-
import { Input as
|
|
30
|
+
import { Input as mo } from "./Input/Input.js";
|
|
31
31
|
import { InputField as ao } from "./InputField/InputField.js";
|
|
32
32
|
import { Label as no } from "./Label/Label.js";
|
|
33
33
|
import { MenuLink as co } from "./MenuLink/MenuLink.js";
|
|
@@ -37,27 +37,29 @@ import { M as ko } from "../TablePlugin-MjKuocl4.js";
|
|
|
37
37
|
import { OverlayCloseButton as Fo } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
38
38
|
import { OverlayStepBar as Io } from "./OverlayStepBar/OverlayStepBar.js";
|
|
39
39
|
import { PageOverlay as Mo } from "./PageOverlay/PageOverlay.js";
|
|
40
|
-
import { Periods as
|
|
41
|
-
import { PeriodSelector as
|
|
42
|
-
import { ProgrammeCard as
|
|
43
|
-
import { RadioButton as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
40
|
+
import { Periods as Ao } from "./Periods/Periods.js";
|
|
41
|
+
import { PeriodSelector as Ro } from "./PeriodSelector/PeriodSelector.js";
|
|
42
|
+
import { ProgrammeCard as Do } from "./ProgrammeCard/ProgrammeCard.js";
|
|
43
|
+
import { RadioButton as vo } from "./RadioButton/RadioButton.js";
|
|
44
|
+
import { RadioGroup as Go } from "./RadioGroup/RadioGroup.js";
|
|
45
|
+
import { Repeater as Eo } from "./Repeater/Repeater.js";
|
|
46
|
+
import { Rte as zo, RteEditor as No } from "./RteEditor/RteEditor.js";
|
|
47
|
+
import { SectionNotification as jo } from "./SectionNotification/SectionNotification.js";
|
|
48
|
+
import { SelectListbox as Jo } from "./SelectListbox/SelectListbox.js";
|
|
49
|
+
import { SelectProvider as Qo, useSelect as Uo } from "./SelectListbox/SelectProvider.js";
|
|
50
|
+
import { Sortable as Xo } from "./Sortable/Sortable.js";
|
|
51
|
+
import { Spinner as Zo } from "./Spinner/Spinner.js";
|
|
52
|
+
import { StatusBadge as $o } from "./StatusBadge/StatusBage.js";
|
|
53
|
+
import { StatusPill as rr } from "./StatusPill/StatusPill.js";
|
|
54
|
+
import { TextArea as er } from "./TextArea/TextArea.js";
|
|
55
|
+
import { Timeline as xr } from "./Timeline/Timeline.js";
|
|
56
|
+
import { ToggleSwitch as fr } from "./ToggleSwitch/ToggleSwitch.js";
|
|
57
|
+
import { Tooltip as ir } from "./Tooltip/Tooltip.js";
|
|
58
|
+
import { VarIndicator as lr } from "./VarIndicator/VarIndicator.js";
|
|
57
59
|
export {
|
|
58
60
|
t as Accordion,
|
|
59
61
|
p as AccordionCard,
|
|
60
|
-
|
|
62
|
+
m as ActionList,
|
|
61
63
|
a as AppStatusBar,
|
|
62
64
|
n as Attention,
|
|
63
65
|
c as Backdrop,
|
|
@@ -66,11 +68,11 @@ export {
|
|
|
66
68
|
g as Card,
|
|
67
69
|
L as Checkbox,
|
|
68
70
|
h as CheckboxButton,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
P as CheckboxButtonBar,
|
|
72
|
+
y as CheckboxTree,
|
|
73
|
+
T as Chip,
|
|
72
74
|
w as Drawer,
|
|
73
|
-
|
|
75
|
+
O as EmptyStateDataDisplay,
|
|
74
76
|
H as FeedbackBar,
|
|
75
77
|
N as FeedbackBox,
|
|
76
78
|
j as FieldHint,
|
|
@@ -82,7 +84,7 @@ export {
|
|
|
82
84
|
oo as Icon,
|
|
83
85
|
to as IconButton,
|
|
84
86
|
po as InfoMessage,
|
|
85
|
-
|
|
87
|
+
mo as Input,
|
|
86
88
|
ao as InputField,
|
|
87
89
|
no as Label,
|
|
88
90
|
b as LinkButton,
|
|
@@ -94,24 +96,26 @@ export {
|
|
|
94
96
|
Fo as OverlayCloseButton,
|
|
95
97
|
Io as OverlayStepBar,
|
|
96
98
|
Mo as PageOverlay,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
No as
|
|
105
|
-
jo as
|
|
106
|
-
Jo as
|
|
107
|
-
|
|
108
|
-
Xo as
|
|
109
|
-
Zo as
|
|
110
|
-
$o as
|
|
111
|
-
rr as
|
|
112
|
-
er as
|
|
113
|
-
|
|
114
|
-
fr as
|
|
115
|
-
|
|
99
|
+
Ro as PeriodSelector,
|
|
100
|
+
Ao as Periods,
|
|
101
|
+
Do as ProgrammeCard,
|
|
102
|
+
vo as RadioButton,
|
|
103
|
+
Go as RadioGroup,
|
|
104
|
+
Eo as Repeater,
|
|
105
|
+
zo as Rte,
|
|
106
|
+
No as RteEditor,
|
|
107
|
+
jo as SectionNotification,
|
|
108
|
+
Jo as SelectListbox,
|
|
109
|
+
Qo as SelectProvider,
|
|
110
|
+
Xo as Sortable,
|
|
111
|
+
Zo as Spinner,
|
|
112
|
+
$o as StatusBadge,
|
|
113
|
+
rr as StatusPill,
|
|
114
|
+
er as TextArea,
|
|
115
|
+
xr as Timeline,
|
|
116
|
+
fr as ToggleSwitch,
|
|
117
|
+
ir as Tooltip,
|
|
118
|
+
lr as VarIndicator,
|
|
119
|
+
Uo as useSelect
|
|
116
120
|
};
|
|
117
121
|
//# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accordion as t } from "./components/Accordion/Accordion.js";
|
|
2
2
|
import { AccordionCard as p } from "./components/AccordionCard/AccordionCard.js";
|
|
3
|
-
import { ActionList as
|
|
3
|
+
import { ActionList as m } from "./components/ActionList/ActionList.js";
|
|
4
4
|
import { AppStatusBar as a } from "./components/AppStatusBar/AppStatusBar.js";
|
|
5
5
|
import { Attention as n } from "./components/Attention/Attention.js";
|
|
6
6
|
import { Backdrop as c } from "./components/Backdrop/Backdrop.js";
|
|
@@ -11,11 +11,11 @@ import { MenuButton as C } from "./components/Buttons/MenuButton.js";
|
|
|
11
11
|
import { Card as g } from "./components/Card/Card.js";
|
|
12
12
|
import { Checkbox as L } from "./components/Checkbox/Checkbox.js";
|
|
13
13
|
import { CheckboxButton as h } from "./components/CheckboxButton/CheckboxButton.js";
|
|
14
|
-
import { CheckboxButtonBar as
|
|
15
|
-
import { CheckboxTree as
|
|
16
|
-
import { Chip as
|
|
14
|
+
import { CheckboxButtonBar as P } from "./components/CheckboxButtonBar/CheckboxButtonBar.js";
|
|
15
|
+
import { CheckboxTree as y } from "./components/CheckboxTree/CheckboxTree.js";
|
|
16
|
+
import { Chip as T } from "./components/Chip/Chip.js";
|
|
17
17
|
import { Drawer as w } from "./components/Drawer/Drawer.js";
|
|
18
|
-
import { EmptyStateDataDisplay as
|
|
18
|
+
import { EmptyStateDataDisplay as O } from "./components/EmptyStateDataDisplay/EmptyStateDataDisplay.js";
|
|
19
19
|
import { FeedbackBar as H } from "./components/FeedbackBar/FeedbackBar.js";
|
|
20
20
|
import { FeedbackBox as N } from "./components/FeedbackBox/FeedbackBox.js";
|
|
21
21
|
import { FieldHint as j } from "./components/FieldHint/FieldHint.js";
|
|
@@ -27,7 +27,7 @@ import { HorizontalList as _ } from "./components/HorizontalList/HorizontalList.
|
|
|
27
27
|
import { Icon as oo } from "./components/Icon/Icon.js";
|
|
28
28
|
import { IconButton as to } from "./components/IconButton/IconButton.js";
|
|
29
29
|
import { InfoMessage as po } from "./components/InfoMessage/InfoMessage.js";
|
|
30
|
-
import { Input as
|
|
30
|
+
import { Input as mo } from "./components/Input/Input.js";
|
|
31
31
|
import { InputField as ao } from "./components/InputField/InputField.js";
|
|
32
32
|
import { Label as no } from "./components/Label/Label.js";
|
|
33
33
|
import { MenuLink as co } from "./components/MenuLink/MenuLink.js";
|
|
@@ -37,27 +37,29 @@ import { M as ko } from "./TablePlugin-MjKuocl4.js";
|
|
|
37
37
|
import { OverlayCloseButton as Fo } from "./components/OverlayCloseButton/OverlayCloseButton.js";
|
|
38
38
|
import { OverlayStepBar as Io } from "./components/OverlayStepBar/OverlayStepBar.js";
|
|
39
39
|
import { PageOverlay as Mo } from "./components/PageOverlay/PageOverlay.js";
|
|
40
|
-
import { Periods as
|
|
41
|
-
import { PeriodSelector as
|
|
42
|
-
import { ProgrammeCard as
|
|
43
|
-
import { RadioButton as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
40
|
+
import { Periods as Ao } from "./components/Periods/Periods.js";
|
|
41
|
+
import { PeriodSelector as Ro } from "./components/PeriodSelector/PeriodSelector.js";
|
|
42
|
+
import { ProgrammeCard as Do } from "./components/ProgrammeCard/ProgrammeCard.js";
|
|
43
|
+
import { RadioButton as vo } from "./components/RadioButton/RadioButton.js";
|
|
44
|
+
import { RadioGroup as Go } from "./components/RadioGroup/RadioGroup.js";
|
|
45
|
+
import { Repeater as Eo } from "./components/Repeater/Repeater.js";
|
|
46
|
+
import { Rte as zo, RteEditor as No } from "./components/RteEditor/RteEditor.js";
|
|
47
|
+
import { SectionNotification as jo } from "./components/SectionNotification/SectionNotification.js";
|
|
48
|
+
import { SelectListbox as Jo } from "./components/SelectListbox/SelectListbox.js";
|
|
49
|
+
import { SelectProvider as Qo, useSelect as Uo } from "./components/SelectListbox/SelectProvider.js";
|
|
50
|
+
import { Sortable as Xo } from "./components/Sortable/Sortable.js";
|
|
51
|
+
import { Spinner as Zo } from "./components/Spinner/Spinner.js";
|
|
52
|
+
import { StatusBadge as $o } from "./components/StatusBadge/StatusBage.js";
|
|
53
|
+
import { StatusPill as rr } from "./components/StatusPill/StatusPill.js";
|
|
54
|
+
import { TextArea as er } from "./components/TextArea/TextArea.js";
|
|
55
|
+
import { Timeline as xr } from "./components/Timeline/Timeline.js";
|
|
56
|
+
import { ToggleSwitch as fr } from "./components/ToggleSwitch/ToggleSwitch.js";
|
|
57
|
+
import { Tooltip as ir } from "./components/Tooltip/Tooltip.js";
|
|
58
|
+
import { VarIndicator as lr } from "./components/VarIndicator/VarIndicator.js";
|
|
57
59
|
export {
|
|
58
60
|
t as Accordion,
|
|
59
61
|
p as AccordionCard,
|
|
60
|
-
|
|
62
|
+
m as ActionList,
|
|
61
63
|
a as AppStatusBar,
|
|
62
64
|
n as Attention,
|
|
63
65
|
c as Backdrop,
|
|
@@ -66,11 +68,11 @@ export {
|
|
|
66
68
|
g as Card,
|
|
67
69
|
L as Checkbox,
|
|
68
70
|
h as CheckboxButton,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
P as CheckboxButtonBar,
|
|
72
|
+
y as CheckboxTree,
|
|
73
|
+
T as Chip,
|
|
72
74
|
w as Drawer,
|
|
73
|
-
|
|
75
|
+
O as EmptyStateDataDisplay,
|
|
74
76
|
H as FeedbackBar,
|
|
75
77
|
N as FeedbackBox,
|
|
76
78
|
j as FieldHint,
|
|
@@ -82,7 +84,7 @@ export {
|
|
|
82
84
|
oo as Icon,
|
|
83
85
|
to as IconButton,
|
|
84
86
|
po as InfoMessage,
|
|
85
|
-
|
|
87
|
+
mo as Input,
|
|
86
88
|
ao as InputField,
|
|
87
89
|
no as Label,
|
|
88
90
|
b as LinkButton,
|
|
@@ -94,24 +96,26 @@ export {
|
|
|
94
96
|
Fo as OverlayCloseButton,
|
|
95
97
|
Io as OverlayStepBar,
|
|
96
98
|
Mo as PageOverlay,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
No as
|
|
105
|
-
jo as
|
|
106
|
-
Jo as
|
|
107
|
-
|
|
108
|
-
Xo as
|
|
109
|
-
Zo as
|
|
110
|
-
$o as
|
|
111
|
-
rr as
|
|
112
|
-
er as
|
|
113
|
-
|
|
114
|
-
fr as
|
|
115
|
-
|
|
99
|
+
Ro as PeriodSelector,
|
|
100
|
+
Ao as Periods,
|
|
101
|
+
Do as ProgrammeCard,
|
|
102
|
+
vo as RadioButton,
|
|
103
|
+
Go as RadioGroup,
|
|
104
|
+
Eo as Repeater,
|
|
105
|
+
zo as Rte,
|
|
106
|
+
No as RteEditor,
|
|
107
|
+
jo as SectionNotification,
|
|
108
|
+
Jo as SelectListbox,
|
|
109
|
+
Qo as SelectProvider,
|
|
110
|
+
Xo as Sortable,
|
|
111
|
+
Zo as Spinner,
|
|
112
|
+
$o as StatusBadge,
|
|
113
|
+
rr as StatusPill,
|
|
114
|
+
er as TextArea,
|
|
115
|
+
xr as Timeline,
|
|
116
|
+
fr as ToggleSwitch,
|
|
117
|
+
ir as Tooltip,
|
|
118
|
+
lr as VarIndicator,
|
|
119
|
+
Uo as useSelect
|
|
116
120
|
};
|
|
117
121
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|