@avenue-ticketing/ui 0.10.0 → 0.12.0-beta.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 +47 -0
- package/dist/badge-types-B67wcd4m.d.ts +22 -0
- package/dist/react/app-store-buttons-outline.d.ts +17 -0
- package/dist/react/app-store-buttons-outline.js +582 -0
- package/dist/react/app-store-buttons-outline.js.map +1 -0
- package/dist/react/app-store-buttons.d.ts +20 -0
- package/dist/react/app-store-buttons.js +817 -0
- package/dist/react/app-store-buttons.js.map +1 -0
- package/dist/react/avatar-label-group.d.ts +14 -0
- package/dist/react/avatar-label-group.js +183 -0
- package/dist/react/avatar-label-group.js.map +1 -0
- package/dist/react/avatar-profile-photo.d.ts +9 -0
- package/dist/react/avatar-profile-photo.js +202 -0
- package/dist/react/avatar-profile-photo.js.map +1 -0
- package/dist/react/avatar.d.ts +66 -40
- package/dist/react/avatar.js +159 -149
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/badge-groups.d.ts +25 -0
- package/dist/react/badge-groups.js +162 -0
- package/dist/react/badge-groups.js.map +1 -0
- package/dist/react/badge.d.ts +123 -59
- package/dist/react/badge.js +314 -86
- package/dist/react/badge.js.map +1 -1
- package/dist/react/button-group.d.ts +43 -0
- package/dist/react/button-group.js +108 -0
- package/dist/react/button-group.js.map +1 -0
- package/dist/react/button-utility.d.ts +47 -0
- package/dist/react/button-utility.js +158 -0
- package/dist/react/button-utility.js.map +1 -0
- package/dist/react/button.d.ts +112 -37
- package/dist/react/button.js +270 -55
- package/dist/react/button.js.map +1 -1
- package/dist/react/checkbox.d.ts +25 -8
- package/dist/react/checkbox.js +112 -110
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/close-button.d.ts +25 -0
- package/dist/react/close-button.js +54 -0
- package/dist/react/close-button.js.map +1 -0
- package/dist/react/combobox.d.ts +17 -0
- package/dist/react/combobox.js +322 -0
- package/dist/react/combobox.js.map +1 -0
- package/dist/react/dialog.d.ts +15 -15
- package/dist/react/dialog.js +43 -108
- package/dist/react/dialog.js.map +1 -1
- package/dist/react/dropdown-account-breadcrumb.d.ts +5 -0
- package/dist/react/dropdown-account-breadcrumb.js +319 -0
- package/dist/react/dropdown-account-breadcrumb.js.map +1 -0
- package/dist/react/dropdown-account-button.d.ts +5 -0
- package/dist/react/dropdown-account-button.js +773 -0
- package/dist/react/dropdown-account-button.js.map +1 -0
- package/dist/react/dropdown-account-card-md.d.ts +5 -0
- package/dist/react/dropdown-account-card-md.js +549 -0
- package/dist/react/dropdown-account-card-md.js.map +1 -0
- package/dist/react/dropdown-account-card-sm.d.ts +5 -0
- package/dist/react/dropdown-account-card-sm.js +527 -0
- package/dist/react/dropdown-account-card-sm.js.map +1 -0
- package/dist/react/dropdown-account-card-xs.d.ts +5 -0
- package/dist/react/dropdown-account-card-xs.js +507 -0
- package/dist/react/dropdown-account-card-xs.js.map +1 -0
- package/dist/react/dropdown-avatar.d.ts +5 -0
- package/dist/react/dropdown-avatar.js +790 -0
- package/dist/react/dropdown-avatar.js.map +1 -0
- package/dist/react/dropdown-button-advanced.d.ts +5 -0
- package/dist/react/dropdown-button-advanced.js +799 -0
- package/dist/react/dropdown-button-advanced.js.map +1 -0
- package/dist/react/dropdown-button-link.d.ts +5 -0
- package/dist/react/dropdown-button-link.js +501 -0
- package/dist/react/dropdown-button-link.js.map +1 -0
- package/dist/react/dropdown-button-simple.d.ts +5 -0
- package/dist/react/dropdown-button-simple.js +754 -0
- package/dist/react/dropdown-button-simple.js.map +1 -0
- package/dist/react/dropdown-icon-advanced.d.ts +5 -0
- package/dist/react/dropdown-icon-advanced.js +543 -0
- package/dist/react/dropdown-icon-advanced.js.map +1 -0
- package/dist/react/dropdown-icon-simple.d.ts +5 -0
- package/dist/react/dropdown-icon-simple.js +505 -0
- package/dist/react/dropdown-icon-simple.js.map +1 -0
- package/dist/react/dropdown-integration.d.ts +5 -0
- package/dist/react/dropdown-integration.js +1325 -0
- package/dist/react/dropdown-integration.js.map +1 -0
- package/dist/react/dropdown-search-advanced.d.ts +5 -0
- package/dist/react/dropdown-search-advanced.js +998 -0
- package/dist/react/dropdown-search-advanced.js.map +1 -0
- package/dist/react/dropdown-search-simple.d.ts +5 -0
- package/dist/react/dropdown-search-simple.js +960 -0
- package/dist/react/dropdown-search-simple.js.map +1 -0
- package/dist/react/dropdown.d.ts +32 -133
- package/dist/react/dropdown.js +404 -1351
- package/dist/react/dropdown.js.map +1 -1
- package/dist/react/file-upload-trigger.d.ts +34 -0
- package/dist/react/file-upload-trigger.js +39 -0
- package/dist/react/file-upload-trigger.js.map +1 -0
- package/dist/react/form.d.ts +10 -0
- package/dist/react/form.js +11 -0
- package/dist/react/form.js.map +1 -0
- package/dist/react/hint-text.d.ts +17 -0
- package/dist/react/hint-text.js +36 -0
- package/dist/react/hint-text.js.map +1 -0
- package/dist/react/hook-form.d.ts +35 -0
- package/dist/react/hook-form.js +50 -0
- package/dist/react/hook-form.js.map +1 -0
- package/dist/react/input-date.d.ts +43 -0
- package/dist/react/input-date.js +306 -0
- package/dist/react/input-date.js.map +1 -0
- package/dist/react/input-file.d.ts +45 -0
- package/dist/react/input-file.js +748 -0
- package/dist/react/input-file.js.map +1 -0
- package/dist/react/input-group.d.ts +37 -0
- package/dist/react/input-group.js +251 -0
- package/dist/react/input-group.js.map +1 -0
- package/dist/react/input-number.d.ts +32 -0
- package/dist/react/input-number.js +553 -0
- package/dist/react/input-number.js.map +1 -0
- package/dist/react/input-payment.d.ts +16 -0
- package/dist/react/input-payment.js +593 -0
- package/dist/react/input-payment.js.map +1 -0
- package/dist/react/input-tags-outer.d.ts +53 -0
- package/dist/react/input-tags-outer.js +607 -0
- package/dist/react/input-tags-outer.js.map +1 -0
- package/dist/react/input-tags.d.ts +53 -0
- package/dist/react/input-tags.js +565 -0
- package/dist/react/input-tags.js.map +1 -0
- package/dist/react/input.d.ts +71 -22
- package/dist/react/input.js +332 -45
- package/dist/react/input.js.map +1 -1
- package/dist/react/label.d.ts +18 -0
- package/dist/react/label.js +112 -0
- package/dist/react/label.js.map +1 -0
- package/dist/react/multi-select.d.ts +89 -0
- package/dist/react/multi-select.js +1036 -0
- package/dist/react/multi-select.js.map +1 -0
- package/dist/react/pin-input.d.ts +59 -0
- package/dist/react/pin-input.js +229 -0
- package/dist/react/pin-input.js.map +1 -0
- package/dist/react/popover.d.ts +7 -73
- package/dist/react/popover.js +23 -569
- package/dist/react/popover.js.map +1 -1
- package/dist/react/progress-circle.d.ts +9 -0
- package/dist/react/progress-circle.js +36 -0
- package/dist/react/progress-circle.js.map +1 -0
- package/dist/react/progress-circles.d.ts +14 -0
- package/dist/react/progress-circles.js +160 -0
- package/dist/react/progress-circles.js.map +1 -0
- package/dist/react/progress-indicators.d.ts +52 -0
- package/dist/react/progress-indicators.js +78 -0
- package/dist/react/progress-indicators.js.map +1 -0
- package/dist/react/radio-buttons.d.ts +35 -0
- package/dist/react/radio-buttons.js +116 -0
- package/dist/react/radio-buttons.js.map +1 -0
- package/dist/react/scroll-header.d.ts +6 -0
- package/dist/react/scroll-header.js +42 -61
- package/dist/react/scroll-header.js.map +1 -1
- package/dist/react/scroll-wheel.d.ts +4 -5
- package/dist/react/scroll-wheel.js +19 -15
- package/dist/react/scroll-wheel.js.map +1 -1
- package/dist/react/select-item.d.ts +13 -0
- package/dist/react/select-item.js +336 -0
- package/dist/react/select-item.js.map +1 -0
- package/dist/react/select-native.d.ts +17 -0
- package/dist/react/select-native.js +203 -0
- package/dist/react/select-native.js.map +1 -0
- package/dist/react/select.d.ts +18 -61
- package/dist/react/select.js +625 -923
- package/dist/react/select.js.map +1 -1
- package/dist/react/sheet.d.ts +19 -19
- package/dist/react/sheet.js +97 -219
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/slider.d.ts +15 -0
- package/dist/react/slider.js +66 -0
- package/dist/react/slider.js.map +1 -0
- package/dist/react/social-button.d.ts +55 -0
- package/dist/react/social-button.js +263 -0
- package/dist/react/social-button.js.map +1 -0
- package/dist/react/social-logos.d.ts +20 -0
- package/dist/react/social-logos.js +131 -0
- package/dist/react/social-logos.js.map +1 -0
- package/dist/react/switch.d.ts +21 -36
- package/dist/react/switch.js +121 -109
- package/dist/react/switch.js.map +1 -1
- package/dist/react/tag-select.d.ts +44 -0
- package/dist/react/tag-select.js +1062 -0
- package/dist/react/tag-select.js.map +1 -0
- package/dist/react/tags.d.ts +30 -0
- package/dist/react/tags.js +228 -0
- package/dist/react/tags.js.map +1 -0
- package/dist/react/textarea.d.ts +40 -4
- package/dist/react/textarea.js +193 -27
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/tooltip.d.ts +30 -43
- package/dist/react/tooltip.js +65 -521
- package/dist/react/tooltip.js.map +1 -1
- package/dist/select-shared-B3Y5SMXU.d.ts +62 -0
- package/package.json +28 -21
- package/source.css +2 -12
- package/theme.css +883 -79
- package/dist/react/calendar.d.ts +0 -13
- package/dist/react/calendar.js +0 -4639
- package/dist/react/calendar.js.map +0 -1
- package/dist/react/card.d.ts +0 -11
- package/dist/react/card.js +0 -113
- package/dist/react/card.js.map +0 -1
- package/dist/react/datetime-picker.d.ts +0 -21
- package/dist/react/datetime-picker.js +0 -6142
- package/dist/react/datetime-picker.js.map +0 -1
- package/dist/react/pagination.d.ts +0 -28
- package/dist/react/pagination.js +0 -262
- package/dist/react/pagination.js.map +0 -1
- package/dist/react/table-pagination.d.ts +0 -15
- package/dist/react/table-pagination.js +0 -1247
- package/dist/react/table-pagination.js.map +0 -1
- package/dist/react/table-view/column-menu.d.ts +0 -15
- package/dist/react/table-view/column-menu.js +0 -1049
- package/dist/react/table-view/column-menu.js.map +0 -1
- package/dist/react/table-view/index.d.ts +0 -70
- package/dist/react/table-view/index.js +0 -2284
- package/dist/react/table-view/index.js.map +0 -1
- package/dist/react/table.d.ts +0 -86
- package/dist/react/table.js +0 -414
- package/dist/react/table.js.map +0 -1
- package/dist/react/tabs.d.ts +0 -34
- package/dist/react/tabs.js +0 -423
- package/dist/react/tabs.js.map +0 -1
- package/dist/react/time-picker.d.ts +0 -22
- package/dist/react/time-picker.js +0 -856
- package/dist/react/time-picker.js.map +0 -1
|
@@ -0,0 +1,799 @@
|
|
|
1
|
+
import { createContext, useState, isValidElement, useCallback, useRef, useLayoutEffect } from 'react';
|
|
2
|
+
import { ArrowLeftIcon } from '@phosphor-icons/react/dist/csr/ArrowLeft';
|
|
3
|
+
import { ArrowRightIcon } from '@phosphor-icons/react/dist/csr/ArrowRight';
|
|
4
|
+
import { CaretDownIcon } from '@phosphor-icons/react/dist/csr/CaretDown';
|
|
5
|
+
import { CodeIcon } from '@phosphor-icons/react/dist/csr/Code';
|
|
6
|
+
import { CopyIcon } from '@phosphor-icons/react/dist/csr/Copy';
|
|
7
|
+
import { CubeIcon } from '@phosphor-icons/react/dist/csr/Cube';
|
|
8
|
+
import { DownloadSimpleIcon } from '@phosphor-icons/react/dist/csr/DownloadSimple';
|
|
9
|
+
import { PencilLineIcon } from '@phosphor-icons/react/dist/csr/PencilLine';
|
|
10
|
+
import { ArrowCounterClockwiseIcon } from '@phosphor-icons/react/dist/csr/ArrowCounterClockwise';
|
|
11
|
+
import { ScissorsIcon } from '@phosphor-icons/react/dist/csr/Scissors';
|
|
12
|
+
import { StarIcon } from '@phosphor-icons/react/dist/csr/Star';
|
|
13
|
+
import { MenuTrigger, MenuSection, SubmenuTrigger, Link, Button as Button$1, Popover, Menu, MenuItem, Separator } from 'react-aria-components';
|
|
14
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
15
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import { CheckIcon } from '@phosphor-icons/react/dist/csr/Check';
|
|
17
|
+
import { CaretRightIcon } from '@phosphor-icons/react/dist/csr/CaretRight';
|
|
18
|
+
import '@phosphor-icons/react/dist/csr/DotsThreeVertical';
|
|
19
|
+
import { UserIcon } from '@phosphor-icons/react/dist/csr/User';
|
|
20
|
+
import '@phosphor-icons/react/dist/csr/Plus';
|
|
21
|
+
|
|
22
|
+
var twMerge = extendTailwindMerge({
|
|
23
|
+
extend: {
|
|
24
|
+
theme: {
|
|
25
|
+
text: ["display-xs", "display-sm", "display-md", "display-lg", "display-xl", "display-2xl"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var cx = twMerge;
|
|
30
|
+
function sortCx(classes) {
|
|
31
|
+
return classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ../../utils/is-react-component.ts
|
|
35
|
+
var isFunctionComponent = (component) => {
|
|
36
|
+
return typeof component === "function";
|
|
37
|
+
};
|
|
38
|
+
var isClassComponent = (component) => {
|
|
39
|
+
return typeof component === "function" && component.prototype && (!!component.prototype.isReactComponent || !!component.prototype.render);
|
|
40
|
+
};
|
|
41
|
+
var isForwardRefComponent = (component) => {
|
|
42
|
+
return typeof component === "object" && component !== null && component.$$typeof.toString() === "Symbol(react.forward_ref)";
|
|
43
|
+
};
|
|
44
|
+
var isReactComponent = (component) => {
|
|
45
|
+
return isFunctionComponent(component) || isForwardRefComponent(component) || isClassComponent(component);
|
|
46
|
+
};
|
|
47
|
+
var focusShadowPlain = "focus-visible:outline-none focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
48
|
+
var focusShadowSkeuomorphic = "focus-visible:outline-none focus-visible:[box-shadow:var(--shadow-xs-skeuomorphic),0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
49
|
+
var skeuomorphicGradientBorderClass = [
|
|
50
|
+
"ring-1 ring-inset ring-transparent",
|
|
51
|
+
"before:pointer-events-none before:absolute before:inset-px before:rounded-[inherit] before:border before:border-[#ffffff1f] before:content-['']",
|
|
52
|
+
"before:[mask-image:linear-gradient(to_bottom,#000,transparent)]"
|
|
53
|
+
].join(" ");
|
|
54
|
+
var skeuomorphicShadowClass = ["shadow-xs-skeuomorphic", focusShadowSkeuomorphic, "overflow-hidden"].join(" ");
|
|
55
|
+
var focusShadowSecondary = "focus-visible:outline-none focus-visible:[box-shadow:0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
56
|
+
var secondaryInnerShadow = "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:content-[''] after:[box-shadow:inset_0px_-1px_0px_0px_rgba(0,0,0,0.05)]";
|
|
57
|
+
var secondaryShadowClass = ["relative overflow-hidden shadow-xs", secondaryInnerShadow, focusShadowSecondary].join(" ");
|
|
58
|
+
var inputNumberButtonClass = [
|
|
59
|
+
"in-data-number-input:border-0 in-data-number-input:shadow-none in-data-number-input:!rounded-none in-data-number-input:!h-full in-data-number-input:!min-h-0 in-data-number-input:self-stretch in-data-number-input:overflow-hidden",
|
|
60
|
+
"in-data-number-input:before:hidden in-data-number-input:after:hidden",
|
|
61
|
+
"in-data-number-input:focus-visible:outline-none in-data-number-input:focus-visible:shadow-none in-data-number-input:focus-visible:ring-0 in-data-number-input:focus-visible:![box-shadow:none]"
|
|
62
|
+
].join(" ");
|
|
63
|
+
var inputAddonButtonClass = [
|
|
64
|
+
"in-data-input-wrapper:border-0 in-data-input-wrapper:shadow-none in-data-input-wrapper:!rounded-none in-data-input-wrapper:overflow-hidden",
|
|
65
|
+
"in-data-input-wrapper:in-data-trailing:border-l in-data-input-wrapper:in-data-trailing:border-solid in-data-input-wrapper:in-data-trailing:border-primary",
|
|
66
|
+
"in-data-input-wrapper:in-data-leading:border-r in-data-input-wrapper:in-data-leading:border-solid in-data-input-wrapper:in-data-leading:border-primary",
|
|
67
|
+
"in-data-input-wrapper:group-invalid:in-data-trailing:border-error_subtle in-data-input-wrapper:group-invalid:in-data-leading:border-error_subtle",
|
|
68
|
+
"in-data-input-wrapper:before:hidden in-data-input-wrapper:after:hidden",
|
|
69
|
+
"in-data-input-wrapper:focus-visible:outline-none in-data-input-wrapper:focus-visible:shadow-none in-data-input-wrapper:focus-visible:ring-0 in-data-input-wrapper:focus-visible:![box-shadow:none]"
|
|
70
|
+
].join(" ");
|
|
71
|
+
var styles = sortCx({
|
|
72
|
+
common: {
|
|
73
|
+
root: [
|
|
74
|
+
"group relative inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-full font-body outline-none before:absolute",
|
|
75
|
+
"font-semibold transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-out",
|
|
76
|
+
"pressed:scale-[0.985] pressed:duration-100 pressed:ease-linear motion-reduce:pressed:scale-100",
|
|
77
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed in-data-input-wrapper:disabled:opacity-100",
|
|
78
|
+
inputAddonButtonClass,
|
|
79
|
+
inputNumberButtonClass,
|
|
80
|
+
// Stretch to InputGroup row height; padding/typography follow `data-input-size` on the field (Figma 85:1269).
|
|
81
|
+
"in-data-input-wrapper:!h-full in-data-input-wrapper:!min-h-0 in-data-input-wrapper:self-stretch",
|
|
82
|
+
"in-data-input-wrapper:in-data-[input-size=sm]:gap-1 in-data-input-wrapper:in-data-[input-size=sm]:px-3 in-data-input-wrapper:in-data-[input-size=sm]:py-2 in-data-input-wrapper:in-data-[input-size=sm]:text-sm",
|
|
83
|
+
"in-data-input-wrapper:in-data-[input-size=md]:gap-1 in-data-input-wrapper:in-data-[input-size=md]:px-3.5 in-data-input-wrapper:in-data-[input-size=md]:py-2.5 in-data-input-wrapper:in-data-[input-size=md]:text-sm",
|
|
84
|
+
"in-data-input-wrapper:in-data-[input-size=lg]:gap-1.5 in-data-input-wrapper:in-data-[input-size=lg]:px-4 in-data-input-wrapper:in-data-[input-size=lg]:py-2.5 in-data-input-wrapper:in-data-[input-size=lg]:text-md",
|
|
85
|
+
"*:data-icon:pointer-events-none *:data-icon:shrink-0 *:data-icon:transition-inherit-all"
|
|
86
|
+
].join(" "),
|
|
87
|
+
icon: "pointer-events-none shrink-0 transition-inherit-all"
|
|
88
|
+
},
|
|
89
|
+
sizes: {
|
|
90
|
+
xs: {
|
|
91
|
+
root: [
|
|
92
|
+
"h-8 min-h-8 gap-1 px-[0.625rem] py-1.5 text-sm data-icon-only:size-8 data-icon-only:min-h-8 data-icon-only:min-w-8 data-icon-only:p-2",
|
|
93
|
+
"in-data-input-wrapper:data-icon-only:p-2.5",
|
|
94
|
+
"*:data-icon:size-4"
|
|
95
|
+
].join(" "),
|
|
96
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-3"
|
|
97
|
+
},
|
|
98
|
+
sm: {
|
|
99
|
+
root: [
|
|
100
|
+
"h-9 min-h-9 gap-1 px-3 py-2 text-sm data-icon-only:size-9 data-icon-only:min-h-9 data-icon-only:min-w-9 data-icon-only:p-2",
|
|
101
|
+
"in-data-input-wrapper:data-icon-only:p-2.5",
|
|
102
|
+
"*:data-icon:size-5"
|
|
103
|
+
].join(" "),
|
|
104
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-3"
|
|
105
|
+
},
|
|
106
|
+
md: {
|
|
107
|
+
root: [
|
|
108
|
+
"h-10 min-h-10 gap-1 px-3.5 py-2.5 text-sm data-icon-only:size-10 data-icon-only:min-h-10 data-icon-only:min-w-10 data-icon-only:p-2.5",
|
|
109
|
+
"in-data-input-wrapper:data-icon-only:p-3",
|
|
110
|
+
"*:data-icon:size-5"
|
|
111
|
+
].join(" "),
|
|
112
|
+
linkRoot: "h-auto min-h-0 gap-1 px-0! py-0! text-sm *:data-text:underline-offset-4"
|
|
113
|
+
},
|
|
114
|
+
lg: {
|
|
115
|
+
root: "h-11 min-h-11 gap-1.5 px-4 py-2.5 text-md data-icon-only:size-11 data-icon-only:min-h-11 data-icon-only:min-w-11 data-icon-only:p-3 *:data-icon:size-5",
|
|
116
|
+
linkRoot: "h-auto min-h-0 gap-1.5 px-0! py-0! text-md *:data-text:underline-offset-4"
|
|
117
|
+
},
|
|
118
|
+
xl: {
|
|
119
|
+
root: "h-12 min-h-12 gap-1.5 px-[1.125rem] py-3 text-md data-icon-only:size-12 data-icon-only:min-h-12 data-icon-only:min-w-12 data-icon-only:p-3 data-icon-only:*:data-icon:size-6 *:data-icon:size-5",
|
|
120
|
+
linkRoot: "h-auto min-h-0 gap-1.5 px-0! py-0! text-md *:data-text:underline-offset-4"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
colors: {
|
|
124
|
+
/** Figma Hierarchy=Primary — dark neutral solid; hover lightens to fg-tertiary_hover (#404040). */
|
|
125
|
+
primary: {
|
|
126
|
+
root: [
|
|
127
|
+
"bg-primary-solid text-white",
|
|
128
|
+
skeuomorphicShadowClass,
|
|
129
|
+
skeuomorphicGradientBorderClass,
|
|
130
|
+
"hover:bg-fg-tertiary_hover dark:hover:bg-quaternary",
|
|
131
|
+
"disabled:opacity-30",
|
|
132
|
+
"data-loading:bg-fg-tertiary_hover dark:data-loading:bg-quaternary",
|
|
133
|
+
"*:data-icon:not([data-icon=loading]):text-white/70"
|
|
134
|
+
].join(" ")
|
|
135
|
+
},
|
|
136
|
+
/** Figma Hierarchy=Brand — purple solid; hover darkens to bg-brand-solid_hover (#6d28d9). */
|
|
137
|
+
brand: {
|
|
138
|
+
root: [
|
|
139
|
+
"bg-brand-solid text-primary_on-brand",
|
|
140
|
+
skeuomorphicShadowClass,
|
|
141
|
+
skeuomorphicGradientBorderClass,
|
|
142
|
+
"hover:bg-brand-solid_hover",
|
|
143
|
+
"disabled:opacity-50",
|
|
144
|
+
"data-loading:bg-brand-solid_hover",
|
|
145
|
+
"*:data-icon:not([data-icon=loading]):text-primary_on-brand"
|
|
146
|
+
].join(" ")
|
|
147
|
+
},
|
|
148
|
+
/** Figma Hierarchy=Secondary — border-primary + shadow-xs + skeuomorphic inner rim overlay. */
|
|
149
|
+
secondary: {
|
|
150
|
+
root: [
|
|
151
|
+
"border border-solid border-primary bg-primary text-secondary",
|
|
152
|
+
secondaryShadowClass,
|
|
153
|
+
"hover:bg-primary_hover hover:text-secondary_hover",
|
|
154
|
+
"disabled:opacity-50",
|
|
155
|
+
"data-loading:bg-primary_hover",
|
|
156
|
+
"*:data-icon:text-fg-secondary hover:*:data-icon:text-fg-quaternary_hover"
|
|
157
|
+
].join(" ")
|
|
158
|
+
},
|
|
159
|
+
/** Figma Hierarchy=Tertiary */
|
|
160
|
+
tertiary: {
|
|
161
|
+
root: [
|
|
162
|
+
"border border-transparent bg-transparent text-tertiary",
|
|
163
|
+
focusShadowPlain,
|
|
164
|
+
"hover:bg-primary_hover hover:text-tertiary_hover",
|
|
165
|
+
"disabled:opacity-50",
|
|
166
|
+
"*:data-icon:text-fg-tertiary hover:*:data-icon:text-fg-quaternary_hover"
|
|
167
|
+
].join(" ")
|
|
168
|
+
},
|
|
169
|
+
/** Figma Hierarchy=Link color — text + icons share brand-secondary; hover underlines with fg-brand-secondary. */
|
|
170
|
+
"link-color": {
|
|
171
|
+
root: [
|
|
172
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-brand-secondary shadow-none",
|
|
173
|
+
focusShadowPlain,
|
|
174
|
+
"hover:text-brand-secondary_hover",
|
|
175
|
+
"disabled:opacity-50",
|
|
176
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-fg-brand-secondary"
|
|
177
|
+
].join(" ")
|
|
178
|
+
},
|
|
179
|
+
/** Figma Hierarchy=Link gray — text + icons share tertiary; hover underlines with fg-quaternary. */
|
|
180
|
+
"link-gray": {
|
|
181
|
+
root: [
|
|
182
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-tertiary shadow-none",
|
|
183
|
+
focusShadowPlain,
|
|
184
|
+
"hover:text-tertiary_hover",
|
|
185
|
+
"disabled:opacity-50",
|
|
186
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-fg-quaternary"
|
|
187
|
+
].join(" ")
|
|
188
|
+
},
|
|
189
|
+
"primary-destructive": {
|
|
190
|
+
root: [
|
|
191
|
+
"bg-error-solid text-white",
|
|
192
|
+
skeuomorphicShadowClass,
|
|
193
|
+
skeuomorphicGradientBorderClass,
|
|
194
|
+
"hover:bg-error-solid_hover",
|
|
195
|
+
"disabled:opacity-50",
|
|
196
|
+
"data-loading:bg-error-solid_hover",
|
|
197
|
+
"*:data-icon:not([data-icon=loading]):text-white/70"
|
|
198
|
+
].join(" ")
|
|
199
|
+
},
|
|
200
|
+
"secondary-destructive": {
|
|
201
|
+
root: [
|
|
202
|
+
"border border-solid border-primary bg-primary text-error-primary",
|
|
203
|
+
secondaryShadowClass,
|
|
204
|
+
"hover:bg-error-primary hover:text-error-primary_hover",
|
|
205
|
+
"disabled:opacity-50",
|
|
206
|
+
"data-loading:bg-error-primary",
|
|
207
|
+
"*:data-icon:text-fg-error-secondary hover:*:data-icon:text-fg-error-primary"
|
|
208
|
+
].join(" ")
|
|
209
|
+
},
|
|
210
|
+
"tertiary-destructive": {
|
|
211
|
+
root: [
|
|
212
|
+
"border border-transparent bg-transparent text-error-primary",
|
|
213
|
+
focusShadowPlain,
|
|
214
|
+
"hover:bg-error-primary hover:text-error-primary_hover",
|
|
215
|
+
"disabled:opacity-50",
|
|
216
|
+
"*:data-icon:text-fg-error-secondary hover:*:data-icon:text-fg-error-primary"
|
|
217
|
+
].join(" ")
|
|
218
|
+
},
|
|
219
|
+
/** Figma Hierarchy=Link (destructive) — text + icons share error-primary; hover underlines. */
|
|
220
|
+
"link-destructive": {
|
|
221
|
+
root: [
|
|
222
|
+
"h-auto min-h-0 border-0 bg-transparent px-0! py-0! text-error-primary shadow-none",
|
|
223
|
+
focusShadowPlain,
|
|
224
|
+
"hover:text-error-primary_hover",
|
|
225
|
+
"disabled:opacity-50",
|
|
226
|
+
"*:data-text:underline *:data-text:decoration-transparent *:data-text:decoration-solid hover:*:data-text:decoration-current"
|
|
227
|
+
].join(" ")
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
var Button = ({
|
|
232
|
+
size = "md",
|
|
233
|
+
color = "primary",
|
|
234
|
+
children,
|
|
235
|
+
className,
|
|
236
|
+
noTextPadding,
|
|
237
|
+
iconLeading: IconLeading,
|
|
238
|
+
iconTrailing: IconTrailing,
|
|
239
|
+
isDisabled: disabled,
|
|
240
|
+
isLoading: loading,
|
|
241
|
+
showTextWhileLoading,
|
|
242
|
+
...props
|
|
243
|
+
}) => {
|
|
244
|
+
const href = "href" in props ? props.href : void 0;
|
|
245
|
+
const isIcon = (IconLeading || IconTrailing) && !children;
|
|
246
|
+
const isLinkType = ["link-gray", "link-color", "link-destructive"].includes(color);
|
|
247
|
+
noTextPadding = isLinkType || noTextPadding;
|
|
248
|
+
const commonChildren = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
249
|
+
isValidElement(IconLeading) && IconLeading,
|
|
250
|
+
isReactComponent(IconLeading) && /* @__PURE__ */ jsx(IconLeading, { "data-icon": "leading", className: styles.common.icon }),
|
|
251
|
+
loading && /* @__PURE__ */ jsx(
|
|
252
|
+
"svg",
|
|
253
|
+
{
|
|
254
|
+
fill: "none",
|
|
255
|
+
"data-icon": "loading",
|
|
256
|
+
viewBox: "0 0 256 256",
|
|
257
|
+
"aria-hidden": true,
|
|
258
|
+
className: cx(
|
|
259
|
+
styles.common.icon,
|
|
260
|
+
"size-5 animate-spin",
|
|
261
|
+
!showTextWhileLoading && "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
262
|
+
),
|
|
263
|
+
children: /* @__PURE__ */ jsx(
|
|
264
|
+
"path",
|
|
265
|
+
{
|
|
266
|
+
fill: "currentColor",
|
|
267
|
+
d: "M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60,61.46,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20-66.54-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"
|
|
268
|
+
}
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
children && /* @__PURE__ */ jsx("span", { "data-text": true, className: cx("transition-inherit-all", !noTextPadding && !isLinkType && "px-0.5"), children }),
|
|
273
|
+
isValidElement(IconTrailing) && IconTrailing,
|
|
274
|
+
isReactComponent(IconTrailing) && /* @__PURE__ */ jsx(IconTrailing, { "data-icon": "trailing", className: styles.common.icon })
|
|
275
|
+
] });
|
|
276
|
+
const commonProps = {
|
|
277
|
+
"data-icon-only": isIcon ? true : void 0,
|
|
278
|
+
"data-loading": loading ? true : void 0,
|
|
279
|
+
...props,
|
|
280
|
+
isDisabled: disabled || loading,
|
|
281
|
+
className: cx(
|
|
282
|
+
styles.common.root,
|
|
283
|
+
styles.sizes[size].root,
|
|
284
|
+
styles.colors[color].root,
|
|
285
|
+
isLinkType && styles.sizes[size].linkRoot,
|
|
286
|
+
(loading || href && (disabled || loading)) && "pointer-events-none",
|
|
287
|
+
loading && (showTextWhileLoading ? "[&>*:not([data-icon=loading]):not([data-text])]:hidden" : "[&>*:not([data-icon=loading])]:invisible"),
|
|
288
|
+
className
|
|
289
|
+
),
|
|
290
|
+
children: commonChildren
|
|
291
|
+
};
|
|
292
|
+
if ("href" in commonProps) {
|
|
293
|
+
return /* @__PURE__ */ jsx(Link, { ...commonProps, href: disabled || loading ? void 0 : href });
|
|
294
|
+
}
|
|
295
|
+
return /* @__PURE__ */ jsx(Button$1, { ...commonProps, type: commonProps.type || "button", isPending: loading });
|
|
296
|
+
};
|
|
297
|
+
var sizes = {
|
|
298
|
+
xs: "size-1.5",
|
|
299
|
+
sm: "size-2",
|
|
300
|
+
md: "size-2.5",
|
|
301
|
+
lg: "size-3",
|
|
302
|
+
xl: "size-3.5",
|
|
303
|
+
"2xl": "size-4",
|
|
304
|
+
"3xl": "size-4.5",
|
|
305
|
+
"4xl": "size-5"
|
|
306
|
+
};
|
|
307
|
+
var AvatarOnlineIndicator = ({ size, status, className }) => /* @__PURE__ */ jsx(
|
|
308
|
+
"span",
|
|
309
|
+
{
|
|
310
|
+
className: cx(
|
|
311
|
+
"absolute right-0 bottom-0 flex justify-center rounded-full ring-[1.5px] ring-bg-primary",
|
|
312
|
+
status === "online" ? "bg-fg-success-secondary" : "bg-utility-neutral-300",
|
|
313
|
+
sizes[size],
|
|
314
|
+
className
|
|
315
|
+
),
|
|
316
|
+
style: {
|
|
317
|
+
backgroundImage: "radial-gradient(43.75% 43.75% at 50% 28.75%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.00) 100%), radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.00) 74.66%, rgba(255, 255, 255, 0.18) 100%), radial-gradient(75% 75% at 50% 0%, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.00) 50%, rgba(255, 255, 255, 0.08) 99%, rgba(255, 255, 255, 0.00) 100%)"
|
|
318
|
+
},
|
|
319
|
+
children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 7.2 2.85", fill: "none", className: "mt-[10%] h-[20%] w-[60%]", children: [
|
|
320
|
+
/* @__PURE__ */ jsx(
|
|
321
|
+
"path",
|
|
322
|
+
{
|
|
323
|
+
d: "M7.2 1.83107C7.2 2.84235 5.58823 2.19729 3.6 2.19729C1.61177 2.19729 0 2.84235 0 1.83107C0 0.8198 1.61177 0 3.6 0C5.58823 0 7.2 0.8198 7.2 1.83107Z",
|
|
324
|
+
fill: "url(#reflection-gradient)",
|
|
325
|
+
fillOpacity: "0.4"
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "reflection-gradient", x1: "3.6", y1: "0", x2: "3.6", y2: "2.4", gradientUnits: "userSpaceOnUse", children: [
|
|
329
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "white" }),
|
|
330
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0.1" })
|
|
331
|
+
] }) })
|
|
332
|
+
] })
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
var sizes2 = {
|
|
336
|
+
xs: "size-2.5",
|
|
337
|
+
sm: "size-3",
|
|
338
|
+
md: "size-3.5",
|
|
339
|
+
lg: "size-4",
|
|
340
|
+
xl: "size-4.5",
|
|
341
|
+
"2xl": "size-5",
|
|
342
|
+
"3xl": "size-6",
|
|
343
|
+
"4xl": "size-8"
|
|
344
|
+
};
|
|
345
|
+
var VerifiedTick = ({ size, className }) => /* @__PURE__ */ jsxs("svg", { className: cx("z-10 text-utility-blue-500", sizes2[size], className), viewBox: "0 0 10 10", fill: "none", children: [
|
|
346
|
+
/* @__PURE__ */ jsx(
|
|
347
|
+
"path",
|
|
348
|
+
{
|
|
349
|
+
d: "M7.72237 1.77098C7.81734 2.00068 7.99965 2.18326 8.2292 2.27858L9.03413 2.61199C9.26384 2.70714 9.44635 2.88965 9.5415 3.11936C9.63665 3.34908 9.63665 3.60718 9.5415 3.83689L9.20833 4.64125C9.11313 4.87106 9.113 5.12943 9.20863 5.35913L9.54122 6.16325C9.58839 6.27702 9.61268 6.39897 9.6127 6.52214C9.61272 6.6453 9.58847 6.76726 9.54134 6.88105C9.4942 6.99484 9.42511 7.09823 9.33801 7.18531C9.2509 7.27238 9.14749 7.34144 9.03369 7.38854L8.22934 7.72171C7.99964 7.81669 7.81706 7.99899 7.72174 8.22855L7.38833 9.03348C7.29318 9.26319 7.11067 9.4457 6.88096 9.54085C6.65124 9.636 6.39314 9.636 6.16343 9.54085L5.35907 9.20767C5.12935 9.11276 4.87134 9.11295 4.64177 9.20821L3.83684 9.54115C3.60725 9.63608 3.34937 9.636 3.11984 9.54092C2.89032 9.44585 2.70791 9.26356 2.6127 9.03409L2.27918 8.22892C2.18421 7.99923 2.0019 7.81665 1.77235 7.72133L0.967421 7.38792C0.737807 7.29281 0.555355 7.11041 0.460169 6.88083C0.364983 6.65125 0.364854 6.39327 0.45981 6.16359L0.792984 5.35924C0.8879 5.12952 0.887707 4.87151 0.792445 4.64193L0.459749 3.83642C0.41258 3.72265 0.388291 3.60069 0.388272 3.47753C0.388252 3.35436 0.412501 3.2324 0.459634 3.11861C0.506767 3.00482 0.57586 2.90144 0.662965 2.81436C0.75007 2.72728 0.853479 2.65822 0.967283 2.61113L1.77164 2.27795C2.00113 2.18306 2.1836 2.00099 2.27899 1.7717L2.6124 0.966768C2.70755 0.737054 2.89006 0.554547 3.11978 0.459397C3.34949 0.364246 3.60759 0.364246 3.83731 0.459397L4.64166 0.792571C4.87138 0.887487 5.12939 0.887293 5.35897 0.792031L6.16424 0.459913C6.39392 0.364816 6.65197 0.364836 6.88164 0.459968C7.11131 0.555099 7.29379 0.737554 7.38895 0.967208L7.72247 1.77238L7.72237 1.77098Z",
|
|
350
|
+
className: "fill-current"
|
|
351
|
+
}
|
|
352
|
+
),
|
|
353
|
+
/* @__PURE__ */ jsx(
|
|
354
|
+
"path",
|
|
355
|
+
{
|
|
356
|
+
fillRule: "evenodd",
|
|
357
|
+
clipRule: "evenodd",
|
|
358
|
+
d: "M6.95829 3.68932C7.02509 3.58439 7.04747 3.45723 7.02051 3.3358C6.99356 3.21437 6.91946 3.10862 6.81454 3.04182C6.70961 2.97502 6.58245 2.95264 6.46102 2.97959C6.33959 3.00655 6.23384 3.08064 6.16704 3.18557L4.33141 6.06995L3.49141 5.01995C3.41375 4.92281 3.30069 4.8605 3.17709 4.84673C3.05349 4.83296 2.92949 4.86885 2.83235 4.94651C2.73522 5.02417 2.67291 5.13723 2.65914 5.26083C2.64536 5.38443 2.68125 5.50843 2.75891 5.60557L4.00891 7.16807C4.0555 7.22638 4.11533 7.27271 4.18344 7.30323C4.25154 7.33375 4.32595 7.34757 4.40047 7.34353C4.47499 7.3395 4.54747 7.31773 4.61188 7.28004C4.67629 7.24234 4.73077 7.18981 4.77079 7.12682L6.95829 3.68932Z",
|
|
359
|
+
fill: "white"
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
] });
|
|
363
|
+
var AvatarCount = ({ count, className }) => /* @__PURE__ */ jsx("div", { className: cx("absolute right-0 bottom-0 p-px", className), children: /* @__PURE__ */ jsx("div", { className: "flex size-3.5 items-center justify-center rounded-full bg-fg-error-primary text-center text-[10px] leading-[13px] font-bold text-white", children: count }) });
|
|
364
|
+
var styles2 = {
|
|
365
|
+
xs: { root: "size-6", rootWithBorder: "p-px", initials: "text-xs font-semibold", icon: "size-4" },
|
|
366
|
+
sm: { root: "size-8", rootWithBorder: "p-px", initials: "text-sm font-semibold", icon: "size-5" },
|
|
367
|
+
md: { root: "size-10", rootWithBorder: "p-px", initials: "text-md font-semibold", icon: "size-6" },
|
|
368
|
+
lg: { root: "size-12", rootWithBorder: "p-[1.5px]", initials: "text-lg font-semibold", icon: "size-7" },
|
|
369
|
+
xl: { root: "size-14", rootWithBorder: "p-0.5", initials: "text-xl font-semibold", icon: "size-8" },
|
|
370
|
+
"2xl": { root: "size-16", rootWithBorder: "p-0.5", initials: "text-display-xs font-semibold", icon: "size-8" }
|
|
371
|
+
};
|
|
372
|
+
var Avatar = ({
|
|
373
|
+
size = "md",
|
|
374
|
+
src,
|
|
375
|
+
alt,
|
|
376
|
+
initials,
|
|
377
|
+
placeholder,
|
|
378
|
+
placeholderIcon: PlaceholderIcon,
|
|
379
|
+
border,
|
|
380
|
+
badge,
|
|
381
|
+
status,
|
|
382
|
+
verified,
|
|
383
|
+
count,
|
|
384
|
+
focusable = false,
|
|
385
|
+
rounded = true,
|
|
386
|
+
className,
|
|
387
|
+
contentClassName
|
|
388
|
+
}) => {
|
|
389
|
+
const [isFailed, setIsFailed] = useState(false);
|
|
390
|
+
const canShowImage = src && !isFailed;
|
|
391
|
+
const renderMainContent = () => {
|
|
392
|
+
if (canShowImage) {
|
|
393
|
+
return /* @__PURE__ */ jsx("img", { "data-avatar-img": true, className: "size-full object-cover", src, alt, onError: () => setIsFailed(true) });
|
|
394
|
+
}
|
|
395
|
+
if (initials) {
|
|
396
|
+
return /* @__PURE__ */ jsx("span", { className: cx("text-quaternary", styles2[size].initials), children: initials });
|
|
397
|
+
}
|
|
398
|
+
if (PlaceholderIcon) {
|
|
399
|
+
return /* @__PURE__ */ jsx(PlaceholderIcon, { className: cx("text-fg-quaternary", styles2[size].icon) });
|
|
400
|
+
}
|
|
401
|
+
return placeholder || /* @__PURE__ */ jsx(UserIcon, { className: cx("text-fg-quaternary", styles2[size].icon) });
|
|
402
|
+
};
|
|
403
|
+
const renderBadgeContent = () => {
|
|
404
|
+
if (status) {
|
|
405
|
+
return /* @__PURE__ */ jsx(AvatarOnlineIndicator, { status, size });
|
|
406
|
+
}
|
|
407
|
+
if (verified) {
|
|
408
|
+
return /* @__PURE__ */ jsx(VerifiedTick, { size, className: cx("absolute right-0 bottom-0", size === "xs" && "-right-px -bottom-px") });
|
|
409
|
+
}
|
|
410
|
+
if (count) {
|
|
411
|
+
return /* @__PURE__ */ jsx(AvatarCount, { count });
|
|
412
|
+
}
|
|
413
|
+
return badge;
|
|
414
|
+
};
|
|
415
|
+
return /* @__PURE__ */ jsxs(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
"data-avatar": true,
|
|
419
|
+
className: cx(
|
|
420
|
+
"relative inline-flex shrink-0 rounded-[7px]",
|
|
421
|
+
rounded && "rounded-full",
|
|
422
|
+
// Focus styles
|
|
423
|
+
focusable && "outline-none group-focus-visible:[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]",
|
|
424
|
+
border && "ring-1 ring-secondary_alt",
|
|
425
|
+
border && styles2[size].rootWithBorder,
|
|
426
|
+
styles2[size].root,
|
|
427
|
+
className
|
|
428
|
+
),
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ jsx(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
className: cx(
|
|
434
|
+
"relative inline-flex size-full shrink-0 items-center justify-center overflow-hidden rounded-md bg-tertiary outline-[0.5px] -outline-offset-[0.5px] outline-black/16 before:inset-[0.5px]",
|
|
435
|
+
rounded && "rounded-full",
|
|
436
|
+
canShowImage && size !== "xs" && "before:absolute before:inset-0 before:rounded-[inherit] before:border before:border-white/32 before:mask-[linear-gradient(to_bottom,black_0%,transparent_25%,transparent_75%,black_100%)]",
|
|
437
|
+
contentClassName
|
|
438
|
+
),
|
|
439
|
+
children: renderMainContent()
|
|
440
|
+
}
|
|
441
|
+
),
|
|
442
|
+
renderBadgeContent()
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
);
|
|
446
|
+
};
|
|
447
|
+
var CHECKBOX_TICK_DELAY_MS = 60;
|
|
448
|
+
var CHECKBOX_TICK_DRAW_MS = 100;
|
|
449
|
+
function CheckboxAnimatedCheckMark({ className }) {
|
|
450
|
+
const pathRef = useRef(null);
|
|
451
|
+
useLayoutEffect(() => {
|
|
452
|
+
const path = pathRef.current;
|
|
453
|
+
if (!path || typeof path.getTotalLength !== "function") return;
|
|
454
|
+
const len = path.getTotalLength();
|
|
455
|
+
if (len <= 0) return;
|
|
456
|
+
path.style.strokeDasharray = `${len}`;
|
|
457
|
+
path.style.strokeDashoffset = `${len}`;
|
|
458
|
+
if (typeof path.animate !== "function") {
|
|
459
|
+
path.style.strokeDashoffset = "0";
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
const anim = path.animate([{ strokeDashoffset: len }, { strokeDashoffset: 0 }], {
|
|
463
|
+
duration: CHECKBOX_TICK_DRAW_MS,
|
|
464
|
+
delay: CHECKBOX_TICK_DELAY_MS,
|
|
465
|
+
easing: "cubic-bezier(0.45, 0, 0.2, 1)",
|
|
466
|
+
fill: "forwards"
|
|
467
|
+
});
|
|
468
|
+
return () => anim.cancel();
|
|
469
|
+
}, []);
|
|
470
|
+
return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 14 14", fill: "none", className: cx("block shrink-0", className), children: /* @__PURE__ */ jsx(
|
|
471
|
+
"path",
|
|
472
|
+
{
|
|
473
|
+
ref: pathRef,
|
|
474
|
+
d: "M2.33325 7L5.24992 9.91667L11.6666 3.5",
|
|
475
|
+
stroke: "currentColor",
|
|
476
|
+
strokeWidth: "2",
|
|
477
|
+
strokeLinecap: "round",
|
|
478
|
+
strokeLinejoin: "round"
|
|
479
|
+
}
|
|
480
|
+
) });
|
|
481
|
+
}
|
|
482
|
+
var focusRingShadow = "outline-none [box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
483
|
+
var CheckboxBase = ({ className, isSelected, isDisabled, isIndeterminate, size = "sm", isFocusVisible = false }) => {
|
|
484
|
+
const isChecked = isSelected || isIndeterminate;
|
|
485
|
+
const iconClassName = size === "sm" ? "size-2.5" : "size-3.5";
|
|
486
|
+
return /* @__PURE__ */ jsxs(
|
|
487
|
+
"div",
|
|
488
|
+
{
|
|
489
|
+
className: cx(
|
|
490
|
+
"relative flex shrink-0 cursor-pointer appearance-none items-center justify-center border border-solid border-primary",
|
|
491
|
+
size === "sm" ? "size-4 rounded-xs" : "size-5 rounded-sm",
|
|
492
|
+
isChecked ? "border-transparent bg-brand-solid" : "bg-primary",
|
|
493
|
+
isDisabled && "cursor-not-allowed opacity-50",
|
|
494
|
+
isDisabled && !isChecked && "bg-tertiary",
|
|
495
|
+
isFocusVisible && !isDisabled && focusRingShadow,
|
|
496
|
+
className
|
|
497
|
+
),
|
|
498
|
+
children: [
|
|
499
|
+
isIndeterminate && /* @__PURE__ */ jsx(
|
|
500
|
+
"svg",
|
|
501
|
+
{
|
|
502
|
+
"aria-hidden": "true",
|
|
503
|
+
viewBox: "0 0 14 14",
|
|
504
|
+
fill: "none",
|
|
505
|
+
className: cx("pointer-events-none block shrink-0 text-fg-white", iconClassName),
|
|
506
|
+
children: /* @__PURE__ */ jsx("path", { d: "M2.91675 7H11.0834", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
507
|
+
}
|
|
508
|
+
),
|
|
509
|
+
isSelected && !isIndeterminate && /* @__PURE__ */ jsx(CheckboxAnimatedCheckMark, { className: cx("pointer-events-none text-fg-white", iconClassName) })
|
|
510
|
+
]
|
|
511
|
+
}
|
|
512
|
+
);
|
|
513
|
+
};
|
|
514
|
+
CheckboxBase.displayName = "CheckboxBase";
|
|
515
|
+
var RADIO_DOT_DELAY_MS = 60;
|
|
516
|
+
var RADIO_DOT_POP_MS = 100;
|
|
517
|
+
function RadioAnimatedDot({ className }) {
|
|
518
|
+
const dotRef = useRef(null);
|
|
519
|
+
useLayoutEffect(() => {
|
|
520
|
+
const dot = dotRef.current;
|
|
521
|
+
if (!dot) return;
|
|
522
|
+
if (typeof dot.animate !== "function") {
|
|
523
|
+
dot.style.opacity = "1";
|
|
524
|
+
dot.style.transform = "scale(1)";
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
const anim = dot.animate(
|
|
528
|
+
[
|
|
529
|
+
{ opacity: 0, transform: "scale(0)" },
|
|
530
|
+
{ opacity: 1, transform: "scale(1)" }
|
|
531
|
+
],
|
|
532
|
+
{
|
|
533
|
+
duration: RADIO_DOT_POP_MS,
|
|
534
|
+
delay: RADIO_DOT_DELAY_MS,
|
|
535
|
+
easing: "cubic-bezier(0.45, 0, 0.2, 1)",
|
|
536
|
+
fill: "forwards"
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
return () => anim.cancel();
|
|
540
|
+
}, []);
|
|
541
|
+
return /* @__PURE__ */ jsx("div", { ref: dotRef, "aria-hidden": "true", className: cx("rounded-full bg-fg-white", className), style: { opacity: 0, transform: "scale(0)" } });
|
|
542
|
+
}
|
|
543
|
+
var focusRingShadow2 = "outline-none [box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
544
|
+
createContext(null);
|
|
545
|
+
var RadioButtonBase = ({ className, isFocusVisible, isSelected, isDisabled, size = "sm" }) => {
|
|
546
|
+
const dotClassName = size === "sm" ? "size-1.5" : "size-2";
|
|
547
|
+
return /* @__PURE__ */ jsx(
|
|
548
|
+
"div",
|
|
549
|
+
{
|
|
550
|
+
className: cx(
|
|
551
|
+
"relative flex shrink-0 cursor-pointer appearance-none items-center justify-center overflow-clip rounded-full border border-solid border-primary bg-primary",
|
|
552
|
+
size === "sm" ? "size-4" : "size-5",
|
|
553
|
+
isSelected && "border-transparent bg-brand-solid",
|
|
554
|
+
isDisabled && "cursor-not-allowed opacity-50",
|
|
555
|
+
isDisabled && !isSelected && "bg-tertiary",
|
|
556
|
+
isFocusVisible && !isDisabled && focusRingShadow2,
|
|
557
|
+
className
|
|
558
|
+
),
|
|
559
|
+
children: isSelected && /* @__PURE__ */ jsx(RadioAnimatedDot, { className: cx("pointer-events-none", dotClassName) })
|
|
560
|
+
}
|
|
561
|
+
);
|
|
562
|
+
};
|
|
563
|
+
RadioButtonBase.displayName = "RadioButtonBase";
|
|
564
|
+
var focusRingShadow3 = "outline-none [box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
565
|
+
var ToggleBase = ({ className, isHovered, isDisabled, isFocusVisible, isSelected, slim, size = "sm" }) => {
|
|
566
|
+
const styles3 = {
|
|
567
|
+
default: {
|
|
568
|
+
sm: {
|
|
569
|
+
track: "h-5 w-9 p-0.5",
|
|
570
|
+
thumb: "size-4",
|
|
571
|
+
thumbPosition: isSelected ? "left-[calc(100%-1rem-0.125rem)]" : "left-0.5"
|
|
572
|
+
},
|
|
573
|
+
md: {
|
|
574
|
+
track: "h-6 w-11 p-0.5",
|
|
575
|
+
thumb: "size-5",
|
|
576
|
+
thumbPosition: isSelected ? "left-[calc(100%-1.25rem-0.125rem)]" : "left-0.5"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
slim: {
|
|
580
|
+
sm: {
|
|
581
|
+
track: "h-4 w-8",
|
|
582
|
+
thumb: "size-4",
|
|
583
|
+
thumbPosition: isSelected ? "left-4" : "left-0"
|
|
584
|
+
},
|
|
585
|
+
md: {
|
|
586
|
+
track: "h-5 w-10",
|
|
587
|
+
thumb: "size-5",
|
|
588
|
+
thumbPosition: isSelected ? "left-5" : "left-0"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
const classes = slim ? styles3.slim[size] : styles3.default[size];
|
|
593
|
+
const offTrackBackground = (() => {
|
|
594
|
+
if (isDisabled) return "bg-tertiary";
|
|
595
|
+
if (isHovered) return slim ? "bg-tertiary" : "bg-brand-primary";
|
|
596
|
+
return "bg-quaternary";
|
|
597
|
+
})();
|
|
598
|
+
return /* @__PURE__ */ jsx(
|
|
599
|
+
"div",
|
|
600
|
+
{
|
|
601
|
+
className: cx(
|
|
602
|
+
"relative inline-flex shrink-0 cursor-pointer overflow-clip rounded-full outline-none transition duration-150 ease-linear",
|
|
603
|
+
!isSelected && offTrackBackground,
|
|
604
|
+
!slim && "ring-[0.5px] ring-secondary ring-inset",
|
|
605
|
+
slim && "ring-1 ring-secondary ring-inset",
|
|
606
|
+
isSelected && "bg-brand-solid",
|
|
607
|
+
isSelected && isHovered && "bg-brand-solid_hover",
|
|
608
|
+
isSelected && "ring-transparent",
|
|
609
|
+
isDisabled && "cursor-not-allowed opacity-50",
|
|
610
|
+
isFocusVisible && !isDisabled && focusRingShadow3,
|
|
611
|
+
classes.track,
|
|
612
|
+
className
|
|
613
|
+
),
|
|
614
|
+
children: /* @__PURE__ */ jsx(
|
|
615
|
+
"div",
|
|
616
|
+
{
|
|
617
|
+
className: cx(
|
|
618
|
+
"absolute rounded-full bg-fg-white shadow-sm transition-[left] duration-150 ease-in-out",
|
|
619
|
+
slim ? "top-0 shadow-xs" : "top-0.5",
|
|
620
|
+
slim && "border border-toggle-border",
|
|
621
|
+
slim && isSelected && "border-toggle-slim-border_pressed",
|
|
622
|
+
slim && isSelected && isHovered && "border-toggle-slim-border_pressed-hover",
|
|
623
|
+
classes.thumb,
|
|
624
|
+
classes.thumbPosition
|
|
625
|
+
)
|
|
626
|
+
}
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
};
|
|
631
|
+
var focusShadowInset = "[box-shadow:0px_0px_0px_2px_var(--color-bg-primary),0px_0px_0px_4px_var(--color-focus-ring)]";
|
|
632
|
+
var DropdownItem = ({ label, children, addon, icon: Icon, avatarUrl, unstyled, selectionIndicator = "checkmark", ...props }) => {
|
|
633
|
+
const SelectionIndicator = useCallback(
|
|
634
|
+
(state) => {
|
|
635
|
+
if (selectionIndicator === "checkmark") {
|
|
636
|
+
return /* @__PURE__ */ jsx(
|
|
637
|
+
CheckIcon,
|
|
638
|
+
{
|
|
639
|
+
"aria-hidden": "true",
|
|
640
|
+
className: cx("size-4 shrink-0 stroke-[2.25px] text-fg-brand-primary", !state.isSelected && "invisible", state.className)
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
if (selectionIndicator === "checkbox") {
|
|
645
|
+
return /* @__PURE__ */ jsx(
|
|
646
|
+
CheckboxBase,
|
|
647
|
+
{
|
|
648
|
+
isSelected: state.isSelected && !state.hasSubmenu,
|
|
649
|
+
isIndeterminate: state.isSelected && state.hasSubmenu,
|
|
650
|
+
size: "sm",
|
|
651
|
+
className: cx("shrink-0", state.className)
|
|
652
|
+
}
|
|
653
|
+
);
|
|
654
|
+
}
|
|
655
|
+
if (selectionIndicator === "radio") {
|
|
656
|
+
return /* @__PURE__ */ jsx(RadioButtonBase, { isSelected: state.isSelected, className: cx("shrink-0", state.className) });
|
|
657
|
+
}
|
|
658
|
+
if (selectionIndicator === "toggle") {
|
|
659
|
+
return /* @__PURE__ */ jsx(ToggleBase, { slim: true, size: "sm", isSelected: state.isSelected, className: cx("shrink-0", state.className) });
|
|
660
|
+
}
|
|
661
|
+
return null;
|
|
662
|
+
},
|
|
663
|
+
[selectionIndicator]
|
|
664
|
+
);
|
|
665
|
+
if (unstyled) {
|
|
666
|
+
return /* @__PURE__ */ jsx(MenuItem, { id: label, textValue: label, ...props });
|
|
667
|
+
}
|
|
668
|
+
return /* @__PURE__ */ jsx(
|
|
669
|
+
MenuItem,
|
|
670
|
+
{
|
|
671
|
+
...props,
|
|
672
|
+
className: (state) => cx(
|
|
673
|
+
"group block cursor-pointer px-1.5 py-px outline-hidden",
|
|
674
|
+
state.isDisabled && "cursor-not-allowed opacity-50",
|
|
675
|
+
typeof props.className === "function" ? props.className(state) : props.className
|
|
676
|
+
),
|
|
677
|
+
children: (state) => /* @__PURE__ */ jsxs(
|
|
678
|
+
"div",
|
|
679
|
+
{
|
|
680
|
+
className: cx(
|
|
681
|
+
"relative flex items-center rounded-md px-2.5 py-2 transition duration-100 ease-linear",
|
|
682
|
+
!state.isDisabled && "group-hover:bg-primary_hover",
|
|
683
|
+
state.isFocused && "bg-primary_hover",
|
|
684
|
+
state.isFocusVisible && focusShadowInset,
|
|
685
|
+
state.hasSubmenu && "pr-1.5"
|
|
686
|
+
),
|
|
687
|
+
children: [
|
|
688
|
+
state.selectionMode !== "none" && !avatarUrl && !Icon && /* @__PURE__ */ jsx(SelectionIndicator, { ...state, className: "mr-2" }),
|
|
689
|
+
avatarUrl && /* @__PURE__ */ jsx("div", { className: "mr-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(Avatar, { "aria-hidden": "true", size: "xs", src: avatarUrl, alt: label, className: "size-5" }) }),
|
|
690
|
+
Icon && /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", className: "mr-2 size-4 shrink-0 stroke-[2.25px] text-fg-quaternary" }),
|
|
691
|
+
/* @__PURE__ */ jsx("span", { className: cx("grow truncate text-sm font-semibold text-secondary", state.isFocused && "text-secondary_hover"), children: label || (typeof children === "function" ? children(state) : children) }),
|
|
692
|
+
addon && /* @__PURE__ */ jsx("span", { className: "ml-1 shrink-0 pr-1 text-xs font-medium text-quaternary", children: addon }),
|
|
693
|
+
state.selectionMode !== "none" && (avatarUrl || Icon) && /* @__PURE__ */ jsx(SelectionIndicator, { ...state, className: "ml-1" }),
|
|
694
|
+
state.hasSubmenu && /* @__PURE__ */ jsx(CaretRightIcon, { "aria-hidden": "true", className: "ml-auto size-4 shrink-0 stroke-[2.25px] text-fg-quaternary" })
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
}
|
|
699
|
+
);
|
|
700
|
+
};
|
|
701
|
+
var DropdownMenu = (props) => {
|
|
702
|
+
return /* @__PURE__ */ jsx(
|
|
703
|
+
Menu,
|
|
704
|
+
{
|
|
705
|
+
...props,
|
|
706
|
+
className: (state) => cx("h-min overflow-y-auto py-1 outline-hidden select-none", typeof props.className === "function" ? props.className(state) : props.className)
|
|
707
|
+
}
|
|
708
|
+
);
|
|
709
|
+
};
|
|
710
|
+
var DropdownPopover = (props) => {
|
|
711
|
+
return /* @__PURE__ */ jsx(
|
|
712
|
+
Popover,
|
|
713
|
+
{
|
|
714
|
+
placement: "bottom right",
|
|
715
|
+
...props,
|
|
716
|
+
className: (state) => cx(
|
|
717
|
+
"w-62 origin-(--trigger-anchor-point) overflow-auto rounded-lg bg-primary shadow-lg ring-1 ring-secondary_alt will-change-transform",
|
|
718
|
+
state.isEntering && "duration-150 ease-out animate-in fade-in placement-right:slide-in-from-left-0.5 placement-top:slide-in-from-bottom-0.5 placement-bottom:slide-in-from-top-0.5",
|
|
719
|
+
state.isExiting && "duration-100 ease-in animate-out fade-out placement-right:slide-out-to-left-0.5 placement-top:slide-out-to-bottom-0.5 placement-bottom:slide-out-to-top-0.5",
|
|
720
|
+
typeof props.className === "function" ? props.className(state) : props.className
|
|
721
|
+
),
|
|
722
|
+
children: props.children
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
};
|
|
726
|
+
var DropdownSeparator = (props) => {
|
|
727
|
+
return /* @__PURE__ */ jsx(Separator, { ...props, className: cx("my-1 h-px w-full bg-border-secondary", props.className) });
|
|
728
|
+
};
|
|
729
|
+
var Dropdown = {
|
|
730
|
+
Root: MenuTrigger,
|
|
731
|
+
Popover: DropdownPopover,
|
|
732
|
+
Menu: DropdownMenu,
|
|
733
|
+
Section: MenuSection,
|
|
734
|
+
Item: DropdownItem,
|
|
735
|
+
Separator: DropdownSeparator};
|
|
736
|
+
var StatusDot = ({ status }) => /* @__PURE__ */ jsx("span", { className: "mr-2 inline-flex shrink-0 items-center justify-center p-[5px]", children: /* @__PURE__ */ jsx("span", { className: cx("inline-block size-1.5 rounded-full", status === "online" ? "bg-fg-success-secondary" : "bg-utility-neutral-300") }) });
|
|
737
|
+
var DropdownButtonAdvanced = () => {
|
|
738
|
+
const [viewOptions, setViewOptions] = useState(/* @__PURE__ */ new Set(["show-bookmarks"]));
|
|
739
|
+
return /* @__PURE__ */ jsxs(Dropdown.Root, { children: [
|
|
740
|
+
/* @__PURE__ */ jsx(
|
|
741
|
+
Button,
|
|
742
|
+
{
|
|
743
|
+
size: "sm",
|
|
744
|
+
className: "group",
|
|
745
|
+
color: "secondary",
|
|
746
|
+
iconTrailing: (props) => /* @__PURE__ */ jsx(CaretDownIcon, { "data-icon": "trailing", ...props, className: "size-4! stroke-[2.25px]!" }),
|
|
747
|
+
children: "Actions"
|
|
748
|
+
}
|
|
749
|
+
),
|
|
750
|
+
/* @__PURE__ */ jsx(Dropdown.Popover, { className: "w-60", children: /* @__PURE__ */ jsxs(Dropdown.Menu, { selectionMode: "none", children: [
|
|
751
|
+
/* @__PURE__ */ jsxs(Dropdown.Section, { children: [
|
|
752
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: ArrowLeftIcon, children: "Back" }),
|
|
753
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: ArrowRightIcon, children: "Forward" }),
|
|
754
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { addon: "\u2318R", icon: ArrowCounterClockwiseIcon, children: "Reload" }),
|
|
755
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: PencilLineIcon, children: "Edit page" }),
|
|
756
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: StarIcon, children: "Add to favorites" })
|
|
757
|
+
] }),
|
|
758
|
+
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
759
|
+
/* @__PURE__ */ jsxs(Dropdown.Section, { selectionMode: "multiple", selectedKeys: viewOptions, onSelectionChange: setViewOptions, children: [
|
|
760
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { id: "show-bookmarks", children: "Show bookmarks" }),
|
|
761
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { id: "show-urls", children: "Show full URLs" })
|
|
762
|
+
] }),
|
|
763
|
+
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
764
|
+
/* @__PURE__ */ jsxs(Dropdown.Section, { children: [
|
|
765
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { id: "olivia", icon: () => /* @__PURE__ */ jsx(StatusDot, { status: "online" }), children: "Olivia Rhye" }),
|
|
766
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { id: "sienna", icon: () => /* @__PURE__ */ jsx(StatusDot, { status: "offline" }), children: "Sienna Hewitt" })
|
|
767
|
+
] }),
|
|
768
|
+
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
769
|
+
/* @__PURE__ */ jsx(Dropdown.Section, { children: /* @__PURE__ */ jsxs(SubmenuTrigger, { children: [
|
|
770
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: CubeIcon, children: "More tools" }),
|
|
771
|
+
/* @__PURE__ */ jsx(Dropdown.Popover, { placement: "right top", offset: -6, className: "w-50", children: /* @__PURE__ */ jsxs(Dropdown.Menu, { selectionMode: "none", children: [
|
|
772
|
+
/* @__PURE__ */ jsxs(SubmenuTrigger, { children: [
|
|
773
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: DownloadSimpleIcon, children: "Save as" }),
|
|
774
|
+
/* @__PURE__ */ jsx(Dropdown.Popover, { placement: "right top", offset: -6, className: "w-50", children: /* @__PURE__ */ jsxs(Dropdown.Menu, { selectionMode: "none", children: [
|
|
775
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "PDF" }),
|
|
776
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "HTML" }),
|
|
777
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "Markdown" })
|
|
778
|
+
] }) })
|
|
779
|
+
] }),
|
|
780
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { addon: "\u2318X", icon: ScissorsIcon, children: "Cut" }),
|
|
781
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { addon: "\u2318C", icon: CopyIcon, children: "Copy" }),
|
|
782
|
+
/* @__PURE__ */ jsx(Dropdown.Separator, {}),
|
|
783
|
+
/* @__PURE__ */ jsxs(SubmenuTrigger, { children: [
|
|
784
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { icon: CodeIcon, children: "Developer" }),
|
|
785
|
+
/* @__PURE__ */ jsx(Dropdown.Popover, { placement: "right top", offset: -6, className: "w-50", children: /* @__PURE__ */ jsxs(Dropdown.Menu, { selectionMode: "none", children: [
|
|
786
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "View source" }),
|
|
787
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "Developer tools" }),
|
|
788
|
+
/* @__PURE__ */ jsx(Dropdown.Item, { children: "Inspect elements" })
|
|
789
|
+
] }) })
|
|
790
|
+
] })
|
|
791
|
+
] }) })
|
|
792
|
+
] }) })
|
|
793
|
+
] }) })
|
|
794
|
+
] });
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
export { DropdownButtonAdvanced };
|
|
798
|
+
//# sourceMappingURL=dropdown-button-advanced.js.map
|
|
799
|
+
//# sourceMappingURL=dropdown-button-advanced.js.map
|