@frontify/fondue-components 3.0.3 → 3.2.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 (117) hide show
  1. package/dist/fondue-components.js +38 -24
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +18 -38
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +64 -40
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +19 -77
  8. package/dist/fondue-components12.js.map +1 -1
  9. package/dist/fondue-components13.js +22 -64
  10. package/dist/fondue-components13.js.map +1 -1
  11. package/dist/fondue-components14.js +39 -46
  12. package/dist/fondue-components14.js.map +1 -1
  13. package/dist/fondue-components15.js +6 -12
  14. package/dist/fondue-components15.js.map +1 -1
  15. package/dist/fondue-components16.js +46 -154
  16. package/dist/fondue-components16.js.map +1 -1
  17. package/dist/fondue-components17.js +54 -117
  18. package/dist/fondue-components17.js.map +1 -1
  19. package/dist/fondue-components18.js +28 -117
  20. package/dist/fondue-components18.js.map +1 -1
  21. package/dist/fondue-components19.js +111 -20
  22. package/dist/fondue-components19.js.map +1 -1
  23. package/dist/fondue-components20.js +65 -14
  24. package/dist/fondue-components20.js.map +1 -1
  25. package/dist/fondue-components21.js +42 -59
  26. package/dist/fondue-components21.js.map +1 -1
  27. package/dist/fondue-components22.js +32 -17
  28. package/dist/fondue-components22.js.map +1 -1
  29. package/dist/fondue-components23.js +5 -17
  30. package/dist/fondue-components23.js.map +1 -1
  31. package/dist/fondue-components24.js +10 -33
  32. package/dist/fondue-components24.js.map +1 -1
  33. package/dist/fondue-components25.js +154 -24
  34. package/dist/fondue-components25.js.map +1 -1
  35. package/dist/fondue-components26.js +118 -9
  36. package/dist/fondue-components26.js.map +1 -1
  37. package/dist/fondue-components27.js +118 -110
  38. package/dist/fondue-components27.js.map +1 -1
  39. package/dist/fondue-components28.js +21 -12
  40. package/dist/fondue-components28.js.map +1 -1
  41. package/dist/fondue-components29.js +28 -39
  42. package/dist/fondue-components29.js.map +1 -1
  43. package/dist/fondue-components3.js +11 -40
  44. package/dist/fondue-components3.js.map +1 -1
  45. package/dist/fondue-components30.js +28 -8
  46. package/dist/fondue-components30.js.map +1 -1
  47. package/dist/fondue-components31.js +129 -20
  48. package/dist/fondue-components31.js.map +1 -1
  49. package/dist/fondue-components32.js +20 -55
  50. package/dist/fondue-components32.js.map +1 -1
  51. package/dist/fondue-components33.js +45 -18
  52. package/dist/fondue-components33.js.map +1 -1
  53. package/dist/fondue-components34.js +15 -15
  54. package/dist/fondue-components34.js.map +1 -1
  55. package/dist/fondue-components35.js +60 -2
  56. package/dist/fondue-components35.js.map +1 -1
  57. package/dist/fondue-components36.js +14 -38
  58. package/dist/fondue-components36.js.map +1 -1
  59. package/dist/fondue-components37.js +22 -0
  60. package/dist/fondue-components37.js.map +1 -0
  61. package/dist/fondue-components38.js +20 -0
  62. package/dist/fondue-components38.js.map +1 -0
  63. package/dist/fondue-components39.js +8 -0
  64. package/dist/fondue-components39.js.map +1 -0
  65. package/dist/fondue-components4.js +39 -45
  66. package/dist/fondue-components4.js.map +1 -1
  67. package/dist/fondue-components40.js +16 -0
  68. package/dist/fondue-components40.js.map +1 -0
  69. package/dist/fondue-components41.js +8 -0
  70. package/dist/fondue-components41.js.map +1 -0
  71. package/dist/fondue-components42.js +38 -0
  72. package/dist/fondue-components42.js.map +1 -0
  73. package/dist/fondue-components43.js +8 -0
  74. package/dist/fondue-components43.js.map +1 -0
  75. package/dist/fondue-components44.js +28 -0
  76. package/dist/fondue-components44.js.map +1 -0
  77. package/dist/fondue-components45.js +20 -0
  78. package/dist/fondue-components45.js.map +1 -0
  79. package/dist/fondue-components46.js +14 -0
  80. package/dist/fondue-components46.js.map +1 -0
  81. package/dist/fondue-components47.js +16 -0
  82. package/dist/fondue-components47.js.map +1 -0
  83. package/dist/fondue-components48.js +133 -0
  84. package/dist/fondue-components48.js.map +1 -0
  85. package/dist/fondue-components49.js +15 -0
  86. package/dist/fondue-components49.js.map +1 -0
  87. package/dist/fondue-components5.js +46 -82
  88. package/dist/fondue-components5.js.map +1 -1
  89. package/dist/fondue-components50.js +46 -0
  90. package/dist/fondue-components50.js.map +1 -0
  91. package/dist/fondue-components51.js +11 -0
  92. package/dist/fondue-components51.js.map +1 -0
  93. package/dist/fondue-components52.js +30 -0
  94. package/dist/fondue-components52.js.map +1 -0
  95. package/dist/fondue-components53.js +52 -0
  96. package/dist/fondue-components53.js.map +1 -0
  97. package/dist/fondue-components54.js +21 -0
  98. package/dist/fondue-components54.js.map +1 -0
  99. package/dist/fondue-components55.js +10 -0
  100. package/dist/fondue-components55.js.map +1 -0
  101. package/dist/fondue-components56.js +5 -0
  102. package/dist/fondue-components56.js.map +1 -0
  103. package/dist/fondue-components57.js +14 -0
  104. package/dist/fondue-components57.js.map +1 -0
  105. package/dist/fondue-components58.js +42 -0
  106. package/dist/fondue-components58.js.map +1 -0
  107. package/dist/fondue-components6.js +48 -30
  108. package/dist/fondue-components6.js.map +1 -1
  109. package/dist/fondue-components7.js +80 -83
  110. package/dist/fondue-components7.js.map +1 -1
  111. package/dist/fondue-components8.js +28 -56
  112. package/dist/fondue-components8.js.map +1 -1
  113. package/dist/fondue-components9.js +101 -22
  114. package/dist/fondue-components9.js.map +1 -1
  115. package/dist/index.d.ts +490 -5
  116. package/dist/style.css +1 -1
  117. package/package.json +5 -3
