@telia/teddy 0.0.23 → 0.0.25

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 (186) hide show
  1. package/dist/components/accordion/accordion-content.cjs +32 -0
  2. package/dist/components/accordion/accordion-header.cjs +33 -0
  3. package/dist/components/accordion/accordion-indicator.cjs +16 -0
  4. package/dist/components/accordion/accordion-item.cjs +32 -0
  5. package/dist/components/accordion/accordion-root.cjs +56 -0
  6. package/dist/components/accordion/accordion-root.js +11 -11
  7. package/dist/components/accordion/accordion-title.cjs +15 -0
  8. package/dist/components/accordion/accordion-trigger.cjs +37 -0
  9. package/dist/components/accordion/index.cjs +25 -0
  10. package/dist/components/accordion/index.js +7 -0
  11. package/dist/components/badge/badge.cjs +43 -0
  12. package/dist/components/badge/index.cjs +4 -0
  13. package/dist/components/box/box.cjs +17 -0
  14. package/dist/components/box/index.cjs +4 -0
  15. package/dist/components/button/button.cjs +130 -0
  16. package/dist/components/button/button.js +24 -24
  17. package/dist/components/button/index.cjs +4 -0
  18. package/dist/components/card/card.cjs +219 -0
  19. package/dist/components/card/index.cjs +4 -0
  20. package/dist/components/chip/chip-indicator.cjs +16 -0
  21. package/dist/components/chip/chip-item.cjs +45 -0
  22. package/dist/components/chip/chip.cjs +48 -0
  23. package/dist/components/chip/index.cjs +10 -0
  24. package/dist/components/drawer/drawer-close.cjs +39 -0
  25. package/dist/components/drawer/drawer-content.cjs +42 -0
  26. package/dist/components/drawer/drawer-description.cjs +36 -0
  27. package/dist/components/drawer/drawer-footer.cjs +16 -0
  28. package/dist/components/drawer/drawer-overlay.cjs +43 -0
  29. package/dist/components/drawer/drawer-root.cjs +28 -0
  30. package/dist/components/drawer/drawer-title.cjs +34 -0
  31. package/dist/components/drawer/drawer-trigger.cjs +27 -0
  32. package/dist/components/drawer/index.cjs +20 -0
  33. package/dist/components/field-error-text/field-error-text.cjs +30 -0
  34. package/dist/components/field-error-text/index.cjs +4 -0
  35. package/dist/components/flex/flex.cjs +19 -0
  36. package/dist/components/flex/index.cjs +4 -0
  37. package/dist/components/grid/grid.cjs +19 -0
  38. package/dist/components/grid/index.cjs +4 -0
  39. package/dist/components/heading/heading.cjs +55 -0
  40. package/dist/components/heading/index.cjs +4 -0
  41. package/dist/components/helper-text/helper-text.cjs +21 -0
  42. package/dist/components/helper-text/helper-text.d.ts +2 -4
  43. package/dist/components/helper-text/index.cjs +4 -0
  44. package/dist/components/icon/AllIcons.cjs +1091 -0
  45. package/dist/components/icon/AllIcons.d.ts +2 -0
  46. package/dist/components/icon/AllIcons.js +1092 -0
  47. package/dist/components/icon/icon.cjs +29 -0
  48. package/dist/components/icon/index.cjs +8 -0
  49. package/dist/components/icon/index.d.ts +1 -0
  50. package/dist/components/icon/index.js +2 -0
  51. package/dist/components/image/image.cjs +17 -0
  52. package/dist/components/image/index.cjs +4 -0
  53. package/dist/components/index.cjs +66 -0
  54. package/dist/components/index.js +6 -3
  55. package/dist/components/input/index.cjs +14 -0
  56. package/dist/components/input/index.d.ts +27 -2
  57. package/dist/components/input/index.js +10 -1
  58. package/dist/components/input/input-clear-button.cjs +43 -0
  59. package/dist/components/input/input-clear-button.d.ts +6 -0
  60. package/dist/components/input/input-clear-button.js +43 -0
  61. package/dist/components/input/input-group.cjs +132 -0
  62. package/dist/components/input/input-group.d.ts +16 -0
  63. package/dist/components/input/input-group.js +132 -0
  64. package/dist/components/input/input-indicator.cjs +10 -0
  65. package/dist/components/input/input-indicator.d.ts +23 -0
  66. package/dist/components/input/input-indicator.js +10 -0
  67. package/dist/components/input/input.cjs +9 -0
  68. package/dist/components/input/input.d.ts +4 -28
  69. package/dist/components/input/input.js +7 -114
  70. package/dist/components/label/index.cjs +4 -0
  71. package/dist/components/label/label.cjs +44 -0
  72. package/dist/components/link/index.cjs +4 -0
  73. package/dist/components/link/link.cjs +37 -0
  74. package/dist/components/link/link.js +10 -10
  75. package/dist/components/modal/index.cjs +4 -0
  76. package/dist/components/modal/modal.cjs +209 -0
  77. package/dist/components/modal/modal.js +2 -2
  78. package/dist/components/navigation-menu/index.cjs +4 -0
  79. package/dist/components/navigation-menu/navigation-menu.cjs +410 -0
  80. package/dist/components/notification/index.cjs +4 -0
  81. package/dist/components/notification/notification.cjs +116 -0
  82. package/dist/components/notification/notification.js +8 -8
  83. package/dist/components/radio-group/index.cjs +4 -0
  84. package/dist/components/radio-group/radio-group.cjs +110 -0
  85. package/dist/components/scroll-area/index.cjs +9 -0
  86. package/dist/components/scroll-area/scroll-area-bar.cjs +175 -0
  87. package/dist/components/scroll-area/scroll-area-bar.js +8 -8
  88. package/dist/components/scroll-area/scroll-area-button.cjs +11 -0
  89. package/dist/components/scroll-area/scroll-area-corner.cjs +8 -0
  90. package/dist/components/scroll-area/scroll-area-item.cjs +42 -0
  91. package/dist/components/scroll-area/scroll-area-item.js +2 -1
  92. package/dist/components/scroll-area/scroll-area-root.cjs +11 -0
  93. package/dist/components/scroll-area/scroll-area-root.d.ts +11 -1
  94. package/dist/components/scroll-area/scroll-area-thumb.cjs +8 -0
  95. package/dist/components/spinner/index.cjs +4 -0
  96. package/dist/components/spinner/spinner.cjs +57 -0
  97. package/dist/components/tabs/index.cjs +16 -0
  98. package/dist/components/tabs/tabs-content.cjs +32 -0
  99. package/dist/components/tabs/tabs-list.cjs +39 -0
  100. package/dist/components/tabs/tabs-list.js +6 -4
  101. package/dist/components/tabs/tabs-root.cjs +75 -0
  102. package/dist/components/tabs/tabs-root.d.ts +4 -7
  103. package/dist/components/tabs/tabs-root.js +25 -8
  104. package/dist/components/tabs/tabs-scroll-button.cjs +15 -0
  105. package/dist/components/tabs/tabs-scroll.cjs +22 -0
  106. package/dist/components/tabs/tabs-trigger.cjs +55 -0
  107. package/dist/components/tabs/tabs-trigger.js +19 -9
  108. package/dist/components/text/index.cjs +4 -0
  109. package/dist/components/text/text.cjs +49 -0
  110. package/dist/components/text-field/index.cjs +31 -0
  111. package/dist/components/text-field/index.d.ts +63 -2
  112. package/dist/components/text-field/index.js +28 -1
  113. package/dist/components/text-field/text-field-button.cjs +31 -0
  114. package/dist/components/text-field/text-field-button.d.ts +27 -0
  115. package/dist/components/text-field/text-field-button.js +31 -0
  116. package/dist/components/text-field/text-field-clear-button.cjs +12 -0
  117. package/dist/components/text-field/text-field-clear-button.d.ts +6 -0
  118. package/dist/components/text-field/text-field-clear-button.js +12 -0
  119. package/dist/components/text-field/text-field-error-list.cjs +28 -0
  120. package/dist/components/text-field/text-field-error-list.d.ts +9 -0
  121. package/dist/components/text-field/text-field-error-list.js +28 -0
  122. package/dist/components/text-field/text-field-helper-text.cjs +19 -0
  123. package/dist/components/text-field/text-field-helper-text.d.ts +5 -0
  124. package/dist/components/text-field/text-field-helper-text.js +19 -0
  125. package/dist/components/text-field/text-field-indicator.cjs +14 -0
  126. package/dist/components/text-field/text-field-indicator.d.ts +6 -0
  127. package/dist/components/text-field/text-field-indicator.js +14 -0
  128. package/dist/components/text-field/text-field-input-group.cjs +11 -0
  129. package/dist/components/text-field/text-field-input-group.d.ts +7 -0
  130. package/dist/components/text-field/text-field-input-group.js +11 -0
  131. package/dist/components/text-field/text-field-input.cjs +27 -0
  132. package/dist/components/text-field/text-field-input.d.ts +5 -0
  133. package/dist/components/text-field/text-field-input.js +27 -0
  134. package/dist/components/text-field/text-field-label.cjs +27 -0
  135. package/dist/components/text-field/text-field-label.d.ts +8 -0
  136. package/dist/components/text-field/text-field-label.js +27 -0
  137. package/dist/components/text-field/text-field.cjs +54 -0
  138. package/dist/components/text-field/text-field.d.ts +12 -58
  139. package/dist/components/text-field/text-field.js +17 -101
  140. package/dist/components/text-field/util.cjs +4 -0
  141. package/dist/components/text-field/util.d.ts +1 -0
  142. package/dist/components/text-field/util.js +4 -0
  143. package/dist/components/text-spacing/index.cjs +4 -0
  144. package/dist/components/text-spacing/text-spacing.cjs +19 -0
  145. package/dist/components/toggle/index.cjs +4 -0
  146. package/dist/components/toggle/toggle.cjs +104 -0
  147. package/dist/components/visually-hidden/index.cjs +4 -0
  148. package/dist/components/visually-hidden/visually-hidden.cjs +26 -0
  149. package/dist/drawer.module-w9nGK9pO.cjs +13 -0
  150. package/dist/icons/category.cjs +335 -0
  151. package/dist/icons/name.cjs +335 -0
  152. package/dist/icons/name.d.cjs +1 -0
  153. package/dist/main.cjs +374 -0
  154. package/dist/main.js +6 -3
  155. package/dist/style.css +385 -323
  156. package/dist/tokens/border/variables.cjs +20 -0
  157. package/dist/tokens/breakpoint/variables.cjs +10 -0
  158. package/dist/tokens/color/variables.cjs +454 -0
  159. package/dist/tokens/index.cjs +310 -0
  160. package/dist/tokens/motion/variables.cjs +24 -0
  161. package/dist/tokens/shadow/variables.cjs +10 -0
  162. package/dist/tokens/spacing/variables.cjs +48 -0
  163. package/dist/tokens/typography/variables.cjs +50 -0
  164. package/dist/utils/action.cjs +21 -0
  165. package/dist/utils/component-props-as.cjs +1 -0
  166. package/dist/utils/composeEventHandlers.cjs +11 -0
  167. package/dist/utils/composeRefs.cjs +18 -0
  168. package/dist/utils/generate-styling/align.cjs +32 -0
  169. package/dist/utils/generate-styling/color.cjs +12 -0
  170. package/dist/utils/generate-styling/flex.cjs +67 -0
  171. package/dist/utils/generate-styling/gap.cjs +22 -0
  172. package/dist/utils/generate-styling/grid.cjs +123 -0
  173. package/dist/utils/generate-styling/height.cjs +51 -0
  174. package/dist/utils/generate-styling/index.cjs +97 -0
  175. package/dist/utils/generate-styling/inset.cjs +33 -0
  176. package/dist/utils/generate-styling/justify.cjs +18 -0
  177. package/dist/utils/generate-styling/margin.cjs +33 -0
  178. package/dist/utils/generate-styling/object-fit.cjs +18 -0
  179. package/dist/utils/generate-styling/padding.cjs +33 -0
  180. package/dist/utils/generate-styling/position.cjs +21 -0
  181. package/dist/utils/generate-styling/util.cjs +33 -0
  182. package/dist/utils/generate-styling/width.cjs +26 -0
  183. package/dist/vite-env.d.cjs +1 -0
  184. package/package.json +6 -4
  185. package/dist/components/text-field/tex-field-label.d.ts +0 -0
  186. package/dist/components/text-field/tex-field-label.js +0 -1
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const clsx = require("clsx");
6
+ const components_tabs_tabsRoot = require("./tabs-root.cjs");
7
+ const components_scrollArea_index = require("../scroll-area/index.cjs");
8
+ const ScrollButton = React.forwardRef(
9
+ ({ className, ...props }, forwardRef) => {
10
+ const classes = clsx([components_tabs_tabsRoot.styles[`${components_tabs_tabsRoot.rootClassName}__scroll-button`]], className);
11
+ return /* @__PURE__ */ jsxRuntime.jsx(components_scrollArea_index.ScrollArea.Button, { variant: "text", ...props, className: classes, ref: forwardRef });
12
+ }
13
+ );
14
+ ScrollButton.displayName = "ScrollButton";
15
+ exports.ScrollButton = ScrollButton;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const clsx = require("clsx");
6
+ const components_tabs_tabsRoot = require("./tabs-root.cjs");
7
+ const components_scrollArea_index = require("../scroll-area/index.cjs");
8
+ const components_tabs_tabsScrollButton = require("./tabs-scroll-button.cjs");
9
+ const ScrollContext = React.createContext(false);
10
+ const Scroll = React.forwardRef(
11
+ ({ className, children, ...props }, forwardRef) => {
12
+ const classes = clsx([components_tabs_tabsRoot.styles[`${components_tabs_tabsRoot.rootClassName}__scroll`]], className);
13
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(components_scrollArea_index.ScrollArea, { ...props, className: classes, ref: forwardRef, children: [
14
+ /* @__PURE__ */ jsxRuntime.jsx(components_tabs_tabsScrollButton.ScrollButton, { direction: "left" }),
15
+ /* @__PURE__ */ jsxRuntime.jsx(components_tabs_tabsScrollButton.ScrollButton, { direction: "right" }),
16
+ children
17
+ ] }) });
18
+ }
19
+ );
20
+ Scroll.displayName = "Scroll";
21
+ exports.Scroll = Scroll;
22
+ exports.ScrollContext = ScrollContext;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const TabsPrimitive = require("@radix-ui/react-tabs");
6
+ const clsx = require("clsx");
7
+ const components_tabs_tabsRoot = require("./tabs-root.cjs");
8
+ const components_scrollArea_index = require("../scroll-area/index.cjs");
9
+ const components_button_button = require("../button/button.cjs");
10
+ const utils_composeRefs = require("../../utils/composeRefs.cjs");
11
+ const tokens_motion_variables = require("../../tokens/motion/variables.cjs");
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== "default") {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+ const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
29
+ const Trigger = React.forwardRef(
30
+ ({ className, ...props }, forwardRef) => {
31
+ const classes = clsx([components_tabs_tabsRoot.styles[`${components_tabs_tabsRoot.rootClassName}__trigger`]], className);
32
+ const innerElementRef = React.useRef(null);
33
+ const context = React.useContext(components_tabs_tabsRoot.RootContext);
34
+ React.useEffect(() => {
35
+ if ((context == null ? void 0 : context.value) === props.value && innerElementRef.current) {
36
+ const newTab = innerElementRef.current;
37
+ context == null ? void 0 : context.setActiveElement(newTab);
38
+ const tabsContainer = context == null ? void 0 : context.listElement.current;
39
+ if (!newTab || !tabsContainer)
40
+ return;
41
+ const newTabWidth = newTab.offsetWidth / tabsContainer.offsetWidth;
42
+ context == null ? void 0 : context.setActiveElement(innerElementRef.current);
43
+ tabsContainer.style.setProperty("--_width", newTabWidth.toFixed(3));
44
+ tabsContainer.style.setProperty("--_left", newTab.offsetLeft + "px");
45
+ tabsContainer.style.setProperty("--_duration", tokens_motion_variables.teddyMotionDuration200);
46
+ }
47
+ }, [context, props.value]);
48
+ if (context == null ? void 0 : context.snapCenter) {
49
+ return /* @__PURE__ */ jsxRuntime.jsx(components_scrollArea_index.ScrollArea.Item, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_button_button.Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { ...props, ref: utils_composeRefs.composeRefs(forwardRef, innerElementRef), className: classes }) }) });
50
+ }
51
+ return /* @__PURE__ */ jsxRuntime.jsx(components_button_button.Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Trigger, { ...props, ref: utils_composeRefs.composeRefs(forwardRef, innerElementRef), className: classes }) });
52
+ }
53
+ );
54
+ Trigger.displayName = "Trigger";
55
+ exports.Trigger = Trigger;
@@ -3,23 +3,33 @@ import React__default from "react";
3
3
  import * as TabsPrimitive from "@radix-ui/react-tabs";
