@frontify/fondue-components 1.2.3 → 1.3.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 (54) hide show
  1. package/dist/fondue-components.js +16 -4
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +46 -114
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +45 -34
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +8 -2360
  8. package/dist/fondue-components12.js.map +1 -1
  9. package/dist/fondue-components13.js +11 -142
  10. package/dist/fondue-components13.js.map +1 -1
  11. package/dist/fondue-components14.js +154 -29
  12. package/dist/fondue-components14.js.map +1 -1
  13. package/dist/fondue-components15.js +121 -0
  14. package/dist/fondue-components15.js.map +1 -0
  15. package/dist/fondue-components16.js +121 -0
  16. package/dist/fondue-components16.js.map +1 -0
  17. package/dist/fondue-components17.js +23 -0
  18. package/dist/fondue-components17.js.map +1 -0
  19. package/dist/fondue-components18.js +63 -0
  20. package/dist/fondue-components18.js.map +1 -0
  21. package/dist/fondue-components19.js +20 -0
  22. package/dist/fondue-components19.js.map +1 -0
  23. package/dist/fondue-components20.js +38 -0
  24. package/dist/fondue-components20.js.map +1 -0
  25. package/dist/fondue-components21.js +28 -0
  26. package/dist/fondue-components21.js.map +1 -0
  27. package/dist/fondue-components22.js +11 -0
  28. package/dist/fondue-components22.js.map +1 -0
  29. package/dist/fondue-components23.js +8 -0
  30. package/dist/fondue-components23.js.map +1 -0
  31. package/dist/fondue-components24.js +18 -0
  32. package/dist/fondue-components24.js.map +1 -0
  33. package/dist/fondue-components25.js +2363 -0
  34. package/dist/fondue-components25.js.map +1 -0
  35. package/dist/fondue-components26.js +146 -0
  36. package/dist/fondue-components26.js.map +1 -0
  37. package/dist/fondue-components27.js +32 -0
  38. package/dist/fondue-components27.js.map +1 -0
  39. package/dist/fondue-components3.js +5 -5
  40. package/dist/fondue-components4.js +44 -51
  41. package/dist/fondue-components4.js.map +1 -1
  42. package/dist/fondue-components5.js +22 -34
  43. package/dist/fondue-components5.js.map +1 -1
  44. package/dist/fondue-components6.js +58 -8
  45. package/dist/fondue-components6.js.map +1 -1
  46. package/dist/fondue-components7.js +23 -11
  47. package/dist/fondue-components7.js.map +1 -1
  48. package/dist/fondue-components8.js +38 -153
  49. package/dist/fondue-components8.js.map +1 -1
  50. package/dist/fondue-components9.js +46 -117
  51. package/dist/fondue-components9.js.map +1 -1
  52. package/dist/index.d.ts +377 -8
  53. package/dist/style.css +1 -1
  54. package/package.json +41 -31