@@ -1,28 +1,42 @@
1
1
  /* empty css */
2
- import { Button as e } from "./fondue-components3.js";
3
- import { Checkbox as m } from "./fondue-components4.js";
4
- import { Dialog as f } from "./fondue-components5.js";
5
- import { Divider as l } from "./fondue-components6.js";
6
- import { Dropdown as a } from "./fondue-components7.js";
7
- import { Flyout as g } from "./fondue-components8.js";
8
- import { Label as D } from "./fondue-components9.js";
9
- import { LoadingBar as c } from "./fondue-components10.js";
10
- import { SegmentedControl as C } from "./fondue-components11.js";
11
- import { Select as S } from "./fondue-components12.js";
12
- import { TextInput as h } from "./fondue-components13.js";
13
- import { Tooltip as v } from "./fondue-components14.js";
2
+ import { Box as t } from "./fondue-components3.js";
3
+ import { Button as x } from "./fondue-components4.js";
4
+ import { Checkbox as f } from "./fondue-components5.js";
5
+ import { ColorPicker as l } from "./fondue-components6.js";
6
+ import { Dialog as d } from "./fondue-components7.js";
7
+ import { Divider as S } from "./fondue-components8.js";
8
+ import { Dropdown as g } from "./fondue-components9.js";
9
+ import { Flex as B } from "./fondue-components10.js";
10
+ import { Flyout as D } from "./fondue-components11.js";
11
+ import { Grid as h } from "./fondue-components12.js";
12
+ import { Label as w } from "./fondue-components13.js";
13
+ import { LoadingBar as L } from "./fondue-components14.js";
14
+ import { Section as v } from "./fondue-components15.js";
15
+ import { SegmentedControl as G } from "./fondue-components16.js";
16
+ import { Slider as P } from "./fondue-components17.js";
17
+ import { Switch as q } from "./fondue-components18.js";
18
+ import { Select as z } from "./fondue-components19.js";
19
+ import { TextInput as E } from "./fondue-components20.js";
20
+ import { Tooltip as J } from "./fondue-components21.js";
14
21
  export {
15
- e as Button,
16
- m as Checkbox,
17
- f as Dialog,
18
- l as Divider,
19
- a as Dropdown,
20
- g as Flyout,
21
- D as Label,
22
- c as LoadingBar,
23
- C as SegmentedControl,
24
- S as Select,
25
- h as TextInput,
26
- v as Tooltip
22
+ t as Box,
23
+ x as Button,
24
+ f as Checkbox,
25
+ l as ColorPicker,
26
+ d as Dialog,
27
+ S as Divider,
28
+ g as Dropdown,
29
+ B as Flex,
30
+ D as Flyout,
31
+ h as Grid,
32
+ w as Label,
33
+ L as LoadingBar,
34
+ v as Section,
35
+ G as SegmentedControl,
36
+ z as Select,
37
+ P as Slider,
38
+ q as Switch,
39
+ E as TextInput,
40
+ J as Tooltip
27
41
  };
28
42
  //# sourceMappingURL=fondue-components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1,42 +1,22 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-progress";