4
4
  import clsx from "clsx";
5
5
  import { s as styles, rootClassName, RootContext } from "./tabs-root.js";
6
- import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
7
6
  import { ScrollArea } from "../scroll-area/index.js";
8
7
  import { Button } from "../button/button.js";
8
+ import { composeRefs } from "../../utils/composeRefs.js";
9
+ import { teddyMotionDuration200 } from "../../tokens/motion/variables.js";
9
10
  const Trigger = React__default.forwardRef(
10
11
  ({ className, ...props }, forwardRef) => {
11
12
  const classes = clsx([styles[`${rootClassName}__trigger`]], className);
13
+ const innerElementRef = React__default.useRef(null);
12
14
  const context = React__default.useContext(RootContext);
13
- function onClick() {
14
- return composeEventHandlers(
15
- props.onClick,
16
- (e) => context == null ? void 0 : context.setActiveElement(e.currentTarget.getBoundingClientRect())
17
- );
18
- }
15
+ React__default.useEffect(() => {
16
+ if ((context == null ? void 0 : context.value) === props.value && innerElementRef.current) {
17
+ const newTab = innerElementRef.current;
18
+ context == null ? void 0 : context.setActiveElement(newTab);
19
+ const tabsContainer = context == null ? void 0 : context.listElement.current;
20
+ if (!newTab || !tabsContainer)
21
+ return;
22
+ const newTabWidth = newTab.offsetWidth / tabsContainer.offsetWidth;
23
+ context == null ? void 0 : context.setActiveElement(innerElementRef.current);
24
+ tabsContainer.style.setProperty("--_width", newTabWidth.toFixed(3));
25
+ tabsContainer.style.setProperty("--_left", newTab.offsetLeft + "px");
26
+ tabsContainer.style.setProperty("--_duration", teddyMotionDuration200);
27
+ }
28
+ }, [context, props.value]);
19
29
  if (context == null ? void 0 : context.snapCenter) {
20
- return /* @__PURE__ */ jsx(ScrollArea.Item, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ...props, onClick, ref: forwardRef, className: classes }) }) });
30
+ return /* @__PURE__ */ jsx(ScrollArea.Item, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ...props, ref: composeRefs(forwardRef, innerElementRef), className: classes }) }) });
21
31
  }
