@nearform/quantum 1.8.0 → 1.9.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/README.md +19 -1
- package/dist/animations/index.d.ts +25 -0
- package/dist/animations/index.js +14 -37
- package/dist/animations/index.js.map +1 -1
- package/dist/assets/build/open-source.icon.d.ts +2 -0
- package/dist/assets/build/open-source.icon.js +7 -0
- package/dist/assets/build/open-source.icon.js.map +1 -0
- package/dist/assets/index.d.ts +13 -0
- package/dist/assets/index.js +29 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/colors/accent.d.ts +16 -0
- package/dist/colors/accent.js +21 -0
- package/dist/colors/accent.js.map +1 -0
- package/dist/colors/background.d.ts +36 -0
- package/dist/colors/background.js +41 -0
- package/dist/colors/background.js.map +1 -0
- package/dist/colors/base.d.ts +136 -0
- package/dist/colors/base.js +140 -0
- package/dist/colors/base.js.map +1 -0
- package/dist/colors/border.d.ts +16 -0
- package/dist/colors/border.js +21 -0
- package/dist/colors/border.js.map +1 -0
- package/dist/colors/button.d.ts +106 -0
- package/dist/colors/button.js +115 -0
- package/dist/colors/button.js.map +1 -0
- package/dist/colors/feedback.d.ts +27 -0
- package/dist/colors/feedback.js +32 -0
- package/dist/colors/feedback.js.map +1 -0
- package/dist/colors/foreground.d.ts +35 -0
- package/dist/colors/foreground.js +40 -0
- package/dist/colors/foreground.js.map +1 -0
- package/dist/colors/index.d.ts +351 -0
- package/dist/colors/index.js +13 -416
- package/dist/colors/index.js.map +1 -1
- package/dist/components/Accordion/index.d.ts +13 -0
- package/dist/components/Accordion/index.js +97 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/AppHeader/index.d.ts +21 -0
- package/dist/components/AppHeader/index.js +98 -0
- package/dist/components/AppHeader/index.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +30 -0
- package/dist/components/Avatar/index.js +116 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/BackLink/index.d.ts +9 -0
- package/dist/components/BackLink/index.js +80 -0
- package/dist/components/BackLink/index.js.map +1 -0
- package/dist/components/Badge/index.d.ts +48 -0
- package/dist/components/Badge/index.js +160 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Breadcrumb/index.d.ts +13 -0
- package/dist/components/Breadcrumb/index.js +90 -0
- package/dist/components/Breadcrumb/index.js.map +1 -0
- package/dist/components/Button/index.d.ts +17 -0
- package/dist/components/Button/index.js +204 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +11 -0
- package/dist/components/ButtonGroup/index.js +102 -0
- package/dist/components/ButtonGroup/index.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +8 -0
- package/dist/components/Calendar/index.js +146 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Card/index.d.ts +28 -0
- package/dist/components/Card/index.js +155 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Chat/index.d.ts +39 -0
- package/dist/components/Chat/index.js +100 -0
- package/dist/components/Chat/index.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +5 -0
- package/dist/components/Checkbox/index.js +128 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +61 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js +107 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroupItem.d.ts +19 -0
- package/dist/components/CheckboxGroup/CheckboxGroupItem.js +83 -0
- package/dist/components/CheckboxGroup/CheckboxGroupItem.js.map +1 -0
- package/dist/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/components/CheckboxGroup/index.js +9 -0
- package/dist/components/CheckboxGroup/index.js.map +1 -0
- package/dist/components/Chip/index.d.ts +11 -0
- package/dist/components/Chip/index.js +105 -0
- package/dist/components/Chip/index.js.map +1 -0
- package/dist/components/CodeBlock/index.d.ts +7 -0
- package/dist/components/CodeBlock/index.js +57 -0
- package/dist/components/CodeBlock/index.js.map +1 -0
- package/dist/components/ControlLabel/index.d.ts +13 -0
- package/dist/components/ControlLabel/index.js +83 -0
- package/dist/components/ControlLabel/index.js.map +1 -0
- package/dist/components/DateInput/index.d.ts +26 -0
- package/dist/components/DateInput/index.js +261 -0
- package/dist/components/DateInput/index.js.map +1 -0
- package/dist/components/DocsList/index.d.ts +18 -0
- package/dist/components/DocsList/index.js +125 -0
- package/dist/components/DocsList/index.js.map +1 -0
- package/dist/components/FormGroup/index.d.ts +121 -0
- package/dist/components/FormGroup/index.js +359 -0
- package/dist/components/FormGroup/index.js.map +1 -0
- package/dist/components/HeroButton/index.d.ts +17 -0
- package/dist/components/HeroButton/index.js +139 -0
- package/dist/components/HeroButton/index.js.map +1 -0
- package/dist/components/IconButton/index.d.ts +77 -0
- package/dist/components/IconButton/index.js +235 -0
- package/dist/components/IconButton/index.js.map +1 -0
- package/dist/components/Input/index.d.ts +27 -0
- package/dist/components/Input/index.js +179 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/Label/index.d.ts +12 -0
- package/dist/components/Label/index.js +89 -0
- package/dist/components/Label/index.js.map +1 -0
- package/dist/components/Link/index.d.ts +8 -0
- package/dist/components/Link/index.js +40 -0
- package/dist/components/Link/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +26 -0
- package/dist/components/Modal/index.js +143 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Navigation/index.d.ts +8 -0
- package/dist/components/Navigation/index.js +65 -0
- package/dist/components/Navigation/index.js.map +1 -0
- package/dist/components/Notice/index.d.ts +17 -0
- package/dist/components/Notice/index.js +134 -0
- package/dist/components/Notice/index.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +15 -0
- package/dist/components/PageHeader/index.js +90 -0
- package/dist/components/PageHeader/index.js.map +1 -0
- package/dist/components/Pagination/index.d.ts +17 -0
- package/dist/components/Pagination/index.js +118 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Password/index.d.ts +18 -0
- package/dist/components/Password/index.js +106 -0
- package/dist/components/Password/index.js.map +1 -0
- package/dist/components/Popover/index.d.ts +28 -0
- package/dist/components/Popover/index.js +97 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Radio/RadioGroup.d.ts +42 -0
- package/dist/components/Radio/RadioGroup.js +82 -0
- package/dist/components/Radio/RadioGroup.js.map +1 -0
- package/dist/components/Radio/RadioGroupItem.d.ts +17 -0
- package/dist/components/Radio/RadioGroupItem.js +117 -0
- package/dist/components/Radio/RadioGroupItem.js.map +1 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +8 -0
- package/dist/components/Radio/index.js.map +1 -0
- package/dist/components/Select/index.d.ts +19 -0
- package/dist/components/Select/index.js +206 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Slider/index.d.ts +18 -0
- package/dist/components/Slider/index.js +122 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/SortAndShow/index.d.ts +15 -0
- package/dist/components/SortAndShow/index.js +68 -0
- package/dist/components/SortAndShow/index.js.map +1 -0
- package/dist/components/SplitButton/index.d.ts +25 -0
- package/dist/components/SplitButton/index.js +224 -0
- package/dist/components/SplitButton/index.js.map +1 -0
- package/dist/components/Stats/index.d.ts +10 -0
- package/dist/components/Stats/index.js +63 -0
- package/dist/components/Stats/index.js.map +1 -0
- package/dist/components/Stepper/index.d.ts +23 -0
- package/dist/components/Stepper/index.js +142 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/StepsIndicator/Step.d.ts +6 -0
- package/dist/components/StepsIndicator/Step.js +24 -0
- package/dist/components/StepsIndicator/Step.js.map +1 -0
- package/dist/components/StepsIndicator/StepsIndicator.d.ts +12 -0
- package/dist/components/StepsIndicator/StepsIndicator.js +67 -0
- package/dist/components/StepsIndicator/StepsIndicator.js.map +1 -0
- package/dist/components/StepsIndicator/index.d.ts +2 -0
- package/dist/components/StepsIndicator/index.js +19 -0
- package/dist/components/StepsIndicator/index.js.map +1 -0
- package/dist/components/Subnav/index.d.ts +14 -0
- package/dist/components/Subnav/index.js +94 -0
- package/dist/components/Subnav/index.js.map +1 -0
- package/dist/components/Switch/index.d.ts +4 -0
- package/dist/components/Switch/index.js +103 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Table/index.d.ts +48 -0
- package/dist/components/Table/index.js +147 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +16 -0
- package/dist/components/Tabs/index.js +168 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Textarea/index.d.ts +13 -0
- package/dist/components/Textarea/index.js +96 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/Toast/index.d.ts +24 -0
- package/dist/components/Toast/index.js +171 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/ToggleList/index.d.ts +20 -0
- package/dist/components/ToggleList/index.js +68 -0
- package/dist/components/ToggleList/index.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +11 -0
- package/dist/components/Tooltip/index.js +66 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/WebsiteFooter/index.d.ts +23 -0
- package/dist/components/WebsiteFooter/index.js +113 -0
- package/dist/components/WebsiteFooter/index.js.map +1 -0
- package/dist/components/WebsiteHeader/index.d.ts +21 -0
- package/dist/components/WebsiteHeader/index.js +98 -0
- package/dist/components/WebsiteHeader/index.js.map +1 -0
- package/dist/components/choice-group.d.ts +109 -0
- package/dist/components/choice-group.js +200 -0
- package/dist/components/choice-group.js.map +1 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.js +66 -0
- package/dist/components/index.js.map +1 -0
- package/dist/esm/animations/index.js +17 -0
- package/dist/esm/animations/index.js.map +1 -0
- package/dist/esm/colors/accent.js +18 -0
- package/dist/esm/colors/accent.js.map +1 -0
- package/dist/esm/colors/background.js +38 -0
- package/dist/esm/colors/background.js.map +1 -0
- package/dist/esm/colors/base.js +137 -0
- package/dist/esm/colors/base.js.map +1 -0
- package/dist/esm/colors/border.js +18 -0
- package/dist/esm/colors/border.js.map +1 -0
- package/dist/esm/colors/button.js +112 -0
- package/dist/esm/colors/button.js.map +1 -0
- package/dist/esm/colors/feedback.js +29 -0
- package/dist/esm/colors/feedback.js.map +1 -0
- package/dist/esm/colors/foreground.js +37 -0
- package/dist/esm/colors/foreground.js.map +1 -0
- package/dist/esm/colors/index.js +13 -0
- package/dist/esm/colors/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/tailwind-base.js +31 -0
- package/dist/esm/tailwind-base.js.map +1 -0
- package/dist/esm/tailwind-plugin.js +29 -0
- package/dist/esm/tailwind-plugin.js.map +1 -0
- package/dist/esm/theme.js +55 -0
- package/dist/esm/theme.js.map +1 -0
- package/dist/global.css +552 -485
- package/dist/index.d.ts +3 -1315
- package/dist/index.js +23 -6468
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.js +23 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/tailwind-base.js +33 -0
- package/dist/tailwind-base.js.map +1 -0
- package/dist/tailwind-plugin.js +31 -497
- package/dist/tailwind-plugin.js.map +1 -1
- package/dist/theme.js +60 -0
- package/dist/theme.js.map +1 -0
- package/package.json +8 -11
- package/dist/animations/index.mjs +0 -8
- package/dist/animations/index.mjs.map +0 -1
- package/dist/chunk-36NLQKQR.mjs +0 -22
- package/dist/chunk-36NLQKQR.mjs.map +0 -1
- package/dist/chunk-3FFF7Q7C.mjs +0 -55
- package/dist/chunk-3FFF7Q7C.mjs.map +0 -1
- package/dist/chunk-GTI4HTES.mjs +0 -386
- package/dist/chunk-GTI4HTES.mjs.map +0 -1
- package/dist/colors/index.mjs +0 -8
- package/dist/colors/index.mjs.map +0 -1
- package/dist/global.css.map +0 -1
- package/dist/index.d.mts +0 -1315
- package/dist/index.mjs +0 -6043
- package/dist/index.mjs.map +0 -1
- package/dist/tailwind-plugin.mjs +0 -67
- package/dist/tailwind-plugin.mjs.map +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.AppHeaderMobileMenu = exports.AppHeaderMenuButton = exports.AppHeaderActions = exports.AppHeaderLink = exports.AppHeaderNav = exports.AppHeaderLogo = exports.AppHeader = void 0;
|
|
48
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
49
|
+
const React = __importStar(require("react"));
|
|
50
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
51
|
+
const utils_1 = require("../../lib/utils");
|
|
52
|
+
const AppHeader = React.forwardRef((_a, ref) => {
|
|
53
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("header", Object.assign({ ref: ref, className: (0, utils_1.cn)('flex items-center justify-between', 'w-full px-6 py-2', 'bg-background-surface dark:bg-background-surface-dark', 'border-b border-border-subtle dark:border-border-subtle-dark', 'text-foreground dark:text-foreground-dark', className) }, props)));
|
|
55
|
+
});
|
|
56
|
+
exports.AppHeader = AppHeader;
|
|
57
|
+
AppHeader.displayName = 'AppHeader';
|
|
58
|
+
const AppHeaderLogo = React.forwardRef((_a, ref) => {
|
|
59
|
+
var { className, asChild = false } = _a, props = __rest(_a, ["className", "asChild"]);
|
|
60
|
+
const Comp = asChild ? react_slot_1.Slot : 'a';
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(Comp, Object.assign({ ref: ref, className: (0, utils_1.cn)('inline-flex items-center shrink-0', 'text-foreground dark:text-foreground-dark', 'focus-visible:outline-hidden', 'focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10', 'rounded-sm', className) }, props)));
|
|
62
|
+
});
|
|
63
|
+
exports.AppHeaderLogo = AppHeaderLogo;
|
|
64
|
+
AppHeaderLogo.displayName = 'AppHeaderLogo';
|
|
65
|
+
const AppHeaderNav = React.forwardRef((_a, ref) => {
|
|
66
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)("nav", Object.assign({ ref: ref, className: (0, utils_1.cn)('hidden sm:flex items-center gap-1', className) }, props)));
|
|
68
|
+
});
|
|
69
|
+
exports.AppHeaderNav = AppHeaderNav;
|
|
70
|
+
AppHeaderNav.displayName = 'AppHeaderNav';
|
|
71
|
+
const AppHeaderLink = React.forwardRef((_a, ref) => {
|
|
72
|
+
var { className, asChild = false, active = false, 'aria-current': ariaCurrent } = _a, props = __rest(_a, ["className", "asChild", "active", 'aria-current']);
|
|
73
|
+
const Comp = asChild ? react_slot_1.Slot : 'a';
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(Comp, Object.assign({ ref: ref, "aria-current": ariaCurrent !== null && ariaCurrent !== void 0 ? ariaCurrent : (active ? 'page' : undefined), className: (0, utils_1.cn)('inline-flex items-center px-3 py-1.5', 'text-sm font-medium rounded-sm', 'cursor-pointer', 'text-foreground-subtle dark:text-foreground-muted-dark', 'hover:text-foreground dark:hover:text-foreground-dark', 'aria-[current=page]:text-foreground dark:aria-[current=page]:text-foreground-dark', 'aria-[current=page]:bg-background dark:aria-[current=page]:bg-background-dark', 'focus-visible:outline-hidden', 'focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10', className) }, props)));
|
|
75
|
+
});
|
|
76
|
+
exports.AppHeaderLink = AppHeaderLink;
|
|
77
|
+
AppHeaderLink.displayName = 'AppHeaderLink';
|
|
78
|
+
const AppHeaderActions = React.forwardRef((_a, ref) => {
|
|
79
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('hidden sm:flex items-center gap-2', className) }, props)));
|
|
81
|
+
});
|
|
82
|
+
exports.AppHeaderActions = AppHeaderActions;
|
|
83
|
+
AppHeaderActions.displayName = 'AppHeaderActions';
|
|
84
|
+
const AppHeaderMenuButton = React.forwardRef((_a, ref) => {
|
|
85
|
+
var { className, open = false, children } = _a, props = __rest(_a, ["className", "open", "children"]);
|
|
86
|
+
return ((0, jsx_runtime_1.jsx)("button", Object.assign({ ref: ref, type: "button", "aria-expanded": open, "aria-label": open ? 'Close menu' : 'Open menu', className: (0, utils_1.cn)('inline-flex sm:hidden items-center justify-center', 'size-8 rounded-sm', 'cursor-pointer', 'text-foreground dark:text-foreground-dark', 'hover:bg-background dark:hover:bg-background-dark', 'focus-visible:outline-hidden', 'focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10', className) }, props, { children: children !== null && children !== void 0 ? children : ((0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: open ? ((0, jsx_runtime_1.jsx)("path", { d: "M4 4L12 12M12 4L4 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })) : ((0, jsx_runtime_1.jsx)("path", { d: "M2 4H14M2 8H14M2 12H14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })) })) })));
|
|
87
|
+
});
|
|
88
|
+
exports.AppHeaderMenuButton = AppHeaderMenuButton;
|
|
89
|
+
AppHeaderMenuButton.displayName = 'AppHeaderMenuButton';
|
|
90
|
+
const AppHeaderMobileMenu = React.forwardRef((_a, ref) => {
|
|
91
|
+
var { className, open = false } = _a, props = __rest(_a, ["className", "open"]);
|
|
92
|
+
if (!open)
|
|
93
|
+
return null;
|
|
94
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('sm:hidden flex flex-col gap-1', 'w-full px-6 py-3', 'bg-background-surface dark:bg-background-surface-dark', 'border-b border-border-subtle dark:border-border-subtle-dark', className) }, props)));
|
|
95
|
+
});
|
|
96
|
+
exports.AppHeaderMobileMenu = AppHeaderMobileMenu;
|
|
97
|
+
AppHeaderMobileMenu.displayName = 'AppHeaderMobileMenu';
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AppHeader/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,qDAA2C;AAE3C,2CAAoC;AAEpC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGhC,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,iDACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACX,mCAAmC,EACnC,kBAAkB,EAClB,uDAAuD,EACvD,8DAA8D,EAC9D,2CAA2C,EAC3C,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAwKA,8BAAS;AAvKX,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAMnC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CACpC,CAAC,EAAwC,EAAE,GAAG,EAAE,EAAE;QAAjD,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,OAAY,EAAP,KAAK,cAAtC,wBAAwC,CAAF;IACrC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,iBAAI,CAAC,CAAC,CAAC,GAAG,CAAA;IACjC,OAAO,CACL,uBAAC,IAAI,kBACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACX,mCAAmC,EACnC,2CAA2C,EAC3C,8BAA8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,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,CACH,GACG,CACP,IACM,CACV,CAAA;CAAA,CAAC,CAAA;AA8BA,kDAAmB;AA7BrB,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA;AAEvD,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAG1C,CAAC,EAAqC,EAAE,GAAG,EAAE,EAAE;QAA9C,EAAE,SAAS,EAAE,IAAI,GAAG,KAAK,OAAY,EAAP,KAAK,cAAnC,qBAAqC,CAAF;IACpC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,OAAO,CACL,8CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACX,+BAA+B,EAC/B,kBAAkB,EAClB,uDAAuD,EACvD,8DAA8D,EAC9D,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAUA,kDAAmB;AATrB,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const avatarVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
5
|
+
shape?: "square" | "circle" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
interface AvatarProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'children' | 'onError'>, VariantProps<typeof avatarVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* Image to show. Until it loads — and permanently, if it fails to load — the
|
|
10
|
+
* initials or the icon show in its place.
|
|
11
|
+
*/
|
|
12
|
+
src?: string;
|
|
13
|
+
/** Who the avatar stands for: names it, and seeds the initials. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Initials to render instead of the ones derived from `name`. */
|
|
16
|
+
initials?: string;
|
|
17
|
+
/** Accessible name to use instead of `name`, for the image and the fallback alike. */
|
|
18
|
+
alt?: string;
|
|
19
|
+
/** Icon to render instead of the default person glyph when there are no initials. */
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The image sits on top of the fallback rather than replacing it, so the
|
|
24
|
+
* initials cover the gap while it loads instead of the avatar flashing empty.
|
|
25
|
+
* Only one of the two is ever exposed to assistive technology: the `<img>`
|
|
26
|
+
* carries the accessible name whenever it is rendered, and the fallback layer
|
|
27
|
+
* is `aria-hidden` throughout.
|
|
28
|
+
*/
|
|
29
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
export { Avatar, AvatarProps };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Avatar = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
21
|
+
const utils_1 = require("../../lib/utils");
|
|
22
|
+
const assets_1 = require("../../assets");
|
|
23
|
+
const avatarVariants = (0, class_variance_authority_1.cva)([
|
|
24
|
+
[
|
|
25
|
+
'relative',
|
|
26
|
+
'inline-flex',
|
|
27
|
+
'shrink-0',
|
|
28
|
+
'items-center',
|
|
29
|
+
'justify-center',
|
|
30
|
+
'overflow-hidden',
|
|
31
|
+
'select-none',
|
|
32
|
+
'font-semibold',
|
|
33
|
+
'uppercase'
|
|
34
|
+
],
|
|
35
|
+
['bg-background-alt', 'text-foreground'],
|
|
36
|
+
['dark:bg-background-alt-dark', 'dark:text-foreground-dark']
|
|
37
|
+
], {
|
|
38
|
+
variants: {
|
|
39
|
+
size: {
|
|
40
|
+
xs: ['h-6', 'w-6', 'text-[10px]'],
|
|
41
|
+
sm: ['h-8', 'w-8', 'text-xs'],
|
|
42
|
+
default: ['h-10', 'w-10', 'text-sm'],
|
|
43
|
+
lg: ['h-12', 'w-12', 'text-base'],
|
|
44
|
+
xl: ['h-16', 'w-16', 'text-xl']
|
|
45
|
+
},
|
|
46
|
+
shape: {
|
|
47
|
+
circle: 'rounded-full',
|
|
48
|
+
square: 'rounded-lg'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
size: 'default',
|
|
53
|
+
shape: 'circle'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const iconVariants = (0, class_variance_authority_1.cva)('shrink-0', {
|
|
57
|
+
variants: {
|
|
58
|
+
size: {
|
|
59
|
+
xs: ['h-3.5', 'w-3.5'],
|
|
60
|
+
sm: ['h-4', 'w-4'],
|
|
61
|
+
default: ['h-5', 'w-5'],
|
|
62
|
+
lg: ['h-6', 'w-6'],
|
|
63
|
+
xl: ['h-8', 'w-8']
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: {
|
|
67
|
+
size: 'default'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* First letter of the first word plus first letter of the last word, so
|
|
72
|
+
* "Ada Lovelace" reads "AL" and a mononym reads a single letter.
|
|
73
|
+
*
|
|
74
|
+
* Split with `Array.from` rather than `[0]`: indexing a string walks UTF-16
|
|
75
|
+
* code units, so a name starting outside the BMP — an emoji, or one of the
|
|
76
|
+
* supplementary-plane scripts — would yield half a surrogate pair and render
|
|
77
|
+
* as a replacement character.
|
|
78
|
+
*/
|
|
79
|
+
const initialsFrom = (name) => {
|
|
80
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
81
|
+
if (words.length === 0)
|
|
82
|
+
return '';
|
|
83
|
+
const first = Array.from(words[0])[0];
|
|
84
|
+
const last = words.length > 1 ? Array.from(words[words.length - 1])[0] : '';
|
|
85
|
+
return `${first}${last}`;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The image sits on top of the fallback rather than replacing it, so the
|
|
89
|
+
* initials cover the gap while it loads instead of the avatar flashing empty.
|
|
90
|
+
* Only one of the two is ever exposed to assistive technology: the `<img>`
|
|
91
|
+
* carries the accessible name whenever it is rendered, and the fallback layer
|
|
92
|
+
* is `aria-hidden` throughout.
|
|
93
|
+
*/
|
|
94
|
+
const Avatar = react_1.default.forwardRef((_a, ref) => {
|
|
95
|
+
var { className, size, shape, src, name, initials, alt, icon, role } = _a, props = __rest(_a, ["className", "size", "shape", "src", "name", "initials", "alt", "icon", "role"]);
|
|
96
|
+
// Keyed by the URL that failed rather than a boolean, so a new `src` is
|
|
97
|
+
// retried instead of inheriting the previous one's failure.
|
|
98
|
+
const [failedSrc, setFailedSrc] = react_1.default.useState();
|
|
99
|
+
const showImage = Boolean(src) && src !== failedSrc;
|
|
100
|
+
const label = alt !== null && alt !== void 0 ? alt : name;
|
|
101
|
+
const text = initials !== null && initials !== void 0 ? initials : (name ? initialsFrom(name) : '');
|
|
102
|
+
/**
|
|
103
|
+
* `role="img"` and the name that goes with it are emitted as a pair: the
|
|
104
|
+
* label is there to name that role and nothing else. So a caller who
|
|
105
|
+
* supplies a `role` of their own takes the name with it, rather than
|
|
106
|
+
* finding ours still attached to their role — `role="presentation"`
|
|
107
|
+
* carrying an `aria-label` is a contradiction the browser resolves by
|
|
108
|
+
* re-exposing the element, which is the opposite of what suppressing the
|
|
109
|
+
* role asked for.
|
|
110
|
+
*/
|
|
111
|
+
const named = !showImage && Boolean(label) && role === undefined;
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ ref: ref, className: (0, utils_1.cn)(avatarVariants({ size, shape }), className), role: role !== null && role !== void 0 ? role : (named ? 'img' : undefined), "aria-label": named ? label : undefined, "aria-hidden": showImage || label ? undefined : true }, props, { children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", className: "flex h-full w-full items-center justify-center", children: text || icon || ((0, jsx_runtime_1.jsx)(assets_1.BsPersonFill, { className: (0, utils_1.cn)(iconVariants({ size })) })) }), showImage && ((0, jsx_runtime_1.jsx)("img", { src: src, alt: label !== null && label !== void 0 ? label : '', onError: () => setFailedSrc(src), className: "absolute inset-0 h-full w-full object-cover" }))] })));
|
|
113
|
+
});
|
|
114
|
+
exports.Avatar = Avatar;
|
|
115
|
+
Avatar.displayName = 'Avatar';
|
|
116
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,uEAA4D;AAC5D,2CAAoC;AACpC,yCAA2C;AAE3C,MAAM,cAAc,GAAG,IAAA,8BAAG,EACxB;IACE;QACE,UAAU;QACV,aAAa;QACb,UAAU;QACV,cAAc;QACd,gBAAgB;QAChB,iBAAiB;QACjB,aAAa;QACb,eAAe;QACf,WAAW;KACZ;IACD,CAAC,mBAAmB,EAAE,iBAAiB,CAAC;IACxC,CAAC,6BAA6B,EAAE,2BAA2B,CAAC;CAC7D,EACD;IACE,QAAQ,EAAE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IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,gBAC7B,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,iBAGxB,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,IAC9C,KAAK,eAET,gDACc,MAAM,EAClB,SAAS,EAAC,gDAAgD,YAEzD,IAAI,IAAI,IAAI,IAAI,CACf,uBAAC,qBAAY,IAAC,SAAS,EAAE,IAAA,UAAE,EAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAI,CACxD,GACI,EACN,SAAS,IAAI,CACZ,gCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EAChC,SAAS,EAAC,6CAA6C,GACvD,CACH,KACI,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAIQ,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const backLinkVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
interface BackLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof backLinkVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare const BackLink: React.ForwardRefExoticComponent<BackLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
9
|
+
export { BackLink, backLinkVariants, type BackLinkProps };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.backLinkVariants = exports.BackLink = void 0;
|
|
48
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
49
|
+
const React = __importStar(require("react"));
|
|
50
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
51
|
+
const assets_1 = require("../../assets");
|
|
52
|
+
const utils_1 = require("../../lib/utils");
|
|
53
|
+
const backLinkVariants = (0, class_variance_authority_1.cva)([
|
|
54
|
+
'inline-flex items-center gap-1.5',
|
|
55
|
+
'rounded-sm',
|
|
56
|
+
'text-sm font-semibold leading-normal',
|
|
57
|
+
'text-foreground dark:text-foreground-dark',
|
|
58
|
+
'cursor-pointer',
|
|
59
|
+
'hover:underline',
|
|
60
|
+
'focus-visible:outline-hidden focus-visible:underline',
|
|
61
|
+
'focus-visible:shadow-brandGreen dark:focus-visible:shadow-brandGreen10'
|
|
62
|
+
], {
|
|
63
|
+
variants: {
|
|
64
|
+
size: {
|
|
65
|
+
md: 'px-2 py-1',
|
|
66
|
+
sm: 'p-1.5'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
size: 'md'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
exports.backLinkVariants = backLinkVariants;
|
|
74
|
+
const BackLink = React.forwardRef((_a, ref) => {
|
|
75
|
+
var { className, size, children = 'Back' } = _a, props = __rest(_a, ["className", "size", "children"]);
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)("a", Object.assign({ ref: ref, className: (0, utils_1.cn)(backLinkVariants({ size }), className) }, props, { children: [(0, jsx_runtime_1.jsx)(assets_1.BsArrowLeft, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("span", { className: size === 'sm' ? 'sr-only' : undefined, children: children })] })));
|
|
77
|
+
});
|
|
78
|
+
exports.BackLink = BackLink;
|
|
79
|
+
BackLink.displayName = 'BackLink';
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BackLink/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAC9B,uEAAiE;AAEjE,yCAA0C;AAC1C,2CAAoC;AAEpC,MAAM,gBAAgB,GAAG,IAAA,8BAAG,EAC1B;IACE,kCAAkC;IAClC,YAAY;IACZ,sCAAsC;IACtC,2CAA2C;IAC3C,gBAAgB;IAChB,iBAAiB;IACjB,sDAAsD;IACtD,wEAAwE;CACzE,EACD;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,OAAO;SACZ;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,IAAI;KACX;CACF,CACF,CAAA;AAqBkB,4CAAgB;AAdnC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAgD,EAAE,GAAG,EAAE,EAAE;QAAzD,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,OAAY,EAAP,KAAK,cAA9C,iCAAgD,CAAF;IAAY,OAAA,CACzD,6CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,IAChD,KAAK,eAET,uBAAC,oBAAW,IAAC,SAAS,EAAC,kBAAkB,iBAAa,MAAM,GAAG,EAC/D,iCAAM,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,YAAG,QAAQ,GAAQ,KACvE,CACL,CAAA;CAAA,CACF,CAAA;AAGQ,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* Badge wears the same clothes as `Chip`: a 2px coloured border around a `-50`
|
|
5
|
+
* fill, with the text in near-black `foreground` rather than a tint of the
|
|
6
|
+
* hue. The two are siblings in the design file and share the fills exactly, so
|
|
7
|
+
* they share the tokens here too.
|
|
8
|
+
*
|
|
9
|
+
* Putting the colour in the border rather than the text is what makes the
|
|
10
|
+
* whole set comfortably accessible -- `foreground` on any of the `-50` fills
|
|
11
|
+
* is 16:1 or better, so there is no per-hue weight to tune and no ramp that
|
|
12
|
+
* has to be treated as a special case.
|
|
13
|
+
*
|
|
14
|
+
* Dark mode is not in the design file, so it is derived: the fill drops to the
|
|
15
|
+
* page background, the border takes the dark half of its descriptor, and the
|
|
16
|
+
* border goes on carrying the meaning. Tinting the fill instead would have
|
|
17
|
+
* been prettier and would have hidden the border in it -- `feedback-error` on
|
|
18
|
+
* `red-900` is 1.85:1, which would leave error and success telling themselves
|
|
19
|
+
* apart by fill alone.
|
|
20
|
+
*/
|
|
21
|
+
declare const badgeVariants: (props?: ({
|
|
22
|
+
variant?: "default" | "disabled" | "active" | "info" | "success" | "warning" | "error" | null | undefined;
|
|
23
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
24
|
+
shape?: "circle" | "rounded" | null | undefined;
|
|
25
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
26
|
+
interface BadgeProps extends React.ComponentPropsWithoutRef<'span'>, VariantProps<typeof badgeVariants> {
|
|
27
|
+
/** Decorative icon shown before the text. */
|
|
28
|
+
icon?: React.ReactNode;
|
|
29
|
+
/** Shows a filled dot before the text, in the badge's own colour. */
|
|
30
|
+
dot?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A badge labels the thing beside it -- a count, a status, a category. It is
|
|
34
|
+
* static: nothing about it responds to a click, and a badge that needs to be
|
|
35
|
+
* pressed or removed is a `Chip`. `disabled` is an appearance only, for a
|
|
36
|
+
* badge attached to a control that is itself disabled; it does not disable
|
|
37
|
+
* anything, because there is nothing here to disable.
|
|
38
|
+
*
|
|
39
|
+
* The text inside is the label, so it is left in the accessibility tree as
|
|
40
|
+
* ordinary content. A badge whose text does not say enough on its own -- a
|
|
41
|
+
* bare `3` -- takes an `aria-label`, and with it `role="img"`, which is what
|
|
42
|
+
* makes that label reach a screen reader at all: `aria-label` on a plain
|
|
43
|
+
* `<span>` has no role to name and most screen readers drop it. The badge
|
|
44
|
+
* never carries that role without a name to go in it, however the role
|
|
45
|
+
* arrived.
|
|
46
|
+
*/
|
|
47
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
48
|
+
export { Badge, BadgeProps };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Badge = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const react_1 = __importDefault(require("react"));
|
|
20
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
21
|
+
const utils_1 = require("../../lib/utils");
|
|
22
|
+
/**
|
|
23
|
+
* Badge wears the same clothes as `Chip`: a 2px coloured border around a `-50`
|
|
24
|
+
* fill, with the text in near-black `foreground` rather than a tint of the
|
|
25
|
+
* hue. The two are siblings in the design file and share the fills exactly, so
|
|
26
|
+
* they share the tokens here too.
|
|
27
|
+
*
|
|
28
|
+
* Putting the colour in the border rather than the text is what makes the
|
|
29
|
+
* whole set comfortably accessible -- `foreground` on any of the `-50` fills
|
|
30
|
+
* is 16:1 or better, so there is no per-hue weight to tune and no ramp that
|
|
31
|
+
* has to be treated as a special case.
|
|
32
|
+
*
|
|
33
|
+
* Dark mode is not in the design file, so it is derived: the fill drops to the
|
|
34
|
+
* page background, the border takes the dark half of its descriptor, and the
|
|
35
|
+
* border goes on carrying the meaning. Tinting the fill instead would have
|
|
36
|
+
* been prettier and would have hidden the border in it -- `feedback-error` on
|
|
37
|
+
* `red-900` is 1.85:1, which would leave error and success telling themselves
|
|
38
|
+
* apart by fill alone.
|
|
39
|
+
*/
|
|
40
|
+
const badgeVariants = (0, class_variance_authority_1.cva)([
|
|
41
|
+
[
|
|
42
|
+
'inline-flex',
|
|
43
|
+
'shrink-0',
|
|
44
|
+
'items-center',
|
|
45
|
+
'justify-center',
|
|
46
|
+
'border-2',
|
|
47
|
+
'font-semibold',
|
|
48
|
+
'whitespace-nowrap'
|
|
49
|
+
],
|
|
50
|
+
['text-foreground', 'dark:text-foreground-dark', 'dark:bg-background-dark']
|
|
51
|
+
], {
|
|
52
|
+
variants: {
|
|
53
|
+
variant: {
|
|
54
|
+
default: [
|
|
55
|
+
'bg-background',
|
|
56
|
+
'border-border-subtle',
|
|
57
|
+
'dark:border-border-subtle-dark'
|
|
58
|
+
],
|
|
59
|
+
info: ['bg-blue-50', 'border-blue-500'],
|
|
60
|
+
success: [
|
|
61
|
+
'bg-green-50',
|
|
62
|
+
'border-feedback-success',
|
|
63
|
+
'dark:border-feedback-success-dark'
|
|
64
|
+
],
|
|
65
|
+
warning: [
|
|
66
|
+
'bg-yellow-50',
|
|
67
|
+
'border-feedback-warning',
|
|
68
|
+
'dark:border-feedback-warning-dark'
|
|
69
|
+
],
|
|
70
|
+
error: [
|
|
71
|
+
'bg-red-50',
|
|
72
|
+
'border-feedback-error',
|
|
73
|
+
'dark:border-feedback-error-dark'
|
|
74
|
+
],
|
|
75
|
+
// The two flat variants keep `border-2` and paint it out rather than
|
|
76
|
+
// dropping it, so they stay exactly the same size as the bordered ones
|
|
77
|
+
// and a row of mixed badges still lines up.
|
|
78
|
+
active: [
|
|
79
|
+
'bg-foreground',
|
|
80
|
+
'border-transparent',
|
|
81
|
+
'text-foreground-inverse',
|
|
82
|
+
'dark:bg-foreground-dark',
|
|
83
|
+
'dark:text-foreground-inverse-dark'
|
|
84
|
+
],
|
|
85
|
+
disabled: [
|
|
86
|
+
'bg-background-subtle',
|
|
87
|
+
'border-transparent',
|
|
88
|
+
'text-foreground-subtle',
|
|
89
|
+
'dark:bg-background-subtle-dark',
|
|
90
|
+
'dark:text-foreground-subtle-dark'
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
// `min-w` matches the height, so a badge holding a single digit is a
|
|
94
|
+
// square or a circle rather than a letterbox, and longer text grows out
|
|
95
|
+
// of it from there.
|
|
96
|
+
size: {
|
|
97
|
+
sm: ['text-[10px]', 'h-5', 'min-w-5', 'px-1.5', 'gap-1'],
|
|
98
|
+
default: ['text-xs', 'h-6', 'min-w-6', 'px-2', 'gap-1.5'],
|
|
99
|
+
lg: ['text-sm', 'h-7', 'min-w-7', 'px-2.5', 'gap-1.5']
|
|
100
|
+
},
|
|
101
|
+
shape: {
|
|
102
|
+
rounded: 'rounded-md',
|
|
103
|
+
circle: 'rounded-full'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
variant: 'default',
|
|
108
|
+
size: 'default',
|
|
109
|
+
shape: 'rounded'
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const dotVariants = (0, class_variance_authority_1.cva)(['shrink-0', 'rounded-full', 'bg-current'], {
|
|
113
|
+
variants: {
|
|
114
|
+
size: {
|
|
115
|
+
sm: ['h-1.5', 'w-1.5'],
|
|
116
|
+
default: ['h-2', 'w-2'],
|
|
117
|
+
lg: ['h-2.5', 'w-2.5']
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
defaultVariants: {
|
|
121
|
+
size: 'default'
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* A badge labels the thing beside it -- a count, a status, a category. It is
|
|
126
|
+
* static: nothing about it responds to a click, and a badge that needs to be
|
|
127
|
+
* pressed or removed is a `Chip`. `disabled` is an appearance only, for a
|
|
128
|
+
* badge attached to a control that is itself disabled; it does not disable
|
|
129
|
+
* anything, because there is nothing here to disable.
|
|
130
|
+
*
|
|
131
|
+
* The text inside is the label, so it is left in the accessibility tree as
|
|
132
|
+
* ordinary content. A badge whose text does not say enough on its own -- a
|
|
133
|
+
* bare `3` -- takes an `aria-label`, and with it `role="img"`, which is what
|
|
134
|
+
* makes that label reach a screen reader at all: `aria-label` on a plain
|
|
135
|
+
* `<span>` has no role to name and most screen readers drop it. The badge
|
|
136
|
+
* never carries that role without a name to go in it, however the role
|
|
137
|
+
* arrived.
|
|
138
|
+
*/
|
|
139
|
+
const Badge = react_1.default.forwardRef((_a, ref) => {
|
|
140
|
+
var { className, variant, size, shape, icon, dot, children, role } = _a, props = __rest(_a, ["className", "variant", "size", "shape", "icon", "dot", "children", "role"]);
|
|
141
|
+
// Empty rather than absent is checked deliberately: `role="img"` with no
|
|
142
|
+
// accessible name is itself a violation, so an `aria-label=""` has to
|
|
143
|
+
// leave the badge as the plain text it already was.
|
|
144
|
+
const labelled = Boolean(props['aria-label'] || props['aria-labelledby']);
|
|
145
|
+
// `role="img"` swaps the badge's text for its accessible name, so a badge
|
|
146
|
+
// with no name to swap in must not carry the role: it fails 4.1.2 and puts
|
|
147
|
+
// the text out of reach at the same time. That holds whoever asked for the
|
|
148
|
+
// role. Ours is only generated when there is a label; a caller's is
|
|
149
|
+
// dropped when there is not, rather than forwarding an element we would
|
|
150
|
+
// never have produced ourselves and whose only possible reading is a
|
|
151
|
+
// mistake. Every other role is passed through untouched -- `role="status"`
|
|
152
|
+
// on a badge that changes while the page is open is the point of the
|
|
153
|
+
// override.
|
|
154
|
+
const requested = role !== null && role !== void 0 ? role : (labelled ? 'img' : undefined);
|
|
155
|
+
const resolved = requested === 'img' && !labelled ? undefined : requested;
|
|
156
|
+
return ((0, jsx_runtime_1.jsxs)("span", Object.assign({ ref: ref, className: (0, utils_1.cn)(badgeVariants({ variant, size, shape }), className), role: resolved }, props, { children: [dot && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", className: (0, utils_1.cn)(dotVariants({ size })) })), icon && ((0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 items-center", children: icon })), children] })));
|
|
157
|
+
});
|
|
158
|
+
exports.Badge = Badge;
|
|
159
|
+
Badge.displayName = 'Badge';
|
|
160
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,uEAA4D;AAC5D,2CAAoC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,aAAa,GAAG,IAAA,8BAAG,EACvB;IACE;QACE,aAAa;QACb,UAAU;QACV,cAAc;QACd,gBAAgB;QAChB,UAAU;QACV,eAAe;QACf,mBAAmB;KACpB;IACD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E,QAAQ,IACV,KAAK,eAER,GAAG,IAAI,CACN,gDAAkB,MAAM,EAAC,SAAS,EAAE,IAAA,UAAE,EAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAI,CAClE,EACA,IAAI,IAAI,CACP,gDAAkB,MAAM,EAAC,SAAS,EAAC,4BAA4B,YAC5D,IAAI,GACA,CACR,EACA,QAAQ,KACJ,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAIQ,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type IconType } from '../../assets';
|
|
3
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<React.OlHTMLAttributes<HTMLOListElement> & React.RefAttributes<HTMLOListElement>>;
|
|
5
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<React.LiHTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
interface BreadcrumbLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
icon?: IconType;
|
|
9
|
+
}
|
|
10
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<BreadcrumbLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
declare const BreadcrumbSeparator: React.ForwardRefExoticComponent<React.LiHTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
|
|
13
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, type BreadcrumbLinkProps };
|