3
- import { forwardRef as m } from "react";
4
- import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components24.js";
5
- const p = m(
6
- ({
7
- value: a,
8
- max: r = 100,
9
- rounded: d = !0,
10
- variant: o = "default",
11
- size: e = "medium",
12
- "data-test-id": n = "fondue-loading-bar",
13
- ...l
14
- }, s) => /* @__PURE__ */ i(
15
- t.Root,
16
- {
17
- ref: s,
18
- "data-test-id": n,
19
- className: g({ rounded: d, size: e, variant: o }),
20
- "aria-busy": a !== r,
21
- value: a,
22
- max: r,
23
- style: {
24
- "--loading-bar-value": a,
25
- "--loading-bar-max": r,
26
- "--loading-bar-proportion": "calc(var(--loading-bar-value) / var(--loading-bar-max))"
27
- },
28
- ...l,
29
- children: /* @__PURE__ */ i(
30
- t.Indicator,
31
- {
32
- className: f({ variant: o, indeterminateState: a === null })
33
- }
34
- )
35
- }
36
- )
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { propsToCssVariables as a } from "./fondue-components22.js";
3
+ import i from "./fondue-components39.js";
4
+ const l = ({
5
+ as: t = "div",
6
+ "data-test-id": s = "fondue-flex",
7
+ children: e,
8
+ ...o
9
+ }) => /* @__PURE__ */ r(
10
+ t,
11
+ {
12
+ className: i.root,
13
+ "data-test-id": s,
14
+ style: a(o, { justify: "justify-content" }),
15
+ children: e
16
+ }
37
17
  );
38
- p.displayName = "LoadingBar";
18
+ l.displayName = "Flex";
39
19
  export {
40
- p as LoadingBar
20
+ l as Flex
41
21
  };
42
22
  //# sourceMappingURL=fondue-components10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components10.js","sources":["../src/components/LoadingBar/LoadingBar.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ProgressRadixPrimitive from '@radix-ui/react-progress';\nimport { forwardRef, type CSSProperties, type ElementRef, type ForwardedRef } from 'react';\n\nimport { loadingBarContainerStyles, loadingBarStyles } from './styles/loadingBarStyles';\n\nexport type LoadingBarProps = {\n /**\n * The current value of the loading bar. If `null`, the loading bar will be in an indeterminate state.\n * @default null\n */\n value: number | null;\n /**\n * The maximum value of the loading bar\n * @default 100\n */\n max?: number;\n /**\n * @default 'fondue-loading-bar'\n */\n 'data-test-id'?: string;\n /**\n * Add rounded corners to the loading bar\n * @default true\n */\n rounded?: boolean;\n /**\n * The style of the loading bar\n * @default \"default\"\n */\n variant?: 'default' | 'positive' | 'negative';\n /**\n * The size of the loading bar\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /**\n * The label of the loading bar for accessibility purposes\n */\n getValueLabel?: (value: number, max: number) => string;\n} & ({ 'aria-label': string } | { 'aria-labelledby': string });\n\nexport const LoadingBar = forwardRef<ElementRef<typeof ProgressRadixPrimitive.Root>, LoadingBarProps>(\n (\n {\n value,\n max = 100,\n rounded = true,\n variant = 'default',\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-loading-bar',\n ...props\n }: LoadingBarProps,\n ref: ForwardedRef<ElementRef<typeof ProgressRadixPrimitive.Root>>,\n ) => {\n return (\n <ProgressRadixPrimitive.Root\n ref={ref}\n data-test-id={dataTestId}\n className={loadingBarContainerStyles({ rounded, size, variant })}\n aria-busy={value !== max}\n value={value}\n max={max}\n style={\n {\n '--loading-bar-value': value,\n '--loading-bar-max': max,\n '--loading-bar-proportion': 'calc(var(--loading-bar-value) / var(--loading-bar-max))',\n } as CSSProperties\n }\n {...props}\n >\n <ProgressRadixPrimitive.Indicator\n className={loadingBarStyles({ variant, indeterminateState: value === null })}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","variant","size","dataTestId","props","ref","jsx","ProgressRadixPrimitive","loadingBarContainerStyles","loadingBarStyles"],"mappings":";;;;AA2CO,MAAMA,IAAaC;AAAA,EACtB,CACI;AAAA,IACI,OAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAA0B,EAAE,SAAAR,GAAS,MAAAE,GAAM,SAAAD,GAAS;AAAA,MAC/D,aAAWH,MAAUC;AAAA,MACrB,OAAAD;AAAA,MACA,KAAAC;AAAA,MACA,OACI;AAAA,QACI,uBAAuBD;AAAA,QACvB,qBAAqBC;AAAA,QACrB,4BAA4B;AAAA,MAChC;AAAA,MAEH,GAAGK;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACC,EAAuB;AAAA,QAAvB;AAAA,UACG,WAAWE,EAAiB,EAAE,SAAAR,GAAS,oBAAoBH,MAAU,MAAM;AAAA,QAAA;AAAA,MAC/E;AAAA,IAAA;AAAA,EAAA;AAIhB;AACAF,EAAW,cAAc;"}
1
+ {"version":3,"file":"fondue-components10.js","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/flex.module.scss';\n\nexport type FlexProps = LayoutComponentProps & {\n /**\n * The element to render the Flex component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n /**\n * The display property.\n * @default 'flex'\n */\n display?: Responsive<'none' | 'flex' | 'inline-flex'>;\n /**\n * The direction of the children.\n * @default 'row'\n */\n direction?: Responsive<'row' | 'row-reverse' | 'column' | 'column-reverse'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'>;\n /**\n * The wrap property.\n */\n wrap?: Responsive<'nowrap' | 'wrap' | 'wrap-reverse'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Flex = ({\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-flex',\n children,\n ...props\n}: FlexProps) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-content' })}\n >\n {children}\n </Component>\n );\n};\nFlex.displayName = 'Flex';\n"],"names":["Flex","Component","dataTestId","children","props","jsx","styles","propsToCssVariables"],"mappings":";;;AAuDO,MAAMA,IAAO,CAAC;AAAA,EACjB,IAAIC,IAAY;AAAA,EAChB,gBAAgBC,IAAa;AAAA,EAC7B,UAAAC;AAAA,EACA,GAAGC;AACP,MAEQ,gBAAAC;AAAA,EAACJ;AAAA,EAAA;AAAA,IACG,WAAWK,EAAO;AAAA,IAClB,gBAAcJ;AAAA,IACd,OAAOK,EAAoBH,GAAO,EAAE,SAAS,mBAAmB;AAAA,IAE/D,UAAAD;AAAA,EAAA;AAAA;AAIbH,EAAK,cAAc;"}
@@ -1,50 +1,74 @@
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-components25.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-components26.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,
1
+ import { jsx as a, jsxs as C } from "react/jsx-runtime";
2
+ import { IconCross as v } from "@frontify/fondue-icons";
3
+ import * as s from "@radix-ui/react-popover";
4
+ import { forwardRef as r, useRef as x } from "react";
5
+ import { usePreventDropdownOverflow as w } from "./fondue-components36.js";
6
+ import { syncRefs as u } from "./fondue-components37.js";
7
+ import d from "./fondue-components40.js";
8
+ const y = ({ children: t, ...o }) => /* @__PURE__ */ a(s.Root, { ...o, children: t });
9
+ y.displayName = "Flyout.Root";
10
+ const c = ({ children: t, "data-test-id": o = "fondue-flyout-trigger" }, e) => /* @__PURE__ */ a(s.Trigger, { "data-test-id": o, asChild: !0, ref: e, children: t });
11
+ c.displayName = "Flyout.Trigger";
12
+ const f = ({
13
+ align: t = "start",
14
+ maxWidth: o = "360px",
15
+ padding: e = "compact",
16
+ "data-test-id": i = "fondue-flyout-content",
17
+ children: g,
18
+ rounded: N,
19
+ ...R
20
+ }, n) => {
21
+ const l = x(null), { setMaxHeight: h } = w(l);
22
+ return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(
23
+ s.Content,
14
24
  {
15
- ref: g,
16
- ...a,
17
- className: f,
18
- onValueChange: (n) => {
19
- n && C(n);
25
+ style: {
26
+ "--flyout-max-width": o
20
27
  },
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
- ]
28
+ ref: l,
29
+ align: t,
30
+ collisionPadding: 8,
31
+ sideOffset: 8,
32
+ onOpenAutoFocus: () => {
33
+ h(), u(l, n);
34
+ },
35
+ onCloseAutoFocus: () => {
36
+ u(l, n);
37
+ },
38
+ className: d.root,
39
+ "data-flyout-spacing": e,
40
+ "data-rounded": N,
41
+ "data-test-id": i,
42
+ ...R,
43
+ children: g
29
44
  }
30
- );
45
+ ) });
31
46
  };
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
- ] })
47
+ f.displayName = "Flyout.Content";
48
+ const m = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, i) => /* @__PURE__ */ C("div", { "data-test-id": e, ref: i, className: d.header, children: [
49
+ /* @__PURE__ */ a("div", { children: o }),
50
+ t && /* @__PURE__ */ a(s.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(v, { size: 20 }) })
39
51
  ] });
