@frontify/fondue-components 1.2.3 → 1.3.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.
- package/dist/fondue-components.js +18 -4
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +46 -117
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +47 -32
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +45 -2359
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +8 -143
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +12 -29
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +157 -0
- package/dist/fondue-components15.js.map +1 -0
- package/dist/fondue-components16.js +121 -0
- package/dist/fondue-components16.js.map +1 -0
- package/dist/fondue-components17.js +121 -0
- package/dist/fondue-components17.js.map +1 -0
- package/dist/fondue-components18.js +23 -0
- package/dist/fondue-components18.js.map +1 -0
- package/dist/fondue-components19.js +33 -0
- package/dist/fondue-components19.js.map +1 -0
- package/dist/fondue-components20.js +63 -0
- package/dist/fondue-components20.js.map +1 -0
- package/dist/fondue-components21.js +20 -0
- package/dist/fondue-components21.js.map +1 -0
- package/dist/fondue-components22.js +38 -0
- package/dist/fondue-components22.js.map +1 -0
- package/dist/fondue-components23.js +28 -0
- package/dist/fondue-components23.js.map +1 -0
- package/dist/fondue-components24.js +11 -0
- package/dist/fondue-components24.js.map +1 -0
- package/dist/fondue-components25.js +8 -0
- package/dist/fondue-components25.js.map +1 -0
- package/dist/fondue-components26.js +18 -0
- package/dist/fondue-components26.js.map +1 -0
- package/dist/fondue-components27.js +2363 -0
- package/dist/fondue-components27.js.map +1 -0
- package/dist/fondue-components28.js +146 -0
- package/dist/fondue-components28.js.map +1 -0
- package/dist/fondue-components29.js +32 -0
- package/dist/fondue-components29.js.map +1 -0
- package/dist/fondue-components3.js +5 -5
- package/dist/fondue-components4.js +44 -51
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components5.js +63 -32
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components6.js +23 -8
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components7.js +57 -11
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +23 -153
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +38 -117
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +468 -8
- package/dist/style.css +1 -1
- package/package.json +41 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components8.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components8.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;"}
|
|
@@ -1,121 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-progress";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components22.js";
|
|
5
|
+
const p = s(
|
|
6
|
+
({
|
|
7
|
+
value: a,
|
|
8
|
+
max: r = 100,
|
|
9
|
+
rounded: d = !0,
|
|
10
|
+
style: o = "default",
|
|
11
|
+
size: e = "medium",
|
|
12
|
+
"data-test-id": n = "fondue-loading-bar",
|
|
13
|
+
...l
|
|
14
|
+
}, m) => /* @__PURE__ */ i(
|
|
15
|
+
t.Root,
|
|
16
|
+
{
|
|
17
|
+
ref: m,
|
|
18
|
+
"data-test-id": n,
|
|
19
|
+
className: g({ rounded: d, size: e, style: 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({ style: o, indeterminateState: a === null })
|
|
33
|
+
}
|
|
34
|
+
)
|
|
18
35
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
disabled: !1,
|
|
23
|
-
style: "default",
|
|
24
|
-
emphasis: "default",
|
|
25
|
-
class: "[&_svg]:tw-text-button-icon group-hover:[&_svg]:tw-text-button-icon-hover group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
disabled: !1,
|
|
29
|
-
style: "default",
|
|
30
|
-
emphasis: "weak",
|
|
31
|
-
class: "[&_svg]:tw-text-button-icon group-hover:[&_svg]:tw-text-button-icon-hover group-active:[&_svg]:tw-text-button-icon-pressed [&_svg]:tw-leading-none"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
disabled: !1,
|
|
35
|
-
style: "default",
|
|
36
|
-
emphasis: "strong",
|
|
37
|
-
class: "[&_svg]:tw-text-button-strong-icon group-hover:[&_svg]:tw-text-button-strong-icon-hover group-active:[&_svg]:tw-text-button-strong-icon-pressed [&_svg]:tw-leading-none"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
disabled: !1,
|
|
41
|
-
style: "positive",
|
|
42
|
-
emphasis: "default",
|
|
43
|
-
class: "[&_svg]:tw-text-button-positive-icon group-hover:[&_svg]:tw-text-button-positive-icon-hover group-active:[&_svg]:tw-text-button-positive-icon-pressed [&_svg]:tw-leading-none"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
disabled: !1,
|
|
47
|
-
style: "positive",
|
|
48
|
-
emphasis: "weak",
|
|
49
|
-
class: "[&_svg]:tw-text-button-strong-positive-icon group-hover:[&_svg]:tw-text-button-strong-positive-icon-hovergroup-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
disabled: !1,
|
|
53
|
-
style: "positive",
|
|
54
|
-
emphasis: "strong",
|
|
55
|
-
class: "[&_svg]:tw-text-button-strong-positive-icon group-hover:[&_svg]:tw-text-button-strong-positive-icon-hover group-active:[&_svg]:tw-text-button-strong-positive-icon-pressed [&_svg]:tw-leading-none"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
disabled: !1,
|
|
59
|
-
style: "negative",
|
|
60
|
-
emphasis: "default",
|
|
61
|
-
class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
disabled: !1,
|
|
65
|
-
style: "negative",
|
|
66
|
-
emphasis: "weak",
|
|
67
|
-
class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
disabled: !1,
|
|
71
|
-
style: "negative",
|
|
72
|
-
emphasis: "strong",
|
|
73
|
-
class: "[&_svg]:tw-text-button-strong-negative-icon group-hover:[&_svg]:tw-text-button-strong-negative-icon-hovergroup-active:[&_svg]:tw-text-button-strong-negative-icon-pressed [&_svg]:tw-leading-none"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
disabled: !1,
|
|
77
|
-
style: "danger",
|
|
78
|
-
emphasis: "default",
|
|
79
|
-
class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
disabled: !1,
|
|
83
|
-
style: "danger",
|
|
84
|
-
emphasis: "weak",
|
|
85
|
-
class: "[&_svg]:tw-text-button-negative-icon group-hover:[&_svg]:tw-text-button-negative-icon-hovergroup-active:[&_svg]:tw-text-button-negative-icon-pressed [&_svg]:tw-leading-none"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
disabled: !1,
|
|
89
|
-
style: "danger",
|
|
90
|
-
emphasis: "strong",
|
|
91
|
-
class: "[&_svg]:tw-text-button-danger-icon group-hover:[&_svg]:tw-text-button-danger-icon-hovergroup-active:[&_svg]:tw-text-button-danger-icon-pressed [&_svg]:tw-leading-none"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
disabled: !1,
|
|
95
|
-
style: "loud",
|
|
96
|
-
emphasis: "default",
|
|
97
|
-
class: "[&_svg]:tw-text-box-selected-inverse group-hover:[&_svg]:tw-text-box-selected-inverse-hovergroup-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
disabled: !1,
|
|
101
|
-
style: "loud",
|
|
102
|
-
emphasis: "weak",
|
|
103
|
-
class: "[&_svg]:tw-text-box-selected-inverse group-hover:[&_svg]:tw-text-box-selected-inverse-hovergroup-active:[&_svg]:tw-text-box-selected-inverse-pressed [&_svg]:tw-leading-none"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
disabled: !1,
|
|
107
|
-
style: "loud",
|
|
108
|
-
emphasis: "strong",
|
|
109
|
-
class: "[&_svg]:tw-text-box-selected-strong-inverse group-hover:[&_svg]:tw-text-box-selected-strong-inversegroup-active:[&_svg]:tw-text-box-selected-strong-inverse [&_svg]:tw-leading-none"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
defaultVariants: {
|
|
113
|
-
emphasis: "strong",
|
|
114
|
-
style: "default",
|
|
115
|
-
disabled: !1
|
|
116
|
-
}
|
|
117
|
-
});
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
p.displayName = "LoadingBar";
|
|
118
39
|
export {
|
|
119
|
-
|
|
40
|
+
p as LoadingBar
|
|
120
41
|
};
|
|
121
42
|
//# sourceMappingURL=fondue-components9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components9.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components9.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 style?: '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 style = '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, style })}\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({ style, indeterminateState: value === null })}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","style","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,OAAAC,IAAQ;AAAA,IACR,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,OAAAD,GAAO;AAAA,MAC7D,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,OAAAR,GAAO,oBAAoBH,MAAU,MAAM;AAAA,QAAA;AAAA,MAC7E;AAAA,IAAA;AAAA,EAAA;AAIhB;AACAF,EAAW,cAAc;"}
|