@stihl-design-system/components 1.0.0-RC.13 → 1.0.0-RC.15
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/accordion.C57VwDyH.js +10 -0
- package/{arialiveregions.Cyycgs8g.js → arialiveregions.4aRkBQ4r.js} +3 -3
- package/assets/Breadcrumb.BaYrwrYl.css +1 -0
- package/assets/NavigationTabList.B6x56sAV.css +1 -0
- package/assets/linkstandalone.LMdnj-G0.css +1 -0
- package/assets/numberindicator.BJnvB-K3.css +1 -0
- package/assets/tabpane.D1LTb432.css +1 -0
- package/{asterisk.DpzETKdT.js → asterisk.DdCXwXQh.js} +2 -2
- package/breadcrumb.BZeQwTPf.js +10 -0
- package/breadcrumb.d.ts +2 -0
- package/{button.M4nXjcUn.js → button.Nknx8eP1.js} +6 -6
- package/{buttonround.E56F_805.js → buttonround.BKnxl68m.js} +5 -5
- package/{checkbox.Cb2_ey6U.js → checkbox.B_Es9RI2.js} +6 -6
- package/checkboxgroup.Cg89jmSA.js +8 -0
- package/chip.C0WRTcW9.js +10 -0
- package/{chipgroup.BvTj1ziW.js → chipgroup.BSNjn_jZ.js} +49 -49
- package/chunks/{Accordion.CB6jB3s_.js → Accordion.CecPmLcb.js} +6 -6
- package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +40 -0
- package/chunks/Breadcrumb.qH8heJ6N.js +112 -0
- package/chunks/{CheckboxGroup.S6i5EOc4.js → CheckboxGroup.Bjjv2D4P.js} +40 -37
- package/chunks/{Chip.CMlPUyOJ.js → Chip.BtY9yzNj.js} +33 -27
- package/chunks/{CustomReactSelect.CQ1uexBH.js → CustomReactSelect.BBHV7vvE.js} +1096 -1092
- package/chunks/{Dialog.CudsqNag.js → Dialog.CG1l6YDx.js} +5 -5
- package/chunks/{Drawer.ueG2Bzr9.js → Drawer.BFw0swsE.js} +5 -5
- package/chunks/{Fieldset.Cjmkgxxk.js → Fieldset.CPuNSQNU.js} +8 -8
- package/chunks/{Icon.BCmt_XBG.js → Icon.CvVRQw6C.js} +29 -29
- package/chunks/{Input.utils.ChV6RJsh.js → Input.utils.BolAdXy6.js} +21 -24
- package/chunks/{InputPassword.CNLbBFjx.js → InputPassword.DCV-dKiH.js} +22 -22
- package/chunks/{InputSearch.CHA6mkX_.js → InputSearch.BXLLIjLO.js} +9 -9
- package/chunks/{InputStepper.xmWGU9pU.js → InputStepper.BgUod0gn.js} +51 -49
- package/chunks/NavigationTabList.D3zzmWIL.js +60 -0
- package/chunks/NavigationTabs.ni5Zoq0z.js +72 -0
- package/chunks/{Notification.nx5vTamN.js → Notification.BmXWqd85.js} +5 -5
- package/chunks/RadioGroup.DVyupPKV.js +150 -0
- package/chunks/Select.ByKUcvrB.js +195 -0
- package/chunks/TabPane.utils.CWMN6Tsy.js +20 -0
- package/chunks/Tabs.UwweipbU.js +84 -0
- package/chunks/{Textarea.DUBSOpNL.js → Textarea.BzHIGYVB.js} +52 -52
- package/chunks/{Toast.DyEi2GEP.js → Toast.CwalSzYB.js} +5 -5
- package/chunks/has-window.ut_-aShB.js +5 -0
- package/chunks/helpers.CcqWV-wZ.js +8 -0
- package/chunks/index.CEyLAtio.js +48 -0
- package/chunks/{jsx-runtime.C115EyI4.js → jsx-runtime.BteaETFx.js} +175 -176
- package/chunks/useBreakpoint.BzR_yaIv.js +42 -0
- package/chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js +7 -0
- package/{combobox.CzBpi97e.js → combobox.BY7mbdhL.js} +2 -2
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +2 -2
- package/components/Breadcrumb/Breadcrumb.d.ts +33 -0
- package/components/Breadcrumb/Breadcrumb.test.d.ts +1 -0
- package/components/Breadcrumb/Breadcrumb.utils.d.ts +4 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
- package/components/Input/Input.d.ts +6 -0
- package/components/InputPassword/InputPassword.d.ts +3 -3
- package/components/NavigationTabs/NavigationTabs.d.ts +41 -0
- package/components/NavigationTabs/NavigationTabs.test.d.ts +1 -0
- package/components/NavigationTabs/NavigationTabs.utils.d.ts +6 -0
- package/components/NumberIndicator/NumberIndicator.d.ts +12 -0
- package/components/NumberIndicator/NumberIndicator.test.d.ts +1 -0
- package/components/NumberIndicator/NumberIndicator.utils.d.ts +2 -0
- package/components/Tabs/TabList/NavigationTabList/NavigationTabList.d.ts +21 -0
- package/components/Tabs/TabList/TabList.d.ts +38 -0
- package/components/Tabs/TabList/TabList.utils.d.ts +6 -0
- package/components/Tabs/TabList/TabList.utils.test.d.ts +1 -0
- package/components/Tabs/TabPane/TabPane.d.ts +10 -0
- package/components/Tabs/TabPane/TabPane.utils.d.ts +3 -0
- package/components/Tabs/TabPane/TabPane.utils.test.d.ts +1 -0
- package/components/Tabs/Tabs.d.ts +47 -0
- package/components/Tabs/Tabs.test.d.ts +1 -0
- package/components/Tabs/Tabs.utils.d.ts +6 -0
- package/customreactselect.1jiQuYLT.js +13 -0
- package/dialog.BF2q9x7U.js +9 -0
- package/drawer.B_dIJ0pb.js +9 -0
- package/fieldset.CU4aXdx1.js +11 -0
- package/{flag.BKpsdB_-.js → flag.CfYdEnax.js} +4 -4
- package/{floatingactionbutton.D5L0B7zI.js → floatingactionbutton.CiDfDE1q.js} +5 -5
- package/{heading.IPIYc5vW.js → heading.BesCIchJ.js} +3 -3
- package/icon.R9KQet1b.js +8 -0
- package/index.d.ts +8 -2
- package/index.es.js +144 -130
- package/{input.BEnCFNM-.js → input.Bx05SF7t.js} +20 -19
- package/inputpassword.DswedDs6.js +12 -0
- package/inputsearch.Dc4b-FYd.js +13 -0
- package/inputstepper.Cf2gM7tW.js +15 -0
- package/{link.DREJAoPG.js → link.DsNdcAjt.js} +5 -5
- package/linkstandalone.BGQ2HOO0.js +79 -0
- package/{logo.Hul8qCFo.js → logo.DZy1Gj0_.js} +3 -3
- package/navigationtablist.BKp4bwRn.js +9 -0
- package/navigationtablist.d.ts +2 -0
- package/navigationtabs.CmdW9g9l.js +8 -0
- package/navigationtabs.d.ts +2 -0
- package/notification.YWtBGqLz.js +9 -0
- package/numberindicator.d.ts +2 -0
- package/numberindicator.kZ-G6BbU.js +26 -0
- package/{optioncheckbox.BRUTnQnJ.js → optioncheckbox.DV0QpteH.js} +4 -4
- package/package.json +47 -47
- package/partials/index.js +688 -689
- package/{radio.DEILy_lV.js → radio.DZEIaDlU.js} +4 -4
- package/radiogroup.BNohLQGM.js +10 -0
- package/select.CZvgpafD.js +12 -0
- package/{skiptocontent.BxvpIB7H.js → skiptocontent.CoC8Rk8k.js} +5 -5
- package/{spinner.Bq97Og-6.js → spinner.pcu39V2a.js} +4 -4
- package/styles/scss/ds/lib/theme.scss +2 -0
- package/{switch.DI8YYa5G.js → switch.DaPoGnX-.js} +5 -5
- package/{systemfeedback.C3Pfxxpp.js → systemfeedback.bHSsfiy3.js} +4 -4
- package/tablist.BCOOuiX4.js +258 -0
- package/tablist.d.ts +2 -0
- package/tabpane.CAy_cIi3.js +37 -0
- package/tabpane.d.ts +2 -0
- package/tabs.d.ts +2 -0
- package/tabs.jdCTjBr0.js +10 -0
- package/{text.DThvTwm8.js → text.C5UzzMI9.js} +3 -3
- package/textarea.D9XTlEUz.js +12 -0
- package/{title.DqzdB2Gq.js → title.B2VKsF9O.js} +3 -3
- package/toast.D2BnxnFr.js +10 -0
- package/{toastmanager.B7EZ4JSI.js → toastmanager.CzDos3Ik.js} +18 -18
- package/utils/helpers.d.ts +7 -0
- package/utils/index.d.ts +1 -0
- package/utils/isAnimationDisabled.d.ts +1 -0
- package/accordion.Rvtiu8Y4.js +0 -10
- package/assets/linkstandalone.DIazcjIv.css +0 -1
- package/checkboxgroup.DBDmB-zR.js +0 -8
- package/chip.C_1tGqvZ.js +0 -10
- package/chunks/AriaLiveRegions.utils.BGSZafnS.js +0 -34
- package/chunks/RadioGroup.Crj7NoOs.js +0 -137
- package/chunks/Select.E6gLFYLk.js +0 -194
- package/chunks/has-document.r9i9TxKV.js +0 -5
- package/chunks/helpers.B1JT5ShS.js +0 -7
- package/chunks/index.CvOaL64Y.js +0 -45
- package/chunks/useBreakpoint.5xBNDiCf.js +0 -48
- package/customreactselect.qf7CIeFs.js +0 -13
- package/dialog.DYlBUsOD.js +0 -9
- package/drawer.CvhbP1ra.js +0 -9
- package/fieldset.CtUGEdLv.js +0 -11
- package/icon.Ck0BpI34.js +0 -8
- package/inputpassword.B-D_jB9w.js +0 -12
- package/inputsearch.CaSpklR1.js +0 -13
- package/inputstepper.C7KD1-0S.js +0 -13
- package/linkstandalone.BBoEniZ_.js +0 -79
- package/notification.6M0OdGXK.js +0 -9
- package/radiogroup.DeU-HdlP.js +0 -10
- package/select.BYraFJzz.js +0 -12
- package/textarea.CBvH0ljM.js +0 -12
- package/toast.n1QUINSA.js +0 -10
- package/utils/has-document.d.ts +0 -1
- /package/assets/{Accordion.i4k5SMQM.css → Accordion.DDxMnzaG.css} +0 -0
- /package/assets/{CheckboxGroup.BH1Br1dg.css → CheckboxGroup.Dd-Huo7x.css} +0 -0
- /package/assets/{Chip.DSdLuzoi.css → Chip.dxIYIjj7.css} +0 -0
- /package/assets/{CustomReactSelect.vHt8qNKC.css → CustomReactSelect.DYDaP5r5.css} +0 -0
- /package/assets/{Dialog.BgzebVk4.css → Dialog.DXmPdExC.css} +0 -0
- /package/assets/{Drawer.Bauwxrk7.css → Drawer.BcM0epJS.css} +0 -0
- /package/assets/{Fieldset.DOdTbb7C.css → Fieldset.Og4EsnPI.css} +0 -0
- /package/assets/{Icon.DxRSBRSL.css → Icon.ZNrKuqgu.css} +0 -0
- /package/assets/{InputPassword.CG7Ugu73.css → InputPassword.DtKteerr.css} +0 -0
- /package/assets/{InputSearch.CseChMc-.css → InputSearch.Mql3oFlQ.css} +0 -0
- /package/assets/{InputStepper.C0eAYr7P.css → InputStepper.BXz1MMBg.css} +0 -0
- /package/assets/{Notification.DbRapUJo.css → Notification.DZIF-Wo6.css} +0 -0
- /package/assets/{RadioGroup.BfMo157q.css → RadioGroup.CM2mYOzc.css} +0 -0
- /package/assets/{Select.D4EXgIbz.css → Select.KvAgxJZk.css} +0 -0
- /package/assets/{Textarea.KJGPTYMz.css → Textarea.BIRQlv6m.css} +0 -0
- /package/assets/{Toast.CuafTAf7.css → Toast.CuM-yS7S.css} +0 -0
- /package/assets/{arialiveregions.DhsijBaL.css → arialiveregions.e0Q16ZWi.css} +0 -0
- /package/assets/{asterisk.BfVAUBO7.css → asterisk.B41DaZDe.css} +0 -0
- /package/assets/{button.DF4RBeC2.css → button.CpPeQPsM.css} +0 -0
- /package/assets/{buttonround.19uK_-oO.css → buttonround.BFauSRAb.css} +0 -0
- /package/assets/{checkbox.ByOoFouu.css → checkbox.BKHQN_tu.css} +0 -0
- /package/assets/{chipgroup.BzfZLbkv.css → chipgroup.CUIkyYBW.css} +0 -0
- /package/assets/{flag.B-RLcMcf.css → flag.C7i3MAAP.css} +0 -0
- /package/assets/{floatingactionbutton.E9HekT6S.css → floatingactionbutton.l0nvFiJU.css} +0 -0
- /package/assets/{heading.u4f8Mz94.css → heading.B-rdLVZD.css} +0 -0
- /package/assets/{input.BAkFKPW3.css → input.B5spSeMe.css} +0 -0
- /package/assets/{link.DDJj0D1U.css → link.Be5OF_8E.css} +0 -0
- /package/assets/{logo.CnW8alZU.css → logo.bVXt9m9R.css} +0 -0
- /package/assets/{optioncheckbox.BZaWtRD7.css → optioncheckbox.DAffEKvY.css} +0 -0
- /package/assets/{radio.X-RTl_jo.css → radio.CGf7v0D_.css} +0 -0
- /package/assets/{skiptocontent.PTL3256m.css → skiptocontent.CTSDC_kG.css} +0 -0
- /package/assets/{spinner.2iWJWKyA.css → spinner.BJ5xwnYH.css} +0 -0
- /package/assets/{switch.gw6aa3kx.css → switch.Bc9KIyw9.css} +0 -0
- /package/assets/{systemfeedback.BPz5YlPC.css → systemfeedback.DoqgHZPH.css} +0 -0
- /package/assets/{text.DjTG_qNb.css → text.BlRcxO8n.css} +0 -0
- /package/assets/{title.rosWPEG3.css → title.B0tsgJ-n.css} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as u, useEffect as c } from "react";
|
|
3
|
+
const o = {
|
|
4
|
+
base: 0,
|
|
5
|
+
s: 320,
|
|
6
|
+
m: 768,
|
|
7
|
+
l: 1024,
|
|
8
|
+
xl: 1536
|
|
9
|
+
}, a = ["base", "s", "m", "l", "xl"], k = (e) => {
|
|
10
|
+
let n = "base";
|
|
11
|
+
for (const t of a)
|
|
12
|
+
if (e >= o[t])
|
|
13
|
+
n = t;
|
|
14
|
+
else
|
|
15
|
+
break;
|
|
16
|
+
return n;
|
|
17
|
+
}, b = (e) => e && typeof e == "object" && "base" in e, f = () => {
|
|
18
|
+
const [e, n] = u("base");
|
|
19
|
+
c(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), []);
|
|
20
|
+
const t = () => {
|
|
21
|
+
const r = window.innerWidth;
|
|
22
|
+
n(k(r));
|
|
23
|
+
};
|
|
24
|
+
return e;
|
|
25
|
+
}, B = (e) => {
|
|
26
|
+
const n = f();
|
|
27
|
+
if (e && typeof e != "object" || !b(e))
|
|
28
|
+
return e;
|
|
29
|
+
const t = [...a].reverse();
|
|
30
|
+
let r = e.base;
|
|
31
|
+
for (const s of t) {
|
|
32
|
+
const i = e[s];
|
|
33
|
+
if (i !== void 0 && o[n] >= o[s]) {
|
|
34
|
+
r = i;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return r;
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
B as u
|
|
42
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as u } from "./chunks/jsx-runtime.
|
|
3
|
-
import { v as x, c as C } from "./chunks/CustomReactSelect.
|
|
2
|
+
import { j as u } from "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import { v as x, c as C } from "./chunks/CustomReactSelect.BBHV7vvE.js";
|
|
4
4
|
const v = ({
|
|
5
5
|
id: s,
|
|
6
6
|
label: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ARIA_LIVE_REGION_ALERT_ID = "ds-alert-live-region";
|
|
2
2
|
export declare const ARIA_LIVE_REGION_STATUS_ID = "ds-status-live-region";
|
|
3
|
-
export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null;
|
|
4
|
-
export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null;
|
|
3
|
+
export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null | undefined;
|
|
4
|
+
export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null | undefined;
|
|
5
5
|
export declare const validateMultipleDSAriaLiveRegionsOnPage: () => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SelectedAriaAttributes } from '../../types';
|
|
2
|
+
import { BreadcrumbAriaAttributes } from './Breadcrumb.utils';
|
|
3
|
+
export interface BreadcrumbLink {
|
|
4
|
+
/** The link label text. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** The href for the link if no framework-specific link component wrapper is provided. */
|
|
7
|
+
href?: string;
|
|
8
|
+
/** Name of the icon to display.*/
|
|
9
|
+
iconName?: string;
|
|
10
|
+
/** The framework-specific link component wrapper, e.g., `Link` for `next` or `react-router-dom`. */
|
|
11
|
+
wrapper?: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
}
|
|
13
|
+
export interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
|
|
14
|
+
/** ARIA attributes to ensure accessibility
|
|
15
|
+
*
|
|
16
|
+
* `{'aria-label'? string;`
|
|
17
|
+
* `'aria-labelledby'?: string;}`
|
|
18
|
+
* */
|
|
19
|
+
aria: SelectedAriaAttributes<BreadcrumbAriaAttributes>;
|
|
20
|
+
/** Breadcrumb link array structure with optional and required parameters
|
|
21
|
+
* `{ label: string;`
|
|
22
|
+
* `href?: string;`
|
|
23
|
+
* `iconName?: IconName;`
|
|
24
|
+
* `wrapper?: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;}[]`
|
|
25
|
+
*/
|
|
26
|
+
links: BreadcrumbLink[];
|
|
27
|
+
/** Label for the show all (...) button. */
|
|
28
|
+
showAllButtonLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A breadcrumb provides orientation to users within the structure of a website or application.
|
|
32
|
+
* */
|
|
33
|
+
export declare const DSBreadcrumb: ({ aria, className, links, showAllButtonLabel, ...rest }: BreadcrumbProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,7 +18,7 @@ export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedR
|
|
|
18
18
|
* `type ComboboxOptionsOrOptGroups = (ComboboxOption | ComboboxOptionsGroup)[];`
|
|
19
19
|
* */
|
|
20
20
|
options: ComboboxOptionsOrOptGroups;
|
|
21
|
-
/** The value of
|
|
21
|
+
/** The value of autoComplete to use for the DSCombobox. */
|
|
22
22
|
autoComplete?: string;
|
|
23
23
|
/** Value of the selected Option in **uncontrolled DSCombobox** component. */
|
|
24
24
|
defaultValue?: IsMulti extends true ? ComboboxOption[] : ComboboxOption;
|
|
@@ -15,6 +15,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
15
15
|
actionButtonIconSource?: IconProps['source'];
|
|
16
16
|
/** Callback function called when the action button is clicked. */
|
|
17
17
|
actionButtonOnClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Provides hints to the browser for what type of data the input expects.
|
|
20
|
+
* Use standardized values from the W3C specification for input purposes:
|
|
21
|
+
* https://www.w3.org/TR/WCAG21/#input-purposes.
|
|
22
|
+
*/
|
|
23
|
+
autoComplete?: string;
|
|
18
24
|
/** Disables the input, preventing user interaction.
|
|
19
25
|
* @default false
|
|
20
26
|
*/
|
|
@@ -6,10 +6,10 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
6
6
|
id: string;
|
|
7
7
|
/** Label text displayed above the input. */
|
|
8
8
|
label: string;
|
|
9
|
-
/** The value of
|
|
9
|
+
/** The value of autoComplete to use for the input.
|
|
10
10
|
* @default 'new-password'
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
autoComplete?: 'new-password' | 'current-password' | 'off';
|
|
13
13
|
/** Disables the input, preventing user interaction.
|
|
14
14
|
* @default false
|
|
15
15
|
*/
|
|
@@ -55,4 +55,4 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
55
55
|
*
|
|
56
56
|
* The user can toggle the visibility of the password by clicking on the action button.
|
|
57
57
|
*/
|
|
58
|
-
export declare const DSInputPassword: ({ id, label,
|
|
58
|
+
export declare const DSInputPassword: ({ id, label, autoComplete, className, disabled, hidePasswordText, hint, hideLabel, invalid, readonly, required, showPasswordText, size, systemFeedback, ...rest }: InputPasswordProps) => JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { IconName, SelectedAriaAttributes } from '../../types';
|
|
3
|
+
import { TabListAriaAttributes } from '../Tabs/TabList/TabList.utils';
|
|
4
|
+
import { NavigationTabsAlignment } from './NavigationTabs.utils';
|
|
5
|
+
export interface NavigationTab {
|
|
6
|
+
/** Unique id for the NavigationTab. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Link component to be used for the navigation. */
|
|
9
|
+
linkComponent: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement> & {
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
to?: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** Name of the icon to display */
|
|
14
|
+
iconName?: IconName;
|
|
15
|
+
/** Number Indicator value displayed next to the label. */
|
|
16
|
+
numberIndicatorValue?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface NavigationTabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
/** ARIA attributes to ensure accessibility
|
|
20
|
+
* `{'aria-label'? string;`
|
|
21
|
+
* `'aria-labelledby'?: string;}`
|
|
22
|
+
* */
|
|
23
|
+
aria: SelectedAriaAttributes<TabListAriaAttributes>;
|
|
24
|
+
/** NavigationTab array structure with optional and required parameters
|
|
25
|
+
* `{ id: string;`
|
|
26
|
+
* `linkComponent: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement> & { onClick?: () => void; to?: string; }>;`
|
|
27
|
+
* `iconName?: IconName;`
|
|
28
|
+
* `numberIndicatorValue?: string; }[]`
|
|
29
|
+
*/
|
|
30
|
+
tabs: NavigationTab[];
|
|
31
|
+
/** Alignment of the NavigationTabs.
|
|
32
|
+
* @default 'left'
|
|
33
|
+
*/
|
|
34
|
+
alignment?: NavigationTabsAlignment;
|
|
35
|
+
/** Index of the tab that should be active. */
|
|
36
|
+
activeTabIndex?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The Navigation Tabs component is a link list and often used as secondary navigation. The components main function is to navigate to another page url.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DSNavigationTabs: ({ aria, tabs, alignment, className, activeTabIndex, ...rest }: NavigationTabsProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NavigationTabsProps } from './NavigationTabs';
|
|
2
|
+
export declare const NAVIGATION_TABS_ALIGNMENT: readonly ["left", "center"];
|
|
3
|
+
export type NavigationTabsAlignment = (typeof NAVIGATION_TABS_ALIGNMENT)[number];
|
|
4
|
+
export declare const NAVIGATION_TABS_DIRECTION: readonly ["prev", "next"];
|
|
5
|
+
export type NavigationTabsDirection = (typeof NAVIGATION_TABS_DIRECTION)[number];
|
|
6
|
+
export declare const validateNavigationTabsProps: ({ aria, tabs, activeTabIndex, }: NavigationTabsProps) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NumberIndicatorVariant } from './NumberIndicator.utils';
|
|
2
|
+
export interface NumberIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
/** Content within the NumberIndicator. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Variant of the NumberIndicator.
|
|
7
|
+
*
|
|
8
|
+
* @default 'default'
|
|
9
|
+
*/
|
|
10
|
+
variant?: NumberIndicatorVariant;
|
|
11
|
+
}
|
|
12
|
+
export declare const NumberIndicator: ({ label, className, variant, ...rest }: NumberIndicatorProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NavigationTab } from '../../../NavigationTabs/NavigationTabs';
|
|
2
|
+
interface NavigationTabListProps {
|
|
3
|
+
tabs: NavigationTab[];
|
|
4
|
+
tabRefs: React.MutableRefObject<HTMLAnchorElement[]>;
|
|
5
|
+
scrollerClass: string;
|
|
6
|
+
scrollerRef: React.MutableRefObject<HTMLUListElement>;
|
|
7
|
+
selectedTabIndex: number;
|
|
8
|
+
handleNavigationKeydown: (event: React.KeyboardEvent<HTMLAnchorElement>, index: number) => void;
|
|
9
|
+
setSelectedTab: (index: number) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The NavigationTabList component is an internal component used inside the TabList component.
|
|
13
|
+
* It renders an unordered list with list items that contain anchor elements.
|
|
14
|
+
*
|
|
15
|
+
* Consumers can pass in a link component which is cloned and modified. This allows us to add
|
|
16
|
+
* DSIcon and NumberIndicator and other props.
|
|
17
|
+
* Additionally the link component can be a regular anchor element or a Link component from
|
|
18
|
+
* React Router/Next or any other routing framework.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NavigationTabList: ({ tabs, tabRefs, scrollerClass, scrollerRef, selectedTabIndex, handleNavigationKeydown, setSelectedTab, }: NavigationTabListProps) => JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Dispatch, HTMLAttributes, SetStateAction } from 'react';
|
|
2
|
+
import { SelectedAriaAttributes } from '../../../types';
|
|
3
|
+
import { NavigationTab } from '../../NavigationTabs/NavigationTabs';
|
|
4
|
+
import { Tab } from '../Tabs';
|
|
5
|
+
import { TabsAlignment } from '../Tabs.utils';
|
|
6
|
+
import { TabListAriaAttributes } from './TabList.utils';
|
|
7
|
+
export type TabListProps<IsNavigation extends boolean> = {
|
|
8
|
+
/** ARIA attributes to enhance accessibility
|
|
9
|
+
* `{'aria-label'? string;`
|
|
10
|
+
* `'aria-labelledby'?: string;}`
|
|
11
|
+
* */
|
|
12
|
+
aria: SelectedAriaAttributes<TabListAriaAttributes>;
|
|
13
|
+
selectedTabIndex: number;
|
|
14
|
+
setSelectedTabIndex: Dispatch<SetStateAction<number>>;
|
|
15
|
+
/** An array of Tab Objects containing the id, content, label, and other optional parameters.
|
|
16
|
+
* `{id: string; content: React.ReactNode; label: string; iconName?: IconName; numberIndicatorValue?: string;}[]`*/
|
|
17
|
+
tabs: IsNavigation extends true ? NavigationTab[] : Tab[];
|
|
18
|
+
/** Alignment of the Tabs.
|
|
19
|
+
* @default 'left'
|
|
20
|
+
*/
|
|
21
|
+
alignment?: TabsAlignment;
|
|
22
|
+
/** Index of the tab to be selected when Tabs are rendered the first time.
|
|
23
|
+
* @default 0
|
|
24
|
+
* */
|
|
25
|
+
defaultSelectedTabIndex?: number;
|
|
26
|
+
/** Sets the TabList to navigation mode, using links instead of buttons */
|
|
27
|
+
isNavigation?: boolean;
|
|
28
|
+
/** Callback function called when the selected tab changes. */
|
|
29
|
+
onTabChange?: (selectedTabIndex: number) => void;
|
|
30
|
+
} & HTMLAttributes<HTMLDivElement> & (IsNavigation extends false ? {
|
|
31
|
+
id: string;
|
|
32
|
+
} : unknown);
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* The TabList component is an internal component used in DSTabs and DSNavigationTabs.
|
|
36
|
+
* It dynamically renders either a div with role="tablist" or a nav element based on the isNavigation prop.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TabList: <IsNavigation extends boolean>({ aria, id: tabListId, selectedTabIndex, setSelectedTabIndex, tabs, alignment, className, defaultSelectedTabIndex, isNavigation, onTabChange, ...rest }: TabListProps<IsNavigation>) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the bounding rectangle of a DOM element or a default DOMRect object with 0 values if unavailable.
|
|
3
|
+
*/
|
|
4
|
+
export declare const getRect: (element: HTMLElement | null) => DOMRect;
|
|
5
|
+
export declare const SCROLL_MARGIN_INLINE = 48;
|
|
6
|
+
export type TabListAriaAttributes = 'aria-label' | 'aria-labelledby';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TabPaneProps {
|
|
3
|
+
id: string;
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
index: number;
|
|
6
|
+
selectedTabIndex: number;
|
|
7
|
+
tabListId: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const TabPane: ({ id, content, index, selectedTabIndex, tabListId, className, }: TabPaneProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { IconName } from '../../types';
|
|
3
|
+
import { TabsAlignment } from './Tabs.utils';
|
|
4
|
+
export interface Tab {
|
|
5
|
+
/** Content displayed when the Tab is active. */
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
/** Unique id for the Tab. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** Label text displayed on the Tab. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Name of the icon to display */
|
|
12
|
+
iconName?: IconName;
|
|
13
|
+
/** Number Indicator value displayed next to the label. */
|
|
14
|
+
numberIndicatorValue?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
/** Unique id for the tab list. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** An array of Tab Objects containing the id, content, label, and other optional parameters.
|
|
20
|
+
* `{ content: React.ReactNode;`
|
|
21
|
+
* `id: string;`
|
|
22
|
+
* `label: string;`
|
|
23
|
+
* `iconName?: IconName;`
|
|
24
|
+
* `numberIndicatorValue?: string; }[]`
|
|
25
|
+
*/
|
|
26
|
+
tabs: Tab[];
|
|
27
|
+
/** Alignment of the Tabs.
|
|
28
|
+
* @default 'left'
|
|
29
|
+
*/
|
|
30
|
+
alignment?: TabsAlignment;
|
|
31
|
+
/**
|
|
32
|
+
* Additional class name to apply to the tab pane.
|
|
33
|
+
*/
|
|
34
|
+
classNameTabPane?: string;
|
|
35
|
+
/** Index of the tab to be selected when Tabs are rendered the first time.
|
|
36
|
+
* @default 0
|
|
37
|
+
* */
|
|
38
|
+
defaultSelectedTabIndex?: number;
|
|
39
|
+
/** Callback function called when the selected tab changes. */
|
|
40
|
+
onTabChange?: (selectedTabIndex: number) => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A component for organizing content into tabbed sections, allowing users to navigate between them.
|
|
44
|
+
* Supports single selection to maintain focus on one content area at a time.
|
|
45
|
+
* Avoid excessive tabs to prevent overwhelming the user.
|
|
46
|
+
*/
|
|
47
|
+
export declare const DSTabs: ({ id: tabListId, tabs, alignment, className, classNameTabPane, defaultSelectedTabIndex, onTabChange, ...rest }: TabsProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TabsProps } from './Tabs';
|
|
2
|
+
export declare const TABS_ALIGNMENT: readonly ["left", "center"];
|
|
3
|
+
export type TabsAlignment = (typeof TABS_ALIGNMENT)[number];
|
|
4
|
+
export declare const TABS_DIRECTION: readonly ["prev", "next"];
|
|
5
|
+
export type TabsDirection = (typeof TABS_DIRECTION)[number];
|
|
6
|
+
export declare const validateTabsProps: ({ id, tabs, defaultSelectedTabIndex, }: TabsProps) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import "./chunks/index.CEyLAtio.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { c as l } from "./chunks/CustomReactSelect.BBHV7vvE.js";
|
|
6
|
+
import "./chunks/useBreakpoint.BzR_yaIv.js";
|
|
7
|
+
import "./asterisk.DdCXwXQh.js";
|
|
8
|
+
import "./chunks/Icon.CvVRQw6C.js";
|
|
9
|
+
import "./systemfeedback.bHSsfiy3.js";
|
|
10
|
+
import "./optioncheckbox.DV0QpteH.js";
|
|
11
|
+
export {
|
|
12
|
+
l as CustomReactSelect
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import "./chunks/index.CEyLAtio.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./asterisk.DdCXwXQh.js";
|
|
6
|
+
import "./heading.BesCIchJ.js";
|
|
7
|
+
import "./systemfeedback.bHSsfiy3.js";
|
|
8
|
+
import { D as l } from "./chunks/Fieldset.CPuNSQNU.js";
|
|
9
|
+
export {
|
|
10
|
+
l as DSFieldset
|
|
11
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as s } from "./chunks/jsx-runtime.
|
|
3
|
-
import { c } from "./chunks/index.
|
|
4
|
-
import { D as i } from "./chunks/Icon.
|
|
5
|
-
import './assets/flag.
|
|
2
|
+
import { j as s } from "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import { c } from "./chunks/index.CEyLAtio.js";
|
|
4
|
+
import { D as i } from "./chunks/Icon.CvVRQw6C.js";
|
|
5
|
+
import './assets/flag.C7i3MAAP.css';const n = "ds-flag_root_14d3h_1", f = "ds-flag_root--color-grey-light_14d3h_28", C = "ds-flag_root--color-yellow-light_14d3h_31", y = "ds-flag_root--color-red-light_14d3h_34", m = "ds-flag_root--color-green-light_14d3h_37", L = "ds-flag_root--color-orange-base_14d3h_40", r = {
|
|
6
6
|
root: n,
|
|
7
7
|
"root--color-grey-light": "ds-flag_root--color-grey-light_14d3h_28",
|
|
8
8
|
rootColorGreyLight: f,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as a } from "./chunks/jsx-runtime.
|
|
3
|
-
import { c as n } from "./chunks/index.
|
|
4
|
-
import { D as h } from "./chunks/Icon.
|
|
5
|
-
import { DSSpinner as k } from "./spinner.
|
|
6
|
-
import './assets/floatingactionbutton.
|
|
2
|
+
import { j as a } from "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import { c as n } from "./chunks/index.CEyLAtio.js";
|
|
4
|
+
import { D as h } from "./chunks/Icon.CvVRQw6C.js";
|
|
5
|
+
import { DSSpinner as k } from "./spinner.pcu39V2a.js";
|
|
6
|
+
import './assets/floatingactionbutton.l0nvFiJU.css';const D = "ds-floating-action-button_root_1any0_1", x = "ds-floating-action-button_root--dark_1any0_70", S = "ds-floating-action-button_root--small_1any0_108", j = "ds-floating-action-button_loader_1any0_129", H = "ds-floating-action-button_icon--hidden_1any0_141", N = "ds-floating-action-button_label--hidden_1any0_145", o = {
|
|
7
7
|
root: D,
|
|
8
8
|
"root--dark": "ds-floating-action-button_root--dark_1any0_70",
|
|
9
9
|
rootDark: x,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as _ } from "./chunks/jsx-runtime.
|
|
3
|
-
import { c as u } from "./chunks/index.
|
|
4
|
-
import './assets/heading.
|
|
2
|
+
import { j as _ } from "./chunks/jsx-runtime.BteaETFx.js";
|
|
3
|
+
import { c as u } from "./chunks/index.CEyLAtio.js";
|
|
4
|
+
import './assets/heading.B-rdLVZD.css';const m = "ds-heading_root_6kuzl_1", g = "ds-heading_root--x-large_6kuzl_4", c = "ds-heading_root--x-large-uppercase_6kuzl_19", n = "ds-heading_root--large_6kuzl_35", i = "ds-heading_root--large-uppercase_6kuzl_50", h = "ds-heading_root--medium_6kuzl_66", k = "ds-heading_root--medium-uppercase_6kuzl_75", x = "ds-heading_root--small_6kuzl_85", z = "ds-heading_root--small-uppercase_6kuzl_94", L = "ds-heading_root--theme-dark_6kuzl_104", o = {
|
|
5
5
|
root: m,
|
|
6
6
|
"root--x-large": "ds-heading_root--x-large_6kuzl_4",
|
|
7
7
|
rootXLarge: g,
|
package/icon.R9KQet1b.js
ADDED
package/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './components/Accordion/Accordion';
|
|
2
2
|
export * from './components/Accordion/Accordion.utils';
|
|
3
3
|
export * from './components/AriaLiveRegions/AriaLiveRegions';
|
|
4
|
+
export * from './components/Breadcrumb/Breadcrumb';
|
|
5
|
+
export * from './components/Breadcrumb/Breadcrumb.utils';
|
|
4
6
|
export * from './components/Button/Button';
|
|
5
7
|
export * from './components/Button/Button.utils';
|
|
6
8
|
export * from './components/ButtonRound/ButtonRound';
|
|
@@ -8,6 +10,8 @@ export * from './components/ButtonRound/ButtonRound.utils';
|
|
|
8
10
|
export * from './components/Checkbox/Checkbox';
|
|
9
11
|
export * from './components/CheckboxGroup/CheckboxGroup';
|
|
10
12
|
export * from './components/CheckboxGroup/CheckboxGroup.utils';
|
|
13
|
+
export * from './components/ChipGroup/ChipGroup';
|
|
14
|
+
export * from './components/ChipGroup/ChipGroup.utils';
|
|
11
15
|
export * from './components/Combobox/Combobox';
|
|
12
16
|
export * from './components/Combobox/Combobox.utils';
|
|
13
17
|
export * from './components/Dialog/Dialog';
|
|
@@ -37,6 +41,8 @@ export * from './components/LinkStandalone/LinkStandalone';
|
|
|
37
41
|
export * from './components/LinkStandalone/LinkStandalone.utils';
|
|
38
42
|
export * from './components/Logo/Logo';
|
|
39
43
|
export * from './components/Logo/Logo.utils';
|
|
44
|
+
export * from './components/NavigationTabs/NavigationTabs';
|
|
45
|
+
export * from './components/NavigationTabs/NavigationTabs.utils';
|
|
40
46
|
export * from './components/Notification/Notification';
|
|
41
47
|
export * from './components/Notification/Notification.utils';
|
|
42
48
|
export * from './components/RadioGroup/RadioGroup';
|
|
@@ -48,8 +54,8 @@ export * from './components/Spinner/Spinner';
|
|
|
48
54
|
export * from './components/Spinner/Spinner.utils';
|
|
49
55
|
export * from './components/Switch/Switch';
|
|
50
56
|
export * from './components/Switch/Switch.utils';
|
|
51
|
-
export * from './components/
|
|
52
|
-
export * from './components/
|
|
57
|
+
export * from './components/Tabs/Tabs';
|
|
58
|
+
export * from './components/Tabs/Tabs.utils';
|
|
53
59
|
export * from './components/Text/Text';
|
|
54
60
|
export * from './components/Text/Text.utils';
|
|
55
61
|
export * from './components/Textarea/Textarea';
|