40
- i.displayName = "SegmentedControl.Item";
52
+ m.displayName = "Flyout.Header";
53
+ const p = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: d.footer, children: t });
54
+ p.displayName = "Flyout.Footer";
55
+ const F = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: d.body, children: t });
56
+ F.displayName = "Flyout.Body";
41
57
  const j = {
42
- Root: m(d),
43
- Item: m(i)
58
+ Root: y,
59
+ Trigger: r(c),
60
+ Content: r(f),
61
+ Header: r(m),
62
+ Footer: r(p),
63
+ Body: r(F)
44
64
  };
45
65
  export {
46
- j as SegmentedControl,
47
- i as SegmentedControlItem,
48
- d as SegmentedControlRoot
66
+ j as Flyout,
67
+ F as FlyoutBody,
68
+ f as FlyoutContent,
69
+ p as FlyoutFooter,
70
+ m as FlyoutHeader,
71
+ y as FlyoutRoot,
72
+ c as FlyoutTrigger
49
73
  };
50
74
  //# sourceMappingURL=fondue-components11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components11.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,cAAAC,GAAc,eAAAC,GAAe,GAAGC,EAAU,GACzEC,MACC;AACD,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAqB;AAAA,IAC3C,MAAMP;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EAAA,CACb;AAGG,SAAA,gBAAAM;AAAA,IAACC,EAAqB;AAAA,IAArB;AAAA,MACG,KAAAL;AAAA,MACC,GAAGD;AAAA,MACJ,WAAWO;AAAA,MACX,eAAe,CAACL,MAAU;AACtB,QAAIA,KACAC,EAASD,CAAK;AAAA,MAEtB;AAAA,MACA,OAAAA;AAAA,MACA,MAAK;AAAA,MACL,SAAS;AAAA,MACT,iBAAeF,EAAU;AAAA,MAExB,UAAA;AAAA,QAAAJ;AAAA,QAED,gBAAAY,EAAC,OAAI,EAAA,WAAWC,EAAuC,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnE;AACAd,EAAqB,cAAc;AAO5B,MAAMe,IAAuB,CAChC,EAAE,UAAAd,GAAU,GAAGe,EAAA,GACfV,MAEA,gBAAAI,EAACC,EAAqB,MAArB,EAA0B,KAAAL,GAAW,GAAGU,GAAW,WAAWC,GAA4B,SAAS,IAEhG,UAAA;AAAA,EAAC,gBAAAJ,EAAA,QAAA,EAAK,WAAWK,EAAqC,CAAA;AAAA,EACtD,gBAAAR,EAAC,QAAK,EAAA,WAAWS,GAEb,UAAA;AAAA,IAAC,gBAAAN,EAAA,QAAA,EAAK,WAAWO,GAAwC,UAAAnB,EAAS,CAAA;AAAA,IAGjE,gBAAAY,EAAA,QAAA,EAAK,WAAWQ,GAA0C,UAAApB,EAAS,CAAA;AAAA,EAAA,GACxE;AAAA,GACJ;AAEJc,EAAqB,cAAc;AAE5B,MAAMO,IAAmB;AAAA,EAC5B,MAAMC,EAAsDvB,CAAoB;AAAA,EAChF,MAAMuB,EAAyDR,CAAoB;AACvF;"}
