@ultraviolet/ui 3.5.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/components/Avatar/styles.css.js +1 -0
  2. package/dist/components/Avatar/variables.css.js +0 -1
  3. package/dist/components/Chip/index.d.ts +1 -1
  4. package/dist/components/Link/styles.css.d.ts +31 -31
  5. package/dist/components/Link/styles.css.d.ts.map +1 -1
  6. package/dist/components/Link/styles.css.js +1 -1
  7. package/dist/components/List/index.d.ts +0 -3
  8. package/dist/components/List/index.d.ts.map +1 -1
  9. package/dist/components/NumberInput/index.d.ts +1 -1
  10. package/dist/components/SelectInput/components/Dropdown.d.ts +14 -1
  11. package/dist/components/SelectInput/components/Dropdown.d.ts.map +1 -1
  12. package/dist/components/SelectInput/components/Dropdown.js +304 -131
  13. package/dist/components/SelectInput/components/SearchBarDropdown.d.ts.map +1 -1
  14. package/dist/components/SelectInput/components/SearchBarDropdown.js +10 -4
  15. package/dist/components/SelectInput/components/SelectBar.d.ts.map +1 -1
  16. package/dist/components/SelectInput/components/SelectBar.js +1 -4
  17. package/dist/components/SelectInput/components/dropdown.css.d.ts +7 -5
  18. package/dist/components/SelectInput/components/dropdown.css.d.ts.map +1 -1
  19. package/dist/components/SelectInput/components/dropdown.css.js +13 -9
  20. package/dist/components/SelectInput/constants.d.ts +13 -0
  21. package/dist/components/SelectInput/constants.d.ts.map +1 -0
  22. package/dist/components/SelectInput/constants.js +18 -0
  23. package/dist/components/SelectInput/index.d.ts +11 -5
  24. package/dist/components/SelectInput/index.d.ts.map +1 -1
  25. package/dist/components/SelectInput/index.js +7 -1
  26. package/dist/components/SelectInput/types.d.ts +0 -5
  27. package/dist/components/SelectInput/types.d.ts.map +1 -1
  28. package/dist/components/Slider/components/DoubleSlider.d.ts +1 -1
  29. package/dist/components/Slider/components/DoubleSlider.d.ts.map +1 -1
  30. package/dist/components/Slider/components/DoubleSlider.js +14 -10
  31. package/dist/components/Slider/components/SingleSlider.d.ts +1 -1
  32. package/dist/components/Slider/components/SingleSlider.d.ts.map +1 -1
  33. package/dist/components/Slider/components/SingleSlider.js +9 -3
  34. package/dist/components/Slider/index.d.ts +1 -1
  35. package/dist/components/Slider/index.d.ts.map +1 -1
  36. package/dist/components/Slider/index.js +3 -0
  37. package/dist/components/Slider/types.d.ts +5 -0
  38. package/dist/components/Slider/types.d.ts.map +1 -1
  39. package/dist/components/Stack/index.d.ts +2 -3
  40. package/dist/components/Stack/index.d.ts.map +1 -1
  41. package/dist/components/Stack/index.js +67 -65
  42. package/dist/components/Tabs/index.d.ts +1 -1
  43. package/dist/components/Text/style.css.js +1 -0
  44. package/dist/components/Text/variables.css.js +0 -1
  45. package/dist/components/TextInput/index.d.ts +1 -1
  46. package/dist/components/Tooltip/index.d.ts +1 -1
  47. package/dist/ui.css +1 -1
  48. package/package.json +4 -4
  49. package/dist/components/SelectInput/types.js +0 -9
@@ -7,16 +7,19 @@ var dropdownContainerUnGrouped = "uv_5kpm8k3";
7
7
  var dropdownGroup = "uv_5kpm8k4";
8
8
  var dropdownGroupSelectable = "uv_5kpm8k5";
9
9
  var dropdownGroupWrapper = "uv_5kpm8k6";
