@db-ux/react-core-components 4.9.0 → 4.10.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.
Files changed (166) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +97 -35
  3. package/dist/components/accordion/accordion.js +102 -86
  4. package/dist/components/accordion/model.d.ts +2 -2
  5. package/dist/components/accordion/model.js +4 -2
  6. package/dist/components/accordion-item/accordion-item.d.ts +2 -1
  7. package/dist/components/accordion-item/accordion-item.js +89 -56
  8. package/dist/components/accordion-item/model.d.ts +5 -1
  9. package/dist/components/badge/badge.js +72 -32
  10. package/dist/components/badge/model.d.ts +1 -1
  11. package/dist/components/badge/model.js +12 -1
  12. package/dist/components/brand/brand.js +60 -13
  13. package/dist/components/brand/model.d.ts +1 -1
  14. package/dist/components/button/button.js +75 -21
  15. package/dist/components/button/model.d.ts +1 -1
  16. package/dist/components/button/model.js +13 -2
  17. package/dist/components/card/card.js +65 -15
  18. package/dist/components/card/model.d.ts +1 -1
  19. package/dist/components/card/model.js +8 -2
  20. package/dist/components/checkbox/checkbox.js +163 -157
  21. package/dist/components/checkbox/model.d.ts +1 -1
  22. package/dist/components/custom-button/custom-button.js +65 -10
  23. package/dist/components/custom-button/model.d.ts +2 -2
  24. package/dist/components/custom-select/custom-select.js +509 -727
  25. package/dist/components/custom-select/model.d.ts +4 -4
  26. package/dist/components/custom-select/model.js +8 -1
  27. package/dist/components/custom-select-dropdown/custom-select-dropdown.js +62 -11
  28. package/dist/components/custom-select-dropdown/model.d.ts +1 -1
  29. package/dist/components/custom-select-dropdown/model.js +8 -1
  30. package/dist/components/custom-select-form-field/custom-select-form-field.js +57 -10
  31. package/dist/components/custom-select-form-field/model.d.ts +1 -1
  32. package/dist/components/custom-select-list/custom-select-list.js +60 -11
  33. package/dist/components/custom-select-list/model.d.ts +1 -1
  34. package/dist/components/custom-select-list-item/custom-select-list-item.js +89 -32
  35. package/dist/components/custom-select-list-item/model.d.ts +1 -1
  36. package/dist/components/custom-select-list-item/model.js +4 -1
  37. package/dist/components/divider/divider.js +60 -10
  38. package/dist/components/divider/model.d.ts +1 -1
  39. package/dist/components/divider/model.js +4 -2
  40. package/dist/components/drawer/drawer.js +118 -97
  41. package/dist/components/drawer/model.d.ts +1 -1
  42. package/dist/components/drawer/model.js +14 -4
  43. package/dist/components/header/header.js +143 -65
  44. package/dist/components/header/model.d.ts +1 -1
  45. package/dist/components/icon/icon.js +61 -12
  46. package/dist/components/icon/model.d.ts +1 -1
  47. package/dist/components/icon/model.js +11 -1
  48. package/dist/components/infotext/infotext.js +62 -12
  49. package/dist/components/infotext/model.d.ts +1 -1
  50. package/dist/components/input/input.js +198 -167
  51. package/dist/components/input/model.d.ts +1 -1
  52. package/dist/components/input/model.js +21 -5
  53. package/dist/components/link/link.js +70 -12
  54. package/dist/components/link/model.d.ts +1 -1
  55. package/dist/components/link/model.js +8 -3
  56. package/dist/components/navigation/model.d.ts +1 -1
  57. package/dist/components/navigation/navigation.js +57 -11
  58. package/dist/components/navigation-item/model.d.ts +6 -2
  59. package/dist/components/navigation-item/navigation-item.js +117 -81
  60. package/dist/components/notification/model.d.ts +1 -1
  61. package/dist/components/notification/model.js +12 -3
  62. package/dist/components/notification/notification.js +100 -32
  63. package/dist/components/page/model.d.ts +1 -1
  64. package/dist/components/page/model.js +4 -2
  65. package/dist/components/page/page.js +74 -46
  66. package/dist/components/popover/model.d.ts +1 -1
  67. package/dist/components/popover/popover.js +126 -125
  68. package/dist/components/radio/model.d.ts +1 -1
  69. package/dist/components/radio/radio.js +124 -85
  70. package/dist/components/section/model.d.ts +1 -1
  71. package/dist/components/section/section.js +59 -10
  72. package/dist/components/select/model.d.ts +1 -1
  73. package/dist/components/select/select.js +188 -191
  74. package/dist/components/stack/model.d.ts +1 -1
  75. package/dist/components/stack/model.js +14 -4
  76. package/dist/components/stack/stack.js +63 -10
  77. package/dist/components/switch/model.d.ts +1 -1
  78. package/dist/components/switch/switch.js +182 -150
  79. package/dist/components/tab-item/model.d.ts +1 -1
  80. package/dist/components/tab-item/tab-item.js +105 -76
  81. package/dist/components/tab-list/model.d.ts +1 -1
  82. package/dist/components/tab-list/tab-list.js +60 -11
  83. package/dist/components/tab-panel/model.d.ts +1 -1
  84. package/dist/components/tab-panel/tab-panel.js +59 -13
  85. package/dist/components/tabs/model.d.ts +3 -3
  86. package/dist/components/tabs/model.js +4 -2
  87. package/dist/components/tabs/tabs.js +191 -178
  88. package/dist/components/tag/model.d.ts +1 -1
  89. package/dist/components/tag/model.js +4 -1
  90. package/dist/components/tag/tag.js +91 -32
  91. package/dist/components/textarea/model.d.ts +1 -1
  92. package/dist/components/textarea/model.js +13 -2
  93. package/dist/components/textarea/textarea.js +165 -150
  94. package/dist/components/tooltip/model.d.ts +1 -1
  95. package/dist/components/tooltip/model.js +4 -1
  96. package/dist/components/tooltip/tooltip.js +119 -115
  97. package/dist/index.js +64 -81
  98. package/dist/shared/constants.js +32 -94
  99. package/dist/shared/figma.d.ts +12 -6
  100. package/dist/shared/model.js +73 -22
  101. package/dist/utils/document-click-listener.js +26 -29
  102. package/dist/utils/document-scroll-listener.js +30 -38
  103. package/dist/utils/floating-components.js +107 -358
  104. package/dist/utils/form-components.js +34 -60
  105. package/dist/utils/index.js +49 -167
  106. package/dist/utils/navigation.js +68 -135
  107. package/dist/utils/react.js +10 -15
  108. package/package.json +11 -8
  109. package/dist/components/accordion/index.js +0 -1
  110. package/dist/components/accordion-item/index.js +0 -1
  111. package/dist/components/accordion-item/model.js +0 -1
  112. package/dist/components/badge/index.js +0 -1
  113. package/dist/components/brand/index.js +0 -1
  114. package/dist/components/brand/model.js +0 -1
  115. package/dist/components/button/index.js +0 -1
  116. package/dist/components/card/index.js +0 -1
  117. package/dist/components/checkbox/index.js +0 -1
  118. package/dist/components/checkbox/model.js +0 -1
  119. package/dist/components/custom-button/index.js +0 -1
  120. package/dist/components/custom-button/model.js +0 -1
  121. package/dist/components/custom-select/index.js +0 -1
  122. package/dist/components/custom-select-dropdown/index.js +0 -1
  123. package/dist/components/custom-select-form-field/index.js +0 -1
  124. package/dist/components/custom-select-form-field/model.js +0 -1
  125. package/dist/components/custom-select-list/index.js +0 -1
  126. package/dist/components/custom-select-list/model.js +0 -1
  127. package/dist/components/custom-select-list-item/index.js +0 -1
  128. package/dist/components/divider/index.js +0 -1
  129. package/dist/components/drawer/index.js +0 -1
  130. package/dist/components/header/index.js +0 -1
  131. package/dist/components/header/model.js +0 -1
  132. package/dist/components/icon/index.js +0 -1
  133. package/dist/components/infotext/index.js +0 -1
  134. package/dist/components/infotext/model.js +0 -1
  135. package/dist/components/input/index.js +0 -1
  136. package/dist/components/link/index.js +0 -1
  137. package/dist/components/navigation/index.js +0 -1
  138. package/dist/components/navigation/model.js +0 -1
  139. package/dist/components/navigation-item/index.js +0 -1
  140. package/dist/components/navigation-item/model.js +0 -1
  141. package/dist/components/notification/index.js +0 -1
  142. package/dist/components/page/index.js +0 -1
  143. package/dist/components/popover/index.js +0 -1
  144. package/dist/components/popover/model.js +0 -1
  145. package/dist/components/radio/index.js +0 -1
  146. package/dist/components/radio/model.js +0 -1
  147. package/dist/components/section/index.js +0 -1
  148. package/dist/components/section/model.js +0 -1
  149. package/dist/components/select/index.js +0 -1
  150. package/dist/components/select/model.js +0 -1
  151. package/dist/components/stack/index.js +0 -1
  152. package/dist/components/switch/index.js +0 -1
  153. package/dist/components/switch/model.js +0 -1
  154. package/dist/components/tab-item/index.js +0 -1
  155. package/dist/components/tab-item/model.js +0 -1
  156. package/dist/components/tab-list/index.js +0 -1
  157. package/dist/components/tab-list/model.js +0 -1
  158. package/dist/components/tab-panel/index.js +0 -1
  159. package/dist/components/tab-panel/model.js +0 -1
  160. package/dist/components/tabs/index.js +0 -1
  161. package/dist/components/tag/index.js +0 -1
  162. package/dist/components/textarea/index.js +0 -1
  163. package/dist/components/tooltip/index.js +0 -1
  164. package/dist/shared/examples/index.js +0 -4
  165. package/dist/shared/figma.js +0 -1
  166. package/dist/shared/showcase/show-code-link.js +0 -51