1
+ {"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type FlyoutContentProps = {\n /**\n * Add rounded corners to the flyout\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport const FlyoutTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n rounded,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n } as CSSProperties\n }\n ref={localRef}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n onOpenAutoFocus={() => {\n setMaxHeight();\n syncRefs(localRef, ref);\n }}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n }}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-test-id={dataTestId}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={styles.body}>\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","dataTestId","ref","jsx","FlyoutContent","align","maxWidth","padding","rounded","localRef","useRef","setMaxHeight","usePreventDropdownOverflow","syncRefs","styles","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;;AA2EO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,EAAS,CAAA;AAEnDD,EAAW,cAAc;AAEZ,MAAAI,IAAgB,CACzB,EAAE,UAAAH,GAAU,gBAAgBI,IAAa,2BACzCC,MAGI,gBAAAC,EAACJ,EAAa,SAAb,EAAqB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GACnD,UAAAL,EACL,CAAA;AAGRG,EAAc,cAAc;AAErB,MAAMI,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,gBAAgBN,IAAa;AAAA,EAC7B,UAAAJ;AAAA,EACA,SAAAW;AAAA,EACA,GAAGV;AACP,GACAI,MACC;AACK,QAAAO,IAAWC,EAAO,IAAI,GAEtB,EAAE,cAAAC,EAAA,IAAiBC,EAA2BH,CAAQ;AAGxD,SAAA,gBAAAN,EAACJ,EAAa,QAAb,EACG,UAAA,gBAAAI;AAAA,IAACJ,EAAa;AAAA,IAAb;AAAA,MACG,OACI;AAAA,QACI,sBAAsBO;AAAA,MAC1B;AAAA,MAEJ,KAAKG;AAAA,MACL,OAAAJ;AAAA,MACA,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,iBAAiB,MAAM;AACN,QAAAM,KACbE,EAASJ,GAAUP,CAAG;AAAA,MAC1B;AAAA,MACA,kBAAkB,MAAM;AACpB,QAAAW,EAASJ,GAAUP,CAAG;AAAA,MAC1B;AAAA,MACA,WAAWY,EAAO;AAAA,MAClB,uBAAqBP;AAAA,MACrB,gBAAcC;AAAA,MACd,gBAAcP;AAAA,MACb,GAAGH;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAER;AACAO,EAAc,cAAc;AAEf,MAAAW,IAAe,CACxB,EAAE,iBAAAC,GAAiB,UAAAnB,GAAU,gBAAgBI,IAAa,uBAAuB,GACjFC,wBAGK,OAAI,EAAA,gBAAcD,GAAY,KAAAC,GAAU,WAAWY,EAAO,QACvD,UAAA;AAAA,EAAA,gBAAAX,EAAC,SAAK,UAAAN,GAAS;AAAA,EACdmB,KACI,gBAAAb,EAAAJ,EAAa,OAAb,EAAmB,MAAK,UAAS,gBAAc,GAAGE,CAAU,UAAU,WAAWa,EAAO,OACrF,4BAACG,GAAU,EAAA,MAAM,GAAI,CAAA,GACzB;AAER,EAAA,CAAA;AAGRF,EAAa,cAAc;AAEd,MAAAG,IAAe,CACxB,EAAE,UAAArB,GAAU,gBAAgBI,IAAa,0BACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWY,EAAO,QACtD,UAAAjB,EACL,CAAA;AAGRqB,EAAa,cAAc;AAEd,MAAAC,IAAa,CACtB,EAAE,UAAAtB,GAAU,gBAAgBI,IAAa,wBACzCC,MAGI,gBAAAC,EAAC,OAAI,EAAA,gBAAcF,GAAY,KAAAC,GAAU,uBAAoB,WAAU,WAAWY,EAAO,MACpF,UAAAjB,EACL,CAAA;AAGRsB,EAAW,cAAc;AAElB,MAAMC,IAAS;AAAA,EAClB,MAAMxB;AAAA,EACN,SAASyB,EAAkDrB,CAAa;AAAA,EACxE,SAASqB,EAA+CjB,CAAa;AAAA,EACrE,QAAQiB,EAA8CN,CAAY;AAAA,EAClE,QAAQM,EAA8CH,CAAY;AAAA,EAClE,MAAMG,EAA4CF,CAAU;AAChE;"}
@@ -1,80 +1,22 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { IconCaretDown as B } from "@frontify/fondue-icons";
3
- import * as p from "@radix-ui/react-popover";
4
- import { Slot as j } from "@radix-ui/react-slot";
5
- import { useSelect as D } from "downshift";
6
- import { forwardRef as M } from "react";
7
- import { ForwardedRefCombobox as T } from "./fondue-components27.js";
8
- import { ForwardedRefSelectItem as k, ForwardedRefSelectItemGroup as z } from "./fondue-components28.js";
9
- import { SelectMenu as A } from "./fondue-components29.js";
10
- import { ForwardedRefSelectSlot as O } from "./fondue-components30.js";
11
- import r from "./fondue-components31.js";
12
- import { useSelectData as V } from "./fondue-components32.js";
13
- const n = ({
14
- children: S,
15
- onSelect: a,
16
- value: f,
17
- defaultValue: u,
18
- placeholder: I = "",
19
- disabled: m,
20
- "aria-label": h,
21
- "data-test-id": b = "fondue-select"
22
- }, s) => {
23
- const { inputSlots: g, menuSlots: N, items: x, clearButton: c, getItemByValue: i } = V(S), y = i(u), C = i(f), { getToggleButtonProps: R, getMenuProps: w, getItemProps: v, reset: F, selectedItem: l, isOpen: P, highlightedIndex: G } = D({
24
- items: x,
25
- defaultSelectedItem: y,
26
- selectedItem: C,
27
- onSelectedItemChange: ({ selectedItem: t }) => {
28
- a && a(t.value);
29
- },
30
- itemToString: (t) => t ? t.label : ""
31
- });
32
- return /* @__PURE__ */ d(p.Root, { open: P, children: [
33
- /* @__PURE__ */ o(p.Anchor, { asChild: !0, children: /* @__PURE__ */ d(
34
- "div",
35
- {
36
- className: r.root,
37
- "data-disabled": m,
38
- "data-empty": !l,
39
- "data-test-id": b,
40
- ...m ? {} : R({
41
- "aria-label": h,
42
- ...s ? { ref: s } : {}
43
- }),
44
- children: [
45
- /* @__PURE__ */ o("span", { className: r.input, children: l ? l.label : I }),
46
- g,
47
- c && /* @__PURE__ */ o(
48
- j,
49
- {
50
- onClick: (t) => {
51
- t.stopPropagation(), F();
52
- },
53
- className: r.clear,
54
- children: c
55
- }
56
- ),
57
- /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(B, { size: 16, className: r.caret }) })
58
- ]
59
- }
60
- ) }),
61
- /* @__PURE__ */ o(A, { highlightedIndex: G, getMenuProps: w, getItemProps: v, children: N })
62
- ] });
63
- };
64
- n.displayName = "Select";
65
- const q = M(n), e = q;
66
- e.displayName = "Select";
67
- e.Combobox = T;
68
- e.Combobox.displayName = "Select.Combobox";
69
- e.Item = k;
70
- e.Item.displayName = "Select.Item";
71
- e.Group = z;
72
- e.Group.displayName = "Select.Group";
73
- e.Slot = O;
74
- e.Slot.displayName = "Select.Slot";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { propsToCssVariables as a } from "./fondue-components22.js";
3
+ import e from "./fondue-components41.js";
4
+ const d = ({
5
+ as: s = "div",
6
+ "data-test-id": t = "fondue-grid",
7
+ children: r,
8
+ ...i
9
+ }) => /* @__PURE__ */ o(
10
+ s,
11
+ {
12
+ className: e.root,
13
+ "data-test-id": t,
14
+ style: a(i, { justify: "justify-items" }),
15
+ children: r
16
+ }
17
+ );
18
+ d.displayName = "Grid";
75
19
  export {
76
- q as ForwardedRefSelect,
77
- e as Select,
78
- n as SelectInput
20
+ d as Grid
79
21
  };
