@stihl-design-system/components 1.0.0-RC.0 → 1.0.0-RC.1

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.
Files changed (105) hide show
  1. package/README.md +10 -1
  2. package/assets/Asterisk.288a3f48.css +1 -0
  3. package/assets/Button.c09c516e.css +1 -0
  4. package/assets/ButtonRound.fd628e54.css +1 -0
  5. package/assets/Checkbox.cde01607.css +1 -0
  6. package/assets/CustomReactSelect.cdb5f164.css +1 -0
  7. package/assets/Fieldset.729910fe.css +1 -0
  8. package/assets/Heading.50f5e903.css +1 -0
  9. package/assets/Input.92913cfe.css +1 -0
  10. package/assets/InputPassword.d7b9c937.css +1 -0
  11. package/assets/InputSearch.888f630a.css +1 -0
  12. package/assets/InputStepper.969db0d2.css +1 -0
  13. package/assets/Link.75834750.css +1 -0
  14. package/assets/LinkStandalone.19bdab0d.css +1 -0
  15. package/assets/OptionCheckbox.c56568a3.css +1 -0
  16. package/assets/Radio.79d98dde.css +1 -0
  17. package/assets/Select.b9c135c2.css +1 -0
  18. package/assets/Switch.781e3de6.css +1 -0
  19. package/assets/SystemFeedback.c30264c0.css +1 -0
  20. package/assets/Text.ac70cc84.css +1 -0
  21. package/assets/Textarea.12046393.css +1 -0
  22. package/assets/Title.e9e5a7e6.css +1 -0
  23. package/asterisk.cb74ea72.js +8 -0
  24. package/button.87ad387c.js +135 -0
  25. package/buttonround.ecb24c29.js +118 -0
  26. package/checkbox.42617f46.js +112 -0
  27. package/{checkboxgroup.e9e25471.js → checkboxgroup.fa110fdf.js} +2 -2
  28. package/chunks/{CustomReactSelect.9d0a378a.js → CustomReactSelect.2e4e7ba0.js} +342 -338
  29. package/chunks/Link.module.15dedc23.js +37 -0
  30. package/{combobox.f98a4472.js → combobox.d93091e0.js} +1 -1
  31. package/{customreactselect.a53f9932.js → customreactselect.7c77375a.js} +4 -4
  32. package/fieldset.fdd84bda.js +98 -0
  33. package/heading.c02dcb70.js +44 -0
  34. package/index.es.js +19 -19
  35. package/input.064e0bbf.js +230 -0
  36. package/inputpassword.f76c2f62.js +139 -0
  37. package/inputsearch.6e913fc6.js +188 -0
  38. package/inputstepper.2047ec77.js +286 -0
  39. package/{link.cd3720d1.js → link.5eb13d6e.js} +1 -1
  40. package/linkstandalone.edfd6288.js +80 -0
  41. package/optioncheckbox.2369560b.js +43 -0
  42. package/package.json +10 -1
  43. package/radio.fd841ab0.js +79 -0
  44. package/{radiogroup.6a22fe96.js → radiogroup.e1c8ea3d.js} +2 -2
  45. package/select.88d40c51.js +188 -0
  46. package/styles/fonts/STIHLContrafaceDigitalDisplayTitling.woff +0 -0
  47. package/styles/fonts/STIHLContrafaceDigitalDisplayTitling.woff2 +0 -0
  48. package/styles/fonts/STIHLContrafaceDigitalText-Bold.woff +0 -0
  49. package/styles/fonts/STIHLContrafaceDigitalText-Bold.woff2 +0 -0
  50. package/styles/fonts/STIHLContrafaceDigitalText.woff +0 -0
  51. package/styles/fonts/STIHLContrafaceDigitalText.woff2 +0 -0
  52. package/styles/fonts/font-face.min.css +1 -1
  53. package/styles/scss/lib/_heading.scss +14 -6
  54. package/styles/scss/lib/_text.scss +12 -12
  55. package/switch.96fd1689.js +65 -0
  56. package/{systemfeedback.6bbd1505.js → systemfeedback.8515a4e0.js} +10 -10
  57. package/text.de8facb9.js +57 -0
  58. package/textarea.b8c40c8b.js +189 -0
  59. package/title.7be43d50.js +36 -0
  60. package/assets/Asterisk.582f2067.css +0 -1
  61. package/assets/Button.684e8bda.css +0 -1
  62. package/assets/ButtonRound.ca8748cf.css +0 -1
  63. package/assets/Checkbox.84cf6398.css +0 -1
  64. package/assets/CustomReactSelect.d89ccccb.css +0 -1
  65. package/assets/Fieldset.5297efb8.css +0 -1
  66. package/assets/Heading.32278621.css +0 -1
  67. package/assets/Input.2c508b2f.css +0 -1
  68. package/assets/InputPassword.a534f047.css +0 -1
  69. package/assets/InputSearch.8f986307.css +0 -1
  70. package/assets/InputStepper.52fb45ca.css +0 -1
  71. package/assets/Link.03deeca0.css +0 -1
  72. package/assets/LinkStandalone.7e23a8ac.css +0 -1
  73. package/assets/OptionCheckbox.9c20f6f1.css +0 -1
  74. package/assets/Radio.be8f06f5.css +0 -1
  75. package/assets/Select.b2423b5f.css +0 -1
  76. package/assets/Switch.f3ab20de.css +0 -1
  77. package/assets/SystemFeedback.f4421d60.css +0 -1
  78. package/assets/Text.4756effe.css +0 -1
  79. package/assets/Textarea.eecf04b3.css +0 -1
  80. package/assets/Title.60d50d3e.css +0 -1
  81. package/asterisk.91abccec.js +0 -8
  82. package/button.89b2675b.js +0 -135
  83. package/buttonround.c60c8034.js +0 -118
  84. package/checkbox.7d414047.js +0 -112
  85. package/chunks/Link.module.b8230547.js +0 -37
  86. package/fieldset.fb7b7e49.js +0 -98
  87. package/heading.cb7698f4.js +0 -44
  88. package/input.abb902e3.js +0 -228
  89. package/inputpassword.11c12c66.js +0 -139
  90. package/inputsearch.0c88e71a.js +0 -188
  91. package/inputstepper.b74dac4d.js +0 -284
  92. package/linkstandalone.26b52de0.js +0 -80
  93. package/optioncheckbox.7195f001.js +0 -43
  94. package/radio.1b205d64.js +0 -79
  95. package/select.2ff31eab.js +0 -188
  96. package/styles/fonts/STIHLContrafaceDisplayTitling.woff +0 -0
  97. package/styles/fonts/STIHLContrafaceDisplayTitling.woff2 +0 -0
  98. package/styles/fonts/STIHLContrafaceText-Bold.woff +0 -0
  99. package/styles/fonts/STIHLContrafaceText-Bold.woff2 +0 -0
  100. package/styles/fonts/STIHLContrafaceText.woff +0 -0
  101. package/styles/fonts/STIHLContrafaceText.woff2 +0 -0
  102. package/switch.2f011fcc.js +0 -65
  103. package/text.8d80704f.js +0 -57
  104. package/textarea.e156b0ce.js +0 -189
  105. package/title.d855a8e4.js +0 -36
