@stihl-design-system/components 1.0.0-RC.3 → 1.0.0-RC.5
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/Klarna.svg +1 -0
- package/Mastercard.svg +2 -0
- package/PayPal.svg +2 -0
- package/Placeholder.svg +1 -0
- package/Visa.svg +2 -0
- package/arialiveregions.BvZhV6hb.js +27 -0
- package/arialiveregions.d.ts +1 -0
- package/assets/CustomReactSelect.Bsphydqt.css +1 -0
- package/assets/Fieldset.D0jHAGRL.css +1 -0
- package/assets/Icon.Duy_0R8w.css +1 -0
- package/assets/InputPassword.VCNO8ANM.css +1 -0
- package/assets/InputSearch.BMRAb95l.css +1 -0
- package/assets/InputStepper.BKjqNi-i.css +1 -0
- package/assets/Notification.Bg63cvs4.css +1 -0
- package/assets/RadioGroup.Bz3_xkZU.css +1 -0
- package/assets/Select.Bz1TImkI.css +1 -0
- package/assets/Textarea.D2h5cW_t.css +1 -0
- package/assets/Toast.BzVaebc0.css +1 -0
- package/assets/arialiveregions.GsGx2USO.css +1 -0
- package/assets/{asterisk.C-o6rbGQ.css → asterisk.JlyPArZu.css} +1 -1
- package/assets/button.BdxtFZKx.css +1 -0
- package/assets/buttonround.pR4StXA7.css +1 -0
- package/assets/checkbox.BjIn2stV.css +1 -0
- package/assets/dialog.CKwM2EBH.css +1 -0
- package/assets/floatingactionbutton.CUvMbEMf.css +1 -0
- package/assets/heading.CCbuI4X-.css +1 -0
- package/assets/input.71tOIrpp.css +1 -0
- package/assets/link.D61tKkSK.css +1 -0
- package/assets/linkstandalone.Bx8Uvo0G.css +1 -0
- package/assets/logo.C05WqGId.css +1 -0
- package/assets/optioncheckbox.BdRJHcSw.css +1 -0
- package/assets/radio.ewRpPo4W.css +1 -0
- package/assets/spinner.LuV09jaU.css +1 -0
- package/assets/switch.Ds-I_ybT.css +1 -0
- package/assets/{systemfeedback.WE3wClZ3.css → systemfeedback.BzJATHDd.css} +1 -1
- package/assets/text.B-CTuGgI.css +1 -0
- package/assets/{title.CE0Dm7PI.css → title.DlhX9K3W.css} +1 -1
- package/asterisk.Cjbk-xZi.js +8 -0
- package/button.DlFWwHuA.js +135 -0
- package/buttonround.eYOQM994.js +118 -0
- package/checkbox.DNHdo6_n.js +113 -0
- package/checkboxgroup.DqWlzAeR.js +9 -0
- package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +31 -0
- package/{checkboxgroup.Cfxz9bk6.js → chunks/CheckboxGroup.DsQ6lI5a.js} +38 -31
- package/chunks/{CustomReactSelect.uzWNynay.js → CustomReactSelect.5dHi6PEO.js} +873 -917
- package/chunks/Fieldset.B1vsrHNv.js +99 -0
- package/chunks/Icon.n4XZrQ4N.js +223 -0
- package/chunks/{Input.utils.Bly6ZzLI.js → Input.utils.AKWCNkpA.js} +12 -8
- package/chunks/InputPassword.DTqI58Z4.js +140 -0
- package/chunks/InputSearch.IwQATLKh.js +189 -0
- package/chunks/InputStepper.Jew1ETB6.js +291 -0
- package/chunks/Notification.DbflCBIL.js +93 -0
- package/chunks/RadioGroup.BO4pbAJw.js +132 -0
- package/chunks/RadioGroup.module.BBZwHDjW.js +11 -0
- package/chunks/Select.COdS787F.js +191 -0
- package/chunks/Textarea.oqCrSopu.js +195 -0
- package/chunks/Toast.BLGKvAvZ.js +89 -0
- package/chunks/{circle-info-colored.DLY6BTL4.js → circle-info-colored.D2pp54gf.js} +3 -3
- package/chunks/{jsx-runtime.C-kxDJ4g.js → jsx-runtime.C115EyI4.js} +3 -7
- package/{combobox.BXHAo4Wx.js → combobox.CRlhqmuO.js} +8 -8
- package/components/AriaLiveRegions/AriaLiveRegions.d.ts +4 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +5 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.test.d.ts +1 -0
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +1 -1
- package/components/Dialog/Dialog.d.ts +11 -0
- package/components/Dialog/Dialog.utils.d.ts +0 -0
- package/components/Fieldset/Fieldset.utils.d.ts +1 -1
- package/components/Notification/Notification.d.ts +26 -0
- package/components/Notification/Notification.test.d.ts +1 -0
- package/components/Notification/Notification.utils.d.ts +5 -0
- package/components/Radio/Radio.d.ts +11 -3
- package/components/RadioGroup/RadioGroup.d.ts +6 -3
- package/components/RadioGroup/RadioGroup.utils.d.ts +5 -3
- package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
- package/components/Toast/Toast.d.ts +21 -0
- package/components/Toast/Toast.utils.d.ts +9 -0
- package/components/Toast/ToastManager.d.ts +6 -0
- package/components/Toast/ToastManager.test.d.ts +1 -0
- package/components/Toast/ToastManager.utils.d.ts +2 -0
- package/components/Toast/ToastManager.utils.test.d.ts +1 -0
- package/customreactselect.CD58gwtp.js +13 -0
- package/dialog.d.ts +1 -0
- package/dialog.qd2pOyVc.js +45 -0
- package/fieldset.aY3V2jK2.js +11 -0
- package/floatingactionbutton.CGV3YFQq.js +87 -0
- package/heading.BTNroD1E.js +50 -0
- package/icon.D3RXjzh4.js +8 -0
- package/index.d.ts +24 -0
- package/index.es.js +140 -45
- package/input.BAxvG272.js +236 -0
- package/inputpassword.mn9qFlfs.js +12 -0
- package/inputsearch.qQJj9yFd.js +13 -0
- package/inputstepper.DhbHujiM.js +13 -0
- package/link.SAcKvzJ3.js +115 -0
- package/linkstandalone.DNe0Nydm.js +79 -0
- package/{logo.C_oJ8isW.js → logo.BR_CUXFl.js} +16 -16
- package/notification.CnJOdQza.js +9 -0
- package/notification.d.ts +1 -0
- package/{optioncheckbox.-DRnW_ch.js → optioncheckbox.C4l2UIak.js} +9 -9
- package/package.json +30 -26
- package/partials/index.js +51 -79
- package/radio.epf54-sG.js +115 -0
- package/radiogroup.CiENWRos.js +11 -0
- package/select.DLYav8gw.js +12 -0
- package/spinner.DEtbkdfi.js +58 -0
- package/styles/scss/_index.scss +1 -0
- package/styles/scss/lib/_animation.scss +20 -5
- package/styles/scss/lib/_container-query.scss +3 -3
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +2 -0
- package/styles/scss/lib/_grid-sidebar.scss +14 -7
- package/styles/scss/lib/_link.scss +48 -41
- package/styles/scss/lib/_media-query.scss +3 -3
- package/styles/scss/lib/_shadow.scss +10 -0
- package/styles/scss/lib/_theme.scss +7 -5
- package/styles/scss/lib/_transition.scss +26 -7
- package/switch.BezS5z0Y.js +65 -0
- package/{systemfeedback.C7iXO5A1.js → systemfeedback.CUWch42u.js} +3 -3
- package/text.CrYUewrP.js +57 -0
- package/textarea.hLgeYdsI.js +12 -0
- package/title.Dvp8LKJt.js +36 -0
- package/toast.BR7QuHOG.js +10 -0
- package/toast.d.ts +1 -0
- package/toastmanager.DBp8B1e3.js +96 -0
- package/toastmanager.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/remove-spaces.d.ts +6 -0
- package/utils/remove-spaces.test.d.ts +1 -0
- package/utils/vitest.setup.d.ts +2 -0
- package/assets/CustomReactSelect.BdwXfLLO.css +0 -1
- package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
- package/assets/button.DJvR-58w.css +0 -1
- package/assets/buttonround.BlfQkmMV.css +0 -1
- package/assets/checkbox.BsFEWfQe.css +0 -1
- package/assets/fieldset.xazpUXJX.css +0 -1
- package/assets/floatingactionbutton.D7ywURL3.css +0 -1
- package/assets/heading.CGFucb-C.css +0 -1
- package/assets/icon.CB-KQmw4.css +0 -1
- package/assets/input.BcP5kkZ2.css +0 -1
- package/assets/inputpassword.C3Uyj7oA.css +0 -1
- package/assets/inputsearch.tL3e9-Ob.css +0 -1
- package/assets/inputstepper.paPJix5A.css +0 -1
- package/assets/link.V7pJOW1p.css +0 -1
- package/assets/linkstandalone.D3RbBp23.css +0 -1
- package/assets/logo.BbHYgnWo.css +0 -1
- package/assets/optioncheckbox.C-K1FLhc.css +0 -1
- package/assets/radio.CSHQGdpr.css +0 -1
- package/assets/select.D2qBxaHP.css +0 -1
- package/assets/spinner.C5rBmKiF.css +0 -1
- package/assets/switch.sqve8ApJ.css +0 -1
- package/assets/text.DDAveG7E.css +0 -1
- package/assets/textarea.BKbocznb.css +0 -1
- package/asterisk.DU8THnoC.js +0 -8
- package/button.BUUGRxIp.js +0 -135
- package/buttonround.CKc-a-hd.js +0 -118
- package/checkbox.C2Ga9yTK.js +0 -112
- package/chunks/RadioGroup.module.bi3leRes.js +0 -11
- package/customreactselect.CipgVXTR.js +0 -13
- package/fieldset.DGcIKzDI.js +0 -98
- package/floatingactionbutton.DzHD39NY.js +0 -87
- package/heading.DqGbFfj2.js +0 -50
- package/icon.PX9_1kNB.js +0 -215
- package/input.o8OT6rxJ.js +0 -236
- package/inputpassword.-MXq8baU.js +0 -139
- package/inputsearch.CoYTSjox.js +0 -188
- package/inputstepper.BBMQr6kM.js +0 -290
- package/link.BN6AZfhG.js +0 -115
- package/linkstandalone.4-fyRd08.js +0 -79
- package/radio.Bhu9OUY-.js +0 -79
- package/radiogroup.oILRMrX-.js +0 -102
- package/select.OGcreXnT.js +0 -190
- package/spinner.Diy_EeFY.js +0 -58
- package/switch.BjoFKMQC.js +0 -65
- package/text.CPU8IUqY.js +0 -57
- package/textarea.kc_Sfbgr.js +0 -193
- package/title.icX0VDiO.js +0 -36
|
@@ -3,21 +3,29 @@ import { BreakpointCustomizable } from '../../types';
|
|
|
3
3
|
|
|
4
4
|
export interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
5
|
/** Label text displayed next to the radio */
|
|
6
|
-
label:
|
|
6
|
+
label: string;
|
|
7
7
|
/** Name of the radio group */
|
|
8
8
|
name: string;
|
|
9
9
|
/** Set the value of the radio */
|
|
10
10
|
value: string;
|
|
11
|
+
/** Controls whether the radio is checked. */
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/** Allows the addition of e.g. decorative icons for an option */
|
|
14
|
+
customArea?: React.ReactNode;
|
|
11
15
|
/** Disables the radio, preventing user interaction */
|
|
12
16
|
disabled?: boolean;
|
|
13
17
|
/** Hides the radio label, can be responsive
|
|
14
18
|
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
15
19
|
*/
|
|
16
20
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
17
|
-
/**
|
|
18
|
-
|
|
21
|
+
/** Makes the label use `ds-utility-medium-bold` if any option has a `hint` and `hideUncheckedHint` is set to false */
|
|
22
|
+
isBold?: boolean;
|
|
23
|
+
/** Short descriptive text displayed beneath the label */
|
|
24
|
+
hint?: string;
|
|
19
25
|
/** Marks the radio as invalid, typically used for form validation */
|
|
20
26
|
invalid?: boolean;
|
|
27
|
+
/** Controls whether the hint is displayed when the radio button is not checked */
|
|
28
|
+
hideUncheckedHint?: boolean;
|
|
21
29
|
/** Callback function triggered when the state of the radio changes */
|
|
22
30
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
31
|
}
|
|
@@ -18,12 +18,13 @@ export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSe
|
|
|
18
18
|
name: string;
|
|
19
19
|
/**
|
|
20
20
|
* An array of RadioGroupOption Objects containing the label and the value of each Radio Button
|
|
21
|
-
* `{label: string; value: string}[]`
|
|
22
|
-
* @prop {{label: string; value: string}[]} options
|
|
21
|
+
* `{label: string; value: string; customArea?: React.ReactNode; hint?: string}[]`
|
|
22
|
+
* @prop {{label: string; value: string; customArea?: React.ReactNode; hint?: string}[]} options
|
|
23
23
|
*/
|
|
24
24
|
options: RadioGroupOption[];
|
|
25
25
|
/**
|
|
26
|
-
* Set the alignment of the radio buttons
|
|
26
|
+
* Set the alignment of the radio buttons.
|
|
27
|
+
* `alignment="horizontal"` is not possible if a `hint` or `customArea` is passed to the `options`.
|
|
27
28
|
*/
|
|
28
29
|
alignment?: 'vertical' | 'horizontal';
|
|
29
30
|
/**
|
|
@@ -34,6 +35,8 @@ export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSe
|
|
|
34
35
|
description?: FieldsetProps['description'];
|
|
35
36
|
/** Disables the radio group, preventing user interaction */
|
|
36
37
|
disabled?: boolean;
|
|
38
|
+
/** Controls whether the hint is displayed when the radio buttons are not checked. If set to `false` labels of radio buttons with hints will be displayed in **bold** */
|
|
39
|
+
hideUncheckedHints?: boolean;
|
|
37
40
|
/** Unique id for the radio group, needs to be set for proper accessibility functionality, if `description` or `systemFeedback` are set */
|
|
38
41
|
id?: string;
|
|
39
42
|
/** Marks the radio group as invalid, typically used for form validation */
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { RadioProps } from '../Radio/Radio';
|
|
2
2
|
import { RadioGroupProps } from './RadioGroup';
|
|
3
3
|
|
|
4
|
-
export type RadioGroupOption = Pick<RadioProps, 'label' | 'value'>;
|
|
5
|
-
type ValidationProps = Pick<RadioGroupProps, '
|
|
6
|
-
export declare const
|
|
4
|
+
export type RadioGroupOption = Pick<RadioProps, 'label' | 'value' | 'customArea' | 'hint'>;
|
|
5
|
+
type ValidationProps = Pick<RadioGroupProps, 'legend' | 'name' | 'options' | 'alignment' | 'description' | 'id' | 'systemFeedback'>;
|
|
6
|
+
export declare const optionsHaveHint: (options: RadioGroupOption[]) => boolean;
|
|
7
|
+
export declare const optionsHaveCustomArea: (options: RadioGroupOption[]) => boolean;
|
|
8
|
+
export declare const validateRadioGroupProps: ({ legend, name, options, alignment, description, id, systemFeedback, }: ValidationProps) => void;
|
|
7
9
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { ToastVariant } from './Toast.utils';
|
|
3
|
+
|
|
4
|
+
export interface ToastProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave'> {
|
|
5
|
+
/** Message displayed in the Toast */
|
|
6
|
+
message: string;
|
|
7
|
+
/** Hides the icon of the Toast */
|
|
8
|
+
hideIcon?: boolean;
|
|
9
|
+
/** Visual style variant of the Toast */
|
|
10
|
+
variant?: ToastVariant;
|
|
11
|
+
/** Used by the ToastManager to clear the timeout of the toast removal */
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
/** Used by the ToastManager to clear the timeout of the toast removal */
|
|
14
|
+
onMouseEnter: () => void;
|
|
15
|
+
/** Used by the ToastManager to start timeout of the toast removal again */
|
|
16
|
+
onMouseLeave: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Toasts are small, non-intrusive messages that appear temporarily to provide feedback or information.
|
|
20
|
+
* */
|
|
21
|
+
export declare const DSToast: import('react').ForwardRefExoticComponent<ToastProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconName } from '../../types';
|
|
2
|
+
|
|
3
|
+
export declare const TOAST_VARIANT: readonly ["info", "success", "warning"];
|
|
4
|
+
export type ToastVariant = (typeof TOAST_VARIANT)[number];
|
|
5
|
+
export declare const TOAST_ICONS: Record<ToastVariant, IconName>;
|
|
6
|
+
export type ToastOptions = {
|
|
7
|
+
variant?: ToastVariant;
|
|
8
|
+
hideIcon?: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { c as l } from "./chunks/CustomReactSelect.5dHi6PEO.js";
|
|
6
|
+
import "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
7
|
+
import "./asterisk.Cjbk-xZi.js";
|
|
8
|
+
import "./chunks/Icon.n4XZrQ4N.js";
|
|
9
|
+
import "./systemfeedback.CUWch42u.js";
|
|
10
|
+
import "./optioncheckbox.C4l2UIak.js";
|
|
11
|
+
export {
|
|
12
|
+
l as CustomReactSelect
|
|
13
|
+
};
|
package/dialog.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/Dialog/Dialog'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as u } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as f, useEffect as l } from "react";
|
|
5
|
+
import { DSButton as m } from "./button.DlFWwHuA.js";
|
|
6
|
+
import './assets/dialog.CKwM2EBH.css';const _ = "_root_4piiz_76", p = "_success_4piiz_80", d = "_info_4piiz_84", g = "_warning_4piiz_88", h = {
|
|
7
|
+
root: _,
|
|
8
|
+
success: p,
|
|
9
|
+
info: d,
|
|
10
|
+
warning: g
|
|
11
|
+
}, z = ({
|
|
12
|
+
children: r,
|
|
13
|
+
className: c,
|
|
14
|
+
footer: n,
|
|
15
|
+
header: a,
|
|
16
|
+
isOpen: t,
|
|
17
|
+
onClose: s
|
|
18
|
+
}) => {
|
|
19
|
+
const i = f(null);
|
|
20
|
+
return l(() => {
|
|
21
|
+
const o = i.current;
|
|
22
|
+
return o && (t ? o.showModal() : o.close(), s && o.addEventListener("close", s)), () => {
|
|
23
|
+
o && s && o.removeEventListener("close", s);
|
|
24
|
+
};
|
|
25
|
+
}, [t, s]), /* @__PURE__ */ e.jsxs("dialog", { ref: i, className: u(h.root, c), children: [
|
|
26
|
+
/* @__PURE__ */ e.jsx(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
type: "button",
|
|
30
|
+
iconName: "cross",
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
hideLabel: !0,
|
|
33
|
+
onClick: s,
|
|
34
|
+
autoFocus: !0,
|
|
35
|
+
children: "Close Dialog"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
a,
|
|
39
|
+
r,
|
|
40
|
+
n
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
z as DSDialog
|
|
45
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./asterisk.Cjbk-xZi.js";
|
|
6
|
+
import "./heading.BTNroD1E.js";
|
|
7
|
+
import "./systemfeedback.CUWch42u.js";
|
|
8
|
+
import { D as l } from "./chunks/Fieldset.B1vsrHNv.js";
|
|
9
|
+
export {
|
|
10
|
+
l as DSFieldset
|
|
11
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as a } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as t } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { D as k } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
+
import { DSSpinner as D } from "./spinner.DEtbkdfi.js";
|
|
6
|
+
import './assets/floatingactionbutton.CUvMbEMf.css';const x = "_root_qplp0_76", S = "_root--dark_qplp0_135", j = "_root--small_qplp0_175", H = "_loader_qplp0_194", y = "_icon--hidden_qplp0_206", N = "_label--hidden_qplp0_210", o = {
|
|
7
|
+
root: x,
|
|
8
|
+
"root--dark": "_root--dark_qplp0_135",
|
|
9
|
+
rootDark: S,
|
|
10
|
+
"root--small": "_root--small_qplp0_175",
|
|
11
|
+
rootSmall: j,
|
|
12
|
+
loader: H,
|
|
13
|
+
"icon--hidden": "_icon--hidden_qplp0_206",
|
|
14
|
+
iconHidden: y,
|
|
15
|
+
"label--hidden": "_label--hidden_qplp0_210",
|
|
16
|
+
labelHidden: N
|
|
17
|
+
}, B = ({
|
|
18
|
+
aria: c,
|
|
19
|
+
children: p,
|
|
20
|
+
className: _,
|
|
21
|
+
dataTrackingid: m,
|
|
22
|
+
disabled: r = !1,
|
|
23
|
+
iconName: s = "placeholder",
|
|
24
|
+
iconSource: e,
|
|
25
|
+
loading: l = !1,
|
|
26
|
+
size: b = "medium",
|
|
27
|
+
theme: n = "light",
|
|
28
|
+
onClick: i,
|
|
29
|
+
...u
|
|
30
|
+
}) => {
|
|
31
|
+
const h = t(
|
|
32
|
+
o.root,
|
|
33
|
+
o.rootIconOnlySmall,
|
|
34
|
+
_,
|
|
35
|
+
{
|
|
36
|
+
// dark theme
|
|
37
|
+
[o.rootDark]: n === "dark",
|
|
38
|
+
// size
|
|
39
|
+
[o.rootSmall]: b === "small"
|
|
40
|
+
}
|
|
41
|
+
), q = t(o.icon, {
|
|
42
|
+
// set icon opacity to 0 when loading to prevent button size from changing
|
|
43
|
+
[o.iconHidden]: l
|
|
44
|
+
}), f = (d) => {
|
|
45
|
+
if (r || l) {
|
|
46
|
+
d.preventDefault();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
i && i(d);
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ a.jsxs(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
className: h,
|
|
55
|
+
"data-trackingid": m,
|
|
56
|
+
type: "button",
|
|
57
|
+
onClick: f,
|
|
58
|
+
...c,
|
|
59
|
+
...u,
|
|
60
|
+
"aria-disabled": r || l,
|
|
61
|
+
"aria-busy": l,
|
|
62
|
+
children: [
|
|
63
|
+
l && /* @__PURE__ */ a.jsx(
|
|
64
|
+
D,
|
|
65
|
+
{
|
|
66
|
+
className: o.loader,
|
|
67
|
+
aria: { "aria-label": "Loading state" }
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ a.jsx("span", { className: t(o.label, o.labelHidden), children: p }),
|
|
71
|
+
(s || e) && /* @__PURE__ */ a.jsx(
|
|
72
|
+
k,
|
|
73
|
+
{
|
|
74
|
+
name: s,
|
|
75
|
+
theme: n,
|
|
76
|
+
source: e,
|
|
77
|
+
className: q,
|
|
78
|
+
"aria-hidden": "true"
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
B as DSFloatingActionButton
|
|
87
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as l } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import './assets/heading.CCbuI4X-.css';const n = "_root_n4708_76", u = "_root--x-large_n4708_79", g = "_root--x-large-uppercase_n4708_93", d = "_root--large_n4708_107", i = "_root--large-uppercase_n4708_121", x = "_root--medium_n4708_135", L = "_root--medium-uppercase_n4708_143", U = "_root--small_n4708_151", h = "_root--small-uppercase_n4708_159", k = "_root--theme-dark_n4708_167", o = {
|
|
5
|
+
root: n,
|
|
6
|
+
"root--x-large": "_root--x-large_n4708_79",
|
|
7
|
+
rootXLarge: u,
|
|
8
|
+
"root--x-large-uppercase": "_root--x-large-uppercase_n4708_93",
|
|
9
|
+
rootXLargeUppercase: g,
|
|
10
|
+
"root--large": "_root--large_n4708_107",
|
|
11
|
+
rootLarge: d,
|
|
12
|
+
"root--large-uppercase": "_root--large-uppercase_n4708_121",
|
|
13
|
+
rootLargeUppercase: i,
|
|
14
|
+
"root--medium": "_root--medium_n4708_135",
|
|
15
|
+
rootMedium: x,
|
|
16
|
+
"root--medium-uppercase": "_root--medium-uppercase_n4708_143",
|
|
17
|
+
rootMediumUppercase: L,
|
|
18
|
+
"root--small": "_root--small_n4708_151",
|
|
19
|
+
rootSmall: U,
|
|
20
|
+
"root--small-uppercase": "_root--small-uppercase_n4708_159",
|
|
21
|
+
rootSmallUppercase: h,
|
|
22
|
+
"root--theme-dark": "_root--theme-dark_n4708_167",
|
|
23
|
+
rootThemeDark: k
|
|
24
|
+
}, X = ({
|
|
25
|
+
children: e,
|
|
26
|
+
className: a,
|
|
27
|
+
size: r = "medium",
|
|
28
|
+
tag: t = "h2",
|
|
29
|
+
// default tag because of SEO reasons (h1 should be used only once per page)
|
|
30
|
+
theme: p = "light",
|
|
31
|
+
...s
|
|
32
|
+
}) => {
|
|
33
|
+
const _ = t, m = c(o.root, a, {
|
|
34
|
+
// sizes
|
|
35
|
+
[o.rootXLarge]: r === "x-large",
|
|
36
|
+
[o.rootXLargeUppercase]: r === "x-large-uppercase",
|
|
37
|
+
[o.rootLarge]: r === "large",
|
|
38
|
+
[o.rootLargeUppercase]: r === "large-uppercase",
|
|
39
|
+
[o.rootMedium]: r == "medium",
|
|
40
|
+
[o.rootMediumUppercase]: r == "medium-uppercase",
|
|
41
|
+
[o.rootSmall]: r == "small",
|
|
42
|
+
[o.rootSmallUppercase]: r == "small-uppercase",
|
|
43
|
+
// dark theme
|
|
44
|
+
[o.rootThemeDark]: p === "dark"
|
|
45
|
+
});
|
|
46
|
+
return /* @__PURE__ */ l.jsx(_, { className: m, ...s, children: e });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
X as DSHeading
|
|
50
|
+
};
|
package/icon.D3RXjzh4.js
ADDED
package/index.d.ts
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
1
|
+
export * from './components/AriaLiveRegions/AriaLiveRegions';
|
|
1
2
|
export * from './components/Button/Button';
|
|
3
|
+
export * from './components/Button/Button.utils';
|
|
2
4
|
export * from './components/ButtonRound/ButtonRound';
|
|
5
|
+
export * from './components/ButtonRound/ButtonRound.utils';
|
|
3
6
|
export * from './components/Checkbox/Checkbox';
|
|
4
7
|
export * from './components/CheckboxGroup/CheckboxGroup';
|
|
8
|
+
export * from './components/CheckboxGroup/CheckboxGroup.utils';
|
|
5
9
|
export * from './components/Combobox/Combobox';
|
|
10
|
+
export * from './components/Combobox/Combobox.utils';
|
|
6
11
|
export * from './components/Fieldset/Fieldset';
|
|
12
|
+
export * from './components/Fieldset/Fieldset.utils';
|
|
7
13
|
export * from './components/FloatingActionButton/FloatingActionButton';
|
|
8
14
|
export * from './components/Heading/Heading';
|
|
15
|
+
export * from './components/Heading/Heading.utils';
|
|
9
16
|
export * from './components/Icon/Icon';
|
|
17
|
+
export * from './components/Icon/Icon.utils';
|
|
10
18
|
export * from './components/Input/Input';
|
|
19
|
+
export * from './components/Input/Input.utils';
|
|
11
20
|
export * from './components/InputPassword/InputPassword';
|
|
21
|
+
export * from './components/InputPassword/InputPassword.utils';
|
|
12
22
|
export * from './components/InputSearch/InputSearch';
|
|
23
|
+
export * from './components/InputSearch/InputSearch.utils';
|
|
13
24
|
export * from './components/InputStepper/InputStepper';
|
|
25
|
+
export * from './components/InputStepper/InputStepper.utils';
|
|
14
26
|
export * from './components/Link/Link';
|
|
27
|
+
export * from './components/Link/Link.utils';
|
|
15
28
|
export * from './components/LinkStandalone/LinkStandalone';
|
|
29
|
+
export * from './components/LinkStandalone/LinkStandalone.utils';
|
|
16
30
|
export * from './components/Logo/Logo';
|
|
31
|
+
export * from './components/Logo/Logo.utils';
|
|
32
|
+
export * from './components/Notification/Notification';
|
|
33
|
+
export * from './components/Notification/Notification.utils';
|
|
17
34
|
export * from './components/RadioGroup/RadioGroup';
|
|
35
|
+
export * from './components/RadioGroup/RadioGroup.utils';
|
|
18
36
|
export * from './components/Select/Select';
|
|
37
|
+
export * from './components/Select/Select.utils';
|
|
19
38
|
export * from './components/Spinner/Spinner';
|
|
39
|
+
export * from './components/Spinner/Spinner.utils';
|
|
20
40
|
export * from './components/Switch/Switch';
|
|
41
|
+
export * from './components/Switch/Switch.utils';
|
|
21
42
|
export * from './components/Text/Text';
|
|
43
|
+
export * from './components/Text/Text.utils';
|
|
22
44
|
export * from './components/Textarea/Textarea';
|
|
45
|
+
export * from './components/Textarea/Textarea.utils';
|
|
23
46
|
export * from './components/Title/Title';
|
|
47
|
+
export * from './components/Title/Title.utils';
|
package/index.es.js
CHANGED
|
@@ -1,49 +1,144 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
2
|
+
import { DSAriaLiveRegions as x } from "./arialiveregions.BvZhV6hb.js";
|
|
3
|
+
import { DSButton as N } from "./button.DlFWwHuA.js";
|
|
4
|
+
import { DSButtonRound as u } from "./buttonround.eYOQM994.js";
|
|
5
|
+
import { DSCheckbox as h } from "./checkbox.DNHdo6_n.js";
|
|
6
|
+
import { D as f, v as A } from "./chunks/CheckboxGroup.DsQ6lI5a.js";
|
|
7
|
+
import { DSCombobox as g } from "./combobox.CRlhqmuO.js";
|
|
8
|
+
import { C as P, b as C, a as R, D as L, v as B } from "./chunks/CustomReactSelect.5dHi6PEO.js";
|
|
9
|
+
import { D as X, v as b } from "./chunks/Fieldset.B1vsrHNv.js";
|
|
10
|
+
import { DSFloatingActionButton as Z } from "./floatingactionbutton.CGV3YFQq.js";
|
|
11
|
+
import { DSHeading as H } from "./heading.BTNroD1E.js";
|
|
12
|
+
import { D as M, I as w, u as V } from "./chunks/Icon.n4XZrQ4N.js";
|
|
13
|
+
import { DSInput as y } from "./input.BAxvG272.js";
|
|
14
|
+
import { I as Y, M as q, a as j, S as z, U as J, h as Q, i as $, c as oo, s as ao, v as eo, b as to } from "./chunks/Input.utils.AKWCNkpA.js";
|
|
15
|
+
import { D as so, v as po } from "./chunks/InputPassword.DTqI58Z4.js";
|
|
16
|
+
import { D as So, i as lo, v as mo } from "./chunks/InputSearch.IwQATLKh.js";
|
|
17
|
+
import { D as Io, v as To } from "./chunks/InputStepper.Jew1ETB6.js";
|
|
18
|
+
import { DSLink as xo } from "./link.SAcKvzJ3.js";
|
|
19
|
+
import { DSLinkStandalone as co } from "./linkstandalone.DNe0Nydm.js";
|
|
20
|
+
import { DSLogo as _o } from "./logo.BR_CUXFl.js";
|
|
21
|
+
import { D as Eo, a as fo, N as Ao } from "./chunks/Notification.DbflCBIL.js";
|
|
22
|
+
import { D as go, a as vo, o as Po, v as Co } from "./chunks/RadioGroup.BO4pbAJw.js";
|
|
23
|
+
import { D as Lo, S as Bo, g as Uo, v as Xo } from "./chunks/Select.COdS787F.js";
|
|
24
|
+
import { DSSpinner as Go } from "./spinner.DEtbkdfi.js";
|
|
25
|
+
import { DSSwitch as Fo } from "./switch.BezS5z0Y.js";
|
|
26
|
+
import { DSText as ko } from "./text.CrYUewrP.js";
|
|
27
|
+
import { D as wo, T as Vo, v as Ko } from "./chunks/Textarea.oqCrSopu.js";
|
|
28
|
+
import { DSTitle as Wo } from "./title.Dvp8LKJt.js";
|
|
29
|
+
const o = ["medium", "small"], a = [
|
|
30
|
+
"filled",
|
|
31
|
+
"highlight",
|
|
32
|
+
"outline",
|
|
33
|
+
"ghost"
|
|
34
|
+
], e = ["filled", "highlight"], t = [
|
|
35
|
+
"x-large",
|
|
36
|
+
"x-large-uppercase",
|
|
37
|
+
"large",
|
|
38
|
+
"large-uppercase",
|
|
39
|
+
"medium",
|
|
40
|
+
"medium-uppercase",
|
|
41
|
+
"small",
|
|
42
|
+
"small-uppercase"
|
|
43
|
+
], r = ["h1", "h2", "h3", "h4", "h5", "h6"], s = ["medium", "small"], p = [
|
|
44
|
+
"filled",
|
|
45
|
+
"highlight",
|
|
46
|
+
"outline",
|
|
47
|
+
"ghost"
|
|
48
|
+
], i = ["neutral", "highlight"], S = [
|
|
49
|
+
"small",
|
|
50
|
+
"medium",
|
|
51
|
+
"large",
|
|
52
|
+
"x-large",
|
|
53
|
+
"inherit"
|
|
54
|
+
], l = [
|
|
55
|
+
"address",
|
|
56
|
+
"blockquote",
|
|
57
|
+
"cite",
|
|
58
|
+
"div",
|
|
59
|
+
"figcaption",
|
|
60
|
+
"legend",
|
|
61
|
+
"p",
|
|
62
|
+
"span",
|
|
63
|
+
"time"
|
|
64
|
+
], m = [
|
|
65
|
+
"large",
|
|
66
|
+
"medium",
|
|
67
|
+
"small",
|
|
68
|
+
"x-small",
|
|
69
|
+
"xx-small"
|
|
70
|
+
], n = ["bold", "normal"], I = ["x-large", "large"];
|
|
25
71
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
72
|
+
e as BUTTON_ROUND_VARIANT,
|
|
73
|
+
o as BUTTON_SIZE,
|
|
74
|
+
a as BUTTON_VARIANT,
|
|
75
|
+
P as COMBOBOX_SIZE,
|
|
76
|
+
x as DSAriaLiveRegions,
|
|
77
|
+
N as DSButton,
|
|
78
|
+
u as DSButtonRound,
|
|
79
|
+
h as DSCheckbox,
|
|
29
80
|
f as DSCheckboxGroup,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
81
|
+
g as DSCombobox,
|
|
82
|
+
X as DSFieldset,
|
|
83
|
+
Z as DSFloatingActionButton,
|
|
84
|
+
H as DSHeading,
|
|
85
|
+
M as DSIcon,
|
|
86
|
+
y as DSInput,
|
|
87
|
+
so as DSInputPassword,
|
|
88
|
+
So as DSInputSearch,
|
|
89
|
+
Io as DSInputStepper,
|
|
90
|
+
xo as DSLink,
|
|
91
|
+
co as DSLinkStandalone,
|
|
92
|
+
_o as DSLogo,
|
|
93
|
+
Eo as DSNotification,
|
|
94
|
+
go as DSRadioGroup,
|
|
95
|
+
Lo as DSSelect,
|
|
96
|
+
Go as DSSpinner,
|
|
97
|
+
Fo as DSSwitch,
|
|
98
|
+
ko as DSText,
|
|
99
|
+
wo as DSTextarea,
|
|
100
|
+
Wo as DSTitle,
|
|
101
|
+
C as DS_COMBOBOX_TRANSLATIONS,
|
|
102
|
+
R as DS_COMBOBOX_TRANSLATIONS_DE,
|
|
103
|
+
L as DS_COMBOBOX_TRANSLATIONS_EN,
|
|
104
|
+
t as HEADING_SIZE,
|
|
105
|
+
r as HEADING_TAG,
|
|
106
|
+
w as ICON_SIZE,
|
|
107
|
+
Y as INPUT_SIZE,
|
|
108
|
+
s as LINK_SIZE,
|
|
109
|
+
i as LINK_STANDALONE_VARIANT,
|
|
110
|
+
p as LINK_VARIANT,
|
|
111
|
+
q as MAX_PREFIX_LENGTH,
|
|
112
|
+
j as MAX_SUFFIX_LENGTH,
|
|
113
|
+
fo as NOTIFICATION_ICONS,
|
|
114
|
+
Ao as NOTIFICATION_VARIANT,
|
|
115
|
+
Bo as SELECT_SIZE,
|
|
116
|
+
S as SPINNER_SIZE,
|
|
117
|
+
z as SUPPORTED_INPUT_TYPES,
|
|
118
|
+
Vo as TEXTAREA_SIZE,
|
|
119
|
+
m as TEXT_SIZE,
|
|
120
|
+
l as TEXT_TAG,
|
|
121
|
+
n as TEXT_WEIGHT,
|
|
122
|
+
I as TITLE_SIZE,
|
|
123
|
+
J as UNSUPPORTED_INPUT_TYPES,
|
|
124
|
+
Uo as getIsPlaceholderSelected,
|
|
125
|
+
Q as hasShowPickerSupport,
|
|
126
|
+
$ as isCalendarInput,
|
|
127
|
+
oo as isTimeInput,
|
|
128
|
+
lo as isWithinForm,
|
|
129
|
+
vo as optionsHaveCustomArea,
|
|
130
|
+
Po as optionsHaveHint,
|
|
131
|
+
ao as showCustomCalendarOrTimeIndicator,
|
|
132
|
+
V as useDynamicSvgImport,
|
|
133
|
+
A as validateCheckboxGroupProps,
|
|
134
|
+
B as validateComboboxProps,
|
|
135
|
+
b as validateFieldsetProps,
|
|
136
|
+
po as validateInputPasswordProps,
|
|
137
|
+
eo as validateInputProps,
|
|
138
|
+
mo as validateInputSearchProps,
|
|
139
|
+
To as validateInputStepperProps,
|
|
140
|
+
Co as validateRadioGroupProps,
|
|
141
|
+
Xo as validateSelectProps,
|
|
142
|
+
Ko as validateTextareaProps,
|
|
143
|
+
to as validateType
|
|
49
144
|
};
|