80
22
  //# sourceMappingURL=fondue-components12.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components12.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The aria label of the select component.\n */\n 'aria-label'?: string;\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n disabled,\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'fondue-select',\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect && onSelect(selectedItem.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor asChild>\n <div\n className={styles.root}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': ariaLabel,\n ...(forwardedRef ? { ref: forwardedRef } : {}),\n }))}\n >\n <span className={styles.input}>{selectedItem ? selectedItem.label : placeholder}</span>\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n )}\n <div>\n <IconCaretDown size={16} className={styles.caret} />\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu highlightedIndex={highlightedIndex} getMenuProps={getMenuProps} getItemProps={getItemProps}>\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","disabled","ariaLabel","dataTestId","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","jsxs","RadixPopover","jsx","styles","RadixSlot","event","IconCaretDown","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AAkDO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC;AAAA,EACA,cAAcC;AAAA,EACd,gBAAgBC,IAAa;AACjC,GACAC,MACC;AACK,QAAA,EAAE,YAAAC,GAAY,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,gBAAAC,EAAe,IAAIC,EAAcd,CAAQ,GAEtFe,IAAcF,EAAeV,CAAY,GACzCa,IAAaH,EAAeX,CAAK,GAEjC,EAAE,sBAAAe,GAAsB,cAAAC,GAAc,cAAAC,GAAc,OAAAC,GAAO,cAAAC,GAAc,QAAAC,GAAQ,kBAAAC,EAAiB,IACpGC,EAAU;AAAA,IACN,OAAAb;AAAA,IACA,qBAAqBI;AAAA,IACrB,cAAcC;AAAA,IACd,sBAAsB,CAAC,EAAE,cAAAK,QAAmB;AAC5B,MAAApB,KAAAA,EAASoB,EAAa,KAAK;AAAA,IAC3C;AAAA,IACA,cAAc,CAACI,MAAUA,IAAOA,EAAK,QAAQ;AAAA,EAAA,CAChD;AAEL,SACK,gBAAAC,EAAAC,EAAa,MAAb,EAAkB,MAAML,GACrB,UAAA;AAAA,IAAA,gBAAAM,EAACD,EAAa,QAAb,EAAoB,SAAO,IACxB,UAAA,gBAAAD;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,WAAWG,EAAO;AAAA,QAClB,iBAAexB;AAAA,QACf,cAAY,CAACgB;AAAA,QACb,gBAAcd;AAAA,QACb,GAAIF,IACC,CAAC,IACDY,EAAqB;AAAA,UACjB,cAAcX;AAAA,UACd,GAAIE,IAAe,EAAE,KAAKA,MAAiB,CAAC;AAAA,QAAA,CAC/C;AAAA,QAEP,UAAA;AAAA,UAAA,gBAAAoB,EAAC,UAAK,WAAWC,EAAO,OAAQ,UAAeR,IAAAA,EAAa,QAAQjB,EAAY,CAAA;AAAA,UAC/EK;AAAA,UACAG,KACG,gBAAAgB;AAAA,YAACE;AAAAA,YAAA;AAAA,cACG,SAAS,CAACC,MAAU;AAChB,gBAAAA,EAAM,gBAAgB,GAChBX;cACV;AAAA,cACA,WAAWS,EAAO;AAAA,cAEjB,UAAAjB;AAAA,YAAA;AAAA,UACL;AAAA,UAEJ,gBAAAgB,EAAC,SACG,UAAC,gBAAAA,EAAAI,GAAA,EAAc,MAAM,IAAI,WAAWH,EAAO,MAAA,CAAO,EACtD,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAER;AAAA,IAEC,gBAAAD,EAAAK,GAAA,EAAW,kBAAAV,GAAoC,cAAAL,GAA4B,cAAAC,GACvE,UACLT,GAAA;AAAA,EACJ,EAAA,CAAA;AAER;AACAX,EAAY,cAAc;AAEb,MAAAmC,IAAqBC,EAAiDpC,CAAW,GAGjFqC,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
