@oneplatformdev/ui 0.1.99-beta.3 → 0.1.99-beta.30
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/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +31 -25
- package/Accordion/Accordion.js.map +1 -1
- package/Badge/badgeVariants.d.ts +1 -1
- package/Button/Button.d.ts +6 -6
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +44 -42
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js +45 -53
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.types.d.ts +24 -1
- package/Button/Button.types.d.ts.map +1 -1
- package/Button/ButtonCounterBadge.d.ts +7 -0
- package/Button/ButtonCounterBadge.d.ts.map +1 -0
- package/Button/ButtonCounterBadge.js +20 -0
- package/Button/ButtonCounterBadge.js.map +1 -0
- package/Button/buttonVariants.d.ts +11 -20
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +76 -12
- package/Button/buttonVariants.js.map +1 -1
- package/Button/index.js +6 -5
- package/ButtonIcon/ButtonIcon.d.ts +30 -19
- package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/ButtonIcon/ButtonIcon.js +70 -46
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js +121 -78
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/ButtonIcon.types.d.ts +2 -1
- package/ButtonIcon/ButtonIcon.types.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +7 -6
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +362 -0
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +25 -26
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +192 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/ComboboxOptions.d.ts.map +1 -1
- package/Combobox/ComboboxOptions.js +42 -42
- package/Combobox/ComboboxOptions.js.map +1 -1
- package/Dialog/Dialog.js +6 -6
- package/Dialog/Dialog.js.map +1 -1
- package/Form/Form.d.ts.map +1 -1
- package/Form/Form.js.map +1 -1
- package/Input/Input.js +3 -3
- package/Input/Input.js.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +5 -4
- package/Input/inputVariants.js.map +1 -1
- package/LoadedIcon/LoadedIcon.d.ts.map +1 -1
- package/LoadedIcon/LoadedIcon.js +3 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/Resizable/Resizable.d.ts +5 -20
- package/Resizable/Resizable.d.ts.map +1 -1
- package/Resizable/Resizable.js +48 -31
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js +140 -0
- package/Resizable/Resizable.stories.js.map +1 -0
- package/Search/Search.js +12 -12
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js +17 -0
- package/Search/Search.stories.js.map +1 -0
- package/Textarea/Textarea.js +6 -6
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js +12 -0
- package/Textarea/Textarea.stories.js.map +1 -0
- package/Textarea/useAutosizeTextArea.d.ts +1 -1
- package/Textarea/useAutosizeTextArea.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.js.map +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js.map +1 -1
- package/index.js +326 -325
- package/package.json +7 -4
- package/Button/Button.s.d.ts +0 -83
- package/Button/Button.s.d.ts.map +0 -1
- package/Button/Button.s.js +0 -163
- package/Button/Button.s.js.map +0 -1
package/Button/Button.types.d.ts
CHANGED
|
@@ -2,10 +2,32 @@ import { ButtonHTMLAttributes, ComponentType, ReactElement, SVGProps, ReactNode
|
|
|
2
2
|
import { TooltipProps } from '../Tooltip';
|
|
3
3
|
import { ButtonVarianceProps } from './buttonVariants';
|
|
4
4
|
type ButtonAttributes = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
5
|
+
type ButtonScreenReaderOptions = {
|
|
6
|
+
/** Text to be read by screen readers when the button is in a loading state. */
|
|
7
|
+
text?: string;
|
|
8
|
+
};
|
|
9
|
+
export type ButtonScreenReader = ButtonScreenReaderOptions['text'] | ButtonScreenReaderOptions;
|
|
10
|
+
export type ButtonCounterBadgeReaderOptions = {
|
|
11
|
+
/**
|
|
12
|
+
* Count to display in the counter badge (e.g., number of notifications).
|
|
13
|
+
* If omitted, the badge will not be rendered.
|
|
14
|
+
*/
|
|
15
|
+
count?: number;
|
|
16
|
+
};
|
|
17
|
+
export type ButtonCounterBadgeReader = ButtonCounterBadgeReaderOptions['count'] | ButtonCounterBadgeReaderOptions;
|
|
5
18
|
export interface ButtonDefaultProps extends Omit<ButtonAttributes, 'color' | 'title' | 'disabled'> {
|
|
6
19
|
asChild?: boolean;
|
|
7
20
|
loading?: boolean;
|
|
8
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Screen reader text or options used for accessibility (e.g., when the button is loading).
|
|
24
|
+
* Accepts a string or an object with a `text` property for more control.
|
|
25
|
+
*/
|
|
26
|
+
screenReader?: ButtonScreenReader;
|
|
27
|
+
/**
|
|
28
|
+
* Field for rendering a count badge on the button (e.g., notifications).
|
|
29
|
+
*/
|
|
30
|
+
counter?: ButtonCounterBadgeReader;
|
|
9
31
|
}
|
|
10
32
|
export interface ButtonTooltipProps {
|
|
11
33
|
/**
|
|
@@ -27,7 +49,8 @@ export type ButtonBaseProps<VariantProps extends object = object, SlotProps = un
|
|
|
27
49
|
};
|
|
28
50
|
export interface ButtonSlotProps {
|
|
29
51
|
}
|
|
30
|
-
export type
|
|
52
|
+
export type ButtonIconType = ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
|
|
53
|
+
export type ButtonAdornmentProps = ButtonIconType;
|
|
31
54
|
export interface ButtonProps extends ButtonBaseProps<ButtonVarianceProps, ButtonSlotProps> {
|
|
32
55
|
startAdornment?: ButtonAdornmentProps;
|
|
33
56
|
endAdornment?: ButtonAdornmentProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../src/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhE,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../src/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,KAAK,gBAAgB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEhE,KAAK,yBAAyB,GAAG;IAC/B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,C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M,WAAW,WACf,SAAQ,eAAe,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAC7D,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonCounterBadgeReader } from './Button.types';
|
|
2
|
+
import { ButtonBadgeCVAProps } from './buttonVariants';
|
|
3
|
+
export interface ButtonCounterBadgeProps extends ButtonBadgeCVAProps {
|
|
4
|
+
counter?: ButtonCounterBadgeReader;
|
|
5
|
+
}
|
|
6
|
+
export declare const ButtonCounterBadge: (props: ButtonCounterBadgeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=ButtonCounterBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonCounterBadge.d.ts","sourceRoot":"","sources":["../../src/Button/ButtonCounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAmC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAuB,MAAM,kBAAkB,CAAC;AAGjF,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC;AAgBD,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,mDAchE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { buttonBadgeVariants as c } from "./buttonVariants.js";
|
|
3
|
+
import { cn as u } from "@oneplatformdev/utils";
|
|
4
|
+
const a = (t) => t ? typeof t == "number" ? { count: t } : t : null, o = 99, l = (t) => Math.max(0, Math.min(t || 0, o)), m = (t) => t > o, x = (t) => {
|
|
5
|
+
const { counter: r, ...e } = t, n = a(r);
|
|
6
|
+
return n?.count ? /* @__PURE__ */ i(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: u(c({ ...e })),
|
|
10
|
+
children: [
|
|
11
|
+
l(n.count),
|
|
12
|
+
m(n.count) && /* @__PURE__ */ s("span", { className: "relative -top-[0.5px]", children: "+" })
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
) : null;
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
x as ButtonCounterBadge
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ButtonCounterBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonCounterBadge.js","sources":["../../src/Button/ButtonCounterBadge.tsx"],"sourcesContent":["import { ButtonCounterBadgeReader, ButtonCounterBadgeReaderOptions } from \"./Button.types\";\nimport { type ButtonBadgeCVAProps, buttonBadgeVariants } from \"./buttonVariants\";\nimport { cn } from \"@oneplatformdev/utils\";\n\nexport interface ButtonCounterBadgeProps extends ButtonBadgeCVAProps {\n counter?: ButtonCounterBadgeReader;\n}\n\nconst normalizeCounter = (counter: ButtonCounterBadgeReader): ButtonCounterBadgeReaderOptions | null => {\n if(!counter) return null\n if(typeof counter === 'number') return { count: counter };\n return counter;\n}\n\nconst MIN_COUNT = 99;\nconst normalizeCount = (count: number): number => {\n const c = count || 0;\n return Math.max(0, Math.min(c, MIN_COUNT));\n}\n\nconst isOverflown = (count: number): boolean => count > MIN_COUNT\n\nexport const ButtonCounterBadge = (props: ButtonCounterBadgeProps) => {\n const {counter: initializeCounter, ...rest} = props;\n const counter = normalizeCounter(initializeCounter);\n if(!counter?.count) return null;\n return (\n <div\n className={cn(buttonBadgeVariants({ ...rest }))}\n >\n {normalizeCount(counter.count)}\n {isOverflown(counter.count) && (\n <span className=\"relative -top-[0.5px]\">+</span>\n )}\n </div>\n )\n}\n"],"names":["normalizeCounter","counter","MIN_COUNT","normalizeCount","count","isOverflown","ButtonCounterBadge","props","initializeCounter","rest","jsxs","cn","buttonBadgeVariants"],"mappings":";;;AAQA,MAAMA,IAAmB,CAACC,MACpBA,IACD,OAAOA,KAAY,WAAiB,EAAE,OAAOA,EAAA,IACzCA,IAFa,MAKhBC,IAAY,IACZC,IAAiB,CAACC,MAEf,KAAK,IAAI,GAAG,KAAK,IADdA,KAAS,GACYF,CAAS,CAAC,GAGrCG,IAAc,CAACD,MAA2BA,IAAQF,GAE3CI,IAAqB,CAACC,MAAmC;AACpE,QAAM,EAAC,SAASC,GAAmB,GAAGC,MAAQF,GACxCN,IAAUD,EAAiBQ,CAAiB;AAClD,SAAIP,GAAS,QAEX,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAoB,EAAE,GAAGH,EAAA,CAAM,CAAC;AAAA,MAE7C,UAAA;AAAA,QAAAN,EAAeF,EAAQ,KAAK;AAAA,QAC5BI,EAAYJ,EAAQ,KAAK,uBACvB,QAAA,EAAK,WAAU,yBAAwB,UAAA,IAAA,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAPpB;AAW7B;"}
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const buttonVariants: (props?: ({
|
|
3
|
-
variant?: "none" | "
|
|
4
|
-
color?: "
|
|
3
|
+
variant?: "none" | "contained" | "outlined" | "ghost" | null | undefined;
|
|
4
|
+
color?: "primary" | "secondary" | "error" | null | undefined;
|
|
5
5
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type
|
|
16
|
-
/** @deprecated use "variant=contained color=secondary" instead */
|
|
17
|
-
type LegacySecondaryVariant = 'secondary';
|
|
18
|
-
/** @deprecated use "variant=contained color=error" instead */
|
|
19
|
-
type LegacyDestructiveVariant = 'destructive';
|
|
20
|
-
type ModernVariant = Exclude<ButtonCVAVariants, 'default' | 'outline' | 'ghost' | 'secondary' | 'destructive'> | LegacyDefaultVariant | LegacyOutlineVariant | LegacyGhostVariant | LegacySecondaryVariant | LegacyDestructiveVariant;
|
|
21
|
-
export interface ButtonVarianceProps extends ButtonCVANoVariantProps {
|
|
22
|
-
variant?: ModernVariant;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
7
|
+
export type ButtonVarianceProps = VariantProps<typeof buttonVariants>;
|
|
8
|
+
export declare const buttonBadgeVariants: (props?: ({
|
|
9
|
+
variant?: "none" | "contained" | "outlined" | "ghost" | null | undefined;
|
|
10
|
+
color?: "primary" | "secondary" | "error" | null | undefined;
|
|
11
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
12
|
+
rounded?: boolean | null | undefined;
|
|
13
|
+
disabled?: boolean | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
+
export type ButtonBadgeCVAProps = VariantProps<typeof buttonBadgeVariants>;
|
|
25
16
|
//# sourceMappingURL=buttonVariants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonVariants.d.ts","sourceRoot":"","sources":["../../src/Button/buttonVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,cAAc;;;;
|
|
1
|
+
{"version":3,"file":"buttonVariants.d.ts","sourceRoot":"","sources":["../../src/Button/buttonVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,cAAc;;;;8EA+I1B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB;;;;;;8EAoE/B,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/Button/buttonVariants.js
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { cva as
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
2
|
import { cn as e } from "@oneplatformdev/utils";
|
|
3
|
-
const
|
|
3
|
+
const s = r(
|
|
4
4
|
[
|
|
5
|
-
"inline-flex items-center justify-center",
|
|
5
|
+
"inline-flex items-center justify-center box-border",
|
|
6
6
|
"whitespace-nowrap font-medium",
|
|
7
|
-
"cursor-pointer
|
|
7
|
+
"cursor-pointer",
|
|
8
8
|
"transition-colors focus-visible:outline-hidden focus-visible:ring-none focus-visible:ring-transparent",
|
|
9
9
|
"disabled:pointer-events-none disabled:cursor-default",
|
|
10
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
10
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11
|
+
"transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200"
|
|
11
12
|
],
|
|
12
13
|
{
|
|
13
14
|
variants: {
|
|
14
15
|
variant: {
|
|
15
|
-
default: "deprecated.do_not_use",
|
|
16
|
-
outline: "deprecated.do_not_use",
|
|
17
|
-
secondary: "deprecated.do_not_use",
|
|
18
|
-
destructive: "deprecated.do_not_use",
|
|
19
|
-
//
|
|
20
16
|
none: "",
|
|
21
17
|
contained: "",
|
|
22
18
|
outlined: "",
|
|
@@ -35,7 +31,7 @@ const o = t(
|
|
|
35
31
|
"text-sm leading-[1.12] [&_svg]:size-6"
|
|
36
32
|
),
|
|
37
33
|
lg: e(
|
|
38
|
-
"min-h-10 min-w-35 rounded-lg gap-1 px-
|
|
34
|
+
"min-h-10 min-w-35 rounded-lg gap-1 px-2.5 py-1.5",
|
|
39
35
|
"text-base leading-normal [&_svg]:size-6"
|
|
40
36
|
)
|
|
41
37
|
}
|
|
@@ -147,8 +143,76 @@ const o = t(
|
|
|
147
143
|
size: "lg"
|
|
148
144
|
}
|
|
149
145
|
}
|
|
146
|
+
), o = r(
|
|
147
|
+
[
|
|
148
|
+
"absolute z-0",
|
|
149
|
+
"flex items-center justify-center text-center p-0",
|
|
150
|
+
"font-medium leading-none tracking-tighter",
|
|
151
|
+
"rounded-full w-fit min-w-4 h-4 text-[10px] px-0.5 box-border"
|
|
152
|
+
],
|
|
153
|
+
{
|
|
154
|
+
variants: {
|
|
155
|
+
variant: {
|
|
156
|
+
none: "",
|
|
157
|
+
contained: "",
|
|
158
|
+
outlined: "",
|
|
159
|
+
ghost: ""
|
|
160
|
+
},
|
|
161
|
+
color: {
|
|
162
|
+
primary: "",
|
|
163
|
+
secondary: "",
|
|
164
|
+
error: ""
|
|
165
|
+
},
|
|
166
|
+
size: {
|
|
167
|
+
xs: "",
|
|
168
|
+
sm: "",
|
|
169
|
+
md: "",
|
|
170
|
+
lg: "-top-[2px] left-[14px]"
|
|
171
|
+
},
|
|
172
|
+
rounded: {
|
|
173
|
+
true: "left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
174
|
+
false: ""
|
|
175
|
+
},
|
|
176
|
+
disabled: {
|
|
177
|
+
true: "",
|
|
178
|
+
false: ""
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
compoundVariants: [
|
|
182
|
+
// SIZE XS
|
|
183
|
+
{ size: "xs", rounded: !1, className: "-top-px -right-px translate-x-1/2 -translate-y-1/2" },
|
|
184
|
+
{ size: "xs", rounded: !0, className: "-top-px" },
|
|
185
|
+
// SIZE SM
|
|
186
|
+
{ size: "sm", rounded: !1, className: "top-0 right-0 translate-x-1/2 -translate-y-1/2" },
|
|
187
|
+
{ size: "sm", rounded: !0, className: "-top-[3px]" },
|
|
188
|
+
// SIZE MD
|
|
189
|
+
{ size: "md", rounded: !1, className: "-top-[4px] left-[12px]" },
|
|
190
|
+
{ size: "md", rounded: !0, className: "-top-[6px]" },
|
|
191
|
+
// SIZE LG
|
|
192
|
+
{ size: "lg", rounded: !1, className: "-top-[4px] left-[12px]" },
|
|
193
|
+
{ size: "lg", rounded: !0, className: "-top-2" },
|
|
194
|
+
// COLORS
|
|
195
|
+
{
|
|
196
|
+
color: ["primary", "secondary", "error"],
|
|
197
|
+
className: "bg-[#9368FF] text-[#FCFCFC]"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
color: ["primary", "secondary", "error"],
|
|
201
|
+
disabled: !0,
|
|
202
|
+
className: "bg-[#666A78] text-[#FCFCFC]"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
defaultVariants: {
|
|
206
|
+
color: "primary",
|
|
207
|
+
variant: "contained",
|
|
208
|
+
size: "lg",
|
|
209
|
+
disabled: !1,
|
|
210
|
+
rounded: !1
|
|
211
|
+
}
|
|
212
|
+
}
|
|
150
213
|
);
|
|
151
214
|
export {
|
|
152
|
-
o as
|
|
215
|
+
o as buttonBadgeVariants,
|
|
216
|
+
s as buttonVariants
|
|
153
217
|
};
|
|
154
218
|
//# sourceMappingURL=buttonVariants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonVariants.js","sources":["../../src/Button/buttonVariants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from \"@oneplatformdev/utils\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n 'whitespace-nowrap font-medium',\n 'cursor-pointer box-border',\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-none focus-visible:ring-transparent\",\n \"disabled:pointer-events-none disabled:cursor-default\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0\",\n ],\n {\n variants: {\n variant: {\n default: \"deprecated.do_not_use\",\n outline: \"deprecated.do_not_use\",\n secondary: \"deprecated.do_not_use\",\n destructive: \"deprecated.do_not_use\",\n //\n none: \"\",\n contained: \"\",\n outlined: \"\",\n ghost: '',\n },\n color: {\n primary: '',\n secondary: '',\n error: '',\n },\n size: {\n xs: 'rounded-sm p-1 gap-1 text-xs min-h-4 min-w-14',\n sm: 'rounded-md p-1 gap-1 text-sm min-h-6 min-w-20',\n md: cn(\n 'min-h-8 min-w-[102px] rounded-lg gap-1 px-2 py-1',\n 'text-sm leading-[1.12] [&_svg]:size-6',\n ),\n lg: cn(\n \"min-h-10 min-w-35 rounded-lg gap-1 px-3 py-2\",\n 'text-base leading-normal [&_svg]:size-6',\n )\n }\n },\n compoundVariants: [\n // PRIMARY BUTTON VARIANTS\n {\n color: 'primary',\n variant: 'contained',\n className: cn(\n 'bg-[#9368FF] border border-[#9368FF] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#7F4EEB]',\n 'focus:bg-[#7F4EEB] focus:border-[#6B3DD9]',\n 'active:bg-[#6B3DD9]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#9368FF] text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:bg-[#9368FF0F]',\n 'active:bg-[#9368FF0F] active:border-[#6B3DD9]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:text-[#6B3DD9] hover:[&_svg]:text-[#6B3DD9]',\n 'focus:text-[#6B3DD9] focus:[&_svg]:text-[#6B3DD9]',\n 'active:bg-[#9368FF0F]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // SECONDARY BUTTON VARIANTS\n {\n color: 'secondary',\n variant: 'contained',\n className: cn(\n 'bg-[#FCFCFC] border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'ghost',\n className: cn(\n 'text-[#06080D] [&_svg]:text-[#06080D] bg-transparent border border-transparent',\n 'hover:bg-[#F9FAFB]',\n 'focus:bg-[#FCFCFC]',\n 'active:bg-[#F9FAFB]',\n 'disabled:bg-[#FCFCFC] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // ERROR BUTTON VARIANTS\n {\n color: 'error',\n variant: 'contained',\n className: cn(\n 'bg-[#EF4444] border border-[#EF4444] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#DC2626]',\n 'focus:bg-[#DC2626]',\n 'active:bg-[#DC2626]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#EF4444] text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F] hover:text-[#DC2626] hover:[&_svg]:text-[#DC2626]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n ],\n defaultVariants: {\n variant: 'contained',\n color: 'primary',\n size: 'lg',\n },\n }\n)\n\nexport type ButtonCVAProps = VariantProps<typeof buttonVariants>;\n\ntype ButtonCVANoVariantProps = Omit<VariantProps<typeof buttonVariants>, 'variant'>\n\ntype ButtonCVAVariants = ButtonCVAProps['variant'];\n\n/** @deprecated use \"variant=contained color=primary\" instead */\ntype LegacyDefaultVariant = 'default';\n/** @deprecated use \"variant=outlined color=primary\" instead */\ntype LegacyOutlineVariant = 'outline';\n/** @deprecated use \"variant=text color=primary\" instead */\ntype LegacyGhostVariant = 'ghost';\n/** @deprecated use \"variant=contained color=secondary\" instead */\ntype LegacySecondaryVariant = 'secondary';\n/** @deprecated use \"variant=contained color=error\" instead */\ntype LegacyDestructiveVariant = 'destructive';\n\ntype ModernVariant =\n | Exclude<ButtonCVAVariants, 'default' | 'outline' | 'ghost' | 'secondary' | 'destructive'>\n | LegacyDefaultVariant\n | LegacyOutlineVariant\n | LegacyGhostVariant\n | LegacySecondaryVariant\n | LegacyDestructiveVariant;\n\nexport interface ButtonVarianceProps extends ButtonCVANoVariantProps {\n variant?: ModernVariant;\n}\n"],"names":["buttonVariants","cva","cn"],"mappings":";;AAGO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA;AAAA,QAEb,MAAM;AAAA,QACN,WAAW;AAAA,QACX,UAAU;AAAA,QACV,OAAO;AAAA,MAAA;AAAA,MAET,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QAC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,QACE,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAWA;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,MAEF;AAAA,QACE,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAWA;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,IACF;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"buttonVariants.js","sources":["../../src/Button/buttonVariants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from \"@oneplatformdev/utils\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center box-border\",\n 'whitespace-nowrap font-medium',\n 'cursor-pointer',\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-none focus-visible:ring-transparent\",\n \"disabled:pointer-events-none disabled:cursor-default\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200',\n ],\n {\n variants: {\n variant: {\n none: \"\",\n contained: \"\",\n outlined: \"\",\n ghost: '',\n },\n color: {\n primary: '',\n secondary: '',\n error: '',\n },\n size: {\n xs: 'rounded-sm p-1 gap-1 text-xs min-h-4 min-w-14',\n sm: 'rounded-md p-1 gap-1 text-sm min-h-6 min-w-20',\n md: cn(\n 'min-h-8 min-w-[102px] rounded-lg gap-1 px-2 py-1',\n 'text-sm leading-[1.12] [&_svg]:size-6',\n ),\n lg: cn(\n \"min-h-10 min-w-35 rounded-lg gap-1 px-2.5 py-1.5\",\n 'text-base leading-normal [&_svg]:size-6',\n )\n }\n },\n compoundVariants: [\n // PRIMARY BUTTON VARIANTS\n {\n color: 'primary',\n variant: 'contained',\n className: cn(\n 'bg-[#9368FF] border border-[#9368FF] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#7F4EEB]',\n 'focus:bg-[#7F4EEB] focus:border-[#6B3DD9]',\n 'active:bg-[#6B3DD9]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#9368FF] text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:bg-[#9368FF0F]',\n 'active:bg-[#9368FF0F] active:border-[#6B3DD9]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:text-[#6B3DD9] hover:[&_svg]:text-[#6B3DD9]',\n 'focus:text-[#6B3DD9] focus:[&_svg]:text-[#6B3DD9]',\n 'active:bg-[#9368FF0F]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // SECONDARY BUTTON VARIANTS\n {\n color: 'secondary',\n variant: 'contained',\n className: cn(\n 'bg-[#FCFCFC] border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'ghost',\n className: cn(\n 'text-[#06080D] [&_svg]:text-[#06080D] bg-transparent border border-transparent',\n 'hover:bg-[#F9FAFB]',\n 'focus:bg-[#FCFCFC]',\n 'active:bg-[#F9FAFB]',\n 'disabled:bg-[#FCFCFC] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // ERROR BUTTON VARIANTS\n {\n color: 'error',\n variant: 'contained',\n className: cn(\n 'bg-[#EF4444] border border-[#EF4444] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#DC2626]',\n 'focus:bg-[#DC2626]',\n 'active:bg-[#DC2626]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#EF4444] text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F] hover:text-[#DC2626] hover:[&_svg]:text-[#DC2626]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n ],\n defaultVariants: {\n variant: 'contained',\n color: 'primary',\n size: 'lg',\n },\n }\n)\n\nexport type ButtonVarianceProps = VariantProps<typeof buttonVariants>;\n\nexport const buttonBadgeVariants = cva(\n [\n 'absolute z-0',\n 'flex items-center justify-center text-center p-0',\n 'font-medium leading-none tracking-tighter',\n 'rounded-full w-fit min-w-4 h-4 text-[10px] px-0.5 box-border',\n ],\n {\n variants: {\n variant: {\n none: '',\n contained: '',\n outlined: '',\n ghost: \"\",\n },\n color: {\n primary: \"\",\n secondary: \"\",\n error: \"\"\n },\n size: {\n xs: '',\n sm: '',\n md: '',\n lg: '-top-[2px] left-[14px]',\n },\n rounded: {\n true: 'left-1/2 -translate-x-1/2 -translate-y-1/2',\n false: '',\n },\n disabled: {\n true: '',\n false: '',\n }\n },\n compoundVariants: [\n // SIZE XS\n { size: 'xs', rounded: false, className: '-top-px -right-px translate-x-1/2 -translate-y-1/2' },\n { size: 'xs', rounded: true, className: '-top-px' },\n // SIZE SM\n { size: 'sm', rounded: false, className: 'top-0 right-0 translate-x-1/2 -translate-y-1/2' },\n { size: 'sm', rounded: true, className: '-top-[3px]' },\n // SIZE MD\n { size: 'md', rounded: false, className: '-top-[4px] left-[12px]' },\n { size: 'md', rounded: true, className: '-top-[6px]' },\n // SIZE LG\n { size: 'lg', rounded: false, className: '-top-[4px] left-[12px]' },\n { size: 'lg', rounded: true, className: '-top-2' },\n\n // COLORS\n {\n color: ['primary', 'secondary', 'error'],\n className: 'bg-[#9368FF] text-[#FCFCFC]',\n },\n {\n color: ['primary', 'secondary', 'error'],\n disabled: true,\n className: 'bg-[#666A78] text-[#FCFCFC]'\n },\n ],\n defaultVariants: {\n color: \"primary\",\n variant: \"contained\",\n size: \"lg\",\n disabled: false,\n rounded: false,\n },\n }\n)\nexport type ButtonBadgeCVAProps = VariantProps<typeof buttonBadgeVariants>;\n"],"names":["buttonVariants","cva","cn","buttonBadgeVariants"],"mappings":";;AAGO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,WAAW;AAAA,QACX,UAAU;AAA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ExC,EAAE,MAAM,MAAM,SAAS,IAAO,WAAW,yBAAA;AAAA,MACzC,EAAE,MAAM,MAAM,SAAS,IAAM,WAAW,aAAA;AAAA;AAAA,MAExC,EAAE,MAAM,MAAM,SAAS,IAAO,WAAW,yBAAA;AAAA,MACzC,EAAE,MAAM,MAAM,SAAS,IAAM,WAAW,SAAA;AAAA;AAAA,MAGxC;AAAA,QACE,OAAO,CAAC,WAAW,aAAa,OAAO;AAAA,QACvC,WAAW;AAAA,MAAA;AAAA,MAEb;AAAA,QACE,OAAO,CAAC,WAAW,aAAa,OAAO;AAAA,QACvC,UAAU;AAAA,QACV,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,iBAAiB;AAAA,MACf,OAAO;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
package/Button/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Button as
|
|
2
|
-
import {
|
|
1
|
+
import { Button as a, Button as n } from "./Button.js";
|
|
2
|
+
import { buttonBadgeVariants as u, buttonVariants as e } from "./buttonVariants.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
u as
|
|
6
|
-
|
|
4
|
+
a as Button,
|
|
5
|
+
u as buttonBadgeVariants,
|
|
6
|
+
e as buttonVariants,
|
|
7
|
+
n as default
|
|
7
8
|
};
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,36 +6,47 @@ import * as React from "react";
|
|
|
6
6
|
* `ButtonIcon` is used for compact actions represented by an icon instead of text.
|
|
7
7
|
* Supports all core features of Button: variants, sizes, tooltips, disabled and loading state.
|
|
8
8
|
*
|
|
9
|
+
* @public
|
|
10
|
+
* @see [Documentation](#) // TODO: add link to docs
|
|
11
|
+
*
|
|
9
12
|
* @example
|
|
10
|
-
* >
|
|
13
|
+
* > Import:
|
|
11
14
|
* ```tsx
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
+
* import { ButtonIcon } from '@oneplatformdev/ui/ButtonIcon';
|
|
16
|
+
* ```
|
|
17
|
+
* > Basic usage by icon:
|
|
18
|
+
* ```tsx
|
|
19
|
+
*<ButtonIcon icon={<PlusIcon />}/>
|
|
20
|
+
*<ButtonIcon icon={PlusIcon}/>
|
|
21
|
+
* ```
|
|
22
|
+
* > Basic usage by children:
|
|
23
|
+
* ```tsx
|
|
24
|
+
*<ButtonIcon>
|
|
25
|
+
* <PlusIcon />
|
|
26
|
+
*</ButtonIcon>
|
|
15
27
|
* ```
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
28
|
* > With variant & color:
|
|
19
29
|
* ```tsx
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
30
|
+
*<ButtonIcon variant="outline" color="primary">
|
|
31
|
+
* <Search />
|
|
32
|
+
*</ButtonIcon>
|
|
23
33
|
* ```
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
34
|
* > With tooltip message:
|
|
27
35
|
* ```tsx
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
|
|
36
|
+
*<ButtonIcon message="Edit item">
|
|
37
|
+
* <PencilLine />
|
|
38
|
+
*</ButtonIcon>
|
|
31
39
|
* ```
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
40
|
* > Loading state:
|
|
35
41
|
* ```tsx
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
|
|
42
|
+
*<ButtonIcon loading>
|
|
43
|
+
* <Trash2 />
|
|
44
|
+
*</ButtonIcon>
|
|
45
|
+
* ```
|
|
46
|
+
* > Badge counter:
|
|
47
|
+
* ```tsx
|
|
48
|
+
*<ButtonIcon counter={5} icon={MessageCircleMoreIcon}/>
|
|
49
|
+
*<ButtonIcon counter={{ count: 8 }} icon={MessageCircleMoreIcon}/>
|
|
39
50
|
* ```
|
|
40
51
|
*
|
|
41
52
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.d.ts","sourceRoot":"","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonIcon.d.ts","sourceRoot":"","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAerD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,eAAO,MAAM,UAAU,2FAgFtB,CAAA;AAED,eAAe,UAAU,CAAC"}
|
package/ButtonIcon/ButtonIcon.js
CHANGED
|
@@ -1,61 +1,85 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as g, Fragment as R, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as j from "react";
|
|
3
|
+
import { isValidElement as E, createElement as I } from "react";
|
|
4
|
+
import { cn as V } from "@oneplatformdev/utils";
|
|
5
|
+
import { buttonIconVariants as w } from "./buttonIconVariants.js";
|
|
6
|
+
import { Slot as z } from "@radix-ui/react-slot";
|
|
6
7
|
import "@radix-ui/react-tooltip";
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { LoadedIcon as
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import { Tooltip as F } from "../Tooltip/Tooltip.js";
|
|
9
|
+
import { LoadedIcon as L } from "../LoadedIcon/LoadedIcon.js";
|
|
10
|
+
import { ButtonCounterBadge as P } from "../Button/ButtonCounterBadge.js";
|
|
11
|
+
const S = (t) => t ? E(t) ? t : I(t) : null, T = j.forwardRef(
|
|
12
|
+
(t, h) => {
|
|
11
13
|
const {
|
|
12
|
-
asChild:
|
|
13
|
-
children:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
asChild: a,
|
|
15
|
+
children: m,
|
|
16
|
+
icon: b,
|
|
17
|
+
disabled: e = !1,
|
|
18
|
+
loading: n = !1,
|
|
19
|
+
message: y,
|
|
20
|
+
title: x = "",
|
|
21
|
+
tooltipProps: l = {},
|
|
22
|
+
className: B,
|
|
23
|
+
variant: c,
|
|
24
|
+
color: p,
|
|
25
|
+
size: s,
|
|
26
|
+
rounded: u,
|
|
27
|
+
screenReader: o,
|
|
28
|
+
counter: N,
|
|
29
|
+
...v
|
|
30
|
+
} = t, C = a ? z : "button", i = y || x, d = a ? m : /* @__PURE__ */ g(R, { children: [
|
|
31
|
+
/* @__PURE__ */ g(L, { loading: n, size: s, children: [
|
|
32
|
+
S(b) ?? m,
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
P,
|
|
35
|
+
{
|
|
36
|
+
counter: N,
|
|
37
|
+
variant: c,
|
|
38
|
+
color: p,
|
|
39
|
+
size: s,
|
|
40
|
+
disabled: e,
|
|
41
|
+
rounded: u
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }),
|
|
45
|
+
!!o && /* @__PURE__ */ r("span", { className: "sr-only", children: typeof o == "string" ? o : o.text })
|
|
46
|
+
] });
|
|
47
|
+
if (!d) return null;
|
|
48
|
+
const f = /* @__PURE__ */ r(
|
|
49
|
+
C,
|
|
27
50
|
{
|
|
28
51
|
type: "button",
|
|
29
|
-
ref:
|
|
30
|
-
disabled:
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
52
|
+
ref: h,
|
|
53
|
+
disabled: e,
|
|
54
|
+
className: V(
|
|
55
|
+
"group group/button group/button-icon",
|
|
56
|
+
w({
|
|
57
|
+
variant: c,
|
|
58
|
+
size: s,
|
|
59
|
+
color: p,
|
|
60
|
+
rounded: u,
|
|
61
|
+
className: B
|
|
38
62
|
}),
|
|
39
|
-
|
|
63
|
+
n && "pointer-events-none opacity-80"
|
|
40
64
|
),
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
65
|
+
...v,
|
|
66
|
+
children: d
|
|
43
67
|
}
|
|
44
68
|
);
|
|
45
|
-
return
|
|
46
|
-
|
|
69
|
+
return i ? /* @__PURE__ */ r(
|
|
70
|
+
F,
|
|
47
71
|
{
|
|
48
|
-
...
|
|
49
|
-
open:
|
|
50
|
-
message:
|
|
51
|
-
children:
|
|
72
|
+
...l || {},
|
|
73
|
+
open: l.open ?? (e || n || !i) ? !1 : void 0,
|
|
74
|
+
message: i,
|
|
75
|
+
children: f
|
|
52
76
|
}
|
|
53
|
-
) :
|
|
77
|
+
) : f;
|
|
54
78
|
}
|
|
55
79
|
);
|
|
56
|
-
|
|
80
|
+
T.displayName = "Button";
|
|
57
81
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
82
|
+
T as ButtonIcon,
|
|
83
|
+
T as default
|
|
60
84
|
};
|
|
61
85
|
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonIconVariants } from './buttonIconVariants';\nimport { ButtonIconProps } from './ButtonIcon.types';\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { Tooltip } from '../Tooltip';\nimport { LoadedIcon } from \"../LoadedIcon\";\n\n/**\n * Icon-only version of the Button component.\n *\n * `ButtonIcon` is used for compact actions represented by an icon instead of text.\n * Supports all core features of Button: variants, sizes, tooltips, disabled and loading state.\n *\n * @example\n * > Basic usage:\n * ```tsx\n
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sources":["../../src/ButtonIcon/ButtonIcon.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonIconVariants } from './buttonIconVariants';\nimport { ButtonIconProps } from './ButtonIcon.types';\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { Tooltip } from '../Tooltip';\nimport { LoadedIcon } from \"../LoadedIcon\";\nimport { ButtonIconType } from \"../Button\";\nimport { createElement, isValidElement } from \"react\";\nimport { ButtonCounterBadge } from \"../Button/ButtonCounterBadge\";\n\nconst renderInnerIcon = (Icon?: ButtonIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\n/**\n * Icon-only version of the Button component.\n *\n * `ButtonIcon` is used for compact actions represented by an icon instead of text.\n * Supports all core features of Button: variants, sizes, tooltips, disabled and loading state.\n *\n * @public\n * @see [Documentation](#) // TODO: add link to docs\n *\n * @example\n * > Import:\n * ```tsx\n * import { ButtonIcon } from '@oneplatformdev/ui/ButtonIcon';\n * ```\n * > Basic usage by icon:\n * ```tsx\n *<ButtonIcon icon={<PlusIcon />}/>\n *<ButtonIcon icon={PlusIcon}/>\n * ```\n * > Basic usage by children:\n * ```tsx\n *<ButtonIcon>\n * <PlusIcon />\n *</ButtonIcon>\n * ```\n * > With variant & color:\n * ```tsx\n *<ButtonIcon variant=\"outline\" color=\"primary\">\n * <Search />\n *</ButtonIcon>\n * ```\n * > With tooltip message:\n * ```tsx\n *<ButtonIcon message=\"Edit item\">\n * <PencilLine />\n *</ButtonIcon>\n * ```\n * > Loading state:\n * ```tsx\n *<ButtonIcon loading>\n * <Trash2 />\n *</ButtonIcon>\n * ```\n * > Badge counter:\n * ```tsx\n *<ButtonIcon counter={5} icon={MessageCircleMoreIcon}/>\n *<ButtonIcon counter={{ count: 8 }} icon={MessageCircleMoreIcon}/>\n * ```\n *\n * @remarks\n * - Designed for icon-only usage. If you need text, use `Button`.\n * - Works with any SVG React component or element, e.g. lucide-react, heroicons, custom icons.\n *\n * @see {@link Button} for regular text buttons\n */\nexport const ButtonIcon = React.forwardRef<HTMLButtonElement, ButtonIconProps>(\n (props, ref) => {\n const {\n asChild,\n children,\n icon,\n disabled = false,\n loading = false,\n message,\n title = '',\n tooltipProps = {},\n className,\n variant,\n color,\n size,\n rounded,\n screenReader,\n counter,\n ...rest\n } = props;\n\n const Comp = asChild ? Slot : \"button\"\n const msg = message || title;\n\n const content = asChild\n ? children\n : (\n <>\n <LoadedIcon loading={loading} size={size}>\n {renderInnerIcon(icon) ?? children}\n <ButtonCounterBadge\n counter={counter}\n variant={variant}\n color={color}\n size={size}\n disabled={disabled}\n rounded={rounded}\n />\n </LoadedIcon>\n\n {!!screenReader && (\n <span className=\"sr-only\">\n {typeof screenReader === 'string' ? screenReader : screenReader.text}\n </span>\n )}\n </>\n )\n\n if (!content) return null;\n\n const cmp = (\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(\n 'group group/button group/button-icon',\n buttonIconVariants({\n variant, size, color, rounded,\n className\n }),\n loading && 'pointer-events-none opacity-80',\n )}\n {...rest}\n >\n {content}\n </Comp>\n )\n\n if (!msg) return cmp\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled || loading || !msg) ? false : undefined}\n message={msg}\n >\n {cmp}\n </Tooltip>\n )\n }\n)\nButtonIcon.displayName = \"Button\"\nexport default ButtonIcon;\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","ButtonIcon","React","props","ref","asChild","children","icon","disabled","loading","message","title","tooltipProps","className","variant","color","size","rounded","screenReader","counter","rest","Comp","Slot","msg","content","jsxs","Fragment","LoadedIcon","jsx","ButtonCounterBadge","cmp","cn","buttonIconVariants","Tooltip"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,E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