@@ -1,121 +1,50 @@
1
- import { sv as e } from "./fondue-components7.js";
2
- const s = e({
3
- variants: {
4
- emphasis: {
5
- default: "",
6
- weak: "",
7
- strong: ""
8
- },
9
- style: {
10
- default: "",
11
- positive: "",
12
- negative: "",
13
- danger: "",
14
- loud: ""
15
- },
16
- disabled: {
17
- true: "tw-text-box-disabled-inverse"
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import * as r from "@radix-ui/react-toggle-group";
3
+ import { forwardRef as m } from "react";
4
+ import { useControllableState as S } from "./fondue-components21.js";
5
+ import { segmentedControlRootStyles as f, segmentedControlActiveIndicatorStyles as I, segmentedControlItemStyles as y, segmentedControlItemSeparatorStyles as N, segmentedControlItemLabelStyles as u, segmentedControlItemLabelActiveStyles as b, segmentedControlItemLabelInactiveStyles as h } from "./fondue-components22.js";
6
+ const d = ({ children: e, value: o, defaultValue: s, onValueChange: c, ...a }, g) => {
7
+ const [p, C] = S({
8
+ prop: o,
9
+ defaultProp: s,
10
+ onChange: c
11
+ });
12
+ return /* @__PURE__ */ l(
13
+ r.Root,
14
+ {
15
+ ref: g,
16
+ ...a,
17
+ className: f,
18
+ onValueChange: (n) => {
19
+ n && C(n);
20
+ },
21
+ value: p,
22
+ type: "single",
23
+ asChild: !1,
24
+ "aria-disabled": a.disabled,
25
+ children: [
26
+ e,
27
+ /* @__PURE__ */ t("div", { className: I })
28
+ ]
18
29
  }
19
- },
20
- compoundVariants: [
21
- {
22
- disabled: !1,
23
- style: "default",
24
- emphasis: "default",
25
- class: "[&_svg]:tw-text-button-icon group-hover:[&_svg]:tw-text-button-icon-hover group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none"
26
- },
27
- {
28
- disabled: !1,
29
- style: "default",
30
- emphasis: "weak",
31
- class: "[&_svg]:tw-text-button-icon group-hover:[&_svg]:tw-text-button-icon-hover group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none"
32
- },
33
- {
34
- disabled: !1,
35
- style: "default",
36
- emphasis: "strong",
37
- class: "[&_svg]:tw-text-button-strong-icon group-hover:[&_svg]:tw-text-button-strong-icon-hover group-active:[&_svg]:tw-text-button-strong-icon-pressed [&_svg]:tw-leading-none"
38
- },
39
- {
40
- disabled: !1,
41
- style: "positive",
42
- emphasis: "default",
43
- class: "[&_svg]:tw-text-button-positive-icon group-hover:[&_svg]:tw-text-button-positive-icon-hover group-active:[&_svg]:tw-text-button-positive-icon-pressed [&_svg]:tw-leading-none"
44
- },
45
- {
46
- disabled: !1,
47
- style: "positive",
48
- emphasis: "weak",
49
- class: "[&_svg]:tw-text-button-strong-positive-icon group-hover:[&_svg]:tw-text-button-strong-positive-icon-hovergroup-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none"
50
- },
51
- {
52
- disabled: !1,
53
- style: "positive",
54
- emphasis: "strong",
55
- class: "[&_svg]:tw-text-button-strong-positive-icon group-hover:[&_svg]:tw-text-button-strong-positive-icon-hover group-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none"
56
- },
57
- {
58
- disabled: !1,
59
- style: "negative",
60
- emphasis: "default",
61
- class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
62
- },
63
- {
64
- disabled: !1,
65
- style: "negative",
66
- emphasis: "weak",
67
- class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
68
- },
69
- {
70
- disabled: !1,
71
- style: "negative",
72
- emphasis: "strong",
73
- class: "[&_svg]:tw-text-button-strong-negative-icon group-hover:[&_svg]:tw-text-button-strong-negative-icon-hovergroup-active:[&_svg]:tw-text-button-strong-negative-icon-pressed [&_svg]:tw-leading-none"
74
- },
75
- {
76
- disabled: !1,
77
- style: "danger",
78
- emphasis: "default",
79
- class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
80
- },
81
- {
82
- disabled: !1,
83
- style: "danger",
84
- emphasis: "weak",
85
- class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
86
- },
87
- {
88
- disabled: !1,
89
- style: "danger",
90
- emphasis: "strong",
91
- class: "[&_svg]:tw-text-button-danger-icon group-hover:[&_svg]:tw-text-button-danger-icon-hovergroup-active:[&_svg]:tw-text-button-danger-icon-pressed [&_svg]:tw-leading-none"
92
- },
93
- {
94
- disabled: !1,
95
- style: "loud",
96
- emphasis: "default",
97
- class: "[&_svg]:tw-text-box-selected-inverse group-hover:[&_svg]:tw-text-box-selected-inverse-hovergroup-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none"
98
- },
99
- {
100
- disabled: !1,
101
- style: "loud",
102
- emphasis: "weak",
103
- class: "[&_svg]:tw-text-box-selected-inverse group-hover:[&_svg]:tw-text-box-selected-inverse-hovergroup-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none"
104
- },
105
- {
106
- disabled: !1,
107
- style: "loud",
108
- emphasis: "strong",
109
- class: "[&_svg]:tw-text-box-selected-strong-inverse group-hover:[&_svg]:tw-text-box-selected-strong-inversegroup-active:[&_svg]:tw-text-box-selected-strong-inverse [&_svg]:tw-leading-none"
110
- }
111
- ],
112
- defaultVariants: {
113
- emphasis: "strong",
114
- style: "default",
115
- disabled: !1
116
- }
117
- });
30
+ );
31
+ };
32
+ d.displayName = "SegmentedControl.Root";
33
+ const i = ({ children: e, ...o }, s) => /* @__PURE__ */ l(r.Item, { ref: s, ...o, className: y, asChild: !1, children: [
34
+ /* @__PURE__ */ t("span", { className: N }),
35
+ /* @__PURE__ */ l("span", { className: u, children: [
36
+ /* @__PURE__ */ t("span", { className: b, children: e }),
37
+ /* @__PURE__ */ t("span", { className: h, children: e })
38
+ ] })
39
+ ] });
40
+ i.displayName = "SegmentedControl.Item";
41
+ const j = {
42
+ Root: m(d),
43
+ Item: m(i)
44
+ };
118
45
  export {
119
- s as iconStyles
46
+ j as SegmentedControl,
47
+ i as SegmentedControlItem,
48
+ d as SegmentedControlRoot
120
49
  };
121
50
  //# sourceMappingURL=fondue-components9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components9.js","sources":["../src/components/Button/styles/iconStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const iconStyles = sv({\n variants: {\n emphasis: {\n default: '',\n weak: '',\n strong: '',\n },\n style: {\n default: '',\n positive: '',\n negative: '',\n danger: '',\n loud: '',\n },\n disabled: {\n true: 'tw-text-box-disabled-inverse',\n },\n },\n compoundVariants: [\n {\n disabled: false,\n style: 'default',\n emphasis: 'default',\n class:\n '[&_svg]:tw-text-button-icon ' +\n 'group-hover:[&_svg]:tw-text-button-icon-hover ' +\n 'group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'default',\n emphasis: 'weak',\n class:\n '[&_svg]:tw-text-button-icon ' +\n 'group-hover:[&_svg]:tw-text-button-icon-hover ' +\n 'group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'default',\n emphasis: 'strong',\n class:\n '[&_svg]:tw-text-button-strong-icon ' +\n 'group-hover:[&_svg]:tw-text-button-strong-icon-hover ' +\n 'group-active:[&_svg]:tw-text-button-strong-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'positive',\n emphasis: 'default',\n class:\n '[&_svg]:tw-text-button-positive-icon ' +\n 'group-hover:[&_svg]:tw-text-button-positive-icon-hover ' +\n 'group-active:[&_svg]:tw-text-button-positive-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'positive',\n emphasis: 'weak',\n class:\n '[&_svg]:tw-text-button-strong-positive-icon ' +\n 'group-hover:[&_svg]:tw-text-button-strong-positive-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'positive',\n emphasis: 'strong',\n class:\n '[&_svg]:tw-text-button-strong-positive-icon ' +\n 'group-hover:[&_svg]:tw-text-button-strong-positive-icon-hover ' +\n 'group-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'negative',\n emphasis: 'default',\n class:\n '[&_svg]:tw-text-button-negative-icon ' +\n 'group-hover:[&_svg]:tw-text-button-negative-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'negative',\n emphasis: 'weak',\n class:\n '[&_svg]:tw-text-button-negative-icon ' +\n 'group-hover:[&_svg]:tw-text-button-negative-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'negative',\n emphasis: 'strong',\n class:\n '[&_svg]:tw-text-button-strong-negative-icon ' +\n 'group-hover:[&_svg]:tw-text-button-strong-negative-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-strong-negative-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'danger',\n emphasis: 'default',\n class:\n '[&_svg]:tw-text-button-negative-icon ' +\n 'group-hover:[&_svg]:tw-text-button-negative-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'danger',\n emphasis: 'weak',\n class:\n '[&_svg]:tw-text-button-negative-icon ' +\n 'group-hover:[&_svg]:tw-text-button-negative-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'danger',\n emphasis: 'strong',\n class:\n '[&_svg]:tw-text-button-danger-icon ' +\n 'group-hover:[&_svg]:tw-text-button-danger-icon-hover' +\n 'group-active:[&_svg]:tw-text-button-danger-icon-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'loud',\n emphasis: 'default',\n class:\n '[&_svg]:tw-text-box-selected-inverse ' +\n 'group-hover:[&_svg]:tw-text-box-selected-inverse-hover' +\n 'group-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'loud',\n emphasis: 'weak',\n class:\n '[&_svg]:tw-text-box-selected-inverse ' +\n 'group-hover:[&_svg]:tw-text-box-selected-inverse-hover' +\n 'group-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none',\n },\n {\n disabled: false,\n style: 'loud',\n emphasis: 'strong',\n class:\n '[&_svg]:tw-text-box-selected-strong-inverse ' +\n 'group-hover:[&_svg]:tw-text-box-selected-strong-inverse' +\n 'group-active:[&_svg]:tw-text-box-selected-strong-inverse [&_svg]:tw-leading-none',\n },\n ],\n defaultVariants: {\n emphasis: 'strong',\n style: 'default',\n disabled: false,\n },\n});\n"],"names":["iconStyles","sv"],"mappings":";AAIO,MAAMA,IAAaC,EAAG;AAAA,EACzB,U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MACV,OACI;AAAA,IAGR;AAAA,IACA;AAAA,MACI,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OACI;AAAA,IAGR;AAAA,IACA;AAAA,MACI,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OACI;AAAA,IAGR;AAAA,IACA;AAAA,MACI,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OACI;AAAA,IAGR;AAAA,IACA;AAAA,MACI,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OACI;AAAA,IAGR;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,UAAU;AAAA,EACd;AACJ,CAAC;"}
1
+ {"version":3,"file":"fondue-components9.js","sources":["../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport {\n segmentedControlActiveIndicatorStyles,\n segmentedControlItemLabelActiveStyles,\n segmentedControlItemLabelInactiveStyles,\n segmentedControlItemLabelStyles,\n segmentedControlItemSeparatorStyles,\n segmentedControlItemStyles,\n segmentedControlRootStyles,\n} from './styles/segmentedControlStyles';\n\nexport type SegmentedControlRootProps = {\n id?: string;\n children: ReactNode;\n /**\n * The default value of the segmented control\n * Used for uncontrolled components\n */\n defaultValue: string;\n /**\n * The controlled value of the segmented control\n */\n value?: string;\n /**\n * Event handler called when the value changes\n */\n onValueChange?: (value: string) => void;\n /**\n * Disable the segmented control\n * @default false\n */\n disabled?: boolean;\n};\n\nexport const SegmentedControlRoot = (\n { children, value: propsValue, defaultValue, onValueChange, ...rootProps }: SegmentedControlRootProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [value, setValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n {...rootProps}\n className={segmentedControlRootStyles}\n onValueChange={(value) => {\n if (value) {\n setValue(value);\n }\n }}\n value={value}\n type=\"single\"\n asChild={false}\n aria-disabled={rootProps.disabled}\n >\n {children}\n {/* Active indicator */}\n <div className={segmentedControlActiveIndicatorStyles} />\n </ToggleGroupPrimitive.Root>\n );\n};\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ntype SegmentedControlItemProps = {\n children: ReactNode;\n value: string;\n};\n\nexport const SegmentedControlItem = (\n { children, ...itemProps }: SegmentedControlItemProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <ToggleGroupPrimitive.Item ref={ref} {...itemProps} className={segmentedControlItemStyles} asChild={false}>\n {/* Separator */}\n <span className={segmentedControlItemSeparatorStyles} />\n <span className={segmentedControlItemLabelStyles}>\n {/* Active children */}\n <span className={segmentedControlItemLabelActiveStyles}>{children}</span>\n\n {/* Inactive children */}\n <span className={segmentedControlItemLabelInactiveStyles}>{children}</span>\n </span>\n </ToggleGroupPrimitive.Item>\n);\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport const SegmentedControl = {\n Root: forwardRef<HTMLDivElement, SegmentedControlRootProps>(SegmentedControlRoot),\n Item: forwardRef<HTMLButtonElement, SegmentedControlItemProps>(SegmentedControlItem),\n};\n"],"names":["SegmentedControlRoot","children","propsValue","defaultValue","onValueChange","rootProps","ref","value","setValue","useControllableState","jsxs","ToggleGroupPrimitive","segmentedControlRootStyles","jsx","segmentedControlActiveIndicatorStyles","SegmentedControlItem","itemProps","segmentedControlItemStyles","segmentedControlItemSeparatorStyles","segmentedControlItemLabelStyles","segmentedControlItemLabelActiveStyles","segmentedControlItemLabelInactiveStyles","SegmentedControl","forwardRef"],"mappings":";;;;;AAwCa,MAAAA,IAAuB,CAChC,EAAE,UAAAC,GAAU,OAAOC,GAAY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2
 
3
+ import { ChangeEvent } from 'react';
4
+ import { FormEvent } from 'react';
5
+ import { ForwardedRef } from 'react';
3
6
  import { ForwardRefExoticComponent } from 'react';
7
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
8
+ import { KeyboardEvent as KeyboardEvent_2 } from 'react';
4
9
  import { MouseEvent as MouseEvent_2 } from 'react';
5
10
  import { ReactElement } from 'react';
6
11
  import { ReactNode } from 'react';
@@ -65,19 +70,207 @@ declare type ButtonStyle = 'default' | 'positive' | 'negative' | 'danger' | 'lou
65
70
 
66
71
  declare type ButtonType = 'button' | 'submit' | 'reset';
67
72
 
68
- export declare const Divider: ({ vertical, style, height, "data-test-id": dataTestId, color, }: DividerProps) => ReactElement;
73
+ export declare const Checkbox: ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLButtonElement>>;
69
74
 
70
- declare type DividerHeight = 'small' | 'medium' | 'large';
75
+ declare type CheckboxProps = {
76
+ id?: string;
77
+ name?: string;
78
+ /**
79
+ * The default value of the checkbox
80
+ * Used for uncontrolled components
81
+ * @default false
82
+ */
83
+ defaultValue?: boolean | 'indeterminate';
84
+ /**
85
+ * The controlled value of the checkbox
86
+ * @default false
87
+ */
88
+ value?: boolean | 'indeterminate';
89
+ /**
90
+ * The size of the checkbox
91
+ * @default "default"
92
+ */
93
+ size?: 'default' | 'large';
94
+ /**
95
+ * The emphasis of the checkbox
96
+ * @default "default"
97
+ */
98
+ emphasis?: 'default' | 'weak';
99
+ /**
100
+ * Disable the checkbox
101
+ * @default false
102
+ */
103
+ disabled?: boolean;
104
+ /**
105
+ * Make the checkbox required in form
106
+ * @default false
107
+ */
108
+ required?: boolean;
109
+ /**
110
+ * Make the checkbox read-only
111
+ * @default false
112
+ */
113
+ readOnly?: boolean;
114
+ className?: string;
115
+ /**
116
+ * Event handler called when the checkbox value changes
117
+ */
118
+ onChange?: (event: FormEvent<HTMLButtonElement>) => void;
119
+ /**
120
+ * Event handler called when the checkbox is blurred
121
+ */
122
+ onBlur?: (event: FormEvent<HTMLButtonElement>) => void;
123
+ /**
124
+ * Event handler called when the checkbox is focused
125
+ */
126
+ onFocus?: (event: FormEvent<HTMLButtonElement>) => void;
127
+ 'data-test-id'?: string;
128
+ 'aria-label'?: string;
129
+ 'aria-labelledby'?: string;
130
+ 'aria-describedby'?: string;
131
+ };
132
+
133
+ export declare const Divider: ForwardRefExoticComponent<DividerProps & RefAttributes<HTMLDivElement>>;
134
+
135
+ declare type DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';
136
+
137
+ declare type DividerDirection = 'horizontal' | 'vertical';
138
+
139
+ declare type DividerPadding = 'none' | 'small' | 'medium' | 'large';
71
140
 
72
141
  declare type DividerProps = {
142
+ /**
143
+ * The style of the divider
144
+ * @default "solid"
145
+ */
73
146
  style?: DividerStyle;
74
- height?: DividerHeight;
75
- color?: string;
76
- vertical?: boolean;
147
+ /**
148
+ * The padding of the divider
149
+ * @default "medium"
150
+ */
151
+ padding?: DividerPadding;
152
+ /**
153
+ * The color of the divider
154
+ * @default "default"
155
+ */
156
+ color?: DividerColor;
157
+ /**
158
+ * The direction of the divider
159
+ * @default "horizontal"
160
+ */
161
+ direction?: DividerDirection;
162
+ 'data-test-id'?: string;
163
+ className?: string;
164
+ };
165
+
166
+ declare type DividerStyle = 'noline' | 'dashed' | 'solid';
167
+
168
+ export declare const Flyout: {
169
+ Root: {
170
+ ({ children, ...props }: FlyoutRootProps): JSX_2.Element;
171
+ displayName: string;
172
+ };
173
+ Trigger: ForwardRefExoticComponent<FlyoutTriggerProps & RefAttributes<HTMLButtonElement>>;
174
+ Content: ForwardRefExoticComponent<FlyoutContentProps & RefAttributes<HTMLDivElement>>;
175
+ Header: ForwardRefExoticComponent<FlyoutHeaderProps & RefAttributes<HTMLDivElement>>;
176
+ Footer: ForwardRefExoticComponent<FlyoutFooterProps & RefAttributes<HTMLDivElement>>;
177
+ Body: ForwardRefExoticComponent<FlyoutBodyProps & RefAttributes<HTMLDivElement>>;
178
+ };
179
+
180
+ declare type FlyoutBodyProps = {
181
+ children?: ReactNode;
182
+ 'data-test-id'?: string;
183
+ };
184
+
185
+ declare type FlyoutContentProps = {
186
+ /**
187
+ * Add rounded corners to the flyout
188
+ * @default true
189
+ */
190
+ rounded?: boolean;
191
+ /**
192
+ * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.
193
+ * @default "bottom"
194
+ */
195
+ side?: 'top' | 'right' | 'bottom' | 'left';
196
+ /**
197
+ * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.
198
+ * @default "start"
199
+ */
200
+ align?: 'start' | 'center' | 'end';
201
+ /**
202
+ * Define the padding of the flyout
203
+ * @default "compact"
204
+ */
205
+ padding?: 'compact' | 'comfortable' | 'spacious';
206
+ /**
207
+ * Define the maximum width of the flyout
208
+ * @default "360px"
209
+ */
210
+ maxWidth?: string;
211
+ children?: ReactNode;
212
+ 'data-test-id'?: string;
213
+ };
214
+
215
+ declare type FlyoutFooterProps = {
216
+ children?: ReactNode;
217
+ 'data-test-id'?: string;
218
+ };
219
+
220
+ declare type FlyoutHeaderProps = {
221
+ /**
222
+ * Show a close button in the header
223
+ * @default false
224
+ */
225
+ showCloseButton?: boolean;
226
+ children?: ReactNode;
227
+ 'data-test-id'?: string;
228
+ };
229
+
230
+ declare type FlyoutRootProps = {
231
+ /**
232
+ * Disable interaction with the rest of the page
233
+ * @default false
234
+ */
235
+ modal?: boolean;
236
+ /**
237
+ * The controlled `open` state of the flyout
238
+ * @default false
239
+ */
240
+ open?: boolean;
241
+ /**
242
+ * Event handler called when the `open` state changes
243
+ */
244
+ onOpenChange?: (open: boolean) => void;
245
+ children?: ReactNode;
246
+ };
247
+
248
+ declare type FlyoutTriggerProps = {
249
+ children?: ReactNode;
77
250
  'data-test-id'?: string;
78
251
  };
79
252
 
80
- declare type DividerStyle = 'noline' | 'dashed' | 'solid' | 'dotted';
253
+ declare const ForwardedRefTextFieldRoot: ForwardRefExoticComponent<TextInputProps & RefAttributes<HTMLInputElement>>;
254
+
255
+ declare const ForwardedRefTextFieldSlot: ForwardRefExoticComponent<TextFieldSlotProps & RefAttributes<HTMLDivElement>>;
256
+
257
+ export declare const Label: ForwardRefExoticComponent<LabelProps & RefAttributes<HTMLLabelElement>>;
258
+
259
+ declare type LabelProps = {
260
+ id?: string;
261
+ children: ReactNode;
262
+ /**
263
+ * The id of the input element the label is associated with
264
+ */
265
+ htmlFor: string;
266
+ /**
267
+ * Add an asterisk to the label to indicate it is required
268
+ * @default false
269
+ */
270
+ required?: boolean;
271
+ className?: string;
272
+ 'data-test-id'?: string;
273
+ };
81
274
 
82
275
  export declare const LoadingBar: ForwardRefExoticComponent<LoadingBarProps & RefAttributes<HTMLDivElement>>;
83
276
 
@@ -88,6 +281,7 @@ declare type LoadingBarProps = {
88
281
  */
89
282
  value: number | null;
90
283
  /**
284
+ * The maximum value of the loading bar
91
285
  * @default 100
92
286
  */
93
287
  max?: number;
@@ -96,17 +290,23 @@ declare type LoadingBarProps = {
96
290
  */
97
291
  'data-test-id'?: string;
98
292
  /**
293
+ * Add rounded corners to the loading bar
99
294
  * @default true
100
295
  */
101
296
  rounded?: boolean;
102
297
  /**
103
- * @default 'default'
298
+ * The style of the loading bar
299
+ * @default "default"
104
300
  */
105
301
  style?: 'default' | 'positive' | 'negative';
106
302
  /**
107
- * @default 'medium'
303
+ * The size of the loading bar
304
+ * @default "medium"
108
305
  */
109
306
  size?: 'small' | 'medium' | 'large' | 'x-large';
307
+ /**
308
+ * The label of the loading bar for accessibility purposes
309
+ */
110
310
  getValueLabel?: (value: number, max: number) => string;
111
311
  } & ({
112
312
  'aria-label': string;
@@ -114,6 +314,175 @@ declare type LoadingBarProps = {
114
314
  'aria-labelledby': string;
115
315
  });
116
316
 
317
+ export declare const SegmentedControl: {
318
+ Root: ForwardRefExoticComponent<SegmentedControlRootProps & RefAttributes<HTMLDivElement>>;
319
+ Item: ForwardRefExoticComponent<SegmentedControlItemProps & RefAttributes<HTMLButtonElement>>;
320
+ };
321
+
322
+ declare type SegmentedControlItemProps = {
323
+ children: ReactNode;
324
+ value: string;
325
+ };
326
+
327
+ declare type SegmentedControlRootProps = {
328
+ id?: string;
329
+ children: ReactNode;
330
+ /**
331
+ * The default value of the segmented control
332
+ * Used for uncontrolled components
333
+ */
334
+ defaultValue: string;
335
+ /**
336
+ * The controlled value of the segmented control
337
+ */
338
+ value?: string;
339
+ /**
340
+ * Event handler called when the value changes
341
+ */
342
+ onValueChange?: (value: string) => void;
343
+ /**
344
+ * Disable the segmented control
345
+ * @default false
346
+ */
347
+ disabled?: boolean;
348
+ };
349
+
350
+ declare const TextFieldRoot: {
351
+ ({ children, className, status, "data-test-id": dataTestId, ...inputProps }: TextInputProps, ref: ForwardedRef<HTMLInputElement>): JSX_2.Element;
352
+ displayName: string;
353
+ };
354
+
355
+ declare type TextFieldSlotProps = {
356
+ children: ReactNode;
357
+ name?: 'left' | 'right';
358
+ className?: string;
359
+ };
360
+
361
+ export declare const TextInput: typeof TextFieldRoot & {
362
+ Root: typeof ForwardedRefTextFieldRoot;
363
+ Slot: typeof ForwardedRefTextFieldSlot;
364
+ };
365
+
366
+ declare type TextInputProps = {
367
+ id?: string;
368
+ name?: string;
369
+ /**
370
+ * The place where the input slots are placed
371
+ */
372
+ children?: ReactNode;
373
+ /**
374
+ * The default value of the text input
375
+ * Used for uncontrolled components
376
+ */
377
+ defaultValue?: string | number;
378
+ /**
379
+ * The controlled value of the text input
380
+ */
381
+ value?: string | number;
382
+ /**
383
+ * Type of the text input
384
+ * @default "text"
385
+ */
386
+ type?: 'date' | 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';
387
+ /**
388
+ * The placeholder in the text input
389
+ */
390
+ placeholder?: string;
391
+ /**
392
+ * Disable the text input
393
+ * @default false
394
+ */
395
+ disabled?: boolean;
396
+ /**
397
+ * Make the text input required in form
398
+ * @default false
399
+ */
400
+ required?: boolean;
401
+ /**
402
+ * Make the text input spell-checkable
403
+ * @default true
404
+ */
405
+ spellCheck?: boolean;
406
+ /**
407
+ * Make the text input read-only
408
+ * @default false
409
+ */
410
+ readOnly?: boolean;
411
+ /**
412
+ * Set the type of input so autocomplete can help the user
413
+ * @default "on"
414
+ */
415
+ autoComplete?: string;
416
+ /**
417
+ * The maximum length of the text input
418
+ */
419
+ maxLength?: number;
420
+ /**
421
+ * Status of the text input
422
+ * @default "neutral"
423
+ */
424
+ status?: 'neutral' | 'success' | 'error' | 'loading';
425
+ className?: string;
426
+ /**
427
+ * Event handler called when the text input value changes
428
+ */
429
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
430
+ /**
431
+ * Event handler called when the text input is blurred
432
+ */
433
+ onBlur?: (event: ChangeEvent<HTMLInputElement>) => void;
434
+ /**
435
+ * Event handler called when the text input is focused
436
+ */
437
+ onFocus?: (event: ChangeEvent<HTMLInputElement>) => void;
438
+ /**
439
+ * Event handler called when a key is pressed
440
+ */
441
+ onKeyDown?: (event: KeyboardEvent_2<HTMLInputElement>) => void;
442
+ /**
443
+ * Event handler called when a key is released
444
+ */
445
+ onKeyUp?: (event: KeyboardEvent_2<HTMLInputElement>) => void;
446
+ 'data-test-id'?: string;
447
+ 'aria-label'?: string;
448
+ 'aria-labelledby'?: string;
449
+ 'aria-describedby'?: string;
450
+ };
451
+
452
+ export declare const Tooltip: {
453
+ Root: {
454
+ ({ children, enterDelay }: TooltipRootProps): JSX_2.Element;
455
+ displayName: string;
456
+ };
457
+ Trigger: ForwardRefExoticComponent<TooltipTriggerProps & RefAttributes<HTMLButtonElement>>;
458
+ Content: ForwardRefExoticComponent<TooltipContentProps & RefAttributes<HTMLDivElement>>;
459
+ };
460
+
461
+ declare type TooltipContentProps = {
462
+ /**
463
+ * @default spacious
464
+ */
465
+ padding?: 'spacious' | 'compact';
466
+ /**
467
+ * Defines the preffered side of the tooltip. It will not be respected if there are collisions with the viewport.
468
+ */
469
+ side?: 'top' | 'right' | 'bottom' | 'left';
470
+ maxWidth?: string;
471
+ className?: string;
472
+ children: ReactNode;
473
+ 'data-test-id'?: string;
474
+ };
475
+
476
+ declare type TooltipRootProps = {
477
+ enterDelay?: number;
478
+ children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;
479
+ };
480
+
481
+ declare type TooltipTriggerProps = {
482
+ children: ReactNode;
483
+ 'data-test-id'?: string;
484
+ };
485
+
117
486
  export { }
118
487
 
119
488