1
+ {"version":3,"file":"fondue-components12.js","sources":["../src/components/Grid/Grid.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/grid.module.scss';\n\nexport type GridProps = LayoutComponentProps & {\n /**\n * The element to render the Grid component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n\n /**\n * The display property.\n * @default 'grid'\n */\n display?: 'none' | 'grid' | 'inline-grid';\n /**\n * The columns property.\n */\n columns?: Responsive<string | number>;\n /**\n * The rows property.\n */\n rows?: Responsive<string | number>;\n /**\n * The flow property.\n */\n flow?: Responsive<'row' | 'column' | 'dense' | 'row-dense' | 'column-dense'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'start' | 'center' | 'end' | 'baseline' | 'stretch'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'start' | 'center' | 'end' | 'between'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Grid = ({\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-grid',\n children,\n ...props\n}: GridProps) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-items' })}\n >\n {children}\n </Component>\n );\n};\nGrid.displayName = 'Grid';\n"],"names":["Grid","Component","dataTestId","children","props","jsx","styles","propsToCssVariables"],"mappings":";;;AA2DO,MAAMA,IAAO,CAAC;AAAA,EACjB,IAAIC,IAAY;AAAA,EAChB,gBAAgBC,IAAa;AAAA,EAC7B,UAAAC;AAAA,EACA,GAAGC;AACP,MAEQ,gBAAAC;AAAA,EAACJ;AAAA,EAAA;AAAA,IACG,WAAWK,EAAO;AAAA,IAClB,gBAAcJ;AAAA,IACd,OAAOK,EAAoBH,GAAO,EAAE,SAAS,iBAAiB;AAAA,IAE7D,UAAAD;AAAA,EAAA;AAAA;AAIbH,EAAK,cAAc;"}
@@ -1,69 +1,27 @@
1
- import { jsxs as g, jsx as s } from "react/jsx-runtime";
2
- import { IconCheckMark as w, IconExclamationMarkTriangle as N } from "@frontify/fondue-icons";
3
- import { forwardRef as n, useRef as S } from "react";
4
- import { cn as m } from "./fondue-components15.js";
5
- import r from "./fondue-components33.js";
6
- const f = ({
7
- children: c,
8
- className: d,
9
- status: e = "neutral",
10
- "data-test-id": a = "fondue-text-input",
11
- ...t
12
- }, R) => {
13
- const i = S(!1);
14
- return /* @__PURE__ */ g("div", { className: m(r.root, d), "data-status": e, "data-test-id": a, children: [
15
- e === "loading" ? /* @__PURE__ */ s("div", { className: r.loadingStatus, "data-test-id": `${a}-loader` }) : null,
16
- /* @__PURE__ */ s(
17
- "input",
18
- {
19
- onMouseDown: (o) => {
20
- i.current = !0, o.currentTarget.dataset.showFocusRing = "false";
21
- },
22
- type: "text",
23
- ...t,
24
- onFocus: (o) => {
25
- var l;
26
- i.current || (o.target.dataset.showFocusRing = "true"), (l = t.onFocus) == null || l.call(t, o);
27
- },
28
- onBlur: (o) => {
29
- var l;
30
- o.target.dataset.showFocusRing = "false", i.current = !1, (l = t.onBlur) == null || l.call(t, o);
31
- },
32
- ref: R,
33
- className: r.input,
34
- "aria-invalid": e === "error"
35
- }
36
- ),
37
- e === "success" ? /* @__PURE__ */ s(w, { size: 16, className: r.iconSuccess, "data-test-id": `${a}-success-icon` }) : null,
38
- e === "error" ? /* @__PURE__ */ s(
39
- N,
40
- {
41
- size: 16,
42
- className: r.iconError,
43
- "data-test-id": `${a}-error-icon`
44
- }
45
- ) : null,
46
- c
47
- ] });
48
- };
49
- f.displayName = "TextField.Root";
50
- const u = ({ name: c, className: d, ...e }, a) => /* @__PURE__ */ s(
51
- "div",
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import * as d from "@radix-ui/react-label";
3
+ import { forwardRef as i } from "react";
4
+ import { cn as n } from "./fondue-components24.js";
5
+ const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
6
+ d.Root,
52
7
  {
53
- "data-slot": !0,
54
- "data-name": c,
55
- ...e,
56
- ref: a,
57
- className: m(r.slot, d)
8
+ ref: r,
9
+ "data-required": t.required,
10
+ className: n(
11
+ 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state="checked"]:tw-font-medium peer-data-[state="indeterminate"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',
12
+ // Disabled state if siblings has disabled state
13
+ "has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed",
14
+ // Required asterisk
15
+ 'after:tw-hidden data-[required="true"]:after:tw-flex after:tw-content-["*"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',
16
+ e
17
+ ),
18
+ "data-test-id": a,
19
+ ...t
58
20
  }
59
- );
60
- u.displayName = "TextField.Slot";
61
- const x = n(f), T = n(u), F = x;
62
- F.Root = x;
63
- F.Slot = T;
21
+ ), w = i(s);
22
+ w.displayName = "Label";
64
23
  export {
65
- f as TextFieldRoot,
66
- u as TextFieldSlot,
67
- F as TextInput
24
+ w as Label,
25
+ s as LabelComponent
68
26
  };