10
- var dropdownItem = createRuntimeFn({ defaultClassName: "uv_5kpm8k8 uv_5kpm8k7", variantClassNames: { disabled: { true: "uv_5kpm8k9" }, selected: { true: "uv_5kpm8ka" } }, defaultVariants: { disabled: false, selected: false }, compoundVariants: [] });
11
- var footer = "uv_5kpm8kb";
12
- var dropdownCheckbox = "uv_5kpm8kc";
13
- var dropdownEmptyState = "uv_5kpm8kd";
14
- var dropdownLoadMore = "uv_5kpm8ke";
15
- var dropdownInfo = "uv_5kpm8kf";
16
- var dropdownInfoTextItem = "uv_5kpm8kg";
17
- var dropdownInfoContainer = "uv_5kpm8kh";
18
- var searchBar = "uv_5kpm8ki";
10
+ var emptyStateGroupStyle = "uv_5kpm8k7";
11
+ var dropdownItem = createRuntimeFn({ defaultClassName: "uv_5kpm8k9 uv_5kpm8k8 uv_5kpm8k7", variantClassNames: { selected: { true: "uv_5kpm8ka" }, disabled: { true: "uv_5kpm8kb" } }, defaultVariants: { disabled: false, selected: false }, compoundVariants: [] });
12
+ var footer = "uv_5kpm8kc";
13
+ var dropdownCheckbox = "uv_5kpm8kd";
14
+ var dropdownEmptyState = "uv_5kpm8ke";
15
+ var dropdownLoadMore = "uv_5kpm8kf";
16
+ var dropdownInfo = "uv_5kpm8kg";
17
+ var dropdownInfoTextItem = "uv_5kpm8kh";
18
+ var dropdownInfoContainer = "uv_5kpm8ki";
19
+ var searchBar = "uv_5kpm8kj";
20
+ var comboboxCreate = "uv_5kpm8kk uv_5kpm8k8 uv_5kpm8k7";
19
21
  export {
22
+ comboboxCreate,
20
23
  dropdown,
21
24
  dropdownCheckbox,
22
25
  dropdownContainer,
@@ -31,6 +34,7 @@ export {
31
34
  dropdownItem,
32
35
  dropdownLoadMore,
33
36
  dropdownWidth,
37
+ emptyStateGroupStyle,
34
38
  footer,
35
39
  searchBar
36
40
  };
@@ -0,0 +1,13 @@
1
+ export declare const DROPDOWN_MAX_HEIGHT = 256;
2
+ export declare const OPTION_SELECTOR = "#items > div[role=\"option\"]:not([aria-disabled=\"true\"]), #add-option";
3
+ export declare const SIZES_TAG: {
4
+ gap: number;
5
+ paddings: number;
6
+ plusTag: number;
7
+ };
8
+ export declare const INPUT_SIZE_HEIGHT: {
9
+ readonly large: "600";
10
+ readonly medium: "500";
11
+ readonly small: "400";
12
+ };
13
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAGtC,eAAO,MAAM,eAAe,6EAC4C,CAAA;AAExE,eAAO,MAAM,SAAS;;;;CAIrB,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAA"}
@@ -0,0 +1,18 @@
1
+ const DROPDOWN_MAX_HEIGHT = 256;
2
+ const OPTION_SELECTOR = '#items > div[role="option"]:not([aria-disabled="true"]), #add-option';
3
+ const SIZES_TAG = {
4
+ gap: 8,
5
+ paddings: 16
6
+ };
7
+ const INPUT_SIZE_HEIGHT = {
8
+ large: "600",
9
+ medium: "500",
10
+ small: "400"
11
+ // sizing theme tokens key
12
+ };
13
+ export {
14
+ DROPDOWN_MAX_HEIGHT,
15
+ INPUT_SIZE_HEIGHT,
16
+ OPTION_SELECTOR,
17
+ SIZES_TAG
18
+ };
@@ -30,10 +30,6 @@ type SelectInputProps<IsMulti extends undefined | boolean = false> = {
30
30
  * Message to show when no option available
31
31
  */
32
32
  emptyState?: ReactNode;
33
- /**
34
- * Whether it is possible to search through the input
35
- */
36
- searchable?: boolean;
37
33
  /**
38
34
  * Whether the component in disabled
39
35
  */
@@ -74,6 +70,14 @@ type SelectInputProps<IsMulti extends undefined | boolean = false> = {
74
70
  * Display an error message under the select bar
75
71
  */
76
72
  error?: string | boolean;
73
+ searchable?: boolean;
74
+ /**
75
+ * When searchable, set a combobox to dynamically add an option
76
+ */
77
+ addOption?: {
78
+ text: string;
79
+ onClick: (searchText: string) => void;
80
+ };
77
81
  /**
78
82
  * Display a success message under the select bar
79
83
  */
@@ -123,10 +127,12 @@ type SelectInputProps<IsMulti extends undefined | boolean = false> = {
123
127
  * Please wrap that definition in useCallback
124
128
  */
125
129
  onOpen?: () => void;
130
+ groupError?: Record<string, ReactNode>;
131
+ groupEmptyState?: Record<string, ReactNode>;
126
132
  } & Pick<HTMLAttributes<HTMLDivElement>, 'id' | 'onBlur' | 'onFocus' | 'aria-label' | 'className' | 'style'>;
127
133
  /**
128
134
  * SelectInput component is used to select one or many elements from a selection.
129
135
  */
130
- export declare const SelectInput: <IsMulti extends undefined | boolean>({ name, id, onBlur, onFocus, onChange, "aria-label": ariaLabel, value, label, helper, options, size, emptyState, descriptionDirection, success, error, "data-testid": dataTestId, className, tooltip, footer, placeholderSearch, placeholder, searchable, disabled, readOnly, clearable, multiselect, required, labelDescription, autofocus, loadMore, optionalInfoPlacement, isLoading, selectAll, selectAllGroup, dropdownAlign, portalTarget, onOpen, style, }: SelectInputProps<IsMulti>) => import("react/jsx-runtime").JSX.Element;
136
+ export declare const SelectInput: <IsMulti extends undefined | boolean>({ name, id, onBlur, onFocus, onChange, "aria-label": ariaLabel, value, label, helper, options, size, emptyState, descriptionDirection, success, error, "data-testid": dataTestId, className, tooltip, footer, placeholderSearch, placeholder, searchable, disabled, readOnly, clearable, multiselect, required, labelDescription, autofocus, loadMore, optionalInfoPlacement, isLoading, selectAll, selectAllGroup, dropdownAlign, portalTarget, onOpen, groupEmptyState, groupError, style, addOption, }: SelectInputProps<IsMulti>) => import("react/jsx-runtime").JSX.Element;
131
137
  export {};
132
138
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,gBAAgB,CAAC,OAAO,SAAS,SAAS,GAAG,OAAO,GAAG,KAAK,IAAI;IACnE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAA;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB;;OAE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EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAA;IACrD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,SAAS,IAAI,GAAG,MAAM,EAAE,GAAG,MAAM,CAAA;IAChD,QAAQ,CAAC,EAAE,OAAO,SAAS,IAAI,GAC3B,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,GACzB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;IAC3D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAC5C,GAAG,IAAI,CACN,cAAc,CAAC,cAAc,CAAC,EAC9B,IAAI,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CACnE,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,SAAS,GAAG,OAAO,EAAE,2eA0C9D,gBAAgB,CAAC,OAAO,CAAC,4CAyG3B,CAAA"}
@@ -47,7 +47,10 @@ const SelectInput = ({
47
47
  dropdownAlign,
48
48
  portalTarget,
49
49
  onOpen,
50
- style
50
+ groupEmptyState,
51
+ groupError,
52
+ style,
53
+ addOption
51
54
  }) => {
52
55
  const localId = useId();
53
56
  const finalId = id ?? localId;
@@ -82,10 +85,13 @@ const SelectInput = ({
82
85
  /* @__PURE__ */ jsx(
83
86
  Dropdown,
84
87
  {
88
+ addOption,
85
89
  descriptionDirection,
86
90
  dropdownAlign,
87
91
  emptyState,
88
92
  footer,
93
+ groupEmptyState,
94
+ groupError,
89
95
  id: dropdownId,
90
96
  isLoading,
91
97
  loadMore,
@@ -36,9 +36,4 @@ export type ReducerAction = {
36
36
  selectedValues: ReducerState['selectedValues'];
37
37
  selectedGroups: ReducerState['selectedGroups'];
38
38
  };
39
- export declare const INPUT_SIZE_HEIGHT: {
40
- readonly large: "600";
41
- readonly medium: "500";
42
- readonly small: "400";
43
- };
44
39
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GAAG,CACA;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GACtC;IACE,KAAK,EAAE,SAAS,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB,CACJ,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,EAAE,CAAA;AAElE,MAAM,MAAM,YAAY,GAAG;IACzB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CA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a,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAC9C;IACE,IAAI,EAAE,cAAc,CAAA;IACpB,aAAa,EAAE,UAAU,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GACD;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACE,IAAI,EAAE,OAAO,CAAA;IACb,cAAc,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;IAC9C,cAAc,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAC/C,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import type { DoubleSliderProps } from '../types';
2
- export declare const DoubleSlider: ({ name, tooltip, direction, disabled, error, "data-testid": dataTestId, value, onChange, min, max, step, id, onBlur, onFocus, options, unit, label, className, input, prefix, suffix, required, tooltipPosition, "aria-label": ariaLabel, labelDescription, }: DoubleSliderProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DoubleSlider: ({ name, tooltip, direction, disabled, error, "data-testid": dataTestId, value, onChange, min, max, step, id, onBlur, onFocus, options, unit, label, className, input, prefix, suffix, required, tooltipPosition, "aria-label": ariaLabel, labelDescription, customValueDisplay, }: DoubleSliderProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=DoubleSlider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DoubleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/components/DoubleSlider.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAGjD,eAAO,MAAM,YAAY,GAAI,+PA0B1B,iBAAiB,4CAmXnB,CAAA"}
1
+ {"version":3,"file":"DoubleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/components/DoubleSlider.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAGjD,eAAO,MAAM,YAAY,GAAI,mRA2B1B,iBAAiB,4CAoXnB,CAAA"}
@@ -37,7 +37,8 @@ const DoubleSlider = ({
37
37
  required,
38
38
  tooltipPosition,
39
39
  "aria-label": ariaLabel,
40
- labelDescription
40
+ labelDescription,
41
+ customValueDisplay
41
42
  }) => {
42
43
  const theme = useTheme();
43
44
  const localId = useId();
@@ -209,15 +210,18 @@ const DoubleSlider = ({
209
210
  });
210
211
  }, [min, max, value]);
211
212
  return /* @__PURE__ */ jsxs(Stack, { direction: "column", gap: 1, justifyContent: "left", children: [
212
- label ? /* @__PURE__ */ jsx(Stack, { direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ jsx(
213
- Label,
214
- {
215
- htmlFor: finalId,
216
- labelDescription,
217
- required,
218
- children: label
219
- }
220
- ) }) : null,
213
+ label ? /* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [
214
+ /* @__PURE__ */ jsx(
215
+ Label,
216
+ {
217
+ htmlFor: finalId,
218
+ labelDescription,
219
+ required,
220
+ children: label
221
+ }
222
+ ),
223
+ customValueDisplay
224
+ ] }) : null,
221
225
  /* @__PURE__ */ jsxs(Stack, { direction, gap: 1, width: "100%", children: [
222
226
  direction === "column" ? /* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "space-between", children: [
223
227
  styledValue(leftToShow, "left"),
@@ -1,3 +1,3 @@
1
1
  import type { SingleSliderProps } from '../types';
2
- export declare const SingleSlider: ({ name, tooltip, direction, disabled, error, "data-testid": dataTestId, value, onChange, min, max, step, id, onBlur, unit, options, onFocus, className, label, input, prefix, suffix, required, labelDescription, "aria-label": ariaLabel, tooltipPosition, }: SingleSliderProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const SingleSlider: ({ name, tooltip, direction, disabled, error, "data-testid": dataTestId, value, onChange, min, max, step, id, onBlur, unit, options, onFocus, className, label, input, prefix, suffix, required, labelDescription, customValueDisplay, "aria-label": ariaLabel, tooltipPosition, }: SingleSliderProps) => import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=SingleSlider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SingleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/components/SingleSlider.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,YAAY,GAAI,+PA0B1B,iBAAiB,4CA8NnB,CAAA"}
1
+ {"version":3,"file":"SingleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/components/SingleSlider.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAKjD,eAAO,MAAM,YAAY,GAAI,mRA2B1B,iBAAiB,4CA6OnB,CAAA"}
@@ -36,6 +36,7 @@ const SingleSlider = ({
36
36
  suffix,
37
37
  required,
38
38
  labelDescription,
39
+ customValueDisplay,
39
40
  "aria-label": ariaLabel,
40
41
  tooltipPosition
41
42
  }) => {
@@ -174,11 +175,15 @@ const SingleSlider = ({
174
175
  children: label
175
176
  }
176
177
  ),
177
- direction === "column" ? styledValue(valueToShow) : null
178
+ direction === "column" && (input || !customValueDisplay) ? styledValue(valueToShow) : null,
179
+ direction === "column" && customValueDisplay && !input ? customValueDisplay : null
178
180
  ]
179
181
  }
180
182
  ) : null,
181
- /* @__PURE__ */ jsx(Stack, { direction: "row", justifyContent: "flex-end", children: direction === "column" && !label ? styledValue(valueToShow) : null }),
183
+ /* @__PURE__ */ jsxs(Stack, { direction: "row", justifyContent: "flex-end", children: [
184
+ direction === "column" && !label && (input || !customValueDisplay) ? styledValue(valueToShow) : null,
185
+ direction === "column" && !label && customValueDisplay && !input ? customValueDisplay : null
186
+ ] }),
182
187
  /* @__PURE__ */ jsxs(Stack, { direction: "column", gap: 1, justifyContent: "center", width: "100%", children: [
183
188
  /* @__PURE__ */ jsx(
184
189
  Tooltip,
@@ -239,7 +244,8 @@ const SingleSlider = ({
239
244
  }
240
245
  ) : null
241
246
  ] }),
242
- direction === "row" ? styledValue(valueToShow) : null
247
+ direction === "row" && (input || !customValueDisplay) ? styledValue(valueToShow) : null,
248
+ direction === "row" && customValueDisplay && !input ? customValueDisplay : null
243
249
  ] });
244
250
  };
245
251
  export {
@@ -4,5 +4,5 @@ import type { SliderProps } from './types';
4
4
  * - For a simple slider (one handle) : prop `value` must be number.
5
5
  * - For a double slider (two handles): prop `value` must be an array of numbers (of length 2) and prop `double` must be set to `true`. **Make sure that others props have the correct type.**
6
6
  */
7
- export declare const Slider: ({ name, label, helper, tooltip, direction, input, prefix, unit, suffix, required, disabled, error, options, "data-testid": dataTestId, value, onChange, min, double, max, step, id, onBlur, onFocus, className, tooltipPosition, style, labelDescription, "aria-label": ariaLabel, }: SliderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const Slider: ({ name, label, helper, tooltip, direction, input, prefix, unit, suffix, required, disabled, error, options, "data-testid": dataTestId, value, onChange, min, double, max, step, id, onBlur, onFocus, className, tooltipPosition, style, customValueDisplay, labelDescription, "aria-label": ariaLabel, }: SliderProps) => import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,sRA6BpB,WAAW,4CA8Fb,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C;;;;GAIG;AACH,eAAO,MAAM,MAAM,GAAI,0SA8BpB,WAAW,4CAgGb,CAAA"}
@@ -33,6 +33,7 @@ const Slider = ({
33
33
  className,
34
34
  tooltipPosition = "top",
35
35
  style,
36
+ customValueDisplay,
36
37
  labelDescription,
37
38
  "aria-label": ariaLabel
38
39
  }) => {
@@ -61,6 +62,7 @@ const Slider = ({
61
62
  {
62
63
  "aria-label": ariaLabel,
63
64
  className,
65
+ customValueDisplay,
64
66
  "data-testid": dataTestId,
65
67
  direction,
66
68
  disabled,
@@ -90,6 +92,7 @@ const Slider = ({
90
92
  {
91
93
  "aria-label": ariaLabel,
92
94
  className,
95
+ customValueDisplay,
93
96
  "data-testid": dataTestId,
94
97
  direction,
95
98
  disabled,
@@ -48,6 +48,11 @@ type DefaultProps = {
48
48
  * Whether an error occured
49
49
  */
50
50
  error?: string | boolean;
51
+ /**
52
+ * Display this content instead of the slider value.
53
+ * For a single slider (`double="false"`), if a prefix or a suffix is defined, this prop overrides them
54
+ */
55
+ customValueDisplay?: ReactNode;
51
56
  /**
52
57
  * Options for a non-linear scale, overrides `min`, `max`. This is usefull if step is not enough to get the desired granularity.
53
58
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG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IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ElementType, ReactNode } from 'react';
1
+ import type { CSSProperties, ElementType, ReactElement } from 'react';
2
2
  import type { UltravioletUITheme } from '../../theme';
3
3
  import type { AlignItemsType, JustifyContentType } from './styles.css';
4
4
  import type { PolymorphicComponentProps } from './types';
@@ -15,11 +15,10 @@ type OwnStackProps = {
15
15
  minWidth?: CSSProperties['minWidth'];
16
16
  flex?: CSSProperties['flex'];
17
17
  className?: string;
18
- children: ReactNode;
19
18
  'data-testid'?: string;
20
19
  id?: string;
21
20
  };
22
21
  export type StackProps<T extends ElementType = 'div'> = PolymorphicComponentProps<T, OwnStackProps>;
23
- export declare const Stack: <T extends ElementType = "div">({ gap, direction, alignItems, justifyContent, wrap, className, children, id, "data-testid": dataTestId, width, maxWidth, minWidth, flex, as, ref, style, ...props }: StackProps<T>) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const Stack: <T extends ElementType = "div">(props: StackProps<T>) => ReactElement;
24
23
  export {};
25
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAGxD,KAAK,cAAc,CAAC,CAAC,IACjB,CAAC,GACD,OAAO,CAAC,MAAM,CAAC,MAAM,kBAAkB,CAAC,aAAa,CAAC,EAAE,CAAC,CA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A;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,IAClD,yBAAyB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;AA+F7C,eAAO,MAAM,KAAK,EAAa,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAC3D,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KACjB,YAAY,CAAA"}
@@ -2,7 +2,7 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { consoleLightTheme } from "@ultraviolet/themes";
4
4
  import { assignInlineVars } from "@vanilla-extract/dynamic";
5
- import { useMemo } from "react";
5
+ import { forwardRef, useMemo } from "react";
6
6
  import { sprinkles, stack } from "./styles.css.js";
7
7
  import { flexVar, minWidthVar, maxWidthVar, widthVar } from "./variables.css.js";
8
8
  const mapRepsonsiveGap = (object) => object ? Object.keys(object).reduce(
@@ -12,70 +12,72 @@ const mapRepsonsiveGap = (object) => object ? Object.keys(object).reduce(
12
12
  }),
13
13
  {}
14
14
  ) : {};
15
- const Stack = ({
16
- gap,
17
- direction = "column",
18
- alignItems = "normal",
19
- justifyContent = "normal",
20
- wrap = "nowrap",
21
- className,
22
- children,
23
- id,
24
- "data-testid": dataTestId,
25
- width,
26
- maxWidth,
27
- minWidth,
28
- flex,
29
- as,
30
- ref,
31
- style,
32
- ...props
33
- }) => {
34
- const wrapValue = useMemo(() => {
35
- if (typeof wrap === "boolean") {
36
- return wrap ? "wrap" : "nowrap";
37
- }
38
- if (typeof wrap === "object") {
39
- return Object.keys(wrap).reduce(
40
- (acc, key) => ({
41
- ...acc,
42
- [key]: wrap[key] ? "wrap" : "nowrap"
43
- }),
44
- {}
45
- );
46
- }
47
- return wrap;
48
- }, [wrap]);
49
- const Component = as || "div";
50
- const sprinkleClassName = sprinkles({
51
- alignItems: typeof alignItems === "object" ? alignItems : { xxsmall: alignItems },
52
- flexDirection: typeof direction === "object" ? direction : { xxsmall: direction },
53
- flexWrap: typeof wrapValue === "object" ? wrapValue : { xxsmall: wrapValue },
54
- gap: typeof gap === "object" ? mapRepsonsiveGap(gap) : { xxsmall: gap ? consoleLightTheme.space[gap] : void 0 },
55
- justifyContent: typeof justifyContent === "object" ? justifyContent : { xxsmall: justifyContent }
56
- });
57
- const combinedClassName = [className, stack, sprinkleClassName].filter(Boolean).join(" ");
58
- return /* @__PURE__ */ jsx(
59
- Component,
60
- {
61
- className: combinedClassName,
62
- "data-testid": dataTestId,
63
- id,
64
- ref,
65
- style: {
66
- ...assignInlineVars({
67
- [widthVar]: width?.toString(),
68
- [maxWidthVar]: maxWidth?.toString(),
69
- [minWidthVar]: minWidth?.toString(),
70
- [flexVar]: flex?.toString()
71
- }),
72
- ...style
73
- },
74
- ...props,
75
- children
76
- }
77
- );
78
- };
15
+ const IStack = forwardRef(
16
+ ({
17
+ gap,
18
+ direction = "column",
19
+ alignItems = "normal",
20
+ justifyContent = "normal",
21
+ wrap = "nowrap",
22
+ className,
23
+ children,
24
+ id,
25
+ "data-testid": dataTestId,
26
+ width,
27
+ maxWidth,
28
+ minWidth,
29
+ flex,
30
+ as,
31
+ style,
32
+ ...props
33
+ }, ref) => {
34
+ const wrapValue = useMemo(() => {
35
+ if (typeof wrap === "boolean") {
36
+ return wrap ? "wrap" : "nowrap";
37
+ }
38
+ if (typeof wrap === "object") {
39
+ return Object.keys(wrap).reduce(
40
+ (acc, key) => ({
41
+ ...acc,
42
+ [key]: wrap[key] ? "wrap" : "nowrap"
43
+ }),
44
+ {}
45
+ );
46
+ }
47
+ return wrap;
48
+ }, [wrap]);
49
+ const Component = as || "div";
50
+ const sprinkleClassName = sprinkles({
51
+ alignItems: typeof alignItems === "object" ? alignItems : { xxsmall: alignItems },
52
+ flexDirection: typeof direction === "object" ? direction : { xxsmall: direction },
53
+ flexWrap: typeof wrapValue === "object" ? wrapValue : { xxsmall: wrapValue },
54
+ gap: typeof gap === "object" ? mapRepsonsiveGap(gap) : { xxsmall: gap ? consoleLightTheme.space[gap] : void 0 },
55
+ justifyContent: typeof justifyContent === "object" ? justifyContent : { xxsmall: justifyContent }
56
+ });
57
+ const combinedClassName = [className, stack, sprinkleClassName].filter(Boolean).join(" ");
58
+ return /* @__PURE__ */ jsx(
59
+ Component,
60
+ {
61
+ className: combinedClassName,
62
+ "data-testid": dataTestId,
63
+ id,
64
+ ref,
65
+ style: {
66
+ ...assignInlineVars({
67
+ [widthVar]: width?.toString(),
68
+ [maxWidthVar]: maxWidth?.toString(),
69
+ [minWidthVar]: minWidth?.toString(),
70
+ [flexVar]: flex?.toString()
71
+ }),
72
+ ...style
73
+ },
74
+ ...props,
75
+ children
76
+ }
77
+ );
78
+ }
79
+ );
80
+ const Stack = IStack;
79
81
  export {
80
82
  Stack
81
83
  };
@@ -24,7 +24,7 @@ export declare const Tabs: {
24
24
  tooltip?: string;
25
25
  value?: string | number;
26
26
  style?: import("react").CSSProperties;
27
- } & Omit<any, "tooltip" | "disabled" | "as" | "className" | "children" | "value" | "role" | "badge" | "counter">, "ref"> & import("react").RefAttributes<HTMLElement>>;
27
+ } & Omit<any, "tooltip" | "disabled" | "as" | "className" | "role" | "children" | "value" | "badge" | "counter">, "ref"> & import("react").RefAttributes<HTMLElement>>;
28
28
  Menu: import("react").ForwardRefExoticComponent<{
29
29
  children: ReactNode;
30
30
  disclosure: ReactNode;
@@ -1,3 +1,4 @@
1
+ /* empty css */
1
2
  /* empty css */
2
3
  import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
3
4
  var text = createRuntimeFn({ defaultClassName: "uv_m4c9ow0", variantClassNames: { disabled: { false: "uv_m4c9ow1", true: "uv_m4c9ow2" }, italic: { false: "uv_m4c9ow3", true: "uv_m4c9ow4" }, oneLine: { false: "uv_m4c9ow5", true: "uv_m4c9ow6" }, prominence: { "default": "uv_m4c9ow7", strong: "uv_m4c9ow8", stronger: "uv_m4c9ow9", weak: "uv_m4c9owa" }, sentiment: { black: "uv_m4c9owb", danger: "uv_m4c9owc", info: "uv_m4c9owd", neutral: "uv_m4c9owe", primary: "uv_m4c9owf", secondary: "uv_m4c9owg", success: "uv_m4c9owh", warning: "uv_m4c9owi", white: "uv_m4c9owj" }, strikeThrough: { false: "uv_m4c9owk", true: "uv_m4c9owl" }, underline: { false: "uv_m4c9owm", true: "uv_m4c9own" }, variant: { body: "uv_m4c9owo", bodySmall: "uv_m4c9owp", bodySmallStrong: "uv_m4c9owq", bodySmallStronger: "uv_m4c9owr", bodyStrong: "uv_m4c9ows", bodyStronger: "uv_m4c9owt", caption: "uv_m4c9owu", captionSmall: "uv_m4c9owv", captionSmallStrong: "uv_m4c9oww", captionSmallStronger: "uv_m4c9owx", captionStrong: "uv_m4c9owy", captionStronger: "uv_m4c9owz", code: "uv_m4c9ow10", codeSmall: "uv_m4c9ow11", codeSmallStrong: "uv_m4c9ow12", codeSmallStronger: "uv_m4c9ow13", codeStrong: "uv_m4c9ow14", codeStronger: "uv_m4c9ow15", heading: "uv_m4c9ow16", headingLarge: "uv_m4c9ow17", headingLargeStrong: "uv_m4c9ow18", headingLargeStronger: "uv_m4c9ow19", headingSmall: "uv_m4c9ow1a", headingSmallStrong: "uv_m4c9ow1b", headingSmallStronger: "uv_m4c9ow1c", headingStrong: "uv_m4c9ow1d", headingStronger: "uv_m4c9ow1e" } }, defaultVariants: { disabled: false, italic: false, oneLine: false, prominence: "default", sentiment: void 0, strikeThrough: false, underline: false, variant: "body" }, compoundVariants: [[{ disabled: false, prominence: "default", sentiment: "primary" }, "uv_m4c9ow1f"], [{ disabled: false, prominence: "strong", sentiment: "primary" }, "uv_m4c9ow1g"], [{ disabled: false, prominence: "stronger", sentiment: "primary" }, "uv_m4c9ow1h"], [{ disabled: false, prominence: "weak", sentiment: "primary" }, "uv_m4c9ow1i"], [{ disabled: false, prominence: "default", sentiment: "secondary" }, "uv_m4c9ow1j"], [{ disabled: false, prominence: "strong", sentiment: "secondary" }, "uv_m4c9ow1k"], [{ disabled: false, prominence: "stronger", sentiment: "secondary" }, "uv_m4c9ow1l"], [{ disabled: false, prominence: "weak", sentiment: "secondary" }, "uv_m4c9ow1m"], [{ disabled: false, prominence: "default", sentiment: "danger" }, "uv_m4c9ow1n"], [{ disabled: false, prominence: "strong", sentiment: "danger" }, "uv_m4c9ow1o"], [{ disabled: false, prominence: "stronger", sentiment: "danger" }, "uv_m4c9ow1p"], [{ disabled: false, prominence: "weak", sentiment: "danger" }, "uv_m4c9ow1q"], [{ disabled: false, prominence: "default", sentiment: "info" }, "uv_m4c9ow1r"], [{ disabled: false, prominence: "strong", sentiment: "info" }, "uv_m4c9ow1s"], [{ disabled: false, prominence: "stronger", sentiment: "info" }, "uv_m4c9ow1t"], [{ disabled: false, prominence: "weak", sentiment: "info" }, "uv_m4c9ow1u"], [{ disabled: false, prominence: "default", sentiment: "success" }, "uv_m4c9ow1v"], [{ disabled: false, prominence: "strong", sentiment: "success" }, "uv_m4c9ow1w"], [{ disabled: false, prominence: "stronger", sentiment: "success" }, "uv_m4c9ow1x"], [{ disabled: false, prominence: "weak", sentiment: "success" }, "uv_m4c9ow1y"], [{ disabled: false, prominence: "default", sentiment: "warning" }, "uv_m4c9ow1z"], [{ disabled: false, prominence: "strong", sentiment: "warning" }, "uv_m4c9ow20"], [{ disabled: false, prominence: "stronger", sentiment: "warning" }, "uv_m4c9ow21"], [{ disabled: false, prominence: "weak", sentiment: "warning" }, "uv_m4c9ow22"], [{ disabled: false, prominence: "default", sentiment: "neutral" }, "uv_m4c9ow23"], [{ disabled: false, prominence: "strong", sentiment: "neutral" }, "uv_m4c9ow24"], [{ disabled: false, prominence: "stronger", sentiment: "neutral" }, "uv_m4c9ow25"], [{ disabled: false, prominence: "weak", sentiment: "neutral" }, "uv_m4c9ow26"], [{ disabled: false, prominence: "default", sentiment: "black" }, "uv_m4c9ow27"], [{ disabled: false, prominence: "strong", sentiment: "black" }, "uv_m4c9ow28"], [{ disabled: false, prominence: "stronger", sentiment: "black" }, "uv_m4c9ow29"], [{ disabled: false, prominence: "weak", sentiment: "black" }, "uv_m4c9ow2a"], [{ disabled: false, prominence: "default", sentiment: "white" }, "uv_m4c9ow2b"], [{ disabled: false, prominence: "strong", sentiment: "white" }, "uv_m4c9ow2c"], [{ disabled: false, prominence: "stronger", sentiment: "white" }, "uv_m4c9ow2d"], [{ disabled: false, prominence: "weak", sentiment: "white" }, "uv_m4c9ow2e"], [{ disabled: true, prominence: "default", sentiment: "primary" }, "uv_m4c9ow2f"], [{ disabled: true, prominence: "strong", sentiment: "primary" }, "uv_m4c9ow2g"], [{ disabled: true, prominence: "stronger", sentiment: "primary" }, "uv_m4c9ow2h"], [{ disabled: true, prominence: "weak", sentiment: "primary" }, "uv_m4c9ow2i"], [{ disabled: true, prominence: "default", sentiment: "secondary" }, "uv_m4c9ow2j"], [{ disabled: true, prominence: "strong", sentiment: "secondary" }, "uv_m4c9ow2k"], [{ disabled: true, prominence: "stronger", sentiment: "secondary" }, "uv_m4c9ow2l"], [{ disabled: true, prominence: "weak", sentiment: "secondary" }, "uv_m4c9ow2m"], [{ disabled: true, prominence: "default", sentiment: "danger" }, "uv_m4c9ow2n"], [{ disabled: true, prominence: "strong", sentiment: "danger" }, "uv_m4c9ow2o"], [{ disabled: true, prominence: "stronger", sentiment: "danger" }, "uv_m4c9ow2p"], [{ disabled: true, prominence: "weak", sentiment: "danger" }, "uv_m4c9ow2q"], [{ disabled: true, prominence: "default", sentiment: "info" }, "uv_m4c9ow2r"], [{ disabled: true, prominence: "strong", sentiment: "info" }, "uv_m4c9ow2s"], [{ disabled: true, prominence: "stronger", sentiment: "info" }, "uv_m4c9ow2t"], [{ disabled: true, prominence: "weak", sentiment: "info" }, "uv_m4c9ow2u"], [{ disabled: true, prominence: "default", sentiment: "success" }, "uv_m4c9ow2v"], [{ disabled: true, prominence: "strong", sentiment: "success" }, "uv_m4c9ow2w"], [{ disabled: true, prominence: "stronger", sentiment: "success" }, "uv_m4c9ow2x"], [{ disabled: true, prominence: "weak", sentiment: "success" }, "uv_m4c9ow2y"], [{ disabled: true, prominence: "default", sentiment: "warning" }, "uv_m4c9ow2z"], [{ disabled: true, prominence: "strong", sentiment: "warning" }, "uv_m4c9ow30"], [{ disabled: true, prominence: "stronger", sentiment: "warning" }, "uv_m4c9ow31"], [{ disabled: true, prominence: "weak", sentiment: "warning" }, "uv_m4c9ow32"], [{ disabled: true, prominence: "default", sentiment: "neutral" }, "uv_m4c9ow33"], [{ disabled: true, prominence: "strong", sentiment: "neutral" }, "uv_m4c9ow34"], [{ disabled: true, prominence: "stronger", sentiment: "neutral" }, "uv_m4c9ow35"], [{ disabled: true, prominence: "weak", sentiment: "neutral" }, "uv_m4c9ow36"], [{ disabled: true, prominence: "default", sentiment: "black" }, "uv_m4c9ow37"], [{ disabled: true, prominence: "strong", sentiment: "black" }, "uv_m4c9ow38"], [{ disabled: true, prominence: "stronger", sentiment: "black" }, "uv_m4c9ow39"], [{ disabled: true, prominence: "weak", sentiment: "black" }, "uv_m4c9ow3a"], [{ disabled: true, prominence: "default", sentiment: "white" }, "uv_m4c9ow3b"], [{ disabled: true, prominence: "strong", sentiment: "white" }, "uv_m4c9ow3c"], [{ disabled: true, prominence: "stronger", sentiment: "white" }, "uv_m4c9ow3d"], [{ disabled: true, prominence: "weak", sentiment: "white" }, "uv_m4c9ow3e"], [{ disabled: false, prominence: "default" }, "uv_m4c9ow3f"], [{ disabled: false, prominence: "strong" }, "uv_m4c9ow3g"], [{ disabled: false, prominence: "stronger" }, "uv_m4c9ow3h"], [{ disabled: false, prominence: "weak" }, "uv_m4c9ow3i"]] });
@@ -1,4 +1,3 @@
1
- /* empty css */
2
1
  var placementText = "var(--uv_qabug40)";
3
2
  var whiteSpaceText = "var(--uv_qabug41)";
4
3
  export {
@@ -26,5 +26,5 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<{
26
26
  value?: string;
27
27
  defaultValue?: string;
28
28
  onChangeValue?: (value: string) => void;
29
- } & Pick<InputHTMLAttributes<HTMLInputElement>, "style" | "disabled" | "id" | "autoComplete" | "role" | "autoFocus" | "tabIndex" | "aria-atomic" | "aria-label" | "aria-labelledby" | "aria-live" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "name" | "required" | "placeholder" | "readOnly"> & import("react").RefAttributes<HTMLInputElement>>;
29
+ } & Pick<InputHTMLAttributes<HTMLInputElement>, "style" | "disabled" | "id" | "autoFocus" | "tabIndex" | "role" | "aria-atomic" | "aria-label" | "aria-labelledby" | "aria-live" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "name" | "autoComplete" | "required" | "placeholder" | "readOnly"> & import("react").RefAttributes<HTMLInputElement>>;
30
30
  //# sourceMappingURL=index.d.ts.map
@@ -37,7 +37,7 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<Pick<{
37
37
  portalTarget?: HTMLElement;
38
38
  dynamicDomRendering?: boolean;
39
39
  style?: import("react").CSSProperties;
40
- } & import("react").RefAttributes<HTMLDivElement>, "text" | "maxWidth" | "visible" | "style" | "className" | "children" | "data-testid" | "id" | "role" | "tabIndex" | "portalTarget" | "containerFullHeight" | "containerFullWidth" | "disableAnimation" | "debounceDelay" | "innerRef"> & {
40
+ } & import("react").RefAttributes<HTMLDivElement>, "text" | "maxWidth" | "visible" | "style" | "className" | "data-testid" | "id" | "tabIndex" | "role" | "children" | "portalTarget" | "containerFullHeight" | "containerFullWidth" | "disableAnimation" | "debounceDelay" | "innerRef"> & {
41
41
  placement?: Exclude<ComponentProps<typeof Popup>["placement"], "nested-menu">;
42
42
  } & import("react").RefAttributes<HTMLDivElement>>;
43
43
  //# sourceMappingURL=index.d.ts.map