22
- return /* @__PURE__ */ jsx(Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ...props, onClick, ref: forwardRef, className: classes }) });
32
+ return /* @__PURE__ */ jsx(Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ jsx(TabsPrimitive.Trigger, { ...props, ref: composeRefs(forwardRef, innerElementRef), className: classes }) });
23
33
  }
24
34
  );
25
35
  Trigger.displayName = "Trigger";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_text_text = require("./text.cjs");
4
+ exports.Text = components_text_text.Text;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const reactSlot = require("@radix-ui/react-slot");
5
+ const clsx = require("clsx");
6
+ const React = require("react");
7
+ const utils_generateStyling_index = require("../../utils/generate-styling/index.cjs");
8
+ const tokens_color_variables = require("../../tokens/color/variables.cjs");
9
+ const styles = {
10
+ "teddy-text": "_teddy-text_15w9u_2",
11
+ "teddy-text--disabled": "_teddy-text--disabled_15w9u_8",
12
+ "teddy-text--hyphens": "_teddy-text--hyphens_15w9u_11",
13
+ "teddy-text--paragraph-100": "_teddy-text--paragraph-100_15w9u_14",
14
+ "teddy-text--paragraph-100-medium": "_teddy-text--paragraph-100-medium_15w9u_20",
15
+ "teddy-text--paragraph-100-bold": "_teddy-text--paragraph-100-bold_15w9u_27",
16
+ "teddy-text--paragraph-200": "_teddy-text--paragraph-200_15w9u_34",
17
+ "teddy-text--preamble-100": "_teddy-text--preamble-100_15w9u_40",
18
+ "teddy-text--preamble-200": "_teddy-text--preamble-200_15w9u_46",
19
+ "teddy-text--additional-100": "_teddy-text--additional-100_15w9u_52",
20
+ "teddy-text--additional-100-medium": "_teddy-text--additional-100-medium_15w9u_58",
21
+ "teddy-text--overline-100": "_teddy-text--overline-100_15w9u_65",
22
+ "teddy-text--overline-200": "_teddy-text--overline-200_15w9u_72"
23
+ };
24
+ const rootClassName = "teddy-text";
25
+ const Text = React.forwardRef(({ faded, ...props }, forwardRef) => {
26
+ const color = faded ? tokens_color_variables.teddyColorTextMedium : props.color;
27
+ const {
28
+ className,
29
+ children,
30
+ disabled,
31
+ enableHyphenation,
32
+ variant = "paragraph-100",
33
+ asChild,
34
+ as: Tag = "p",
35
+ ...rest
36
+ } = utils_generateStyling_index.extractProps({ ...props, color });
37
+ const classes = clsx(
38
+ styles[rootClassName],
39
+ styles[`${rootClassName}--${variant}`],
40
+ {
41
+ [styles[`${rootClassName}--hyphens`]]: enableHyphenation,
42
+ [styles[`${rootClassName}--disabled`]]: disabled
43
+ },
44
+ className
45
+ );
46
+ return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { ...rest, ref: forwardRef, className: classes, children: asChild ? children : /* @__PURE__ */ jsxRuntime.jsx(Tag, { children }) });
47
+ });
48
+ Text.displayName = "Text";
49
+ exports.Text = Text;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_textField_textField = require("./text-field.cjs");
4
+ const components_textField_textFieldInput = require("./text-field-input.cjs");
5
+ const components_textField_textFieldLabel = require("./text-field-label.cjs");
6
+ const components_textField_textFieldInputGroup = require("./text-field-input-group.cjs");
7
+ const components_textField_textFieldHelperText = require("./text-field-helper-text.cjs");
8
+ const components_textField_textFieldErrorList = require("./text-field-error-list.cjs");
9
+ const components_textField_textFieldIndicator = require("./text-field-indicator.cjs");
10
+ const components_textField_textFieldButton = require("./text-field-button.cjs");
11
+ const components_textField_textFieldClearButton = require("./text-field-clear-button.cjs");
12
+ components_textField_textField.Root.displayName = "TextField";
13
+ components_textField_textFieldInput.Input.displayName = "TextField.Input";
14
+ components_textField_textFieldLabel.Label.displayName = "TextField.Label";
15
+ components_textField_textFieldInputGroup.InputGroup.displayName = "TextField.Group";
16
+ components_textField_textFieldHelperText.HelperText.displayName = "TextField.HelperText";
17
+ components_textField_textFieldErrorList.ErrorList.displayName = "TextField.ErrorList";
18
+ components_textField_textFieldIndicator.Indicator.displayName = "TextField.Indicator";
19
+ components_textField_textFieldButton.Button.displayName = "TextField.Button";
20
+ components_textField_textFieldClearButton.ClearButton.displayName = "TextField.ClearButton";
21
+ const TextField = Object.assign(components_textField_textField.Root, {
22
+ Input: components_textField_textFieldInput.Input,
23
+ Label: components_textField_textFieldLabel.Label,
24
+ InputGroup: components_textField_textFieldInputGroup.InputGroup,
25
+ HelperText: components_textField_textFieldHelperText.HelperText,
26
+ ErrorList: components_textField_textFieldErrorList.ErrorList,
27
+ Indicator: components_textField_textFieldIndicator.Indicator,
28
+ Button: components_textField_textFieldButton.Button,
29
+ ClearButton: components_textField_textFieldClearButton.ClearButton
30
+ });
31
+ exports.TextField = TextField;
@@ -1,2 +1,63 @@
1
- export { TextField } from './text-field';
2
- export type { TextFieldProps } from './text-field';
1
+ import { TextFieldRootProps } from './text-field';
2
+ import { TextFieldInputProps } from './text-field-input';
3
+ import { TextFieldLabelProps } from './text-field-label';
4
+ import { TextFieldInputGroupProps } from './text-field-input-group';
5
+ import { TextFieldHelperTextProps } from './text-field-helper-text';
6
+ import { TextFieldErrorListProps } from './text-field-error-list';
7
+ import { TextFieldIndicatorProps } from './text-field-indicator';
8
+ import { TextFieldButtonProps } from './text-field-button';
9
+ import { TextFieldClearButtonProps } from './text-field-clear-button';
10
+
11
+ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & Pick<import('../input/input-indicator').InputIndicatorProps, "isLoading" | "isValid"> & {
12
+ disabled?: boolean | undefined;
13
+ readOnly?: boolean | undefined;
14
+ errors?: (string | null | undefined)[] | null | undefined;
15
+ isRequired?: boolean | undefined;
16
+ } & import('react').RefAttributes<HTMLDivElement>> & {
17
+ Input: import('react').ForwardRefExoticComponent<TextFieldInputProps & import('react').RefAttributes<HTMLInputElement>>;
18
+ Label: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-label').LabelProps & import('react').RefAttributes<HTMLLabelElement>, "ref"> & {
19
+ disabled?: boolean | undefined;
20
+ isRequired?: boolean | undefined;
21
+ } & import('react').RefAttributes<HTMLLabelElement>>;
22
+ InputGroup: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
23
+ frameClassName?: string | undefined;
24
+ } & import('react').RefAttributes<HTMLDivElement>>;
25
+ HelperText: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
26
+ ErrorList: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "children"> & {
27
+ children?: import('react').ReactNode | ((args: Pick<import('./text-field').TextFieldContextValue, "errors">) => import('react').ReactNode);
28
+ } & import('react').RefAttributes<HTMLUListElement>>;
29
+ Indicator: import('react').ForwardRefExoticComponent<TextFieldIndicatorProps & import('react').RefAttributes<SVGSVGElement>>;
30
+ Button: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
31
+ asChild?: boolean | undefined;
32
+ loading?: boolean | undefined;
33
+ fullWidth?: boolean | undefined;
34
+ size?: "sm" | "md" | "lg" | undefined;
35
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
36
+ } & {
37
+ iconOnly: true;
38
+ "aria-label": string;
39
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
40
+ asChild?: boolean | undefined;
41
+ loading?: boolean | undefined;
42
+ fullWidth?: boolean | undefined;
43
+ size?: "sm" | "md" | "lg" | undefined;
44
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
45
+ } & {
46
+ iconOnly?: false | undefined;
47
+ "aria-label"?: string | undefined;
48
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
49
+ variant?: "attached" | "separated" | undefined;
50
+ } & import('react').RefAttributes<HTMLButtonElement>>;
51
+ ClearButton: import('react').ForwardRefExoticComponent<import('../input/input-clear-button').ClearButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
52
+ };
53
+ export type TextFieldProps = {
54
+ Root: TextFieldRootProps;
55
+ Input: TextFieldInputProps;
56
+ Label: TextFieldLabelProps;
57
+ Group: TextFieldInputGroupProps;
58
+ HelperText: TextFieldHelperTextProps;
59
+ ErrorList: TextFieldErrorListProps;
60
+ Indicator: TextFieldIndicatorProps;
61
+ Button: TextFieldButtonProps;
62
+ ClearButton: TextFieldClearButtonProps;
63
+ };
@@ -1,4 +1,31 @@
1
- import { TextField } from "./text-field.js";
1
+ import { Root } from "./text-field.js";
2
+ import { Input } from "./text-field-input.js";
3
+ import { Label } from "./text-field-label.js";
4
+ import { InputGroup } from "./text-field-input-group.js";
5
+ import { HelperText } from "./text-field-helper-text.js";
6
+ import { ErrorList } from "./text-field-error-list.js";
7
+ import { Indicator } from "./text-field-indicator.js";
8
+ import { Button } from "./text-field-button.js";
9
+ import { ClearButton } from "./text-field-clear-button.js";
10
+ Root.displayName = "TextField";
11
+ Input.displayName = "TextField.Input";
12
+ Label.displayName = "TextField.Label";
13
+ InputGroup.displayName = "TextField.Group";
14
+ HelperText.displayName = "TextField.HelperText";
15
+ ErrorList.displayName = "TextField.ErrorList";
16
+ Indicator.displayName = "TextField.Indicator";
17
+ Button.displayName = "TextField.Button";
18
+ ClearButton.displayName = "TextField.ClearButton";
19
+ const TextField = Object.assign(Root, {
20
+ Input,
21
+ Label,
22
+ InputGroup,
23
+ HelperText,
24
+ ErrorList,
25
+ Indicator,
26
+ Button,
27
+ ClearButton
28
+ });
2
29
  export {
3
30
  TextField
4
31
  };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const clsx = require("clsx");