69
27
  //# sourceMappingURL=fondue-components13.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components13.js","sources":["../src/components/TextInput/TextInput.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport {\n forwardRef,\n useRef,\n type ChangeEvent,\n type ForwardedRef,\n type KeyboardEvent,\n type ReactNode,\n type SyntheticEvent,\n} from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/text.module.scss';\n\nexport type TextInputProps = {\n id?: string;\n name?: string;\n /**\n * The place where the input slots are placed\n */\n children?: ReactNode;\n /**\n * The default value of the text input\n * Used for uncontrolled components\n */\n defaultValue?: string | number;\n /**\n * The controlled value of the text input\n */\n value?: string | number;\n /**\n * Type of the text input\n * @default \"text\"\n */\n type?: 'date' | 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';\n /**\n * The placeholder in the text input\n */\n placeholder?: string;\n /**\n * Disable the text input\n * @default false\n */\n disabled?: boolean;\n /**\n * Make the text input required in form\n * @default false\n */\n required?: boolean;\n /**\n * Make the text input spell-checkable\n * @default true\n */\n spellCheck?: boolean;\n /**\n * Make the text input read-only\n * @default false\n */\n readOnly?: boolean;\n /**\n * Set the type of input so autocomplete can help the user\n * @default \"on\"\n */\n autoComplete?: string;\n /**\n * The maximum length of the text input\n */\n maxLength?: number;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error' | 'loading';\n className?: string;\n /**\n * Event handler called when the text input value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is blurred\n */\n onBlur?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is focused\n */\n onFocus?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is pressed\n */\n onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is released\n */\n onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text inside of text input is selected\n */\n onSelect?: (event: SyntheticEvent<HTMLInputElement>) => void;\n 'data-test-id'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n};\n\nexport const TextFieldRoot = (\n {\n children,\n className,\n status = 'neutral',\n 'data-test-id': dataTestId = 'fondue-text-input',\n ...inputProps\n }: TextInputProps,\n ref: ForwardedRef<HTMLInputElement>,\n) => {\n const wasClicked = useRef(false);\n\n return (\n <div className={cn(styles.root, className)} data-status={status} data-test-id={dataTestId}>\n {status === 'loading' ? (\n <div className={styles.loadingStatus} data-test-id={`${dataTestId}-loader`} />\n ) : null}\n <input\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n type=\"text\"\n {...inputProps}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n inputProps.onFocus?.(focusEvent);\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n inputProps.onBlur?.(blurEvent);\n }}\n ref={ref}\n className={styles.input}\n aria-invalid={status === 'error'}\n />\n\n {status === 'success' ? (\n <IconCheckMark size={16} className={styles.iconSuccess} data-test-id={`${dataTestId}-success-icon`} />\n ) : null}\n\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n\n {children}\n </div>\n );\n};\nTextFieldRoot.displayName = 'TextField.Root';\n\nexport type TextFieldSlotProps = {\n children: ReactNode;\n name?: 'left' | 'right';\n className?: string;\n};\n\nexport const TextFieldSlot = (\n { name, className, ...slotProps }: TextFieldSlotProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-slot={true}\n data-name={name}\n {...slotProps}\n ref={forwardedRef}\n className={cn(styles.slot, className)}\n />\n );\n};\n\nTextFieldSlot.displayName = 'TextField.Slot';\n\nconst ForwardedRefTextFieldRoot = forwardRef<HTMLInputElement, TextInputProps>(TextFieldRoot);\nconst ForwardedRefTextFieldSlot = forwardRef<HTMLDivElement, TextFieldSlotProps>(TextFieldSlot);\n// @ts-expect-error We support both single component (without slots) and compound components (with slots)\nexport const TextInput: typeof TextFieldRoot & {\n Root: typeof ForwardedRefTextFieldRoot;\n Slot: typeof ForwardedRefTextFieldSlot;\n} = ForwardedRefTextFieldRoot;\nTextInput.Root = ForwardedRefTextFieldRoot;\nTextInput.Slot = ForwardedRefTextFieldSlot;\n"],"names":["TextFieldRoot","children","className","status","dataTestId","inputProps","ref","wasClicked","useRef","jsxs","cn","styles","jsx","mouseEvent","focusEvent","_a","blurEvent","IconCheckMark","IconExclamationMarkTriangle","TextFieldSlot","name","slotProps","forwardedRef","ForwardedRefTextFieldRoot","forwardRef","ForwardedRefTextFieldSlot","TextInput"],"mappings":";;;;;AA2GO,MAAMA,IAAgB,CACzB;AAAA,EACI,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAaC,EAAO,EAAK;AAG3B,SAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAGC,EAAO,MAAMT,CAAS,GAAG,eAAaC,GAAQ,gBAAcC,GAC1E,UAAA;AAAA,IAAWD,MAAA,YACP,gBAAAS,EAAA,OAAA,EAAI,WAAWD,EAAO,eAAe,gBAAc,GAAGP,CAAU,UAAA,CAAW,IAC5E;AAAA,IACJ,gBAAAQ;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,aAAa,CAACC,MAAe;AACzB,UAAAN,EAAW,UAAU,IACVM,EAAA,cAAc,QAAQ,gBAAgB;AAAA,QACrD;AAAA,QACA,MAAK;AAAA,QACJ,GAAGR;AAAA,QACJ,SAAS,CAACS,MAAe;;AACjB,UAACP,EAAW,YACDO,EAAA,OAAO,QAAQ,gBAAgB,UAE9CC,IAAAV,EAAW,YAAX,QAAAU,EAAA,KAAAV,GAAqBS;AAAA,QACzB;AAAA,QACA,QAAQ,CAACE,MAAc;;AACT,UAAAA,EAAA,OAAO,QAAQ,gBAAgB,SACzCT,EAAW,UAAU,KACrBQ,IAAAV,EAAW,WAAX,QAAAU,EAAA,KAAAV,GAAoBW;AAAA,QACxB;AAAA,QACA,KAAAV;AAAA,QACA,WAAWK,EAAO;AAAA,QAClB,gBAAcR,MAAW;AAAA,MAAA;AAAA,IAC7B;AAAA,IAECA,MAAW,YACP,gBAAAS,EAAAK,GAAA,EAAc,MAAM,IAAI,WAAWN,EAAO,aAAa,gBAAc,GAAGP,CAAU,gBAAiB,CAAA,IACpG;AAAA,IAEHD,MAAW,UACR,gBAAAS;AAAA,MAACM;AAAA,MAAA;AAAA,QACG,MAAM;AAAA,QACN,WAAWP,EAAO;AAAA,QAClB,gBAAc,GAAGP,CAAU;AAAA,MAAA;AAAA,IAAA,IAE/B;AAAA,IAEHH;AAAA,EACL,EAAA,CAAA;AAER;AACAD,EAAc,cAAc;AAQf,MAAAmB,IAAgB,CACzB,EAAE,MAAAC,GAAM,WAAAlB,GAAW,GAAGmB,KACtBC,MAGI,gBAAAV;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,aAAW;AAAA,IACX,aAAWQ;AAAA,IACV,GAAGC;AAAA,IACJ,KAAKC;AAAA,IACL,WAAWZ,EAAGC,EAAO,MAAMT,CAAS;AAAA,EAAA;AAAA;AAKhDiB,EAAc,cAAc;AAE5B,MAAMI,IAA4BC,EAA6CxB,CAAa,GACtFyB,IAA4BD,EAA+CL,CAAa,GAEjFO,IAGTH;AACJG,EAAU,OAAOH;AACjBG,EAAU,OAAOD;"}
1
+ {"version":3,"file":"fondue-components13.js","sources":["../src/components/Label/Label.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type ForwardedRef, forwardRef, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nexport type LabelProps = {\n id?: string;\n children: ReactNode;\n /**\n * The id of the input element the label is associated with\n */\n htmlFor: string;\n /**\n * Add an asterisk to the label to indicate it is required\n * @default false\n */\n required?: boolean;\n className?: string;\n 'data-test-id'?: string;\n};\n\nexport const LabelComponent = (\n { className, 'data-test-id': dataTestId = 'fondue-label', ...props }: LabelProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) => {\n return (\n <LabelPrimitive.Root\n ref={ref}\n data-required={props.required}\n className={cn(\n 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state=\"checked\"]:tw-font-medium peer-data-[state=\"indeterminate\"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',\n // Disabled state if siblings has disabled state\n 'has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed',\n // Required asterisk\n 'after:tw-hidden data-[required=\"true\"]:after:tw-flex after:tw-content-[\"*\"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',\n className,\n )}\n data-test-id={dataTestId}\n {...props}\n />\n );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","props","ref","jsx","LabelPrimitive","cn","Label","forwardRef"],"mappings":";;;;AAuBa,MAAAA,IAAiB,CAC1B,EAAE,WAAAC,GAAW,gBAAgBC,IAAa,gBAAgB,GAAGC,EAAM,GACnEC,MAGI,gBAAAC;AAAA,EAACC,EAAe;AAAA,EAAf;AAAA,IACG,KAAAF;AAAA,IACA,iBAAeD,EAAM;AAAA,IACrB,WAAWI;AAAA,MACP;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACAN;AAAA,IACJ;AAAA,IACA,gBAAcC;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,GAKHK,IAAQC,EAAyCT,CAAc;AAC5EQ,EAAM,cAAc;"}