@@ -1,135 +0,0 @@
1
- import "./assets/Button.684e8bda.css";
2
- import { j as _ } from "./chunks/jsx-runtime.5c071667.js";
3
- import { c as n } from "./chunks/index.8021d3e0.js";
4
- import { u as e } from "./chunks/useBreakpoint.6c1b06c2.js";
5
- import { DSIcon as I } from "./icon.b4211784.js";
6
- import { DSSpinner as F } from "./spinner.ee015469.js";
7
- const S = "_root_1dvy1_49", x = "_root--highlight_1dvy1_116", j = "_root--dark-highlight_1dvy1_116", L = "_root--filled_1dvy1_194", C = "_root--outline_1dvy1_222", N = "_root--ghost_1dvy1_249", B = "_root--ghost-flush_1dvy1_274", E = "_root--small_1dvy1_280", R = "_root--dark-filled_1dvy1_355", T = "_root--dark-outline_1dvy1_414", V = "_root--dark-ghost_1dvy1_472", q = "_root--dark-ghost-flush_1dvy1_528", w = "_root--icon-left_1dvy1_587", A = "_root--icon-only_1dvy1_603", J = "_root--icon-only-small_1dvy1_607", K = "_loader_1dvy1_614", M = "_icon--hidden_1dvy1_626", P = "_label--hidden_1dvy1_630", Q = "_label--loading_1dvy1_642", o = {
8
- root: S,
9
- "root--highlight": "_root--highlight_1dvy1_116",
10
- rootHighlight: x,
11
- "root--dark-highlight": "_root--dark-highlight_1dvy1_116",
12
- rootDarkHighlight: j,
13
- "root--filled": "_root--filled_1dvy1_194",
14
- rootFilled: L,
15
- "root--outline": "_root--outline_1dvy1_222",
16
- rootOutline: C,
17
- "root--ghost": "_root--ghost_1dvy1_249",
18
- rootGhost: N,
19
- "root--ghost-flush": "_root--ghost-flush_1dvy1_274",
20
- rootGhostFlush: B,
21
- "root--small": "_root--small_1dvy1_280",
22
- rootSmall: E,
23
- "root--dark-filled": "_root--dark-filled_1dvy1_355",
24
- rootDarkFilled: R,
25
- "root--dark-outline": "_root--dark-outline_1dvy1_414",
26
- rootDarkOutline: T,
27
- "root--dark-ghost": "_root--dark-ghost_1dvy1_472",
28
- rootDarkGhost: V,
29
- "root--dark-ghost-flush": "_root--dark-ghost-flush_1dvy1_528",
30
- rootDarkGhostFlush: q,
31
- "root--icon-left": "_root--icon-left_1dvy1_587",
32
- rootIconLeft: w,
33
- "root--icon-only": "_root--icon-only_1dvy1_603",
34
- rootIconOnly: A,
35
- "root--icon-only-small": "_root--icon-only-small_1dvy1_607",
36
- rootIconOnlySmall: J,
37
- loader: K,
38
- "icon--hidden": "_icon--hidden_1dvy1_626",
39
- iconHidden: M,
40
- "label--hidden": "_label--hidden_1dvy1_630",
41
- labelHidden: P,
42
- "label--loading": "_label--loading_1dvy1_642",
43
- labelLoading: Q
44
- }, z = ({
45
- children: u,
46
- aria: k,
47
- className: f,
48
- dataTrackingid: m,
49
- disabled: a = !1,
50
- hideLabel: s = !1,
51
- iconName: h,
52
- iconPosition: v = "left",
53
- iconSource: c,
54
- isFlush: d = !1,
55
- loading: r = !1,
56
- size: i = "medium",
57
- theme: l = "light",
58
- variant: t = "filled",
59
- onClick: g,
60
- ...D
61
- }) => {
62
- const b = n(o.root, f, {
63
- // variant
64
- [o.rootFilled]: t === "filled",
65
- [o.rootHighlight]: t === "highlight",
66
- [o.rootOutline]: t === "outline",
67
- [o.rootGhost]: t === "ghost" && d !== !0,
68
- // isFlush
69
- [o.rootGhostFlush]: t === "ghost" && d === !0,
70
- // dark theme
71
- [o.rootDarkFilled]: l === "dark" && t === "filled",
72
- [o.rootDarkHighlight]: l === "dark" && t === "highlight",
73
- [o.rootDarkOutline]: l === "dark" && t === "outline",
74
- [o.rootDarkGhost]: l === "dark" && t === "ghost" && d !== !0,
75
- // dark isFlush
76
- [o.rootDarkGhostFlush]: l === "dark" && t === "ghost" && d === !0,
77
- // size
78
- [o.rootSmall]: i === "small",
79
- // icon position
80
- [o.rootIconLeft]: v === "left",
81
- // icon only
82
- [o.rootIconOnly]: e(s) && i === "medium",
83
- [o.rootIconOnlySmall]: e(s) && i === "small"
84
- }), p = n(o.label, {
85
- // hide label only visually to keep them available for assistive technologies
86
- [o.labelHidden]: e(s),
87
- // set label opacity to 0 when loading to prevent button size from changing
88
- [o.labelLoading]: r
89
- }), O = n(o.icon, {
90
- // set icon opacity to 0 when loading to prevent button size from changing
91
- [o.iconHidden]: r
92
- }), G = l === "light" && t === "filled" || l === "dark" && t === "outline" || l === "dark" && t === "ghost" ? "dark" : "light", H = (y) => {
93
- if (a || r) {
94
- y.preventDefault();
95
- return;
96
- }
97
- g && g(y);
98
- };
99
- return /* @__PURE__ */ _.jsxs(
100
- "button",
101
- {
102
- className: b,
103
- "data-trackingid": m,
104
- type: "submit",
105
- onClick: H,
106
- ...k,
107
- ...D,
108
- "aria-disabled": a || r,
109
- "aria-busy": r,
110
- children: [
111
- r && /* @__PURE__ */ _.jsx(
112
- F,
113
- {
114
- className: o.loader,
115
- aria: { "aria-label": "Loading state" }
116
- }
117
- ),
118
- /* @__PURE__ */ _.jsx("span", { className: p, children: u }),
119
- (h || c) && /* @__PURE__ */ _.jsx(
120
- I,
121
- {
122
- name: h,
123
- theme: G,
124
- source: c,
125
- className: O,
126
- "aria-hidden": "true"
127
- }
128
- )
129
- ]
130
- }
131
- );
132
- };
133
- export {
134
- z as DSButton
135
- };
@@ -1,118 +0,0 @@
1
- import "./assets/ButtonRound.ca8748cf.css";
2
- import { j as r } from "./chunks/jsx-runtime.5c071667.js";
3
- import { c as a } from "./chunks/index.8021d3e0.js";
4
- import { DSIcon as y } from "./icon.b4211784.js";
5
- import { DSSpinner as p } from "./spinner.ee015469.js";
6
- const H = "_root_nejad_49", F = "_root--highlight_nejad_118", O = "_root--dark-highlight_nejad_118", G = "_root--filled_nejad_196", I = "_root--outline_nejad_224", S = "_root--ghost_nejad_251", x = "_root--ghost-flush_nejad_276", L = "_root--small_nejad_282", C = "_root--dark-filled_nejad_357", N = "_root--dark-outline_nejad_416", R = "_root--dark-ghost_nejad_474", B = "_root--dark-ghost-flush_nejad_530", E = "_root--icon-left_nejad_589", T = "_root--icon-only_nejad_605", q = "_root--icon-only-small_nejad_609", w = "_loader_nejad_616", z = "_icon--hidden_nejad_628", A = "_label--hidden_nejad_632", J = "_label--loading_nejad_644", o = {
7
- root: H,
8
- "root--highlight": "_root--highlight_nejad_118",
9
- rootHighlight: F,
10
- "root--dark-highlight": "_root--dark-highlight_nejad_118",
11
- rootDarkHighlight: O,
12
- "root--filled": "_root--filled_nejad_196",
13
- rootFilled: G,
14
- "root--outline": "_root--outline_nejad_224",
15
- rootOutline: I,
16
- "root--ghost": "_root--ghost_nejad_251",
17
- rootGhost: S,
18
- "root--ghost-flush": "_root--ghost-flush_nejad_276",
19
- rootGhostFlush: x,
20
- "root--small": "_root--small_nejad_282",
21
- rootSmall: L,
22
- "root--dark-filled": "_root--dark-filled_nejad_357",
23
- rootDarkFilled: C,
24
- "root--dark-outline": "_root--dark-outline_nejad_416",
25
- rootDarkOutline: N,
26
- "root--dark-ghost": "_root--dark-ghost_nejad_474",
27
- rootDarkGhost: R,
28
- "root--dark-ghost-flush": "_root--dark-ghost-flush_nejad_530",
29
- rootDarkGhostFlush: B,
30
- "root--icon-left": "_root--icon-left_nejad_589",
31
- rootIconLeft: E,
32
- "root--icon-only": "_root--icon-only_nejad_605",
33
- rootIconOnly: T,
34
- "root--icon-only-small": "_root--icon-only-small_nejad_609",
35
- rootIconOnlySmall: q,
36
- loader: w,
37
- "icon--hidden": "_icon--hidden_nejad_628",
38
- iconHidden: z,
39
- "label--hidden": "_label--hidden_nejad_632",
40
- labelHidden: A,
41
- "label--loading": "_label--loading_nejad_644",
42
- labelLoading: J
43
- }, V = ({
44
- children: h,
45
- aria: c,
46
- className: g,
47
- dataTrackingid: j,
48
- disabled: e = !1,
49
- iconName: d = "placeholder",
50
- iconSource: _,
51
- loading: t = !1,
52
- theme: n = "light",
53
- variant: l = "filled",
54
- onClick: i,
55
- ...k
56
- }) => {
57
- const u = a(
58
- o.root,
59
- o.rootIconOnlySmall,
60
- g,
61
- {
62
- // variant
63
- [o.rootFilled]: l === "filled",
64
- [o.rootHighlight]: l === "highlight",
65
- // dark theme
66
- [o.rootDarkFilled]: n === "dark" && l === "filled",
67
- [o.rootDarkHighlight]: n === "dark" && l === "highlight"
68
- }
69
- ), f = a(o.label, o.labelHidden, {
70
- // set label opacity to 0 when loading to prevent button size from changing
71
- [o.labelLoading]: t
72
- }), m = a(o.icon, {
73
- // set icon opacity to 0 when loading to prevent button size from changing
74
- [o.iconHidden]: t
75
- }), b = n === "light" && l === "filled" ? "dark" : "light", D = (s) => {
76
- if (e || t) {
77
- s.preventDefault();
78
- return;
79
- }
80
- i && i(s);
81
- };
82
- return /* @__PURE__ */ r.jsxs(
83
- "button",
84
- {
85
- className: u,
86
- "data-trackingid": j,
87
- type: "button",
88
- onClick: D,
89
- ...c,
90
- ...k,
91
- "aria-disabled": e || t,
92
- "aria-busy": t,
93
- children: [
94
- t && /* @__PURE__ */ r.jsx(
95
- p,
96
- {
97
- className: o.loader,
98
- aria: { "aria-label": "Loading state" }
99
- }
100
- ),
101
- /* @__PURE__ */ r.jsx("span", { className: f, children: h }),
102
- (d || _) && /* @__PURE__ */ r.jsx(
103
- y,
104
- {
105
- name: d,
106
- theme: b,
107
- source: _,
108
- className: m,
109
- "aria-hidden": "true"
110
- }
111
- )
112
- ]
113
- }
114
- );
115
- };
116
- export {
117
- V as DSButtonRound
118
- };
@@ -1,112 +0,0 @@
1
- import "./assets/Checkbox.84cf6398.css";
2
- import { j as e } from "./chunks/jsx-runtime.5c071667.js";
3
- import { c as d } from "./chunks/index.8021d3e0.js";
4
- import { forwardRef as I, useRef as H, useState as M, useEffect as g, useCallback as B } from "react";
5
- import { u as E } from "./chunks/useBreakpoint.6c1b06c2.js";
6
- import { DSIcon as k } from "./icon.b4211784.js";
7
- import { DSSystemFeedback as V } from "./systemfeedback.6bbd1505.js";
8
- const w = "_root_1rc21_49", L = "_root--disabled_1rc21_68", O = "_checkbox_1rc21_72", P = "_icon-check_1rc21_86", R = "_icon-minus_1rc21_87", U = "_checkbox--invalid_1rc21_108", q = "_label--hidden_1rc21_113", z = "_input_1rc21_126", A = "_label_1rc21_113", F = "_feedback_1rc21_240", c = {
9
- root: w,
10
- "root--disabled": "_root--disabled_1rc21_68",
11
- rootDisabled: L,
12
- checkbox: O,
13
- "icon-check": "_icon-check_1rc21_86",
14
- iconCheck: P,
15
- "icon-minus": "_icon-minus_1rc21_87",
16
- iconMinus: R,
17
- "checkbox--invalid": "_checkbox--invalid_1rc21_108",
18
- checkboxInvalid: U,
19
- "label--hidden": "_label--hidden_1rc21_113",
20
- labelHidden: q,
21
- input: z,
22
- label: A,
23
- feedback: F
24
- }, G = I(
25
- ({
26
- label: _,
27
- checked: h,
28
- className: m,
29
- defaultChecked: f = !1,
30
- disabled: s = !1,
31
- hideLabel: x = !1,
32
- indeterminate: i = !1,
33
- invalid: l = !1,
34
- systemFeedback: u,
35
- onChange: r,
36
- ...p
37
- }, n) => {
38
- const a = H(null), [C, j] = M(f), N = E(x);
39
- g(() => {
40
- a && a.current && (a.current.indeterminate = i);
41
- }, [i]);
42
- const t = h !== void 0, b = t ? h : C, D = d(c.root, {
43
- [c.rootDisabled]: s
44
- }), v = d(c.label, {
45
- // hide label only visually to keep them available for assistive technologies
46
- [c.labelHidden]: N
47
- }), S = d(c.checkbox, {
48
- [c.checkboxInvalid]: l
49
- }), y = B(
50
- (o) => {
51
- if (s) {
52
- o.preventDefault();
53
- return;
54
- }
55
- t || j(o.target.checked), r && r(o);
56
- },
57
- [s, t, r]
58
- );
59
- return /* @__PURE__ */ e.jsxs("div", { className: m, children: [
60
- /* @__PURE__ */ e.jsxs("label", { className: D, children: [
61
- /* @__PURE__ */ e.jsx(
62
- "input",
63
- {
64
- type: "checkbox",
65
- className: c.input,
66
- ref: (o) => {
67
- typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
68
- },
69
- ...p,
70
- checked: b,
71
- disabled: s,
72
- "aria-label": _,
73
- "aria-invalid": l,
74
- "aria-checked": i ? "mixed" : b,
75
- onChange: y
76
- }
77
- ),
78
- /* @__PURE__ */ e.jsxs("span", { className: S, children: [
79
- /* @__PURE__ */ e.jsx(
80
- k,
81
- {
82
- name: "check",
83
- className: c.iconCheck,
84
- "aria-hidden": "true"
85
- }
86
- ),
87
- /* @__PURE__ */ e.jsx(
88
- k,
89
- {
90
- name: "minus",
91
- className: c.iconMinus,
92
- "aria-hidden": "true"
93
- }
94
- )
95
- ] }),
96
- /* @__PURE__ */ e.jsx("span", { className: v, children: _ })
97
- ] }),
98
- l && u && /* @__PURE__ */ e.jsx(
99
- V,
100
- {
101
- className: c.feedback,
102
- message: u,
103
- type: "invalid"
104
- }
105
- )
106
- ] });
107
- }
108
- );
109
- G.displayName = "DSCheckbox";
110
- export {
111
- G as DSCheckbox
112
- };
@@ -1,37 +0,0 @@
1
- import "../assets/Link.03deeca0.css";
2
- const o = "_root_1j79s_49", t = "_root--highlight_1j79s_115", r = "_root--dark-highlight_1j79s_115", l = "_root--filled_1j79s_193", _ = "_root--outline_1j79s_221", s = "_root--ghost_1j79s_248", h = "_root--ghost-flush_1j79s_273", n = "_root--small_1j79s_279", i = "_root--dark-filled_1j79s_354", a = "_root--dark-outline_1j79s_413", e = "_root--dark-ghost_1j79s_471", d = "_root--dark-ghost-flush_1j79s_527", c = "_root--icon-left_1j79s_586", g = "_root--icon-only_1j79s_602", j = "_root--icon-only-small_1j79s_606", k = "_label--hidden_1j79s_613", f = {
3
- root: o,
4
- "root--highlight": "_root--highlight_1j79s_115",
5
- rootHighlight: t,
6
- "root--dark-highlight": "_root--dark-highlight_1j79s_115",
7
- rootDarkHighlight: r,
8
- "root--filled": "_root--filled_1j79s_193",
9
- rootFilled: l,
10
- "root--outline": "_root--outline_1j79s_221",
11
- rootOutline: _,
12
- "root--ghost": "_root--ghost_1j79s_248",
13
- rootGhost: s,
14
- "root--ghost-flush": "_root--ghost-flush_1j79s_273",
15
- rootGhostFlush: h,
16
- "root--small": "_root--small_1j79s_279",
17
- rootSmall: n,
18
- "root--dark-filled": "_root--dark-filled_1j79s_354",
19
- rootDarkFilled: i,
20
- "root--dark-outline": "_root--dark-outline_1j79s_413",
21
- rootDarkOutline: a,
22
- "root--dark-ghost": "_root--dark-ghost_1j79s_471",
23
- rootDarkGhost: e,
24
- "root--dark-ghost-flush": "_root--dark-ghost-flush_1j79s_527",
25
- rootDarkGhostFlush: d,
26
- "root--icon-left": "_root--icon-left_1j79s_586",
27
- rootIconLeft: c,
28
- "root--icon-only": "_root--icon-only_1j79s_602",
29
- rootIconOnly: g,
30
- "root--icon-only-small": "_root--icon-only-small_1j79s_606",
31
- rootIconOnlySmall: j,
32
- "label--hidden": "_label--hidden_1j79s_613",
33
- labelHidden: k
34
- };
35
- export {
36
- f as s
37
- };
@@ -1,98 +0,0 @@
1
- import "./assets/Fieldset.5297efb8.css";
2
- import { j as e } from "./chunks/jsx-runtime.5c071667.js";
3
- import { c } from "./chunks/index.8021d3e0.js";
4
- import "react";
5
- import { Asterisk as k } from "./asterisk.91abccec.js";
6
- import { DSHeading as F } from "./heading.cb7698f4.js";
7
- import { DSSystemFeedback as w } from "./systemfeedback.6bbd1505.js";
8
- import { g as y } from "./chunks/helpers.ea3ca41a.js";
9
- const N = "_root_1q2kr_25", v = "_child-wrapper_1q2kr_31", E = "_legend_1q2kr_38", M = "_legend--utility--m_1q2kr_41", C = "_description_1q2kr_52", P = "_description--small_1q2kr_65", T = "_system-feedback_1q2kr_69", i = {
10
- root: N,
11
- "child-wrapper": "_child-wrapper_1q2kr_31",
12
- childWrapper: v,
13
- legend: E,
14
- "legend--utility--m": "_legend--utility--m_1q2kr_41",
15
- legendUtilityM: M,
16
- description: C,
17
- "description--small": "_description--small_1q2kr_65",
18
- descriptionSmall: P,
19
- "system-feedback": "_system-feedback_1q2kr_69",
20
- systemFeedback: T
21
- }, U = ({
22
- description: n,
23
- id: s,
24
- legend: a,
25
- systemFeedback: t
26
- }) => {
27
- if (!s && (n || t))
28
- throw new Error(
29
- y(
30
- "DSFieldset",
31
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
32
- )
33
- );
34
- if (!a)
35
- throw new Error(
36
- y(
37
- "DSFieldset",
38
- "The legend prop is required. Please add the legend prop to the DSFieldset component."
39
- )
40
- );
41
- }, L = ({
42
- children: n,
43
- legend: s,
44
- className: a,
45
- description: t,
46
- disabled: j = !1,
47
- id: d,
48
- invalid: p = !1,
49
- required: m = !1,
50
- systemFeedback: r,
51
- ...q
52
- }) => {
53
- process.env.NODE_ENV !== "production" && U({ description: t, id: d, legend: s, systemFeedback: r });
54
- let o, _, g;
55
- const l = typeof s == "object" && s !== void 0;
56
- l && ({ headingSize: o, headingTag: _, headingText: g } = s);
57
- const h = `${d}-feedback`, f = `${d}-description`, S = [
58
- r && h,
59
- t && f
60
- ].filter(Boolean).join(" "), b = !l || o === "small" || o === "small-uppercase", u = c(i.root, a), x = c(i.legend, {
61
- [i.legendUtilityM]: !l
62
- }), D = c(i.description, {
63
- [i.descriptionSmall]: b
64
- });
65
- return /* @__PURE__ */ e.jsxs(
66
- "fieldset",
67
- {
68
- className: u,
69
- disabled: j,
70
- ...q,
71
- "aria-invalid": p,
72
- "aria-describedby": S || void 0,
73
- children: [
74
- /* @__PURE__ */ e.jsx("legend", { className: x, children: l ? /* @__PURE__ */ e.jsxs(F, { tag: _, size: o, children: [
75
- g,
76
- m && /* @__PURE__ */ e.jsx(k, {})
77
- ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
78
- s,
79
- m && /* @__PURE__ */ e.jsx(k, {})
80
- ] }) }),
81
- t && /* @__PURE__ */ e.jsx("span", { id: f, className: D, children: t }),
82
- p && r && /* @__PURE__ */ e.jsx(
83
- w,
84
- {
85
- id: h,
86
- type: "invalid",
87
- message: r,
88
- className: i.systemFeedback
89
- }
90
- ),
91
- /* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: n })
92
- ]
93
- }
94
- );
95
- };
96
- export {
97
- L as DSFieldset
98
- };
@@ -1,44 +0,0 @@
1
- import "./assets/Heading.32278621.css";
2
- import { j as p } from "./chunks/jsx-runtime.5c071667.js";
3
- import { c } from "./chunks/index.8021d3e0.js";
4
- const u = "_root_17wr7_25", d = "_root--x-large_17wr7_28", g = "_root--large_17wr7_42", i = "_root--medium_17wr7_56", n = "_root--medium-uppercase_17wr7_64", w = "_root--small_17wr7_72", h = "_root--small-uppercase_17wr7_80", x = "_root--theme-dark_17wr7_88", o = {
5
- root: u,
6
- "root--x-large": "_root--x-large_17wr7_28",
7
- rootXLarge: d,
8
- "root--large": "_root--large_17wr7_42",
9
- rootLarge: g,
10
- "root--medium": "_root--medium_17wr7_56",
11
- rootMedium: i,
12
- "root--medium-uppercase": "_root--medium-uppercase_17wr7_64",
13
- rootMediumUppercase: n,
14
- "root--small": "_root--small_17wr7_72",
15
- rootSmall: w,
16
- "root--small-uppercase": "_root--small-uppercase_17wr7_80",
17
- rootSmallUppercase: h,
18
- "root--theme-dark": "_root--theme-dark_17wr7_88",
19
- rootThemeDark: x
20
- }, M = ({
21
- children: e,
22
- className: t,
23
- size: r = "medium",
24
- tag: a = "h2",
25
- // default tag because of SEO reasons (h1 should be used only once per page)
26
- theme: m = "light",
27
- ..._
28
- }) => {
29
- const s = a, l = c(o.root, t, {
30
- // sizes
31
- [o.rootXLarge]: r === "x-large",
32
- [o.rootLarge]: r === "large",
33
- [o.rootMedium]: r == "medium",
34
- [o.rootMediumUppercase]: r == "medium-uppercase",
35
- [o.rootSmall]: r == "small",
36
- [o.rootSmallUppercase]: r == "small-uppercase",
37
- // dark theme
38
- [o.rootThemeDark]: m === "dark"
39
- });
40
- return /* @__PURE__ */ p.jsx(s, { className: l, ..._, children: e });
41
- };
42
- export {
43
- M as DSHeading
44
- };