@optimum-intelligence/opti-ui 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +161 -2
- package/dist/components/accordion/Accordion.d.ts +17 -0
- package/dist/components/accordion/Accordion.js +204 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/alert/Alert.d.ts +18 -0
- package/dist/components/alert/Alert.js +164 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/app-shell/AppShell.d.ts +97 -0
- package/dist/components/app-shell/AppShell.js +689 -0
- package/dist/components/app-shell/AppShell.js.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +21 -0
- package/dist/components/avatar/Avatar.js +190 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +16 -0
- package/dist/components/badge/Badge.js +94 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +154 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/button/Button.d.ts +23 -0
- package/dist/components/button/Button.js +159 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/calendar/Calendar.d.ts +59 -0
- package/dist/components/calendar/Calendar.js +709 -0
- package/dist/components/calendar/Calendar.js.map +1 -0
- package/dist/components/calendar/date-utils.d.ts +32 -0
- package/dist/components/calendar/date-utils.js +112 -0
- package/dist/components/calendar/date-utils.js.map +1 -0
- package/dist/components/card/Card.d.ts +42 -0
- package/dist/components/card/Card.js +82 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/choice/Choice.d.ts +32 -0
- package/dist/components/choice/Choice.js +371 -0
- package/dist/components/choice/Choice.js.map +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +15 -0
- package/dist/components/collapsible/Collapsible.js +155 -0
- package/dist/components/collapsible/Collapsible.js.map +1 -0
- package/dist/components/combobox/Combobox.d.ts +68 -0
- package/dist/components/combobox/Combobox.js +752 -0
- package/dist/components/combobox/Combobox.js.map +1 -0
- package/dist/components/command-palette/CommandPalette.d.ts +52 -0
- package/dist/components/command-palette/CommandPalette.js +328 -0
- package/dist/components/command-palette/CommandPalette.js.map +1 -0
- package/dist/components/data-table/DataTable.d.ts +111 -0
- package/dist/components/data-table/DataTable.js +444 -0
- package/dist/components/data-table/DataTable.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +50 -0
- package/dist/components/date-picker/DatePicker.js +485 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/DateRangePicker.d.ts +39 -0
- package/dist/components/date-picker/DateRangePicker.js +339 -0
- package/dist/components/date-picker/DateRangePicker.js.map +1 -0
- package/dist/components/date-picker/PickerField.d.ts +38 -0
- package/dist/components/date-picker/PickerField.js +238 -0
- package/dist/components/date-picker/PickerField.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +70 -0
- package/dist/components/dialog/Dialog.js +354 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/drawer/Drawer.d.ts +39 -0
- package/dist/components/drawer/Drawer.js +225 -0
- package/dist/components/drawer/Drawer.js.map +1 -0
- package/dist/components/empty-state/EmptyState.d.ts +12 -0
- package/dist/components/empty-state/EmptyState.js +116 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -0
- package/dist/components/field/Field.d.ts +36 -0
- package/dist/components/field/Field.js +337 -0
- package/dist/components/field/Field.js.map +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +91 -0
- package/dist/components/file-upload/FileUpload.js +714 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -0
- package/dist/components/input/Input.d.ts +49 -0
- package/dist/components/input/Input.js +538 -0
- package/dist/components/input/Input.js.map +1 -0
- package/dist/components/link/Link.d.ts +17 -0
- package/dist/components/link/Link.js +91 -0
- package/dist/components/link/Link.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +79 -0
- package/dist/components/menu/Menu.js +615 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/number-field/NumberField.d.ts +16 -0
- package/dist/components/number-field/NumberField.js +188 -0
- package/dist/components/number-field/NumberField.js.map +1 -0
- package/dist/components/pagination/Pagination.d.ts +34 -0
- package/dist/components/pagination/Pagination.js +244 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/popover/Popover.d.ts +22 -0
- package/dist/components/popover/Popover.js +186 -0
- package/dist/components/popover/Popover.js.map +1 -0
- package/dist/components/preview-card/PreviewCard.d.ts +20 -0
- package/dist/components/preview-card/PreviewCard.js +114 -0
- package/dist/components/preview-card/PreviewCard.js.map +1 -0
- package/dist/components/progress/Progress.d.ts +20 -0
- package/dist/components/progress/Progress.js +169 -0
- package/dist/components/progress/Progress.js.map +1 -0
- package/dist/components/scroll-area/ScrollArea.d.ts +8 -0
- package/dist/components/scroll-area/ScrollArea.js +112 -0
- package/dist/components/scroll-area/ScrollArea.js.map +1 -0
- package/dist/components/search-input/SearchInput.d.ts +14 -0
- package/dist/components/search-input/SearchInput.js +114 -0
- package/dist/components/search-input/SearchInput.js.map +1 -0
- package/dist/components/select/Select.d.ts +66 -0
- package/dist/components/select/Select.js +601 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/separator/Separator.d.ts +4 -0
- package/dist/components/separator/Separator.js +46 -0
- package/dist/components/separator/Separator.js.map +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +16 -0
- package/dist/components/skeleton/Skeleton.js +135 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +11 -0
- package/dist/components/slider/Slider.js +107 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/spinner/Spinner.d.ts +9 -0
- package/dist/components/spinner/Spinner.js +78 -0
- package/dist/components/spinner/Spinner.js.map +1 -0
- package/dist/components/stack/Stack.d.ts +23 -0
- package/dist/components/stack/Stack.js +79 -0
- package/dist/components/stack/Stack.js.map +1 -0
- package/dist/components/stat-card/StatCard.d.ts +22 -0
- package/dist/components/stat-card/StatCard.js +153 -0
- package/dist/components/stat-card/StatCard.js.map +1 -0
- package/dist/components/stepper/Stepper.d.ts +30 -0
- package/dist/components/stepper/Stepper.js +131 -0
- package/dist/components/stepper/Stepper.js.map +1 -0
- package/dist/components/table/Table.d.ts +53 -0
- package/dist/components/table/Table.js +221 -0
- package/dist/components/table/Table.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +19 -0
- package/dist/components/tabs/Tabs.js +183 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tag/Tag.d.ts +22 -0
- package/dist/components/tag/Tag.js +121 -0
- package/dist/components/tag/Tag.js.map +1 -0
- package/dist/components/toast/Toast.d.ts +34 -0
- package/dist/components/toast/Toast.js +187 -0
- package/dist/components/toast/Toast.js.map +1 -0
- package/dist/components/toggle/Toggle.d.ts +31 -0
- package/dist/components/toggle/Toggle.js +197 -0
- package/dist/components/toggle/Toggle.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +21 -0
- package/dist/components/toolbar/Toolbar.js +239 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +33 -0
- package/dist/components/tooltip/Tooltip.js +182 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/typography/Typography.d.ts +32 -0
- package/dist/components/typography/Typography.js +183 -0
- package/dist/components/typography/Typography.js.map +1 -0
- package/dist/fonts.css +3 -0
- package/dist/icons/index.d.ts +125 -0
- package/dist/icons/index.js +174 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +56 -0
- package/dist/opti-ui.css +5365 -0
- package/dist/theme/ThemeProvider.d.ts +22 -0
- package/dist/theme/ThemeProvider.js +115 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/utils/cx.d.ts +10 -0
- package/dist/utils/cx.js +18 -0
- package/dist/utils/cx.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/portal.d.ts +8 -0
- package/dist/utils/portal.js +16 -0
- package/dist/utils/portal.js.map +1 -0
- package/dist/utils/primitive.d.ts +13 -0
- package/dist/utils/primitive.js +61 -0
- package/dist/utils/primitive.js.map +1 -0
- package/dist/utils/search.d.ts +4 -0
- package/dist/utils/search.js +15 -0
- package/dist/utils/search.js.map +1 -0
- package/package.json +71 -4
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePortalContainer } from "../../utils/portal.js";
|
|
3
|
+
import { withClass } from "../../utils/cx.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Popover } from "@base-ui/react/popover";
|
|
7
|
+
//#region src/components/popover/Popover.tsx
|
|
8
|
+
function PopoverContent(t0) {
|
|
9
|
+
const $ = c(29);
|
|
10
|
+
let arrow;
|
|
11
|
+
let children;
|
|
12
|
+
let className;
|
|
13
|
+
let positionerProps;
|
|
14
|
+
let props;
|
|
15
|
+
let ref;
|
|
16
|
+
let t1;
|
|
17
|
+
let t2;
|
|
18
|
+
let t3;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({side: t1, align: t2, sideOffset: t3, arrow, positionerProps, className, children, ref, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = arrow;
|
|
23
|
+
$[2] = children;
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = positionerProps;
|
|
26
|
+
$[5] = props;
|
|
27
|
+
$[6] = ref;
|
|
28
|
+
$[7] = t1;
|
|
29
|
+
$[8] = t2;
|
|
30
|
+
$[9] = t3;
|
|
31
|
+
} else {
|
|
32
|
+
arrow = $[1];
|
|
33
|
+
children = $[2];
|
|
34
|
+
className = $[3];
|
|
35
|
+
positionerProps = $[4];
|
|
36
|
+
props = $[5];
|
|
37
|
+
ref = $[6];
|
|
38
|
+
t1 = $[7];
|
|
39
|
+
t2 = $[8];
|
|
40
|
+
t3 = $[9];
|
|
41
|
+
}
|
|
42
|
+
const side = t1 === void 0 ? "bottom" : t1;
|
|
43
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
44
|
+
const sideOffset = t3 === void 0 ? 8 : t3;
|
|
45
|
+
const container = usePortalContainer();
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[10] !== className) {
|
|
48
|
+
t4 = withClass("oui-popover", className);
|
|
49
|
+
$[10] = className;
|
|
50
|
+
$[11] = t4;
|
|
51
|
+
} else t4 = $[11];
|
|
52
|
+
let t5;
|
|
53
|
+
if ($[12] !== arrow) {
|
|
54
|
+
t5 = arrow && /* @__PURE__ */ jsx(Popover.Arrow, { className: "oui-popover__arrow" });
|
|
55
|
+
$[12] = arrow;
|
|
56
|
+
$[13] = t5;
|
|
57
|
+
} else t5 = $[13];
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[14] !== children || $[15] !== props || $[16] !== ref || $[17] !== t4 || $[18] !== t5) {
|
|
60
|
+
t6 = /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
61
|
+
ref,
|
|
62
|
+
className: t4,
|
|
63
|
+
...props,
|
|
64
|
+
children: [t5, children]
|
|
65
|
+
});
|
|
66
|
+
$[14] = children;
|
|
67
|
+
$[15] = props;
|
|
68
|
+
$[16] = ref;
|
|
69
|
+
$[17] = t4;
|
|
70
|
+
$[18] = t5;
|
|
71
|
+
$[19] = t6;
|
|
72
|
+
} else t6 = $[19];
|
|
73
|
+
let t7;
|
|
74
|
+
if ($[20] !== align || $[21] !== positionerProps || $[22] !== side || $[23] !== sideOffset || $[24] !== t6) {
|
|
75
|
+
t7 = /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
76
|
+
className: "oui-popover__positioner",
|
|
77
|
+
side,
|
|
78
|
+
align,
|
|
79
|
+
sideOffset,
|
|
80
|
+
...positionerProps,
|
|
81
|
+
children: t6
|
|
82
|
+
});
|
|
83
|
+
$[20] = align;
|
|
84
|
+
$[21] = positionerProps;
|
|
85
|
+
$[22] = side;
|
|
86
|
+
$[23] = sideOffset;
|
|
87
|
+
$[24] = t6;
|
|
88
|
+
$[25] = t7;
|
|
89
|
+
} else t7 = $[25];
|
|
90
|
+
let t8;
|
|
91
|
+
if ($[26] !== container || $[27] !== t7) {
|
|
92
|
+
t8 = /* @__PURE__ */ jsx(Popover.Portal, {
|
|
93
|
+
container,
|
|
94
|
+
children: t7
|
|
95
|
+
});
|
|
96
|
+
$[26] = container;
|
|
97
|
+
$[27] = t7;
|
|
98
|
+
$[28] = t8;
|
|
99
|
+
} else t8 = $[28];
|
|
100
|
+
return t8;
|
|
101
|
+
}
|
|
102
|
+
function PopoverTitle(t0) {
|
|
103
|
+
const $ = c(10);
|
|
104
|
+
let className;
|
|
105
|
+
let props;
|
|
106
|
+
let ref;
|
|
107
|
+
if ($[0] !== t0) {
|
|
108
|
+
({className, ref, ...props} = t0);
|
|
109
|
+
$[0] = t0;
|
|
110
|
+
$[1] = className;
|
|
111
|
+
$[2] = props;
|
|
112
|
+
$[3] = ref;
|
|
113
|
+
} else {
|
|
114
|
+
className = $[1];
|
|
115
|
+
props = $[2];
|
|
116
|
+
ref = $[3];
|
|
117
|
+
}
|
|
118
|
+
let t1;
|
|
119
|
+
if ($[4] !== className) {
|
|
120
|
+
t1 = withClass("oui-popover__title", className);
|
|
121
|
+
$[4] = className;
|
|
122
|
+
$[5] = t1;
|
|
123
|
+
} else t1 = $[5];
|
|
124
|
+
let t2;
|
|
125
|
+
if ($[6] !== props || $[7] !== ref || $[8] !== t1) {
|
|
126
|
+
t2 = /* @__PURE__ */ jsx(Popover.Title, {
|
|
127
|
+
ref,
|
|
128
|
+
className: t1,
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
$[6] = props;
|
|
132
|
+
$[7] = ref;
|
|
133
|
+
$[8] = t1;
|
|
134
|
+
$[9] = t2;
|
|
135
|
+
} else t2 = $[9];
|
|
136
|
+
return t2;
|
|
137
|
+
}
|
|
138
|
+
function PopoverDescription(t0) {
|
|
139
|
+
const $ = c(10);
|
|
140
|
+
let className;
|
|
141
|
+
let props;
|
|
142
|
+
let ref;
|
|
143
|
+
if ($[0] !== t0) {
|
|
144
|
+
({className, ref, ...props} = t0);
|
|
145
|
+
$[0] = t0;
|
|
146
|
+
$[1] = className;
|
|
147
|
+
$[2] = props;
|
|
148
|
+
$[3] = ref;
|
|
149
|
+
} else {
|
|
150
|
+
className = $[1];
|
|
151
|
+
props = $[2];
|
|
152
|
+
ref = $[3];
|
|
153
|
+
}
|
|
154
|
+
let t1;
|
|
155
|
+
if ($[4] !== className) {
|
|
156
|
+
t1 = withClass("oui-popover__description", className);
|
|
157
|
+
$[4] = className;
|
|
158
|
+
$[5] = t1;
|
|
159
|
+
} else t1 = $[5];
|
|
160
|
+
let t2;
|
|
161
|
+
if ($[6] !== props || $[7] !== ref || $[8] !== t1) {
|
|
162
|
+
t2 = /* @__PURE__ */ jsx(Popover.Description, {
|
|
163
|
+
ref,
|
|
164
|
+
className: t1,
|
|
165
|
+
...props
|
|
166
|
+
});
|
|
167
|
+
$[6] = props;
|
|
168
|
+
$[7] = ref;
|
|
169
|
+
$[8] = t1;
|
|
170
|
+
$[9] = t2;
|
|
171
|
+
} else t2 = $[9];
|
|
172
|
+
return t2;
|
|
173
|
+
}
|
|
174
|
+
/** Floating panel anchored to a trigger, for small forms, filters and details. */
|
|
175
|
+
var Popover$1 = {
|
|
176
|
+
Root: Popover.Root,
|
|
177
|
+
Trigger: Popover.Trigger,
|
|
178
|
+
Content: PopoverContent,
|
|
179
|
+
Title: PopoverTitle,
|
|
180
|
+
Description: PopoverDescription,
|
|
181
|
+
Close: Popover.Close
|
|
182
|
+
};
|
|
183
|
+
//#endregion
|
|
184
|
+
export { Popover$1 as Popover };
|
|
185
|
+
|
|
186
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.js","names":["Popover","BasePopover","withClass","usePortalContainer","PopoverContentProps","Popup","Props","side","Positioner","align","sideOffset","arrow","positionerProps","PopoverContent","t0","$","_c","children","className","props","ref","t1","t2","t3","undefined","container","t4","t5","t6","t7","t8","PopoverTitle","PopoverDescription","Root","Trigger","Content","Title","Description","Close","_c","BasePopover","Popover"],"sources":["../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Popover as BasePopover } from '@base-ui/react/popover';\nimport { withClass } from '../../utils/cx';\nimport { usePortalContainer } from '../../utils/portal';\n\nexport interface PopoverContentProps extends BasePopover.Popup.Props {\n side?: BasePopover.Positioner.Props['side'];\n align?: BasePopover.Positioner.Props['align'];\n sideOffset?: BasePopover.Positioner.Props['sideOffset'];\n /** Show a small arrow pointing at the trigger. */\n arrow?: boolean;\n positionerProps?: BasePopover.Positioner.Props;\n}\n\nfunction PopoverContent({\n side = 'bottom',\n align = 'center',\n sideOffset = 8,\n arrow,\n positionerProps,\n className,\n children,\n ref,\n ...props\n}: PopoverContentProps) {\n const container = usePortalContainer();\n return (\n <BasePopover.Portal container={container}>\n <BasePopover.Positioner\n className=\"oui-popover__positioner\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n {...positionerProps}\n >\n <BasePopover.Popup ref={ref} className={withClass('oui-popover', className)} {...props}>\n {arrow && <BasePopover.Arrow className=\"oui-popover__arrow\" />}\n {children}\n </BasePopover.Popup>\n </BasePopover.Positioner>\n </BasePopover.Portal>\n );\n}\n\nfunction PopoverTitle({ className, ref, ...props }: BasePopover.Title.Props) {\n return <BasePopover.Title ref={ref} className={withClass('oui-popover__title', className)} {...props} />;\n}\n\nfunction PopoverDescription({ className, ref, ...props }: BasePopover.Description.Props) {\n return <BasePopover.Description ref={ref} className={withClass('oui-popover__description', className)} {...props} />;\n}\n\n/** Floating panel anchored to a trigger, for small forms, filters and details. */\nexport const Popover = {\n Root: BasePopover.Root,\n Trigger: BasePop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AA,IAAAP,EAAA,OAAAI,SAAAJ,EAAA,OAAAK,OAAAL,EAAA,OAAAM,IAAA;EAA9FC,KAAA,oBAAAkB,QAAA,aAAA;GAA8BpB;GAAgB,WAAAC;GAAgD,GAAMF;EAAK,CAAA;EAAIJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAA7GO;AAA6G;;AAItH,IAAatB,YAAU;CACrBiC,MAAMhC,QAAYgC;CAClBC,SAASjC,QAAYiC;CACrBC,SAAStB;CACTuB,OAAOL;CACPM,aAAaL;CACbM,OAAOrC,QAAYqC;AACrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card';
|
|
2
|
+
export interface PreviewCardContentProps extends BasePreviewCard.Popup.Props {
|
|
3
|
+
side?: BasePreviewCard.Positioner.Props['side'];
|
|
4
|
+
align?: BasePreviewCard.Positioner.Props['align'];
|
|
5
|
+
sideOffset?: BasePreviewCard.Positioner.Props['sideOffset'];
|
|
6
|
+
/** Show a small arrow pointing at the trigger. */
|
|
7
|
+
arrow?: boolean;
|
|
8
|
+
positionerProps?: BasePreviewCard.Positioner.Props;
|
|
9
|
+
}
|
|
10
|
+
declare function PreviewCardContent({ side, align, sideOffset, arrow, positionerProps, className, children, ref, ...props }: PreviewCardContentProps): import("react").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Card that appears when a link is hovered or focused, previewing what is behind it.
|
|
13
|
+
* `PreviewCard.Trigger` is the link itself. Keep the content supplementary: touch users never see it.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PreviewCard: {
|
|
16
|
+
Root: <Payload>(props: BasePreviewCard.Root.Props<Payload>) => React.JSX.Element;
|
|
17
|
+
Trigger: BasePreviewCard.Trigger;
|
|
18
|
+
Content: typeof PreviewCardContent;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePortalContainer } from "../../utils/portal.js";
|
|
3
|
+
import { withClass } from "../../utils/cx.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { PreviewCard } from "@base-ui/react/preview-card";
|
|
7
|
+
//#region src/components/preview-card/PreviewCard.tsx
|
|
8
|
+
function PreviewCardContent(t0) {
|
|
9
|
+
const $ = c(29);
|
|
10
|
+
let arrow;
|
|
11
|
+
let children;
|
|
12
|
+
let className;
|
|
13
|
+
let positionerProps;
|
|
14
|
+
let props;
|
|
15
|
+
let ref;
|
|
16
|
+
let t1;
|
|
17
|
+
let t2;
|
|
18
|
+
let t3;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({side: t1, align: t2, sideOffset: t3, arrow, positionerProps, className, children, ref, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = arrow;
|
|
23
|
+
$[2] = children;
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = positionerProps;
|
|
26
|
+
$[5] = props;
|
|
27
|
+
$[6] = ref;
|
|
28
|
+
$[7] = t1;
|
|
29
|
+
$[8] = t2;
|
|
30
|
+
$[9] = t3;
|
|
31
|
+
} else {
|
|
32
|
+
arrow = $[1];
|
|
33
|
+
children = $[2];
|
|
34
|
+
className = $[3];
|
|
35
|
+
positionerProps = $[4];
|
|
36
|
+
props = $[5];
|
|
37
|
+
ref = $[6];
|
|
38
|
+
t1 = $[7];
|
|
39
|
+
t2 = $[8];
|
|
40
|
+
t3 = $[9];
|
|
41
|
+
}
|
|
42
|
+
const side = t1 === void 0 ? "bottom" : t1;
|
|
43
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
44
|
+
const sideOffset = t3 === void 0 ? 8 : t3;
|
|
45
|
+
const container = usePortalContainer();
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[10] !== className) {
|
|
48
|
+
t4 = withClass("oui-preview-card", className);
|
|
49
|
+
$[10] = className;
|
|
50
|
+
$[11] = t4;
|
|
51
|
+
} else t4 = $[11];
|
|
52
|
+
let t5;
|
|
53
|
+
if ($[12] !== arrow) {
|
|
54
|
+
t5 = arrow && /* @__PURE__ */ jsx(PreviewCard.Arrow, { className: "oui-preview-card__arrow" });
|
|
55
|
+
$[12] = arrow;
|
|
56
|
+
$[13] = t5;
|
|
57
|
+
} else t5 = $[13];
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[14] !== children || $[15] !== props || $[16] !== ref || $[17] !== t4 || $[18] !== t5) {
|
|
60
|
+
t6 = /* @__PURE__ */ jsxs(PreviewCard.Popup, {
|
|
61
|
+
ref,
|
|
62
|
+
className: t4,
|
|
63
|
+
...props,
|
|
64
|
+
children: [t5, children]
|
|
65
|
+
});
|
|
66
|
+
$[14] = children;
|
|
67
|
+
$[15] = props;
|
|
68
|
+
$[16] = ref;
|
|
69
|
+
$[17] = t4;
|
|
70
|
+
$[18] = t5;
|
|
71
|
+
$[19] = t6;
|
|
72
|
+
} else t6 = $[19];
|
|
73
|
+
let t7;
|
|
74
|
+
if ($[20] !== align || $[21] !== positionerProps || $[22] !== side || $[23] !== sideOffset || $[24] !== t6) {
|
|
75
|
+
t7 = /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
76
|
+
className: "oui-preview-card__positioner",
|
|
77
|
+
side,
|
|
78
|
+
align,
|
|
79
|
+
sideOffset,
|
|
80
|
+
...positionerProps,
|
|
81
|
+
children: t6
|
|
82
|
+
});
|
|
83
|
+
$[20] = align;
|
|
84
|
+
$[21] = positionerProps;
|
|
85
|
+
$[22] = side;
|
|
86
|
+
$[23] = sideOffset;
|
|
87
|
+
$[24] = t6;
|
|
88
|
+
$[25] = t7;
|
|
89
|
+
} else t7 = $[25];
|
|
90
|
+
let t8;
|
|
91
|
+
if ($[26] !== container || $[27] !== t7) {
|
|
92
|
+
t8 = /* @__PURE__ */ jsx(PreviewCard.Portal, {
|
|
93
|
+
container,
|
|
94
|
+
children: t7
|
|
95
|
+
});
|
|
96
|
+
$[26] = container;
|
|
97
|
+
$[27] = t7;
|
|
98
|
+
$[28] = t8;
|
|
99
|
+
} else t8 = $[28];
|
|
100
|
+
return t8;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Card that appears when a link is hovered or focused, previewing what is behind it.
|
|
104
|
+
* `PreviewCard.Trigger` is the link itself. Keep the content supplementary: touch users never see it.
|
|
105
|
+
*/
|
|
106
|
+
var PreviewCard$1 = {
|
|
107
|
+
Root: PreviewCard.Root,
|
|
108
|
+
Trigger: PreviewCard.Trigger,
|
|
109
|
+
Content: PreviewCardContent
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
112
|
+
export { PreviewCard$1 as PreviewCard };
|
|
113
|
+
|
|
114
|
+
//# sourceMappingURL=PreviewCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewCard.js","names":["PreviewCard","BasePreviewCard","withClass","usePortalContainer","PreviewCardContentProps","Popup","Props","side","Positioner","align","sideOffset","arrow","positionerProps","PreviewCardContent","t0","$","_c","children","className","props","ref","t1","t2","t3","undefined","container","t4","t5","t6","t7","t8","Root","Trigger","Content","_c","BasePreviewCard","PreviewCard"],"sources":["../../../src/components/preview-card/PreviewCard.tsx"],"sourcesContent":["import { PreviewCard as BasePreviewCard } from '@base-ui/react/preview-card';\nimport { withClass } from '../../utils/cx';\nimport { usePortalContainer } from '../../utils/portal';\n\nexport interface PreviewCardContentProps extends BasePreviewCard.Popup.Props {\n side?: BasePreviewCard.Positioner.Props['side'];\n align?: BasePreviewCard.Positioner.Props['align'];\n sideOffset?: BasePreviewCard.Positioner.Props['sideOffset'];\n /** Show a small arrow pointing at the trigger. */\n arrow?: boolean;\n positionerProps?: BasePreviewCard.Positioner.Props;\n}\n\nfunction PreviewCardContent({\n side = 'bottom',\n align = 'center',\n sideOffset = 8,\n arrow,\n positionerProps,\n className,\n children,\n ref,\n ...props\n}: PreviewCardContentProps) {\n const container = usePortalContainer();\n return (\n <BasePreviewCard.Portal container={container}>\n <BasePreviewCard.Positioner\n className=\"oui-preview-card__positioner\"\n side={side}\n align={align}\n sideOffset={sideOffset}\n {...positionerProps}\n >\n <BasePreviewCard.Popup ref={ref} className={withClass('oui-preview-card', className)} {...props}>\n {arrow && <BasePreviewCard.Arrow className=\"oui-preview-card__arrow\" />}\n {children}\n </BasePreviewCard.Popup>\n </BasePreviewCard.Positioner>\n </BasePreviewCard.Portal>\n );\n}\n\n/**\n * Card that appears when a link is hovered or focused, previewing what is behind it.\n * `PreviewCard.Trigger` is the link itself. Keep the content supplementary: touch users never see it.\n */\nexport const PreviewCard = {\n Root: BasePreviewCard.Root,\n Trigger: BasePreviewCard.Trigger,\n Content: PreviewCardContent,\n};\n"],"mappings":";;;;;;;AAaA,SAAAa,mBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAL;CAAA,IAAAM;CAAA,IAAAC;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAR,EAAA,OAAAD,IAAA;EAA4B,CAAA,CAAAP,MAAAc,IAAAZ,OAAAa,IAAAZ,YAAAa,IAAAZ,OAAAC,iBAAAM,WAAAD,UAAAG,KAAA,GAAAD,SAAAL;EAUFC,EAAA,KAAAD;EAAAC,EAAA,KAAAJ;EAAAI,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAH;EAAAG,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;CAAA,OAAA;EAAAZ,QAAAI,EAAA;EAAAE,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAH,kBAAAG,EAAA;EAAAI,QAAAJ,EAAA;EAAAK,MAAAL,EAAA;EAAAM,KAAAN,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,MAAAH;EAAAG,EAAA,MAAAR;EAAAQ,EAAA,MAAAL;EAAAK,EAAA,MAAAa;EAAAb,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,QAAAU,aAAAV,EAAA,QAAAc,IAAA;EAZ/BC,KAAA,oBAAAK,YAAA,QAAA;GAAmCV;GACjCI,UAAAA;EAYF,CAAA;EAAyBd,EAAA,MAAAU;EAAAV,EAAA,MAAAc;EAAAd,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAbzBe;AAayB;;;;;AAQ7B,IAAa9B,gBAAc;CACzB+B,MAAM9B,YAAgB8B;CACtBC,SAAS/B,YAAgB+B;CACzBC,SAASpB;AACX"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Progress as BaseProgress } from '@base-ui/react/progress';
|
|
3
|
+
import { Meter as BaseMeter } from '@base-ui/react/meter';
|
|
4
|
+
export type ProgressTone = 'accent' | 'primary' | 'success' | 'warning' | 'danger';
|
|
5
|
+
export interface ProgressProps extends BaseProgress.Root.Props {
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
showValue?: boolean;
|
|
8
|
+
tone?: ProgressTone;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
}
|
|
11
|
+
/** Task completion. Pass `value={null}` for an indeterminate bar. */
|
|
12
|
+
export declare function Progress({ label, showValue, tone, size, className, ref, ...props }: ProgressProps): React.JSX.Element;
|
|
13
|
+
export interface MeterProps extends BaseMeter.Root.Props {
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
showValue?: boolean;
|
|
16
|
+
tone?: ProgressTone;
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
}
|
|
19
|
+
/** A measurement within a known range (quota, capacity, score). */
|
|
20
|
+
export declare function Meter({ label, showValue, tone, size, className, ref, ...props }: MeterProps): React.JSX.Element;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { withClass } from "../../utils/cx.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Progress } from "@base-ui/react/progress";
|
|
7
|
+
import { Meter } from "@base-ui/react/meter";
|
|
8
|
+
//#region src/components/progress/Progress.tsx
|
|
9
|
+
/** Task completion. Pass `value={null}` for an indeterminate bar. */
|
|
10
|
+
function Progress$1(t0) {
|
|
11
|
+
const $ = c(21);
|
|
12
|
+
let className;
|
|
13
|
+
let label;
|
|
14
|
+
let props;
|
|
15
|
+
let ref;
|
|
16
|
+
let showValue;
|
|
17
|
+
let t1;
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({label, showValue, tone: t1, size: t2, className, ref, ...props} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = className;
|
|
23
|
+
$[2] = label;
|
|
24
|
+
$[3] = props;
|
|
25
|
+
$[4] = ref;
|
|
26
|
+
$[5] = showValue;
|
|
27
|
+
$[6] = t1;
|
|
28
|
+
$[7] = t2;
|
|
29
|
+
} else {
|
|
30
|
+
className = $[1];
|
|
31
|
+
label = $[2];
|
|
32
|
+
props = $[3];
|
|
33
|
+
ref = $[4];
|
|
34
|
+
showValue = $[5];
|
|
35
|
+
t1 = $[6];
|
|
36
|
+
t2 = $[7];
|
|
37
|
+
}
|
|
38
|
+
const tone = t1 === void 0 ? "accent" : t1;
|
|
39
|
+
const size = t2 === void 0 ? "md" : t2;
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[8] !== className) {
|
|
42
|
+
t3 = withClass("oui-progress", className);
|
|
43
|
+
$[8] = className;
|
|
44
|
+
$[9] = t3;
|
|
45
|
+
} else t3 = $[9];
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[10] !== label || $[11] !== showValue) {
|
|
48
|
+
t4 = (label || showValue) && /* @__PURE__ */ jsxs("div", {
|
|
49
|
+
className: "oui-progress__header",
|
|
50
|
+
children: [label && /* @__PURE__ */ jsx(Progress.Label, {
|
|
51
|
+
className: "oui-progress__label",
|
|
52
|
+
children: label
|
|
53
|
+
}), showValue && /* @__PURE__ */ jsx(Progress.Value, { className: "oui-progress__value" })]
|
|
54
|
+
});
|
|
55
|
+
$[10] = label;
|
|
56
|
+
$[11] = showValue;
|
|
57
|
+
$[12] = t4;
|
|
58
|
+
} else t4 = $[12];
|
|
59
|
+
let t5;
|
|
60
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
61
|
+
t5 = /* @__PURE__ */ jsx(Progress.Track, {
|
|
62
|
+
className: "oui-progress__track",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Progress.Indicator, { className: "oui-progress__indicator" })
|
|
64
|
+
});
|
|
65
|
+
$[13] = t5;
|
|
66
|
+
} else t5 = $[13];
|
|
67
|
+
let t6;
|
|
68
|
+
if ($[14] !== props || $[15] !== ref || $[16] !== size || $[17] !== t3 || $[18] !== t4 || $[19] !== tone) {
|
|
69
|
+
t6 = /* @__PURE__ */ jsxs(Progress.Root, {
|
|
70
|
+
ref,
|
|
71
|
+
className: t3,
|
|
72
|
+
"data-tone": tone,
|
|
73
|
+
"data-size": size,
|
|
74
|
+
...props,
|
|
75
|
+
children: [t4, t5]
|
|
76
|
+
});
|
|
77
|
+
$[14] = props;
|
|
78
|
+
$[15] = ref;
|
|
79
|
+
$[16] = size;
|
|
80
|
+
$[17] = t3;
|
|
81
|
+
$[18] = t4;
|
|
82
|
+
$[19] = tone;
|
|
83
|
+
$[20] = t6;
|
|
84
|
+
} else t6 = $[20];
|
|
85
|
+
return t6;
|
|
86
|
+
}
|
|
87
|
+
/** A measurement within a known range (quota, capacity, score). */
|
|
88
|
+
function Meter$1(t0) {
|
|
89
|
+
const $ = c(21);
|
|
90
|
+
let className;
|
|
91
|
+
let label;
|
|
92
|
+
let props;
|
|
93
|
+
let ref;
|
|
94
|
+
let t1;
|
|
95
|
+
let t2;
|
|
96
|
+
let t3;
|
|
97
|
+
if ($[0] !== t0) {
|
|
98
|
+
({label, showValue: t1, tone: t2, size: t3, className, ref, ...props} = t0);
|
|
99
|
+
$[0] = t0;
|
|
100
|
+
$[1] = className;
|
|
101
|
+
$[2] = label;
|
|
102
|
+
$[3] = props;
|
|
103
|
+
$[4] = ref;
|
|
104
|
+
$[5] = t1;
|
|
105
|
+
$[6] = t2;
|
|
106
|
+
$[7] = t3;
|
|
107
|
+
} else {
|
|
108
|
+
className = $[1];
|
|
109
|
+
label = $[2];
|
|
110
|
+
props = $[3];
|
|
111
|
+
ref = $[4];
|
|
112
|
+
t1 = $[5];
|
|
113
|
+
t2 = $[6];
|
|
114
|
+
t3 = $[7];
|
|
115
|
+
}
|
|
116
|
+
const showValue = t1 === void 0 ? true : t1;
|
|
117
|
+
const tone = t2 === void 0 ? "accent" : t2;
|
|
118
|
+
const size = t3 === void 0 ? "md" : t3;
|
|
119
|
+
let t4;
|
|
120
|
+
if ($[8] !== className) {
|
|
121
|
+
t4 = withClass("oui-progress", className);
|
|
122
|
+
$[8] = className;
|
|
123
|
+
$[9] = t4;
|
|
124
|
+
} else t4 = $[9];
|
|
125
|
+
let t5;
|
|
126
|
+
if ($[10] !== label || $[11] !== showValue) {
|
|
127
|
+
t5 = (label || showValue) && /* @__PURE__ */ jsxs("div", {
|
|
128
|
+
className: "oui-progress__header",
|
|
129
|
+
children: [label && /* @__PURE__ */ jsx(Meter.Label, {
|
|
130
|
+
className: "oui-progress__label",
|
|
131
|
+
children: label
|
|
132
|
+
}), showValue && /* @__PURE__ */ jsx(Meter.Value, { className: "oui-progress__value" })]
|
|
133
|
+
});
|
|
134
|
+
$[10] = label;
|
|
135
|
+
$[11] = showValue;
|
|
136
|
+
$[12] = t5;
|
|
137
|
+
} else t5 = $[12];
|
|
138
|
+
let t6;
|
|
139
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
140
|
+
t6 = /* @__PURE__ */ jsx(Meter.Track, {
|
|
141
|
+
className: "oui-progress__track",
|
|
142
|
+
children: /* @__PURE__ */ jsx(Meter.Indicator, { className: "oui-progress__indicator" })
|
|
143
|
+
});
|
|
144
|
+
$[13] = t6;
|
|
145
|
+
} else t6 = $[13];
|
|
146
|
+
let t7;
|
|
147
|
+
if ($[14] !== props || $[15] !== ref || $[16] !== size || $[17] !== t4 || $[18] !== t5 || $[19] !== tone) {
|
|
148
|
+
t7 = /* @__PURE__ */ jsxs(Meter.Root, {
|
|
149
|
+
ref,
|
|
150
|
+
className: t4,
|
|
151
|
+
"data-tone": tone,
|
|
152
|
+
"data-size": size,
|
|
153
|
+
...props,
|
|
154
|
+
children: [t5, t6]
|
|
155
|
+
});
|
|
156
|
+
$[14] = props;
|
|
157
|
+
$[15] = ref;
|
|
158
|
+
$[16] = size;
|
|
159
|
+
$[17] = t4;
|
|
160
|
+
$[18] = t5;
|
|
161
|
+
$[19] = tone;
|
|
162
|
+
$[20] = t7;
|
|
163
|
+
} else t7 = $[20];
|
|
164
|
+
return t7;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
export { Meter$1 as Meter, Progress$1 as Progress };
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["React","Progress","BaseProgress","Meter","BaseMeter","withClass","ProgressTone","ProgressProps","Root","Props","label","ReactNode","showValue","tone","size","t0","$","_c","className","props","ref","t1","t2","undefined","t3","t4","t5","Symbol","for","t6","MeterProps","t7","Progress","_c","BaseProgress","Meter","BaseMeter"],"sources":["../../../src/components/progress/Progress.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Progress as BaseProgress } from '@base-ui/react/progress';\nimport { Meter as BaseMeter } from '@base-ui/react/meter';\nimport { withClass } from '../../utils/cx';\n\nexport type ProgressTone = 'accent' | 'primary' | 'success' | 'warning' | 'danger';\n\nexport interface ProgressProps extends BaseProgress.Root.Props {\n label?: React.ReactNode;\n showValue?: boolean;\n tone?: ProgressTone;\n size?: 'sm' | 'md' | 'lg';\n}\n\n/** Task completion. Pass `value={null}` for an indeterminate bar. */\nexport function Progress({ label, showValue, tone = 'accent', size = 'md', className, ref, ...props }: ProgressProps) {\n return (\n <BaseProgress.Root\n ref={ref}\n className={withClass('oui-progress', className)}\n data-tone={tone}\n data-size={size}\n {...props}\n >\n {(label || showValue) && (\n <div className=\"oui-progress__header\">\n {label && <BaseProgress.Label className=\"oui-progress__label\">{label}</BaseProgress.Label>}\n {showValue && <BaseProgress.Value className=\"oui-progress__value\" />}\n </div>\n )}\n <BaseProgress.Track className=\"oui-progress__track\">\n <BaseProgress.Indicator className=\"oui-progress__indicator\" />\n </BaseProgress.Track>\n </BaseProgress.Root>\n );\n}\n\nexport interface MeterProps extends BaseMeter.Root.Props {\n label?: React.ReactNode;\n showValue?: boolean;\n tone?: ProgressTone;\n size?: 'sm' | 'md' | 'lg';\n}\n\n/** A measurement within a known range (quota, capacity, score). */\nexport function Meter({ label, showValue = true, tone = 'accent', size = 'md', className, ref, ...props }: MeterProps) {\n return (\n <BaseMeter.Root\n ref={ref}\n className={withClass('oui-progress', className)}\n data-tone={tone}\n data-size={size}\n {...props}\n >\n {(label || showValue) && (\n <div className=\"oui-progress__header\">\n {label && <BaseMeter.Label className=\"oui-progress__label\">{label}</BaseMeter.Label>}\n {showValue && <BaseMeter.Value className=\"oui-progress__value\" />}\n </div>\n )}\n <BaseMeter.Track className=\"oui-progress__track\">\n <BaseMeter.Indicator className=\"oui-progress__indicator\" />\n </BaseMeter.Track>\n </BaseMeter.Root>\n );\n}\n"],"mappings":";;;;;;;;;AAeA,SAAOC,WAAAc,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAS;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAA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EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OAhBjBe;AAgBiB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area';
|
|
2
|
+
export interface ScrollAreaProps extends BaseScrollArea.Root.Props {
|
|
3
|
+
/** Which scrollbars to render. */
|
|
4
|
+
scrollbars?: 'vertical' | 'horizontal' | 'both';
|
|
5
|
+
viewportProps?: BaseScrollArea.Viewport.Props;
|
|
6
|
+
}
|
|
7
|
+
/** Scroll container with slim, themed overlay scrollbars. Set a height or max-height. */
|
|
8
|
+
export declare function ScrollArea({ scrollbars, viewportProps, className, children, ref, ...props }: ScrollAreaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { withClass } from "../../utils/cx.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
6
|
+
//#region src/components/scroll-area/ScrollArea.tsx
|
|
7
|
+
/** Scroll container with slim, themed overlay scrollbars. Set a height or max-height. */
|
|
8
|
+
function ScrollArea$1(t0) {
|
|
9
|
+
const $ = c(29);
|
|
10
|
+
let children;
|
|
11
|
+
let className;
|
|
12
|
+
let props;
|
|
13
|
+
let ref;
|
|
14
|
+
let t1;
|
|
15
|
+
let viewportProps;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({scrollbars: t1, viewportProps, className, children, ref, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = children;
|
|
20
|
+
$[2] = className;
|
|
21
|
+
$[3] = props;
|
|
22
|
+
$[4] = ref;
|
|
23
|
+
$[5] = t1;
|
|
24
|
+
$[6] = viewportProps;
|
|
25
|
+
} else {
|
|
26
|
+
children = $[1];
|
|
27
|
+
className = $[2];
|
|
28
|
+
props = $[3];
|
|
29
|
+
ref = $[4];
|
|
30
|
+
t1 = $[5];
|
|
31
|
+
viewportProps = $[6];
|
|
32
|
+
}
|
|
33
|
+
const scrollbars = t1 === void 0 ? "vertical" : t1;
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[7] !== className) {
|
|
36
|
+
t2 = withClass("oui-scroll-area", className);
|
|
37
|
+
$[7] = className;
|
|
38
|
+
$[8] = t2;
|
|
39
|
+
} else t2 = $[8];
|
|
40
|
+
const t3 = viewportProps?.className;
|
|
41
|
+
let t4;
|
|
42
|
+
if ($[9] !== t3) {
|
|
43
|
+
t4 = withClass("oui-scroll-area__viewport", t3);
|
|
44
|
+
$[9] = t3;
|
|
45
|
+
$[10] = t4;
|
|
46
|
+
} else t4 = $[10];
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[11] !== children || $[12] !== t4 || $[13] !== viewportProps) {
|
|
49
|
+
t5 = /* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
50
|
+
...viewportProps,
|
|
51
|
+
className: t4,
|
|
52
|
+
children
|
|
53
|
+
});
|
|
54
|
+
$[11] = children;
|
|
55
|
+
$[12] = t4;
|
|
56
|
+
$[13] = viewportProps;
|
|
57
|
+
$[14] = t5;
|
|
58
|
+
} else t5 = $[14];
|
|
59
|
+
let t6;
|
|
60
|
+
if ($[15] !== scrollbars) {
|
|
61
|
+
t6 = scrollbars !== "horizontal" && /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
62
|
+
orientation: "vertical",
|
|
63
|
+
className: "oui-scroll-area__scrollbar",
|
|
64
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "oui-scroll-area__thumb" })
|
|
65
|
+
});
|
|
66
|
+
$[15] = scrollbars;
|
|
67
|
+
$[16] = t6;
|
|
68
|
+
} else t6 = $[16];
|
|
69
|
+
let t7;
|
|
70
|
+
if ($[17] !== scrollbars) {
|
|
71
|
+
t7 = scrollbars !== "vertical" && /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
72
|
+
orientation: "horizontal",
|
|
73
|
+
className: "oui-scroll-area__scrollbar",
|
|
74
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "oui-scroll-area__thumb" })
|
|
75
|
+
});
|
|
76
|
+
$[17] = scrollbars;
|
|
77
|
+
$[18] = t7;
|
|
78
|
+
} else t7 = $[18];
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[19] !== scrollbars) {
|
|
81
|
+
t8 = scrollbars === "both" && /* @__PURE__ */ jsx(ScrollArea.Corner, {});
|
|
82
|
+
$[19] = scrollbars;
|
|
83
|
+
$[20] = t8;
|
|
84
|
+
} else t8 = $[20];
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[21] !== props || $[22] !== ref || $[23] !== t2 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8) {
|
|
87
|
+
t9 = /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
88
|
+
ref,
|
|
89
|
+
className: t2,
|
|
90
|
+
...props,
|
|
91
|
+
children: [
|
|
92
|
+
t5,
|
|
93
|
+
t6,
|
|
94
|
+
t7,
|
|
95
|
+
t8
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
$[21] = props;
|
|
99
|
+
$[22] = ref;
|
|
100
|
+
$[23] = t2;
|
|
101
|
+
$[24] = t5;
|
|
102
|
+
$[25] = t6;
|
|
103
|
+
$[26] = t7;
|
|
104
|
+
$[27] = t8;
|
|
105
|
+
$[28] = t9;
|
|
106
|
+
} else t9 = $[28];
|
|
107
|
+
return t9;
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { ScrollArea$1 as ScrollArea };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=ScrollArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollArea.js","names":["ScrollArea","BaseScrollArea","withClass","ScrollAreaProps","Root","Props","scrollbars","viewportProps","Viewport","t0","$","_c","children","className","props","ref","t1","undefined","t2","t3","t4","t5","t6","t7","t8","t9","ScrollArea","_c","BaseScrollArea"],"sources":["../../../src/components/scroll-area/ScrollArea.tsx"],"sourcesContent":["import { ScrollArea as BaseScrollArea } from '@base-ui/react/scroll-area';\nimport { withClass } from '../../utils/cx';\n\nexport interface ScrollAreaProps extends BaseScrollArea.Root.Props {\n /** Which scrollbars to render. */\n scrollbars?: 'vertical' | 'horizontal' | 'both';\n viewportProps?: BaseScrollArea.Viewport.Props;\n}\n\n/** Scroll container with slim, themed overlay scrollbars. Set a height or max-height. */\nexport function ScrollArea({\n scrollbars = 'vertical',\n viewportProps,\n className,\n children,\n ref,\n ...props\n}: ScrollAreaProps) {\n return (\n <BaseScrollArea.Root ref={ref} className={withClass('oui-scroll-area', className)} {...props}>\n <BaseScrollArea.Viewport\n {...viewportProps}\n className={withClass('oui-scroll-area__viewport', viewportProps?.className)}\n >\n {children}\n </BaseScrollArea.Viewport>\n {scrollbars !== 'horizontal' && (\n <BaseScrollArea.Scrollbar orientation=\"vertical\" className=\"oui-scroll-area__scrollbar\">\n <BaseScrollArea.Thumb className=\"oui-scroll-area__thumb\" />\n </BaseScrollArea.Scrollbar>\n )}\n {scrollbars !== 'vertical' && (\n <BaseScrollArea.Scrollbar orientation=\"horizontal\" className=\"oui-scroll-area__scrollbar\">\n <BaseScrollArea.Thumb className=\"oui-scroll-area__thumb\" />\n </BaseScrollArea.Scrollbar>\n )}\n {scrollbars === 'both' && <BaseScrollArea.Corner />}\n </BaseScrollArea.Root>\n );\n}\n"],"mappings":";;;;;;;AAUA,SAAOA,aAAAS,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAT;CAAA,IAAAG,EAAA,OAAAD,IAAA;EAAoB,CAAA,CAAAH,YAAAU,IAAAT,eAAAM,WAAAD,UAAAG,KAAA,GAAAD,SAAAL;EAOTC,EAAA,KAAAD;EAAAC,E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