6
+ const components_textField_textField = require("./text-field.cjs");
7
+ const components_button_button = require("../button/button.cjs");
8
+ const Button = React.forwardRef(
9
+ ({ className, variant, iconOnly, ...props }, forwardRef) => {
10
+ const classes = clsx(
11
+ [components_textField_textField.styles[`${components_textField_textField.rootClassName}__button`]],
12
+ {
13
+ [components_textField_textField.styles[`${components_textField_textField.rootClassName}__button--attached`]]: variant === "attached",
14
+ [components_textField_textField.styles[`${components_textField_textField.rootClassName}__button--separated`]]: variant === "separated"
15
+ },
16
+ className
17
+ );
18
+ return /* @__PURE__ */ jsxRuntime.jsx(
19
+ components_button_button.Button,
20
+ {
21
+ ...props,
22
+ variant: "primary",
23
+ ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
24
+ ref: forwardRef,
25
+ className: classes
26
+ }
27
+ );
28
+ }
29
+ );
30
+ Button.displayName = "Button";
31
+ exports.Button = Button;
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { Button as PrimitiveButton } from '../button';
3
+
4
+ export type TextFieldButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'variant'> & {
5
+ variant?: 'attached' | 'separated';
6
+ };
7
+ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
8
+ asChild?: boolean | undefined;
9
+ loading?: boolean | undefined;
10
+ fullWidth?: boolean | undefined;
11
+ size?: "sm" | "md" | "lg" | undefined;
12
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
13
+ } & {
14
+ iconOnly: true;
15
+ "aria-label": string;
16
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
17
+ asChild?: boolean | undefined;
18
+ loading?: boolean | undefined;
19
+ fullWidth?: boolean | undefined;
20
+ size?: "sm" | "md" | "lg" | undefined;
21
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
22
+ } & {
23
+ iconOnly?: false | undefined;
24
+ "aria-label"?: string | undefined;
25
+ } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
26
+ variant?: "attached" | "separated" | undefined;
27
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,31 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { s as styles, rootClassName } from "./text-field.js";
5
+ import { Button as Button$1 } from "../button/button.js";
6
+ const Button = React__default.forwardRef(
7
+ ({ className, variant, iconOnly, ...props }, forwardRef) => {
8
+ const classes = clsx(
9
+ [styles[`${rootClassName}__button`]],
10
+ {
11
+ [styles[`${rootClassName}__button--attached`]]: variant === "attached",
12
+ [styles[`${rootClassName}__button--separated`]]: variant === "separated"
13
+ },
14
+ className
15
+ );
16
+ return /* @__PURE__ */ jsx(
17
+ Button$1,
18
+ {
19
+ ...props,
20
+ variant: "primary",
21
+ ...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
22
+ ref: forwardRef,
23
+ className: classes
24
+ }
25
+ );
26
+ }
27
+ );
28
+ Button.displayName = "Button";
29
+ export {
30
+ Button
31
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const components_input_inputClearButton = require("../input/input-clear-button.cjs");
6
+ const ClearButton = React.forwardRef(
7
+ (props, forwardRef) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(components_input_inputClearButton.ClearButton, { ...props, ref: forwardRef });
9
+ }
10
+ );
11
+ ClearButton.displayName = "ClearButton";
12
+ exports.ClearButton = ClearButton;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { ClearButtonProps } from '../input/input-clear-button';
3
+
4
+ export type TextFieldClearButtonProps = ClearButtonProps;
5
+ /** This is a button that is used to clear the input field */
6
+ export declare const ClearButton: React.ForwardRefExoticComponent<ClearButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import { ClearButton as ClearButton$1 } from "../input/input-clear-button.js";
4
+ const ClearButton = React__default.forwardRef(
5
+ (props, forwardRef) => {
6
+ return /* @__PURE__ */ jsx(ClearButton$1, { ...props, ref: forwardRef });
7
+ }
8
+ );
9
+ ClearButton.displayName = "ClearButton";
10
+ export {
11
+ ClearButton
12
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const clsx = require("clsx");
5
+ const React = require("react");
6
+ const components_fieldErrorText_fieldErrorText = require("../field-error-text/field-error-text.cjs");
7
+ const components_textField_textField = require("./text-field.cjs");
8
+ const ErrorList = React.forwardRef(
9
+ ({ className, children, ...props }, forwardRef) => {
10
+ const classes = clsx([components_textField_textField.styles[`${components_textField_textField.rootClassName}__error-list`]], className);
11
+ const context = React.useContext(components_textField_textField.TextFieldContext);
12
+ const errors = context == null ? void 0 : context.errors;
13
+ React.useEffect(() => {
14
+ if (!context)
15
+ return;
16
+ const errorId = (errors == null ? void 0 : errors.length) ? `${context.id}-error` : void 0;
17
+ context == null ? void 0 : context.setErrorId(errorId);
18
+ }, [errors, context]);
19
+ if (!context || !context.errors)
20
+ return null;
21
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { id: context.errorId, "aria-live": "assertive", ...props, ref: forwardRef, className: classes, children: typeof children === "function" ? children({ errors }) : children || (errors == null ? void 0 : errors.map((error) => /* @__PURE__ */ jsxRuntime.jsx(components_fieldErrorText_fieldErrorText.FieldErrorText, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
22
+ /* @__PURE__ */ jsxRuntime.jsx(components_fieldErrorText_fieldErrorText.FieldErrorText.Indicator, {}),
23
+ error
24
+ ] }) }, error))) });
25
+ }
26
+ );
27
+ ErrorList.displayName = "ErrorList";
28
+ exports.ErrorList = ErrorList;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { TextFieldContextValue } from './text-field';
3
+
4
+ export type TextFieldErrorListProps = Omit<React.ComponentPropsWithoutRef<'ul'>, 'children'> & {
5
+ children?: ((args: Pick<TextFieldContextValue, 'errors'>) => React.ReactNode) | React.ReactNode;
6
+ };
7
+ export declare const ErrorList: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "children"> & {
8
+ children?: ((args: Pick<TextFieldContextValue, 'errors'>) => React.ReactNode) | React.ReactNode;
9
+ } & React.RefAttributes<HTMLUListElement>>;
@@ -0,0 +1,28 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import React__default from "react";
4
+ import { FieldErrorText } from "../field-error-text/field-error-text.js";
5
+ import { s as styles, rootClassName, TextFieldContext } from "./text-field.js";
6
+ const ErrorList = React__default.forwardRef(
7
+ ({ className, children, ...props }, forwardRef) => {
8
+ const classes = clsx([styles[`${rootClassName}__error-list`]], className);
9
+ const context = React__default.useContext(TextFieldContext);
10
+ const errors = context == null ? void 0 : context.errors;
11
+ React__default.useEffect(() => {
12
+ if (!context)
13
+ return;
14
+ const errorId = (errors == null ? void 0 : errors.length) ? `${context.id}-error` : void 0;
15
+ context == null ? void 0 : context.setErrorId(errorId);
16
+ }, [errors, context]);
17
+ if (!context || !context.errors)
18
+ return null;
19
+ return /* @__PURE__ */ jsx("ul", { id: context.errorId, "aria-live": "assertive", ...props, ref: forwardRef, className: classes, children: typeof children === "function" ? children({ errors }) : children || (errors == null ? void 0 : errors.map((error) => /* @__PURE__ */ jsx(FieldErrorText, { asChild: true, children: /* @__PURE__ */ jsxs("li", { children: [
20
+ /* @__PURE__ */ jsx(FieldErrorText.Indicator, {}),
21
+ error
22
+ ] }) }, error))) });
23
+ }
24
+ );
25
+ ErrorList.displayName = "ErrorList";
26
+ export {
27
+ ErrorList
28
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const clsx = require("clsx");
5
+ const React = require("react");
6
+ const components_helperText_helperText = require("../helper-text/helper-text.cjs");
7
+ const components_textField_textField = require("./text-field.cjs");
8
+ const HelperText = React.forwardRef(
9
+ ({ className, ...props }, forwardRef) => {
10
+ const context = React.useContext(components_textField_textField.TextFieldContext);
11
+ const classes = clsx([components_textField_textField.styles[`${components_textField_textField.rootClassName}__helper-text`]], className);
12
+ React.useEffect(() => {
13
+ context == null ? void 0 : context.setHelperTextId(`${context.id}-helper-text`);
14
+ }, [context]);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(components_helperText_helperText.HelperText, { id: context == null ? void 0 : context.helperTextId, ...props, ref: forwardRef, className: classes });
16
+ }
17
+ );
18
+ HelperText.displayName = "HelperText";
19
+ exports.HelperText = HelperText;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { HelperTextProps } from '../helper-text';
3
+
4
+ export type TextFieldHelperTextProps = HelperTextProps;
5
+ export declare const HelperText: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import React__default from "react";
4
+ import { HelperText as HelperText$1 } from "../helper-text/helper-text.js";
5
+ import { TextFieldContext, s as styles, rootClassName } from "./text-field.js";
6
+ const HelperText = React__default.forwardRef(
7
+ ({ className, ...props }, forwardRef) => {
8
+ const context = React__default.useContext(TextFieldContext);
9
+ const classes = clsx([styles[`${rootClassName}__helper-text`]], className);
10
+ React__default.useEffect(() => {
11
+ context == null ? void 0 : context.setHelperTextId(`${context.id}-helper-text`);
12
+ }, [context]);
13
+ return /* @__PURE__ */ jsx(HelperText$1, { id: context == null ? void 0 : context.helperTextId, ...props, ref: forwardRef, className: classes });
14
+ }
15
+ );
16
+ HelperText.displayName = "HelperText";
17
+ export {
18
+ HelperText
19
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const components_input_index = require("../input/index.cjs");
6
+ const components_textField_textField = require("./text-field.cjs");
7
+ const Indicator = React.forwardRef(
8
+ (props, forwardRef) => {
9
+ const context = React.useContext(components_textField_textField.TextFieldContext);
10
+ return /* @__PURE__ */ jsxRuntime.jsx(components_input_index.InputGroup.Indicator, { ...props, isValid: context == null ? void 0 : context.isValid, isLoading: context == null ? void 0 : context.isLoading, ref: forwardRef });
11
+ }
12
+ );
13
+ Indicator.displayName = "Indicator";
14
+ exports.Indicator = Indicator;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { InputGroupProps } from '../input';
3
+ import { indicatorFelidsInRoot } from './util';
4
+
5
+ export type TextFieldIndicatorProps = Omit<InputGroupProps['Indicator'], (typeof indicatorFelidsInRoot)[number]>;
6
+ export declare const Indicator: React.ForwardRefExoticComponent<TextFieldIndicatorProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import { InputGroup } from "../input/index.js";
4
+ import { TextFieldContext } from "./text-field.js";
5
+ const Indicator = React__default.forwardRef(
6
+ (props, forwardRef) => {
7
+ const context = React__default.useContext(TextFieldContext);
8
+ return /* @__PURE__ */ jsx(InputGroup.Indicator, { ...props, isValid: context == null ? void 0 : context.isValid, isLoading: context == null ? void 0 : context.isLoading, ref: forwardRef });
9
+ }
10
+ );
11
+ Indicator.displayName = "Indicator";
12
+ export {
13
+ Indicator
14
+ };