@vikram-hegde/skeletal 0.0.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/README.md +35 -0
- package/dist/alert-dialog/index.d.ts +2 -0
- package/dist/alert-dialog/index.js +2 -0
- package/dist/alert-dialog-1hxVC_5N.js +71 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge-C3p1L0E7.css +53 -0
- package/dist/badge-C3p1L0E7.js +32 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +2 -0
- package/dist/button-B48UNbaC.css +152 -0
- package/dist/button-B48UNbaC.js +46 -0
- package/dist/button-Dvd4n2U4.d.ts +56 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox-wh2BoiSj.css +76 -0
- package/dist/checkbox-wh2BoiSj.js +112 -0
- package/dist/cluster-BJ4m5uGN.css +9 -0
- package/dist/cluster-BJ4m5uGN.js +21 -0
- package/dist/combobox/index.d.ts +2 -0
- package/dist/combobox/index.js +2 -0
- package/dist/combobox-DWH7uSsx.css +389 -0
- package/dist/combobox-DWH7uSsx.js +327 -0
- package/dist/command-palette/index.d.ts +2 -0
- package/dist/command-palette/index.js +2 -0
- package/dist/command-palette-DF4XJ8qz.css +164 -0
- package/dist/command-palette-DF4XJ8qz.js +191 -0
- package/dist/dialog/index.d.ts +6 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog-C4yqxII_.js +73 -0
- package/dist/dialog-footer-Br9KZP4v.js +29 -0
- package/dist/dialog-footer-bNVIVPbu.d.ts +56 -0
- package/dist/dialog-portal-B21WFYkQ.css +131 -0
- package/dist/dialog-portal-B21WFYkQ.js +26 -0
- package/dist/dialog-portal-BF89FBeX.d.ts +15 -0
- package/dist/dialog-title-DRYRIxCp.js +35 -0
- package/dist/dialog-title-jyf86Q8C.d.ts +36 -0
- package/dist/dialog-viewport-CaMWJrCJ.d.ts +42 -0
- package/dist/dialog-viewport-vpbsq7Ib.js +21 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +2 -0
- package/dist/drawer-DQmz_uCP.css +214 -0
- package/dist/drawer-DQmz_uCP.js +180 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon-DBOdxNvH.css +6 -0
- package/dist/icon-DBOdxNvH.js +20 -0
- package/dist/index-A2QmU5r9.d.ts +37 -0
- package/dist/index-B0uNLS7z.d.ts +301 -0
- package/dist/index-B63PSP58.d.ts +94 -0
- package/dist/index-BBOkTl3h.d.ts +261 -0
- package/dist/index-BLFVnve3.d.ts +53 -0
- package/dist/index-BXPUT5u-.d.ts +72 -0
- package/dist/index-BngvATZx.d.ts +35 -0
- package/dist/index-Br2NrBW_.d.ts +444 -0
- package/dist/index-CUy-9csi.d.ts +135 -0
- package/dist/index-CbMW32E9.d.ts +82 -0
- package/dist/index-CyTcR6iv.d.ts +433 -0
- package/dist/index-CznsZ_1M.d.ts +85 -0
- package/dist/index-D-6gOciw.d.ts +350 -0
- package/dist/index-DdqDyczP.d.ts +209 -0
- package/dist/index-GOGpFujX.d.ts +144 -0
- package/dist/index-W3ozKcis.d.ts +245 -0
- package/dist/index-kpw3_4q_.d.ts +50 -0
- package/dist/index-rH7TJeJt.d.ts +334 -0
- package/dist/index-rQ7sRkqg.d.ts +122 -0
- package/dist/index.css +93 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +26 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +2 -0
- package/dist/input-CQ_ean8e.css +129 -0
- package/dist/input-CQ_ean8e.js +65 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +4 -0
- package/dist/layout-qoyutnKU.css +181 -0
- package/dist/layout-qoyutnKU.js +169 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu-DRdGMI_-.css +236 -0
- package/dist/menu-DRdGMI_-.js +243 -0
- package/dist/merge-class-name-C4KJJGuK.js +15 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover-CenynT0Z.css +139 -0
- package/dist/popover-CenynT0Z.js +174 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio-BJrvdkga.css +80 -0
- package/dist/radio-BJrvdkga.js +75 -0
- package/dist/scroll-area/index.d.ts +2 -0
- package/dist/scroll-area/index.js +2 -0
- package/dist/scroll-area-DkORxJE9.css +175 -0
- package/dist/scroll-area-DkORxJE9.js +114 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +2 -0
- package/dist/select-BaqBHUac.css +273 -0
- package/dist/select-BaqBHUac.js +254 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton-W6fwO5pf.css +88 -0
- package/dist/skeleton-W6fwO5pf.js +97 -0
- package/dist/spinner/index.d.ts +2 -0
- package/dist/spinner/index.js +2 -0
- package/dist/spinner-DB6ap8Si.css +43 -0
- package/dist/spinner-DB6ap8Si.js +27 -0
- package/dist/stack-BzFVrsmT.css +12 -0
- package/dist/stack-BzFVrsmT.js +52 -0
- package/dist/style-vars-ZSrCUzKx.js +13 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch-DizP31iF.css +76 -0
- package/dist/switch-DizP31iF.js +58 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip-CQk2WjUS.css +92 -0
- package/dist/tooltip-CQk2WjUS.js +138 -0
- package/package.json +68 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
@layer skeletal {
|
|
2
|
+
.KbSp5q_drawer__backdrop {
|
|
3
|
+
z-index: 40;
|
|
4
|
+
opacity: calc(1 - var(--drawer-swipe-progress));
|
|
5
|
+
background-color: light-dark(oklch(0% 0 0 / .4), oklch(0% 0 0 / .6));
|
|
6
|
+
transition: opacity .2s ease-out;
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: 0;
|
|
9
|
+
|
|
10
|
+
@supports (-webkit-touch-callout: none) {
|
|
11
|
+
position: absolute;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&[data-starting-style], &[data-ending-style] {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[data-swiping] {
|
|
19
|
+
transition: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (prefers-reduced-motion: reduce) {
|
|
23
|
+
transition: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.KbSp5q_drawer__viewport {
|
|
28
|
+
z-index: 50;
|
|
29
|
+
display: flex;
|
|
30
|
+
position: fixed;
|
|
31
|
+
inset: 0;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
|
|
34
|
+
&:has([data-swipe-direction="left"]) {
|
|
35
|
+
justify-content: flex-start;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:has([data-swipe-direction="right"]) {
|
|
39
|
+
justify-content: flex-end;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:has([data-swipe-direction="down"]) {
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: flex-end;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:has([data-swipe-direction="up"]) {
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.KbSp5q_drawer__popup {
|
|
54
|
+
--_drawer-size: 24rem;
|
|
55
|
+
background-color: var(--sk-popover);
|
|
56
|
+
color: var(--sk-popover-foreground);
|
|
57
|
+
box-shadow: var(--sk-shadow-md);
|
|
58
|
+
touch-action: auto;
|
|
59
|
+
will-change: transform;
|
|
60
|
+
outline: none;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
transition: transform .3s cubic-bezier(.32, .72, 0, 1);
|
|
63
|
+
display: flex;
|
|
64
|
+
position: relative;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
|
|
67
|
+
&[data-ending-style] {
|
|
68
|
+
transition-duration: calc(var(--drawer-swipe-strength) * .3s);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-swiping] {
|
|
72
|
+
transition: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media (prefers-reduced-motion: reduce) {
|
|
76
|
+
transition: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.KbSp5q_drawer__popup[data-swipe-direction="left"], .KbSp5q_drawer__popup[data-swipe-direction="right"] {
|
|
81
|
+
block-size: 100%;
|
|
82
|
+
inline-size: min(var(--_drawer-size), 100%);
|
|
83
|
+
max-inline-size: 100vi;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.KbSp5q_drawer__popup[data-swipe-direction="right"] {
|
|
87
|
+
border-inline-start: 1px solid var(--sk-border);
|
|
88
|
+
border-radius: var(--sk-radius) 0 0 var(--sk-radius);
|
|
89
|
+
transform: translateX(var(--drawer-swipe-movement-x));
|
|
90
|
+
|
|
91
|
+
&[data-starting-style], &[data-ending-style] {
|
|
92
|
+
transform: translateX(calc(100% + 1px));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.KbSp5q_drawer__popup[data-swipe-direction="left"] {
|
|
97
|
+
border-inline-end: 1px solid var(--sk-border);
|
|
98
|
+
border-radius: 0 var(--sk-radius) var(--sk-radius) 0;
|
|
99
|
+
transform: translateX(var(--drawer-swipe-movement-x));
|
|
100
|
+
|
|
101
|
+
&[data-starting-style], &[data-ending-style] {
|
|
102
|
+
transform: translateX(calc(-100% - 1px));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.KbSp5q_drawer__popup[data-swipe-direction="down"], .KbSp5q_drawer__popup[data-swipe-direction="up"] {
|
|
107
|
+
inline-size: 100%;
|
|
108
|
+
max-block-size: min(var(--_drawer-size), 85dvb);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.KbSp5q_drawer__popup[data-swipe-direction="down"] {
|
|
112
|
+
border-block-start: 1px solid var(--sk-border);
|
|
113
|
+
border-radius: var(--sk-radius) var(--sk-radius) 0 0;
|
|
114
|
+
transform: translateY(var(--drawer-swipe-movement-y));
|
|
115
|
+
|
|
116
|
+
&[data-starting-style], &[data-ending-style] {
|
|
117
|
+
transform: translateY(calc(100% + 1px));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.KbSp5q_drawer__popup[data-swipe-direction="up"] {
|
|
122
|
+
border-block-end: 1px solid var(--sk-border);
|
|
123
|
+
border-radius: 0 0 var(--sk-radius) var(--sk-radius);
|
|
124
|
+
transform: translateY(var(--drawer-swipe-movement-y));
|
|
125
|
+
|
|
126
|
+
&[data-starting-style], &[data-ending-style] {
|
|
127
|
+
transform: translateY(calc(-100% - 1px));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.KbSp5q_drawer__popup--sm {
|
|
132
|
+
--_drawer-size: 20rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.KbSp5q_drawer__popup--lg {
|
|
136
|
+
--_drawer-size: 32rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.KbSp5q_drawer__content {
|
|
140
|
+
overflow-block: auto;
|
|
141
|
+
overscroll-behavior: contain;
|
|
142
|
+
flex: auto;
|
|
143
|
+
min-block-size: 0;
|
|
144
|
+
padding: 1.5rem;
|
|
145
|
+
|
|
146
|
+
[data-swipe-direction="down"] & {
|
|
147
|
+
padding-block-end: calc(1.5rem + env(safe-area-inset-bottom, 0px));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.KbSp5q_drawer__header {
|
|
152
|
+
background-color: var(--sk-popover);
|
|
153
|
+
border-block-end: 1px solid var(--sk-border);
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: .5rem;
|
|
159
|
+
padding-block: .75rem;
|
|
160
|
+
padding-inline: 1.5rem;
|
|
161
|
+
display: flex;
|
|
162
|
+
|
|
163
|
+
[data-swipe-direction="up"] & {
|
|
164
|
+
padding-block-start: calc(.75rem + env(safe-area-inset-top, 0px));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.KbSp5q_drawer__footer {
|
|
169
|
+
background-color: var(--sk-muted);
|
|
170
|
+
border-block-start: 1px solid var(--sk-border);
|
|
171
|
+
flex-wrap: wrap;
|
|
172
|
+
flex-shrink: 0;
|
|
173
|
+
justify-content: flex-end;
|
|
174
|
+
align-items: center;
|
|
175
|
+
gap: .5rem;
|
|
176
|
+
padding-block: .75rem;
|
|
177
|
+
padding-inline: 1.5rem;
|
|
178
|
+
display: flex;
|
|
179
|
+
|
|
180
|
+
[data-swipe-direction="down"] & {
|
|
181
|
+
padding-block-end: calc(.75rem + env(safe-area-inset-bottom, 0px));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.KbSp5q_drawer__swipe-area {
|
|
186
|
+
z-index: 20;
|
|
187
|
+
touch-action: pan-y;
|
|
188
|
+
position: fixed;
|
|
189
|
+
|
|
190
|
+
&[data-swipe-direction="left"] {
|
|
191
|
+
inline-size: 1.5rem;
|
|
192
|
+
inset-block: 0;
|
|
193
|
+
inset-inline-end: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&[data-swipe-direction="right"] {
|
|
197
|
+
inline-size: 1.5rem;
|
|
198
|
+
inset-block: 0;
|
|
199
|
+
inset-inline-start: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&[data-swipe-direction="up"] {
|
|
203
|
+
block-size: 1.5rem;
|
|
204
|
+
inset-block-end: 0;
|
|
205
|
+
inset-inline: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&[data-swipe-direction="down"] {
|
|
209
|
+
block-size: 1.5rem;
|
|
210
|
+
inset-block-start: 0;
|
|
211
|
+
inset-inline: 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import './drawer-DQmz_uCP.css';
|
|
2
|
+
import { t as mergeClassName } from "./merge-class-name-C4KJJGuK.js";
|
|
3
|
+
import { t as DialogPortal } from "./dialog-portal-B21WFYkQ.js";
|
|
4
|
+
import { t as Button } from "./button-B48UNbaC.js";
|
|
5
|
+
import { n as DialogDescription, r as DialogClose, t as DialogTitle } from "./dialog-title-DRYRIxCp.js";
|
|
6
|
+
import { t as Stack } from "./stack-BzFVrsmT.js";
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { Drawer } from "@base-ui/react/drawer";
|
|
10
|
+
//#region src/drawer/drawer.module.css
|
|
11
|
+
var drawer_module_default = {
|
|
12
|
+
"drawer__backdrop": "KbSp5q_drawer__backdrop",
|
|
13
|
+
"drawer__content": "KbSp5q_drawer__content",
|
|
14
|
+
"drawer__footer": "KbSp5q_drawer__footer",
|
|
15
|
+
"drawer__header": "KbSp5q_drawer__header",
|
|
16
|
+
"drawer__popup": "KbSp5q_drawer__popup",
|
|
17
|
+
"drawer__popup--lg": "KbSp5q_drawer__popup--lg",
|
|
18
|
+
"drawer__popup--sm": "KbSp5q_drawer__popup--sm",
|
|
19
|
+
"drawer__swipe-area": "KbSp5q_drawer__swipe-area",
|
|
20
|
+
"drawer__viewport": "KbSp5q_drawer__viewport"
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/drawer/drawer-backdrop.tsx
|
|
24
|
+
function DrawerBackdrop({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Drawer.Backdrop, {
|
|
26
|
+
className: mergeClassName(drawer_module_default.drawer__backdrop, className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/drawer/drawer-content.tsx
|
|
32
|
+
function DrawerContent({ className, children, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Drawer.Content, {
|
|
34
|
+
className: mergeClassName(drawer_module_default.drawer__content, className),
|
|
35
|
+
...props,
|
|
36
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
37
|
+
space: "1.25rem",
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/drawer/drawer-footer.tsx
|
|
44
|
+
function DrawerFooter({ className, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: clsx(drawer_module_default.drawer__footer, className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/drawer/drawer-header.tsx
|
|
52
|
+
function DrawerHeader({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: clsx(drawer_module_default.drawer__header, className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/drawer/drawer-popup.tsx
|
|
60
|
+
function DrawerPopup({ className, size = "md", children, ...props }) {
|
|
61
|
+
const sizeClass = size !== "md" ? drawer_module_default[`drawer__popup--${size}`] : void 0;
|
|
62
|
+
return /* @__PURE__ */ jsx(Drawer.Popup, {
|
|
63
|
+
className: mergeClassName(clsx(drawer_module_default.drawer__popup, sizeClass), className),
|
|
64
|
+
...props,
|
|
65
|
+
children
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/drawer/drawer-root.tsx
|
|
70
|
+
/**
|
|
71
|
+
* Maps a `side` to the Base UI swipe direction that dismisses the drawer.
|
|
72
|
+
* Positioning in the CSS keys off the `data-swipe-direction` attribute Base UI
|
|
73
|
+
* sets on the popup, so a single `side` prop drives both gesture and layout.
|
|
74
|
+
*/
|
|
75
|
+
const SIDE_TO_SWIPE_DIRECTION = {
|
|
76
|
+
left: "left",
|
|
77
|
+
right: "right",
|
|
78
|
+
top: "up",
|
|
79
|
+
bottom: "down"
|
|
80
|
+
};
|
|
81
|
+
function DrawerRoot({ side = "right", swipeDirection, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
83
|
+
swipeDirection: swipeDirection ?? SIDE_TO_SWIPE_DIRECTION[side],
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/drawer/drawer-swipe-area.tsx
|
|
89
|
+
function DrawerSwipeArea({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(Drawer.SwipeArea, {
|
|
91
|
+
className: mergeClassName(drawer_module_default["drawer__swipe-area"], className),
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/drawer/drawer-trigger.tsx
|
|
97
|
+
function DrawerTrigger({ className, variant = "primary", size = "md", fullWidth = false, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
99
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
100
|
+
variant,
|
|
101
|
+
size,
|
|
102
|
+
fullWidth,
|
|
103
|
+
className
|
|
104
|
+
}),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/drawer/drawer-viewport.tsx
|
|
110
|
+
function DrawerViewport({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx(Drawer.Viewport, {
|
|
112
|
+
className: mergeClassName(drawer_module_default.drawer__viewport, className),
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/drawer/index.ts
|
|
118
|
+
/**
|
|
119
|
+
* Compound component for drawers.
|
|
120
|
+
*
|
|
121
|
+
* Assemble the parts as properties of the object:
|
|
122
|
+
*
|
|
123
|
+
* ```tsx
|
|
124
|
+
* import { Drawer } from '@vikram-hegde/skeletal'
|
|
125
|
+
*
|
|
126
|
+
* <Drawer.Root side="right">
|
|
127
|
+
* <Drawer.Trigger>Open</Drawer.Trigger>
|
|
128
|
+
* <Drawer.Portal>
|
|
129
|
+
* <Drawer.Backdrop />
|
|
130
|
+
* <Drawer.Viewport>
|
|
131
|
+
* <Drawer.Popup>
|
|
132
|
+
* <Drawer.Header>
|
|
133
|
+
* <Drawer.Title>Title</Drawer.Title>
|
|
134
|
+
* <Drawer.Close size="sm" variant="ghost">✕</Drawer.Close>
|
|
135
|
+
* </Drawer.Header>
|
|
136
|
+
* <Drawer.Content>
|
|
137
|
+
* <Drawer.Description>Description</Drawer.Description>
|
|
138
|
+
* </Drawer.Content>
|
|
139
|
+
* <Drawer.Footer>
|
|
140
|
+
* <Drawer.Close>Cancel</Drawer.Close>
|
|
141
|
+
* <Drawer.Close variant="primary">Confirm</Drawer.Close>
|
|
142
|
+
* </Drawer.Footer>
|
|
143
|
+
* </Drawer.Popup>
|
|
144
|
+
* </Drawer.Viewport>
|
|
145
|
+
* </Drawer.Portal>
|
|
146
|
+
* </Drawer.Root>
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
149
|
+
* Composition follows the Base UI anatomy — `Drawer.Viewport` is the
|
|
150
|
+
* full-screen positioning/scroll container that pins `Drawer.Popup` to the
|
|
151
|
+
* edge set by the root's `side` prop.
|
|
152
|
+
*
|
|
153
|
+
* All parts are thin styled wrappers over Base UI's `Drawer`, so every Base UI
|
|
154
|
+
* prop, `render` override, and ref behaves the same. The drawer adds swipe-to-
|
|
155
|
+
* dismiss gestures on top of a Dialog, so `Backdrop`, `Viewport`, `Popup`,
|
|
156
|
+
* `Content`, and `SwipeArea` are drawer-specific; `Portal`, `Title`,
|
|
157
|
+
* `Description`, and `Close` are the same styled parts as `Dialog`'s (their
|
|
158
|
+
* prop types live under `Dialog*Props`). `Header` and `Footer` are plain
|
|
159
|
+
* sticky bars that stay pinned while `Content` scrolls.
|
|
160
|
+
*
|
|
161
|
+
* Position the drawer with the `side` prop on `Root`. Use `SwipeArea` to let
|
|
162
|
+
* users swipe open a closed drawer from the screen edge.
|
|
163
|
+
*/
|
|
164
|
+
const Drawer$1 = {
|
|
165
|
+
Root: DrawerRoot,
|
|
166
|
+
Trigger: DrawerTrigger,
|
|
167
|
+
Portal: DialogPortal,
|
|
168
|
+
Backdrop: DrawerBackdrop,
|
|
169
|
+
Viewport: DrawerViewport,
|
|
170
|
+
Popup: DrawerPopup,
|
|
171
|
+
Header: DrawerHeader,
|
|
172
|
+
Content: DrawerContent,
|
|
173
|
+
Footer: DrawerFooter,
|
|
174
|
+
Title: DialogTitle,
|
|
175
|
+
Description: DialogDescription,
|
|
176
|
+
Close: DialogClose,
|
|
177
|
+
SwipeArea: DrawerSwipeArea
|
|
178
|
+
};
|
|
179
|
+
//#endregion
|
|
180
|
+
export { Drawer$1 as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './icon-DBOdxNvH.css';
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/icon/icon.module.css
|
|
5
|
+
var icon_module_default = { "icon": "caZ9ea_icon" };
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/icon/icon.tsx
|
|
8
|
+
function Icon({ name: IconComponent, size = 20, weight = "regular", alt, className, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ...props }) {
|
|
9
|
+
const ariaProps = ariaLabel === void 0 && ariaHidden === void 0 && alt === void 0 ? { "aria-hidden": true } : ariaHidden !== void 0 ? { "aria-hidden": ariaHidden } : {};
|
|
10
|
+
return /* @__PURE__ */ jsx(IconComponent, {
|
|
11
|
+
size,
|
|
12
|
+
weight,
|
|
13
|
+
...alt !== void 0 && { alt },
|
|
14
|
+
...ariaProps,
|
|
15
|
+
className: clsx(icon_module_default.icon, className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Icon as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
//#region src/badge/badge.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The visual emphasis of the badge. Choose based on how much attention the
|
|
5
|
+
* label should draw:
|
|
6
|
+
* - `secondary`: muted neutral fill — the default for tags, labels, and
|
|
7
|
+
* metadata chips that shouldn't compete with content.
|
|
8
|
+
* - `primary`: accent fill — draws the eye; use sparingly for a single
|
|
9
|
+
* highlight (e.g. the active filter in a set).
|
|
10
|
+
* - `outline`: transparent with a border — the lightest emphasis; good when
|
|
11
|
+
* many badges sit together (filter rows) and a filled chip would be loud.
|
|
12
|
+
* - `destructive`: red fill — irreversible or error states (blocked, failed,
|
|
13
|
+
* removed). Pair with surrounding copy that explains the state.
|
|
14
|
+
*
|
|
15
|
+
* @default variant = 'secondary'
|
|
16
|
+
*/
|
|
17
|
+
type BadgeVariant = "primary" | "secondary" | "outline" | "destructive";
|
|
18
|
+
/**
|
|
19
|
+
* A small pill that labels, categorizes, or marks status. Renders a `<span>`.
|
|
20
|
+
*
|
|
21
|
+
* Pure presentational — no state, no Base UI, so it's safe to use anywhere a
|
|
22
|
+
* tag is needed. Pick a `variant` for emphasis, and pass `dot` to lead with a
|
|
23
|
+
* status dot (tinted with the badge's foreground color) for live indicators
|
|
24
|
+
* such as "Online" or "Failed".
|
|
25
|
+
*
|
|
26
|
+
* The badge keeps itself to one line and truncates nothing — keep labels
|
|
27
|
+
* short. Long text would stretch the pill awkwardly.
|
|
28
|
+
*/
|
|
29
|
+
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
30
|
+
/** Visual emphasis of the badge. @default 'secondary' */
|
|
31
|
+
variant?: BadgeVariant;
|
|
32
|
+
/** Whether the badge leads with a status dot tinted with the foreground color. @default false */
|
|
33
|
+
dot?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare function Badge({ variant, dot, className, children, ...props }: BadgeProps): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { BadgeProps as n, BadgeVariant as r, Badge as t };
|