@@ -1,34 +1,74 @@
1
1
  "use client";
2
- import * as React from "react";
3
- import { filterPassingProps, getRootProps } from "../../utils/react";
4
- import { useState, useRef, useEffect, forwardRef } from "react";
5
- import { DEFAULT_LABEL } from "../../shared/constants";
6
- import { cls, getBooleanAsString } from "../../utils";
7
- function DBBadgeFn(props, component) {
8
- var _a, _b, _c, _d;
9
- const _ref = component || useRef(component);
10
- const [initialized, setInitialized] = useState(() => false);
11
- useEffect(() => {
12
- setInitialized(true);
13
- }, []);
14
- useEffect(() => {
15
- var _a;
16
- if (_ref.current && initialized) {
17
- if ((_a = props.placement) === null || _a === void 0 ? void 0 : _a.startsWith("corner")) {
18
- let parent = _ref.current.parentElement;
19
- if (parent && parent.localName.includes("badge")) {
20
- // Angular workaround
21
- parent = parent.parentElement;
22
- }
23
- if (parent) {
24
- parent.dataset["hasBadge"] = "true";
25
- }
26
- }
27
- }
28
- }, [_ref.current, initialized]);
29
- return (React.createElement("span", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-badge", props.className), "data-semantic": props.semantic, "data-size": props.size, "data-emphasis": props.emphasis, "data-placement": props.placement, "data-wrap": getBooleanAsString(props.wrap), "data-label": ((_c = props.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = props.label) !== null && _d !== void 0 ? _d : DEFAULT_LABEL) }),
30
- props.text ? React.createElement(React.Fragment, null, props.text) : null,
31
- props.children));
2
+ import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
3
+ import { cls as n, getBooleanAsString as r } from "../../utils/index.js";
4
+ import "../../shared/constants.js";
5
+ import { forwardRef as i, useEffect as a, useRef as o, useState as s } from "react";
6
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ //#region src/components/badge/badge.tsx
8
+ function d(i, d) {
9
+ let f = d || o(d), [p, m] = s(() => !1);
10
+ return a(() => {
11
+ m(!0);
12
+ }, []), a(() => {
13
+ if (f.current && p && i.placement?.startsWith("corner")) {
14
+ let e = f.current.parentElement;
15
+ e && e.localName.includes("badge") && (e = e.parentElement), e && (e.dataset.hasBadge = "true");
16
+ }
17
+ }, [f.current, p]), /* @__PURE__ */ u("span", {
18
+ ref: f,
19
+ ...e(i, [
20
+ "data-icon-variant",
21
+ "data-icon-variant-before",
22
+ "data-icon-variant-after",
23
+ "data-icon-weight",
24
+ "data-icon-weight-before",
25
+ "data-icon-weight-after",
26
+ "data-interactive",
27
+ "data-force-mobile",
28
+ "data-color",
29
+ "data-container-color",
30
+ "data-bg-color",
31
+ "data-on-bg-color",
32
+ "data-color-scheme",
33
+ "data-font-size",
34
+ "data-headline-size",
35
+ "data-divider",
36
+ "data-focus",
37
+ "data-font",
38
+ "data-density"
39
+ ]),
40
+ id: i.id ?? i.propOverrides?.id,
41
+ ...t(i, [
42
+ "data-icon-variant",
43
+ "data-icon-variant-before",
44
+ "data-icon-variant-after",
45
+ "data-icon-weight",
46
+ "data-icon-weight-before",
47
+ "data-icon-weight-after",
48
+ "data-interactive",
49
+ "data-force-mobile",
50
+ "data-color",
51
+ "data-container-color",
52
+ "data-bg-color",
53
+ "data-on-bg-color",
54
+ "data-color-scheme",
55
+ "data-font-size",
56
+ "data-headline-size",
57
+ "data-divider",
58
+ "data-focus",
59
+ "data-font",
60
+ "data-density"
61
+ ]),
62
+ className: n("db-badge", i.className),
63
+ "data-semantic": i.semantic,
64
+ "data-size": i.size,
65
+ "data-emphasis": i.emphasis,
66
+ "data-placement": i.placement,
67
+ "data-wrap": r(i.wrap),
68
+ "data-label": i.placement?.startsWith("corner") && (i.label ?? "LABEL SHOULD BE SET"),
69
+ children: [i.text ? /* @__PURE__ */ l(c, { children: i.text }) : null, i.children]
70
+ });
32
71
  }
33
- const DBBadge = forwardRef(DBBadgeFn);
34
- export default DBBadge;
72
+ var f = i(d);
73
+ //#endregion
74
+ export { f as default };
@@ -1,4 +1,4 @@
1
- import { EmphasisProps, GlobalProps, GlobalState, InitializedState, SemanticProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
1
+ import type { EmphasisProps, GlobalProps, GlobalState, InitializedState, SemanticProps, SizeProps, TextProps, WrapProps } from '../../shared/model';
2
2
  export declare const BadgePlacementList: readonly ["inline", "corner-top-left", "corner-top-right", "corner-center-left", "corner-center-right", "corner-bottom-left", "corner-bottom-right"];
3
3
  export type BadgePlacementType = (typeof BadgePlacementList)[number];
4
4
  export type DBBadgeDefaultProps = {
@@ -1 +1,12 @@
1
- export const BadgePlacementList = ['inline', 'corner-top-left', 'corner-top-right', 'corner-center-left', 'corner-center-right', 'corner-bottom-left', 'corner-bottom-right'];
1
+ //#region src/components/badge/model.ts
2
+ var e = [
3
+ "inline",
4
+ "corner-top-left",
5
+ "corner-top-right",
6
+ "corner-center-left",
7
+ "corner-center-right",
8
+ "corner-bottom-left",
9
+ "corner-bottom-right"
10
+ ];
11
+ //#endregion
12
+ export { e as BadgePlacementList };
@@ -1,15 +1,62 @@
1
1
  "use client";
2
- import * as React from "react";
3
- import { filterPassingProps, getRootProps } from "../../utils/react";
4
- import { useRef, forwardRef } from "react";
5
- import { DEFAULT_ICON } from "../../shared/constants";
6
- import { cls, getBooleanAsString } from "../../utils";
7
- function DBBrandFn(props, component) {
8
- var _a, _b, _c;
9
- const _ref = component || useRef(component);
10
- return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { "data-icon": props.hideLogo ? "none" : (_a = props.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(props.showIcon), id: (_b = props.id) !== null && _b !== void 0 ? _b : (_c = props.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-brand", props.className) }),
11
- props.children,
12
- props.text ? React.createElement(React.Fragment, null, props.text) : null));
2
+ import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
3
+ import { cls as n, getBooleanAsString as r } from "../../utils/index.js";
4
+ import "../../shared/constants.js";
5
+ import { forwardRef as i, useRef as a } from "react";
6
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ //#region src/components/brand/brand.tsx
8
+ function l(i, l) {
9
+ return /* @__PURE__ */ c("div", {
10
+ ref: l || a(l),
11
+ ...e(i, [
12
+ "data-icon-variant",
13
+ "data-icon-variant-before",
14
+ "data-icon-variant-after",
15
+ "data-icon-weight",
16
+ "data-icon-weight-before",
17
+ "data-icon-weight-after",
18
+ "data-interactive",
19
+ "data-force-mobile",
20
+ "data-color",
21
+ "data-container-color",
22
+ "data-bg-color",
23
+ "data-on-bg-color",
24
+ "data-color-scheme",
25
+ "data-font-size",
26
+ "data-headline-size",
27
+ "data-divider",
28
+ "data-focus",
29
+ "data-font",
30
+ "data-density"
31
+ ]),
32
+ "data-icon": i.hideLogo ? "none" : i.icon ?? "brand",
33
+ "data-show-icon": r(i.showIcon),
34
+ id: i.id ?? i.propOverrides?.id,
35
+ ...t(i, [
36
+ "data-icon-variant",
37
+ "data-icon-variant-before",
38
+ "data-icon-variant-after",
39
+ "data-icon-weight",
40
+ "data-icon-weight-before",
41
+ "data-icon-weight-after",
42
+ "data-interactive",
43
+ "data-force-mobile",
44
+ "data-color",
45
+ "data-container-color",
46
+ "data-bg-color",
47
+ "data-on-bg-color",
48
+ "data-color-scheme",
49
+ "data-font-size",
50
+ "data-headline-size",
51
+ "data-divider",
52
+ "data-focus",
53
+ "data-font",
54
+ "data-density"
55
+ ]),
56
+ className: n("db-brand", i.className),
57
+ children: [i.children, i.text ? /* @__PURE__ */ s(o, { children: i.text }) : null]
58
+ });
13
59
  }
14
- const DBBrand = forwardRef(DBBrandFn);
15
- export default DBBrand;
60
+ var u = i(l);
61
+ //#endregion
62
+ export { u as default };
@@ -1,4 +1,4 @@
1
- import { GlobalProps, GlobalState, IconProps, ShowIconProps, TextProps } from '../../shared/model';
1
+ import type { GlobalProps, GlobalState, IconProps, ShowIconProps, TextProps } from '../../shared/model';
2
2
  export type DBBrandDefaultProps = {
3
3
  /**
4
4
  * @deprecated: Disable the default logo svg to pass in a custom `img`
@@ -1,23 +1,77 @@
1
1
  "use client";
2
- import * as React from "react";
3
- import { filterPassingProps, getRootProps } from "../../utils/react";
4
- import { useRef, forwardRef } from "react";
5
- import { cls, getBoolean, getBooleanAsString } from "../../utils";
6
- function DBButtonFn(props, component) {
7
- var _a, _b, _c, _d;
8
- const _ref = component || useRef(component);
9
- function getButtonType() {
10
- if (props.type) {
11
- return props.type;
12
- }
13
- else if (props.onClick) {
14
- return "button";
15
- }
16
- return "submit";
17
- }
18
- return (React.createElement("button", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-button", props.className), type: getButtonType(), disabled: getBoolean(props.disabled, "disabled"), "data-icon": (_c = props.iconLeading) !== null && _c !== void 0 ? _c : props.icon, "data-show-icon": getBooleanAsString((_d = props.showIconLeading) !== null && _d !== void 0 ? _d : props.showIcon), "data-icon-trailing": props.iconTrailing, "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing), "data-size": props.size, "data-width": props.width, "data-variant": props.variant, "data-wrap": getBooleanAsString(props.wrap), "data-no-text": getBooleanAsString(props.noText), name: props.name, form: props.form, value: props.value }),
19
- props.text ? React.createElement(React.Fragment, null, props.text) : null,
20
- props.children));
2
+ import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
3
+ import { cls as n, getBoolean as r, getBooleanAsString as i } from "../../utils/index.js";
4
+ import { forwardRef as a, useRef as o } from "react";
5
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ //#region src/components/button/button.tsx
7
+ function u(a, u) {
8
+ let d = u || o(u);
9
+ function f() {
10
+ return a.type ? a.type : a.onClick ? "button" : "submit";
11
+ }
12
+ return /* @__PURE__ */ l("button", {
13
+ ref: d,
14
+ ...e(a, [
15
+ "data-icon-variant",
16
+ "data-icon-variant-before",
17
+ "data-icon-variant-after",
18
+ "data-icon-weight",
19
+ "data-icon-weight-before",
20
+ "data-icon-weight-after",
21
+ "data-interactive",
22
+ "data-force-mobile",
23
+ "data-color",
24
+ "data-container-color",
25
+ "data-bg-color",
26
+ "data-on-bg-color",
27
+ "data-color-scheme",
28
+ "data-font-size",
29
+ "data-headline-size",
30
+ "data-divider",
31
+ "data-focus",
32
+ "data-font",
33
+ "data-density"
34
+ ]),
35
+ id: a.id ?? a.propOverrides?.id,
36
+ ...t(a, [
37
+ "data-icon-variant",
38
+ "data-icon-variant-before",
39
+ "data-icon-variant-after",
40
+ "data-icon-weight",
41
+ "data-icon-weight-before",
42
+ "data-icon-weight-after",
43
+ "data-interactive",
44
+ "data-force-mobile",
45
+ "data-color",
46
+ "data-container-color",
47
+ "data-bg-color",
48
+ "data-on-bg-color",
49
+ "data-color-scheme",
50
+ "data-font-size",
51
+ "data-headline-size",
52
+ "data-divider",
53
+ "data-focus",
54
+ "data-font",
55
+ "data-density"
56
+ ]),
57
+ className: n("db-button", a.className),
58
+ type: f(),
59
+ disabled: r(a.disabled, "disabled"),
60
+ "data-icon": a.iconLeading ?? a.icon,
61
+ "data-show-icon": i(a.showIconLeading ?? a.showIcon),
62
+ "data-icon-trailing": a.iconTrailing,
63
+ "data-show-icon-trailing": i(a.showIconTrailing),
64
+ "data-size": a.size,
65
+ "data-width": a.width,
66
+ "data-variant": a.variant,
67
+ "data-wrap": i(a.wrap),
68
+ "data-no-text": i(a.noText),
69
+ name: a.name,
70
+ form: a.form,
71
+ value: a.value,
72
+ children: [a.text ? /* @__PURE__ */ c(s, { children: a.text }) : null, a.children]
73
+ });
21
74
  }
22
- const DBButton = forwardRef(DBButtonFn);
23
- export default DBButton;
75
+ var d = a(u);
76
+ //#endregion
77
+ export { d as default };
@@ -1,4 +1,4 @@
1
- import { ClickEventProps, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
1
+ import type { ClickEventProps, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, NoTextProps, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, SizeProps, TextProps, WidthProps, WrapProps } from '../../shared/model';
2
2
  export declare const ButtonVariantList: readonly ["outlined", "brand", "filled", "ghost"];
3
3
  export type ButtonVariantType = (typeof ButtonVariantList)[number];
4
4
  export declare const ButtonTypeList: readonly ["button", "reset", "submit"];
@@ -1,2 +1,13 @@
1
- export const ButtonVariantList = ['outlined', 'brand', 'filled', 'ghost'];
2
- export const ButtonTypeList = ['button', 'reset', 'submit'];
1
+ //#region src/components/button/model.ts
2
+ var e = [
3
+ "outlined",
4
+ "brand",
5
+ "filled",
6
+ "ghost"
7
+ ], t = [
8
+ "button",
9
+ "reset",
10
+ "submit"
11
+ ];
12
+ //#endregion
13
+ export { t as ButtonTypeList, e as ButtonVariantList };
@@ -1,17 +1,67 @@
1
1
  "use client";
2
- import * as React from "react";
3
- import { filterPassingProps, getRootProps } from "../../utils/react";
4
- import { useRef, forwardRef } from "react";
5
- import { cls } from "../../utils";
6
- function DBCardFn(props, component) {
7
- var _a, _b;
8
- const _ref = component || useRef(component);
9
- function handleClick(event) {
10
- if (props.onClick) {
11
- props.onClick(event);
12
- }
13
- }
14
- return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-card", props.className), "data-behavior": props.behavior, "data-elevation-level": props.elevationLevel, "data-spacing": props.spacing, onClick: (event) => handleClick(event) }), props.children));
2
+ import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
3
+ import { cls as n } from "../../utils/index.js";
4
+ import { forwardRef as r, useRef as i } from "react";
5
+ import { jsx as a } from "react/jsx-runtime";
6
+ //#region src/components/card/card.tsx
7
+ function o(r, o) {
8
+ let s = o || i(o);
9
+ function c(e) {
10
+ r.onClick && r.onClick(e);
11
+ }
12
+ return /* @__PURE__ */ a("div", {
13
+ ref: s,
14
+ ...e(r, [
15
+ "data-icon-variant",
16
+ "data-icon-variant-before",
17
+ "data-icon-variant-after",
18
+ "data-icon-weight",
19
+ "data-icon-weight-before",
20
+ "data-icon-weight-after",
21
+ "data-interactive",
22
+ "data-force-mobile",
23
+ "data-color",
24
+ "data-container-color",
25
+ "data-bg-color",
26
+ "data-on-bg-color",
27
+ "data-color-scheme",
28
+ "data-font-size",
29
+ "data-headline-size",
30
+ "data-divider",
31
+ "data-focus",
32
+ "data-font",
33
+ "data-density"
34
+ ]),
35
+ id: r.id ?? r.propOverrides?.id,
36
+ ...t(r, [
37
+ "data-icon-variant",
38
+ "data-icon-variant-before",
39
+ "data-icon-variant-after",
40
+ "data-icon-weight",
41
+ "data-icon-weight-before",
42
+ "data-icon-weight-after",
43
+ "data-interactive",
44
+ "data-force-mobile",
45
+ "data-color",
46
+ "data-container-color",
47
+ "data-bg-color",
48
+ "data-on-bg-color",
49
+ "data-color-scheme",
50
+ "data-font-size",
51
+ "data-headline-size",
52
+ "data-divider",
53
+ "data-focus",
54
+ "data-font",
55
+ "data-density"
56
+ ]),
57
+ className: n("db-card", r.className),
58
+ "data-behavior": r.behavior,
59
+ "data-elevation-level": r.elevationLevel,
60
+ "data-spacing": r.spacing,
61
+ onClick: (e) => c(e),
62
+ children: r.children
63
+ });
15
64
  }
16
- const DBCard = forwardRef(DBCardFn);
17
- export default DBCard;
65
+ var s = r(o);
66
+ //#endregion
67
+ export { s as default };
@@ -1,4 +1,4 @@
1
- import { ClickEventProps, ClickEventState, GlobalProps, GlobalState, SpacingProps } from '../../shared/model';
1
+ import type { ClickEventProps, ClickEventState, GlobalProps, GlobalState, SpacingProps } from '../../shared/model';
2
2
  export declare const CardBehaviorList: readonly ["static", "interactive"];
3
3
  export type CardBehaviorType = (typeof CardBehaviorList)[number];
4
4
  export declare const CardElevationLevelList: readonly ["1", "2", "3"];
@@ -1,2 +1,8 @@
1
- export const CardBehaviorList = ['static', 'interactive'];
2
- export const CardElevationLevelList = ['1', '2', '3'];
1
+ //#region src/components/card/model.ts
2
+ var e = ["static", "interactive"], t = [
3
+ "1",
4
+ "2",
5
+ "3"
6
+ ];
7
+ //#endregion
8
+ export { e as CardBehaviorList, t as CardElevationLevelList };