prometeo-design-system 7.3.6 → 7.3.7
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/SplitButton.d.ts +6 -0
- package/dist/SplitButton.es.js +187 -0
- package/dist/components/SplitButton/SplitButton.d.ts +28 -0
- package/dist/exports/SplitButton.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/prometeo-design-system.es.js +13 -11
- package/dist/styles.css +1 -1
- package/package.json +5 -1
- package/src/styles/intellisense.css +42 -6
- package/src/styles/tokens.css +61 -13
- package/src/styles/utilities/background.css +36 -0
- package/src/styles/utilities/border.css +36 -0
- package/src/styles/utilities/icon.css +66 -12
- package/src/styles/utilities/text.css +42 -6
- package/src/styles/utilities.css +180 -18
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { memo as v, createElement as f, isValidElement as g } from "react";
|
|
3
|
+
import { ChevronDown as y } from "./Icons/ChevronDown.es.js";
|
|
4
|
+
import { c as m } from "./cn-B6yFEsav.js";
|
|
5
|
+
import { c as n } from "./index-BOQuZ0gG.js";
|
|
6
|
+
function t(e) {
|
|
7
|
+
return e ? g(e) ? e : f(e, { size: 24 }) : null;
|
|
8
|
+
}
|
|
9
|
+
const h = n(
|
|
10
|
+
"inline-flex gap-0.5 items-stretch overflow-visible w-max",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
disabled: {
|
|
14
|
+
true: "",
|
|
15
|
+
false: ""
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { disabled: !1 }
|
|
19
|
+
}
|
|
20
|
+
), x = n(
|
|
21
|
+
[
|
|
22
|
+
"group inline-flex items-center gap-2 px-4 py-3 transition-[colors,border-radius,box-shadow] outline-none",
|
|
23
|
+
"rounded-l-[var(--radius-large)] rounded-r-[var(--radius-xsmall)] "
|
|
24
|
+
],
|
|
25
|
+
{
|
|
26
|
+
variants: {
|
|
27
|
+
disabled: {
|
|
28
|
+
true: "text-disabled-ondisabled dropshadow-200 bg-neutral-secondary-default",
|
|
29
|
+
false: "text-neutral-onbrandsecondary-default bg-brand-secondary-default icon-neutral-onbrandsecondary-default dropshadow-300"
|
|
30
|
+
},
|
|
31
|
+
interactive: {
|
|
32
|
+
true: [
|
|
33
|
+
"cursor-pointer",
|
|
34
|
+
"hover:rounded-r-[var(--radius-large)]",
|
|
35
|
+
"hover:bg-brand-secondary-hover active:bg-brand-secondary-pressed",
|
|
36
|
+
"active:ring-2 active:ring-[var(--border-brand-secondary-pressed)] ring-inset",
|
|
37
|
+
"focus-visible:ring-2 focus-visible:ring-primary-default-default",
|
|
38
|
+
"group-hover:icon-neutral-onbrandsecondary-hover group-active:icon-neutral-onbrandsecondary-pressed"
|
|
39
|
+
],
|
|
40
|
+
false: "cursor-default"
|
|
41
|
+
},
|
|
42
|
+
pressed: {
|
|
43
|
+
true: "",
|
|
44
|
+
false: ""
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
compoundVariants: [
|
|
48
|
+
{
|
|
49
|
+
disabled: !1,
|
|
50
|
+
pressed: !0,
|
|
51
|
+
interactive: !0,
|
|
52
|
+
class: "bg-brand-secondary-pressed ring-2 ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed hover:bg-brand-secondary-pressed hover:icon-neutral-onbrandsecondary-pressed"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
disabled: !1,
|
|
56
|
+
pressed: !0,
|
|
57
|
+
interactive: !1,
|
|
58
|
+
class: "bg-brand-secondary-pressed ring-2 ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
defaultVariants: { disabled: !1, pressed: !1, interactive: !0 }
|
|
62
|
+
}
|
|
63
|
+
), I = n(
|
|
64
|
+
[
|
|
65
|
+
"group inline-flex items-center p-3 transition-[colors,border-radius]",
|
|
66
|
+
"rounded-r-[var(--radius-large)] rounded-l-[var(--radius-xsmall)] "
|
|
67
|
+
],
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
disabled: {
|
|
71
|
+
true: "text-disabled-ondisabled icon-disabled-ondisabled dropshadow-200 bg-neutral-secondary-default",
|
|
72
|
+
false: "bg-brand-secondary-default icon-neutral-onbrandsecondary-default dropshadow-300"
|
|
73
|
+
},
|
|
74
|
+
interactive: {
|
|
75
|
+
true: [
|
|
76
|
+
"cursor-pointer",
|
|
77
|
+
"hover:rounded-l-[var(--radius-large)]",
|
|
78
|
+
"active:ring-2 active:ring-[var(--border-brand-secondary-pressed)] ring-inset",
|
|
79
|
+
"hover:bg-brand-secondary-hover active:bg-brand-secondary-pressed",
|
|
80
|
+
"focus-visible:ring-2 focus-visible:ring-primary-default-default",
|
|
81
|
+
"hover:icon-neutral-onbrandsecondary-hover active:icon-neutral-onbrandsecondary-pressed"
|
|
82
|
+
],
|
|
83
|
+
false: "cursor-default"
|
|
84
|
+
},
|
|
85
|
+
pressed: {
|
|
86
|
+
true: "",
|
|
87
|
+
false: ""
|
|
88
|
+
},
|
|
89
|
+
defaultIcon: {
|
|
90
|
+
true: "",
|
|
91
|
+
false: ""
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
compoundVariants: [
|
|
95
|
+
{
|
|
96
|
+
disabled: !1,
|
|
97
|
+
pressed: !0,
|
|
98
|
+
interactive: !0,
|
|
99
|
+
defaultIcon: !0,
|
|
100
|
+
class: [
|
|
101
|
+
"bg-brand-secondary-pressed ring-2! ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed hover:bg-brand-secondary-pressed hover:icon-neutral-onbrandsecondary-pressed rounded-l-[var(--radius-large)]!",
|
|
102
|
+
"[&>svg]:rotate-180"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
disabled: !1,
|
|
107
|
+
pressed: !0,
|
|
108
|
+
interactive: !1,
|
|
109
|
+
defaultIcon: !0,
|
|
110
|
+
class: [
|
|
111
|
+
"bg-brand-secondary-pressed ring-2! ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed rounded-l-[var(--radius-large)]!",
|
|
112
|
+
"[&>svg]:rotate-180"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
defaultIcon: !0,
|
|
117
|
+
class: "[&>svg]:transition-transform [&>svg]:duration-200"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
disabled: !1,
|
|
121
|
+
pressed: !0,
|
|
122
|
+
interactive: !0,
|
|
123
|
+
defaultIcon: !1,
|
|
124
|
+
class: ["bg-brand-secondary-pressed ring-2! ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed hover:bg-brand-secondary-pressed hover:icon-neutral-onbrandsecondary-pressed rounded-l-[var(--radius-large)]!"]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
disabled: !1,
|
|
128
|
+
pressed: !0,
|
|
129
|
+
interactive: !1,
|
|
130
|
+
defaultIcon: !1,
|
|
131
|
+
class: ["bg-brand-secondary-pressed ring-2! ring-[var(--border-brand-secondary-pressed)] ring-inset icon-neutral-onbrandsecondary-pressed rounded-l-[var(--radius-large)]!"]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
defaultVariants: { disabled: !1, pressed: !1, interactive: !0 }
|
|
135
|
+
}
|
|
136
|
+
), i = ({
|
|
137
|
+
action: e,
|
|
138
|
+
trailing: s,
|
|
139
|
+
disabled: r = !1,
|
|
140
|
+
className: l
|
|
141
|
+
}) => {
|
|
142
|
+
const c = e?.children ?? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
143
|
+
t(e?.icon),
|
|
144
|
+
e?.label && /* @__PURE__ */ a.jsx("span", { className: "prometeo-fonts-label-medium", children: e.label })
|
|
145
|
+
] }), u = t(s?.icon ?? y), b = !!e?.onClick, p = !!s?.onClick, d = !r && !!e?.pressed, o = !r && !!s?.pressed;
|
|
146
|
+
return /* @__PURE__ */ a.jsxs("div", { className: m(h({ disabled: r }), l), children: [
|
|
147
|
+
/* @__PURE__ */ a.jsx(
|
|
148
|
+
"button",
|
|
149
|
+
{
|
|
150
|
+
ref: e?.ref,
|
|
151
|
+
type: "button",
|
|
152
|
+
disabled: r,
|
|
153
|
+
"aria-pressed": d || void 0,
|
|
154
|
+
onClick: e?.onClick,
|
|
155
|
+
className: x({
|
|
156
|
+
disabled: r,
|
|
157
|
+
interactive: b,
|
|
158
|
+
pressed: d
|
|
159
|
+
}),
|
|
160
|
+
children: c
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
/* @__PURE__ */ a.jsx(
|
|
164
|
+
"button",
|
|
165
|
+
{
|
|
166
|
+
ref: s?.ref,
|
|
167
|
+
type: "button",
|
|
168
|
+
disabled: r,
|
|
169
|
+
"aria-pressed": o || void 0,
|
|
170
|
+
onClick: s?.onClick,
|
|
171
|
+
className: I({
|
|
172
|
+
disabled: r,
|
|
173
|
+
interactive: p,
|
|
174
|
+
pressed: o,
|
|
175
|
+
defaultIcon: !s?.icon
|
|
176
|
+
}),
|
|
177
|
+
children: u
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
] });
|
|
181
|
+
};
|
|
182
|
+
i.displayName = "SplitButton";
|
|
183
|
+
const k = v(i);
|
|
184
|
+
export {
|
|
185
|
+
k as SplitButton,
|
|
186
|
+
k as default
|
|
187
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IconComponent } from '../../Icons/types';
|
|
2
|
+
export interface SplitButtonActionSlot {
|
|
3
|
+
icon?: IconComponent | React.ReactElement;
|
|
4
|
+
label?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
8
|
+
/** Mantiene el aspecto pressed (p. ej. menú abierto en este slot). */
|
|
9
|
+
pressed?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SplitButtonTrailingSlot {
|
|
12
|
+
icon?: IconComponent;
|
|
13
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
15
|
+
/** Mantiene el aspecto pressed (p. ej. menú abierto en este slot). */
|
|
16
|
+
pressed?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SplitButtonProps {
|
|
19
|
+
action?: SplitButtonActionSlot;
|
|
20
|
+
trailing?: SplitButtonTrailingSlot;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: import('react').MemoExoticComponent<{
|
|
25
|
+
({ action, trailing, disabled, className, }: SplitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default } from '../components/SplitButton/SplitButton';
|
|
2
|
+
export { default as SplitButton } from '../components/SplitButton/SplitButton';
|
|
3
|
+
export type { SplitButtonProps, SplitButtonActionSlot, SplitButtonTrailingSlot, } from '../components/SplitButton/SplitButton';
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export { ProfilePictureUpload } from './exports/ProfilePictureUpload';
|
|
|
47
47
|
export { default as ProgressBar } from './exports/ProgressBar';
|
|
48
48
|
export { default as Select } from './exports/Select';
|
|
49
49
|
export { default as Spinner } from './exports/Spinner';
|
|
50
|
+
export { default as SplitButton } from './exports/SplitButton';
|
|
50
51
|
export { default as Steps } from './exports/Steps';
|
|
51
52
|
export { default as Toggle } from './exports/Toggle';
|
|
52
53
|
/** @deprecated Use Toggle instead */
|
|
@@ -115,6 +116,7 @@ export type { OtpInputProps } from './exports/OtpInput';
|
|
|
115
116
|
export type { BadgeProps } from './components/Sidebar/components/badge';
|
|
116
117
|
export type { NavbarCollapseButtonProps } from './components/Sidebar/components/collapse-button';
|
|
117
118
|
export type { SpinnerProps } from './exports/Spinner';
|
|
119
|
+
export type { SplitButtonProps, SplitButtonActionSlot, SplitButtonTrailingSlot, } from './exports/SplitButton';
|
|
118
120
|
export type { PaginationProps } from './exports/Pagination';
|
|
119
121
|
export type { ProfilePictureUploadProps } from './exports/ProfilePictureUpload';
|
|
120
122
|
export type { Step, StepsProps } from './exports/Steps';
|
|
@@ -65,11 +65,12 @@ import { default as lr } from "./Check.es.js";
|
|
|
65
65
|
import { default as ir } from "./CheckBox.es.js";
|
|
66
66
|
import { default as dr } from "./InputMultiple.es.js";
|
|
67
67
|
import { default as fr } from "./ProfilePictureUpload.es.js";
|
|
68
|
-
import { default as pr
|
|
69
|
-
import { default as br } from "./
|
|
70
|
-
import { default as vr } from "./
|
|
71
|
-
import { default as yr } from "./
|
|
72
|
-
import {
|
|
68
|
+
import { default as pr } from "./SplitButton.es.js";
|
|
69
|
+
import { default as xr, default as br } from "./Toggle.es.js";
|
|
70
|
+
import { default as vr } from "./IconButton.es.js";
|
|
71
|
+
import { default as yr } from "./Skeleton.es.js";
|
|
72
|
+
import { default as Sr } from "./AttachInput.es.js";
|
|
73
|
+
import { useScrollable as Tr } from "./useScrollable.es.js";
|
|
73
74
|
const B = ({
|
|
74
75
|
secondaryActionsSlot: e,
|
|
75
76
|
primaryActionsSlot: t,
|
|
@@ -426,7 +427,7 @@ const be = Object.assign(W, {
|
|
|
426
427
|
};
|
|
427
428
|
export {
|
|
428
429
|
be as ActionInput,
|
|
429
|
-
|
|
430
|
+
Sr as AttachInput,
|
|
430
431
|
st as Avatar,
|
|
431
432
|
it as AvatarAndSubavatar,
|
|
432
433
|
er as AvatarBase,
|
|
@@ -460,7 +461,7 @@ export {
|
|
|
460
461
|
kt as Header,
|
|
461
462
|
Me as HeaderCell,
|
|
462
463
|
J as HelperComponent,
|
|
463
|
-
|
|
464
|
+
vr as IconButton,
|
|
464
465
|
Sa as Image,
|
|
465
466
|
ya as ImageGallery,
|
|
466
467
|
Mt as Input,
|
|
@@ -490,10 +491,11 @@ export {
|
|
|
490
491
|
U as Select,
|
|
491
492
|
Oa as SelectSearch,
|
|
492
493
|
ge as SelectSearchLegacy,
|
|
493
|
-
|
|
494
|
+
yr as Skeleton,
|
|
494
495
|
Yt as Spinner,
|
|
496
|
+
pr as SplitButton,
|
|
495
497
|
ta as Steps,
|
|
496
|
-
|
|
498
|
+
xr as Switch,
|
|
497
499
|
Je as Tab,
|
|
498
500
|
Ke as TabLinkItem,
|
|
499
501
|
Qe as TabLinks,
|
|
@@ -515,7 +517,7 @@ export {
|
|
|
515
517
|
ca as TextArea,
|
|
516
518
|
Ta as Toast,
|
|
517
519
|
Da as ToastProvider,
|
|
518
|
-
|
|
520
|
+
br as Toggle,
|
|
519
521
|
ma as Tooltip,
|
|
520
522
|
xt as groupMessagesBySender,
|
|
521
523
|
Na as toastpyrion,
|
|
@@ -533,5 +535,5 @@ export {
|
|
|
533
535
|
St as useModalControl,
|
|
534
536
|
Lt as useModalState,
|
|
535
537
|
we as usePopover,
|
|
536
|
-
|
|
538
|
+
Tr as useScrollable
|
|
537
539
|
};
|