@lerianstudio/sindarian-ui 2.0.0-beta.2 → 2.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +93 -0
- package/README.md +52 -1
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +25 -1
- package/dist/components/card/account-card/index.js +5 -5
- package/dist/components/card/basic-card/index.d.ts.map +1 -1
- package/dist/components/card/basic-card/index.js +2 -2
- package/dist/components/card/entity-card/index.js +1 -1
- package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/confirmation-dialog/index.js +4 -1
- package/dist/components/entity-box/index.d.ts +18 -2
- package/dist/components/entity-box/index.d.ts.map +1 -1
- package/dist/components/entity-box/index.js +32 -4
- package/dist/components/form/date-picker-field/index.js +1 -1
- package/dist/components/form/date-range-field/index.js +1 -1
- package/dist/components/form/date-time-picker-field/index.js +1 -1
- package/dist/components/form/password-field/index.d.ts +5 -1
- package/dist/components/form/password-field/index.d.ts.map +1 -1
- package/dist/components/form/password-field/index.js +2 -2
- package/dist/components/form/select-field/index.d.ts +15 -1
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/select-field/index.js +28 -3
- package/dist/components/form/switch-field/index.d.ts.map +1 -1
- package/dist/components/form/switch-field/index.js +6 -1
- package/dist/components/page/index.d.ts +35 -1
- package/dist/components/page/index.d.ts.map +1 -1
- package/dist/components/page/index.js +6 -2
- package/dist/components/page-header/index.js +1 -1
- package/dist/components/table/id-table-cell.d.ts +13 -1
- package/dist/components/table/id-table-cell.d.ts.map +1 -1
- package/dist/components/table/id-table-cell.js +99 -9
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/locked-table-actions.d.ts +24 -0
- package/dist/components/table/locked-table-actions.d.ts.map +1 -1
- package/dist/components/table/locked-table-actions.js +31 -1
- package/dist/components/table/name-table-cell.d.ts +57 -4
- package/dist/components/table/name-table-cell.d.ts.map +1 -1
- package/dist/components/table/name-table-cell.js +50 -2
- package/dist/components/ui/autocomplete/index.d.ts +24 -0
- package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/components/ui/autocomplete/index.js +24 -0
- package/dist/components/ui/badge/index.d.ts +11 -7
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +20 -8
- package/dist/components/ui/button/index.d.ts +3 -3
- package/dist/components/ui/copy-field/index.d.ts +25 -1
- package/dist/components/ui/copy-field/index.d.ts.map +1 -1
- package/dist/components/ui/copy-field/index.js +16 -8
- package/dist/components/ui/dialog/index.d.ts +1 -1
- package/dist/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/index.js +2 -2
- package/dist/components/ui/file-upload/index.d.ts +159 -0
- package/dist/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/components/ui/file-upload/index.js +308 -6
- package/dist/components/ui/icon-button/index.d.ts +1 -1
- package/dist/components/ui/icon-button/styles.css +42 -0
- package/dist/components/ui/input/styles.css +79 -4
- package/dist/components/ui/lerian-wordmark/index.d.ts +6 -0
- package/dist/components/ui/lerian-wordmark/index.d.ts.map +1 -0
- package/dist/components/ui/lerian-wordmark/index.js +7 -0
- package/dist/components/ui/otp-input/index.js +1 -1
- package/dist/components/ui/radio-group/index.js +1 -1
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.js +8 -4
- package/dist/components/ui/select/styles.css +1 -1
- package/dist/components/ui/sheet/index.d.ts +42 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/components/ui/sheet/index.js +47 -14
- package/dist/components/ui/sidebar/index.d.ts +1 -0
- package/dist/components/ui/sidebar/index.d.ts.map +1 -1
- package/dist/components/ui/sidebar/index.js +1 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.js +15 -1
- package/dist/components/ui/sidebar/sidebar-item.d.ts +1 -1
- package/dist/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-item.js +28 -4
- package/dist/components/ui/sidebar/sidebar-provider.d.ts +58 -0
- package/dist/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-provider.js +146 -4
- package/dist/components/ui/sidebar/sidebar-root.d.ts +38 -1
- package/dist/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-root.js +111 -5
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts +45 -0
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-trigger.js +57 -0
- package/dist/components/ui/textarea/index.js +1 -1
- package/dist/components/ui/toast/toaster.d.ts +5 -1
- package/dist/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/components/ui/toast/toaster.js +3 -2
- package/dist/enterprise/data-table/index.d.ts +77 -7
- package/dist/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/enterprise/data-table/index.js +56 -11
- package/dist/enterprise/date-range-picker/index.js +4 -4
- package/dist/enterprise/number-input/index.d.ts.map +1 -1
- package/dist/enterprise/number-input/index.js +1 -1
- package/dist/esm/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/esm/components/breadcrumb/index.js +25 -1
- package/dist/esm/components/card/account-card/index.js +5 -5
- package/dist/esm/components/card/basic-card/index.d.ts.map +1 -1
- package/dist/esm/components/card/basic-card/index.js +2 -2
- package/dist/esm/components/card/entity-card/index.js +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.js +4 -1
- package/dist/esm/components/entity-box/index.d.ts +18 -2
- package/dist/esm/components/entity-box/index.d.ts.map +1 -1
- package/dist/esm/components/entity-box/index.js +29 -4
- package/dist/esm/components/form/date-picker-field/index.js +1 -1
- package/dist/esm/components/form/date-range-field/index.js +1 -1
- package/dist/esm/components/form/date-time-picker-field/index.js +1 -1
- package/dist/esm/components/form/password-field/index.d.ts +5 -1
- package/dist/esm/components/form/password-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/password-field/index.js +2 -2
- package/dist/esm/components/form/select-field/index.d.ts +15 -1
- package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/select-field/index.js +29 -4
- package/dist/esm/components/form/switch-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/switch-field/index.js +7 -2
- package/dist/esm/components/page/index.d.ts +35 -1
- package/dist/esm/components/page/index.d.ts.map +1 -1
- package/dist/esm/components/page/index.js +6 -2
- package/dist/esm/components/page-header/index.js +1 -1
- package/dist/esm/components/table/id-table-cell.d.ts +13 -1
- package/dist/esm/components/table/id-table-cell.d.ts.map +1 -1
- package/dist/esm/components/table/id-table-cell.js +100 -7
- package/dist/esm/components/table/index.d.ts +1 -0
- package/dist/esm/components/table/index.d.ts.map +1 -1
- package/dist/esm/components/table/index.js +1 -0
- package/dist/esm/components/table/locked-table-actions.d.ts +24 -0
- package/dist/esm/components/table/locked-table-actions.d.ts.map +1 -1
- package/dist/esm/components/table/locked-table-actions.js +31 -1
- package/dist/esm/components/table/name-table-cell.d.ts +57 -4
- package/dist/esm/components/table/name-table-cell.d.ts.map +1 -1
- package/dist/esm/components/table/name-table-cell.js +50 -2
- package/dist/esm/components/ui/autocomplete/index.d.ts +24 -0
- package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/esm/components/ui/autocomplete/index.js +24 -0
- package/dist/esm/components/ui/badge/index.d.ts +11 -7
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +20 -8
- package/dist/esm/components/ui/button/index.d.ts +3 -3
- package/dist/esm/components/ui/copy-field/index.d.ts +25 -1
- package/dist/esm/components/ui/copy-field/index.d.ts.map +1 -1
- package/dist/esm/components/ui/copy-field/index.js +16 -8
- package/dist/esm/components/ui/dialog/index.d.ts +1 -1
- package/dist/esm/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/esm/components/ui/dialog/index.js +3 -3
- package/dist/esm/components/ui/file-upload/index.d.ts +159 -0
- package/dist/esm/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/esm/components/ui/file-upload/index.js +307 -5
- package/dist/esm/components/ui/icon-button/index.d.ts +1 -1
- package/dist/esm/components/ui/lerian-wordmark/index.d.ts +6 -0
- package/dist/esm/components/ui/lerian-wordmark/index.d.ts.map +1 -0
- package/dist/esm/components/ui/lerian-wordmark/index.js +4 -0
- package/dist/esm/components/ui/otp-input/index.js +1 -1
- package/dist/esm/components/ui/radio-group/index.js +1 -1
- package/dist/esm/components/ui/select/index.d.ts.map +1 -1
- package/dist/esm/components/ui/select/index.js +8 -4
- package/dist/esm/components/ui/sheet/index.d.ts +42 -0
- package/dist/esm/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/esm/components/ui/sheet/index.js +48 -15
- package/dist/esm/components/ui/sidebar/index.d.ts +1 -0
- package/dist/esm/components/ui/sidebar/index.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/index.js +1 -0
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +15 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.d.ts +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-item.js +28 -4
- package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts +58 -0
- package/dist/esm/components/ui/sidebar/sidebar-provider.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-provider.js +143 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.d.ts +38 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-root.js +113 -7
- package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts +45 -0
- package/dist/esm/components/ui/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/esm/components/ui/sidebar/sidebar-trigger.js +53 -0
- package/dist/esm/components/ui/textarea/index.js +1 -1
- package/dist/esm/components/ui/toast/toaster.d.ts +5 -1
- package/dist/esm/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/esm/components/ui/toast/toaster.js +3 -2
- package/dist/esm/enterprise/data-table/index.d.ts +77 -7
- package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/esm/enterprise/data-table/index.js +57 -12
- package/dist/esm/enterprise/date-range-picker/index.js +4 -4
- package/dist/esm/enterprise/number-input/index.d.ts.map +1 -1
- package/dist/esm/enterprise/number-input/index.js +1 -1
- package/dist/esm/hooks/use-toast.d.ts +18 -2
- package/dist/esm/hooks/use-toast.d.ts.map +1 -1
- package/dist/esm/hooks/use-toast.js +60 -16
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/lib/utils.d.ts +2 -0
- package/dist/esm/lib/utils.d.ts.map +1 -1
- package/dist/esm/lib/utils.js +10 -0
- package/dist/esm/toast/helpers.d.ts +13 -0
- package/dist/esm/toast/helpers.d.ts.map +1 -1
- package/dist/esm/toast/helpers.js +8 -1
- package/dist/fonts/OFL.txt +96 -0
- package/dist/fonts/ibm-plex-mono-latin-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-latin-500.woff2 +0 -0
- package/dist/fonts/ibm-plex-serif-latin-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-serif-latin-500.woff2 +0 -0
- package/dist/fonts/inter-latin.woff2 +0 -0
- package/dist/fonts.css +46 -0
- package/dist/globals.css +62 -362
- package/dist/hooks/use-toast.d.ts +18 -2
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +61 -16
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +11 -0
- package/dist/public/wordmark.svg +1 -0
- package/dist/standalone.css +10 -0
- package/dist/toast/helpers.d.ts +13 -0
- package/dist/toast/helpers.d.ts.map +1 -1
- package/dist/toast/helpers.js +8 -1
- package/dist/tokens.css +367 -0
- package/package.json +9 -6
|
@@ -210,5 +210,5 @@ export function NumberInput({ value, onValueChange, min, max, step = 1, precisio
|
|
|
210
210
|
};
|
|
211
211
|
const atMin = typeof min === 'number' && value !== null && value <= min;
|
|
212
212
|
const atMax = typeof max === 'number' && value !== null && value >= max;
|
|
213
|
-
return (_jsxs("div", { className: cn('inline-flex items-stretch gap-1', className), children: [_jsx(IconButton, { type: "button", variant: "outline", disabled: disabled || atMin, "aria-label": `Decrease${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => stepBy(-1), tabIndex: -1, children: _jsx(Minus, { className: "size-4", "aria-hidden": true }) }), _jsx("div", { className: "w-28", children: _jsx(Input, { id: id, inputMode: "decimal", role: "spinbutton", "aria-valuenow": value ?? undefined, "aria-valuemin": min, "aria-valuemax": max, className: "text-right tabular-nums", value: displayValue, placeholder: placeholder, disabled: disabled, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, onBlur: onBlur }) }), _jsx(IconButton, { type: "button", variant: "outline", disabled: disabled || atMax, "aria-label": `Increase${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => stepBy(1), tabIndex: -1, children: _jsx(Plus, { className: "size-4", "aria-hidden": true }) })] }));
|
|
213
|
+
return (_jsxs("div", { className: cn('inline-flex items-stretch gap-1', className), children: [_jsx(IconButton, { className: "shrink-0", type: "button", variant: "outline", disabled: disabled || atMin, "aria-label": `Decrease${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => stepBy(-1), tabIndex: -1, children: _jsx(Minus, { className: "size-4", "aria-hidden": true }) }), _jsx("div", { className: "w-28 min-w-0", children: _jsx(Input, { id: id, inputMode: "decimal", role: "spinbutton", "aria-valuenow": value ?? undefined, "aria-valuemin": min, "aria-valuemax": max, className: "text-right tabular-nums", value: displayValue, placeholder: placeholder, disabled: disabled, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, onChange: onChange, onKeyDown: onKeyDown, onFocus: onFocus, onBlur: onBlur }) }), _jsx(IconButton, { className: "shrink-0", type: "button", variant: "outline", disabled: disabled || atMax, "aria-label": `Increase${ariaLabel ? ` ${ariaLabel}` : ''}`, onClick: () => stepBy(1), tabIndex: -1, children: _jsx(Plus, { className: "size-4", "aria-hidden": true }) })] }));
|
|
214
214
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { ToastActionElement } from '../components/ui/toast/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Lifetime of every non-destructive toast, and the `<Toaster />` fallback for
|
|
4
|
+
* anything raised without one. The two must not drift apart, so the Toaster
|
|
5
|
+
* imports this rather than repeating the literal.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_DURATION = 10000;
|
|
2
8
|
type ToastVariant = 'default' | 'success' | 'warning' | 'destructive';
|
|
3
9
|
type ToasterToast = {
|
|
4
10
|
id: string | number;
|
|
@@ -6,9 +12,19 @@ type ToasterToast = {
|
|
|
6
12
|
description?: React.ReactNode;
|
|
7
13
|
variant?: ToastVariant;
|
|
8
14
|
action?: ToastActionElement;
|
|
15
|
+
/**
|
|
16
|
+
* Auto-dismiss delay in ms, which must be greater than 0: sonner resolves it
|
|
17
|
+
* as `toast.duration || toasterDuration || default`, so `0` reads as unset
|
|
18
|
+
* and the toast silently takes the `<Toaster />` default instead of closing
|
|
19
|
+
* at once. Omit it to take the variant's own lifetime: `destructive` stays
|
|
20
|
+
* until dismissed, every other variant closes after 10s.
|
|
21
|
+
*/
|
|
22
|
+
duration?: number;
|
|
23
|
+
};
|
|
24
|
+
type Toast = Omit<ToasterToast, 'id'> & {
|
|
25
|
+
id?: ToasterToast['id'];
|
|
9
26
|
};
|
|
10
|
-
|
|
11
|
-
declare function toast({ title, description, variant, ...rest }: Toast): {
|
|
27
|
+
declare function toast({ title, description, variant, duration, id, ...rest }: Toast): {
|
|
12
28
|
id: string | number;
|
|
13
29
|
dismiss: () => string | number;
|
|
14
30
|
update: (props: Partial<ToasterToast>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"use-toast.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-toast.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAerC,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAA;AAErE,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,KAAK,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;CAAE,CAAA;AAiCnE,iBAAS,KAAK,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK;;;oBAsCxD,OAAO,CAAC,YAAY,CAAC;EASxC;AAED;;;;;;;GAOG;AACH,iBAAS,QAAQ;;wBAGO,MAAM,GAAG,MAAM;YAOrB,YAAY,EAAE;EAE/B;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAC1B,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,39 +1,83 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { toast as sonnerToast } from 'sonner';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Lifetime of every non-destructive toast, and the `<Toaster />` fallback for
|
|
5
|
+
* anything raised without one. The two must not drift apart, so the Toaster
|
|
6
|
+
* imports this rather than repeating the literal.
|
|
7
|
+
*/
|
|
8
|
+
export const DEFAULT_DURATION = 10000;
|
|
9
|
+
/**
|
|
10
|
+
* A destructive toast reports something the operator has to read -- a refused
|
|
11
|
+
* money operation, a failed copy of a show-once secret, a language switch that
|
|
12
|
+
* did not take. It stays up until dismissed instead of auto-closing.
|
|
13
|
+
*
|
|
14
|
+
* `Infinity` is how sonner disables the auto-close timer (it short-circuits the
|
|
15
|
+
* timer effect rather than calling `setTimeout(fn, Infinity)`, which would fire
|
|
16
|
+
* immediately). `<Toaster />` already passes `closeButton`, and sonner gates the
|
|
17
|
+
* close button on that flag alone, never on the duration -- so a persistent
|
|
18
|
+
* toast still renders its dismiss affordance.
|
|
19
|
+
*/
|
|
20
|
+
const PERSIST_UNTIL_DISMISSED = Infinity;
|
|
21
|
+
const isPlainText = (value) => value === undefined || typeof value === 'string';
|
|
22
|
+
/**
|
|
23
|
+
* Two identical errors share one toast instead of stacking: same variant, same
|
|
24
|
+
* text -- same id, and sonner updates the one already on screen.
|
|
25
|
+
*
|
|
26
|
+
* Unbounded stacking is worse for a persistent toast than for a transient one.
|
|
27
|
+
* `<Toaster />` shows three at a time and renders the rest `opacity: 0;
|
|
28
|
+
* pointer-events: none`, so a fourth error nobody can read is also a fourth
|
|
29
|
+
* error nobody can close -- and without an auto-dismiss, nothing ahead of it
|
|
30
|
+
* clears on its own.
|
|
31
|
+
*
|
|
32
|
+
* Only plain-text toasts collapse. A `ReactNode` has no stable key and
|
|
33
|
+
* `String(node)` would fold unrelated errors onto one id.
|
|
34
|
+
*
|
|
35
|
+
* ponytail: the ceiling is still three. Distinct persistent errors past the
|
|
36
|
+
* third queue behind the front three until one is dismissed; lifting that means
|
|
37
|
+
* raising `visibleToasts`, not more work here.
|
|
38
|
+
*/
|
|
39
|
+
function collapseKey(title, description) {
|
|
40
|
+
if (!isPlainText(title) || !isPlainText(description)) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return `destructive:${JSON.stringify([title ?? null, description ?? null])}`;
|
|
44
|
+
}
|
|
45
|
+
function toast({ title, description, variant, duration, id, ...rest }) {
|
|
5
46
|
const message = title ?? '';
|
|
47
|
+
const toastId = variant === 'destructive' && id === undefined
|
|
48
|
+
? collapseKey(title, description)
|
|
49
|
+
: id;
|
|
6
50
|
const options = {
|
|
7
51
|
description,
|
|
8
|
-
...rest
|
|
52
|
+
...rest,
|
|
53
|
+
...(toastId !== undefined && { id: toastId }),
|
|
54
|
+
duration: duration ??
|
|
55
|
+
(variant === 'destructive' ? PERSIST_UNTIL_DISMISSED : DEFAULT_DURATION)
|
|
9
56
|
};
|
|
10
|
-
let
|
|
57
|
+
let raisedId;
|
|
11
58
|
switch (variant) {
|
|
12
59
|
case 'success':
|
|
13
|
-
|
|
14
|
-
id = sonnerToast.success(message, options);
|
|
60
|
+
raisedId = sonnerToast.success(message, options);
|
|
15
61
|
break;
|
|
16
62
|
case 'warning':
|
|
17
|
-
|
|
18
|
-
id = sonnerToast.warning(message, options);
|
|
63
|
+
raisedId = sonnerToast.warning(message, options);
|
|
19
64
|
break;
|
|
20
65
|
case 'destructive':
|
|
21
|
-
|
|
22
|
-
id = sonnerToast.error(message, options);
|
|
66
|
+
raisedId = sonnerToast.error(message, options);
|
|
23
67
|
break;
|
|
24
68
|
default:
|
|
25
|
-
|
|
26
|
-
id = sonnerToast(message, options);
|
|
69
|
+
raisedId = sonnerToast(message, options);
|
|
27
70
|
break;
|
|
28
71
|
}
|
|
29
72
|
return {
|
|
30
|
-
id,
|
|
31
|
-
dismiss: () => sonnerToast.dismiss(
|
|
73
|
+
id: raisedId,
|
|
74
|
+
dismiss: () => sonnerToast.dismiss(raisedId),
|
|
32
75
|
update: (props) => {
|
|
33
76
|
sonnerToast(props.title ?? message, {
|
|
34
|
-
|
|
77
|
+
...rest,
|
|
78
|
+
id: raisedId,
|
|
35
79
|
description: props.description ?? description,
|
|
36
|
-
|
|
80
|
+
duration: props.duration ?? options.duration
|
|
37
81
|
});
|
|
38
82
|
}
|
|
39
83
|
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './components/ui/alert/index.js';
|
|
2
2
|
export * from './components/ui/autocomplete/index.js';
|
|
3
|
+
export * from './hooks/use-click-away.js';
|
|
3
4
|
export * from './components/ui/autosize-textarea/index.js';
|
|
4
5
|
export * from './components/ui/avatar/index.js';
|
|
5
6
|
export * from './components/ui/badge/index.js';
|
|
@@ -17,6 +18,7 @@ export * from './components/ui/dropdown-menu/index.js';
|
|
|
17
18
|
export * from './components/ui/input/index.js';
|
|
18
19
|
export * from './components/ui/otp-input/index.js';
|
|
19
20
|
export * from './components/ui/label/index.js';
|
|
21
|
+
export * from './components/ui/lerian-wordmark/index.js';
|
|
20
22
|
export * from './components/ui/loading-button/index.js';
|
|
21
23
|
export * from './components/ui/multiple-select/index.js';
|
|
22
24
|
export * from './components/ui/paper/index.js';
|
|
@@ -39,6 +41,7 @@ export * from './components/ui/toast/index.js';
|
|
|
39
41
|
export * from './components/ui/toast/toaster.js';
|
|
40
42
|
export * from './hooks/use-toast.js';
|
|
41
43
|
export * from './components/ui/time-picker/index.js';
|
|
44
|
+
export * from './hooks/use-time.js';
|
|
42
45
|
export * from './components/ui/tooltip/index.js';
|
|
43
46
|
export * from './components/ui/form.js';
|
|
44
47
|
export { Breadcrumb as ApplicationBreadcrumb } from './components/breadcrumb/index.js';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AAGpC,OAAO,EAAE,UAAU,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC7E,cAAc,8CAA8C,CAAA;AAC5D,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AAGxB,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAG5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,uBAAuB,CAAA;AACrC,cAAc,mCAAmC,CAAA;AACjD,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AAGpC,OAAO,EAAE,UAAU,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC7E,cAAc,8CAA8C,CAAA;AAC5D,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AAGxB,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAG5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,cAAc,kBAAkB,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Primitives
|
|
3
3
|
export * from './components/ui/alert/index.js';
|
|
4
4
|
export * from './components/ui/autocomplete/index.js';
|
|
5
|
+
export * from './hooks/use-click-away.js';
|
|
5
6
|
export * from './components/ui/autosize-textarea/index.js';
|
|
6
7
|
export * from './components/ui/avatar/index.js';
|
|
7
8
|
export * from './components/ui/badge/index.js';
|
|
@@ -19,6 +20,7 @@ export * from './components/ui/dropdown-menu/index.js';
|
|
|
19
20
|
export * from './components/ui/input/index.js';
|
|
20
21
|
export * from './components/ui/otp-input/index.js';
|
|
21
22
|
export * from './components/ui/label/index.js';
|
|
23
|
+
export * from './components/ui/lerian-wordmark/index.js';
|
|
22
24
|
export * from './components/ui/loading-button/index.js';
|
|
23
25
|
export * from './components/ui/multiple-select/index.js';
|
|
24
26
|
export * from './components/ui/paper/index.js';
|
|
@@ -41,6 +43,7 @@ export * from './components/ui/toast/index.js';
|
|
|
41
43
|
export * from './components/ui/toast/toaster.js';
|
|
42
44
|
export * from './hooks/use-toast.js';
|
|
43
45
|
export * from './components/ui/time-picker/index.js';
|
|
46
|
+
export * from './hooks/use-time.js';
|
|
44
47
|
export * from './components/ui/tooltip/index.js';
|
|
45
48
|
export * from './components/ui/form.js';
|
|
46
49
|
// Components
|
package/dist/esm/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { type ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
/** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
|
|
4
|
+
export declare function keepOpenOnToast<E extends Event>(onInteractOutside?: (event: E) => void): (event: E) => void;
|
|
3
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AA8B5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,EAC7C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,IAE9B,OAAO,CAAC,UASjB"}
|
package/dist/esm/lib/utils.js
CHANGED
|
@@ -29,3 +29,13 @@ const twMerge = extendTailwindMerge({
|
|
|
29
29
|
export function cn(...inputs) {
|
|
30
30
|
return twMerge(clsx(inputs));
|
|
31
31
|
}
|
|
32
|
+
/** Wraps a Radix `onInteractOutside` so a press on a toast never dismisses the layer under it. */
|
|
33
|
+
export function keepOpenOnToast(onInteractOutside) {
|
|
34
|
+
return (event) => {
|
|
35
|
+
if (event.target?.closest('[data-sonner-toaster]')) {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
onInteractOutside?.(event);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { ToastActionElement } from '../components/ui/toast/index.js';
|
|
2
2
|
/** Extra toast props for the severity helpers (the variant is fixed per helper). */
|
|
3
3
|
export interface ToastOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Caller-controlled toast identity. A repeat under the same id updates the
|
|
6
|
+
* toast in place instead of stacking a second one; omit it and a destructive
|
|
7
|
+
* toast derives its own from the title and description.
|
|
8
|
+
*/
|
|
9
|
+
id?: string | number;
|
|
4
10
|
/** Optional action element rendered inside the toast. */
|
|
5
11
|
action?: ToastActionElement;
|
|
6
12
|
/**
|
|
@@ -9,6 +15,13 @@ export interface ToastOptions {
|
|
|
9
15
|
* it, so it is not rendered. Put it in `description` if it must be visible.
|
|
10
16
|
*/
|
|
11
17
|
errorCode?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Auto-dismiss delay in ms, overriding the variant's own lifetime for this
|
|
20
|
+
* one call. Must be greater than 0 -- sonner reads `0` as unset and falls
|
|
21
|
+
* back to the `<Toaster />` default. Omit it and `errorToast` stays until
|
|
22
|
+
* dismissed while `successToast` and `warningToast` close after 10s.
|
|
23
|
+
*/
|
|
24
|
+
duration?: number;
|
|
12
25
|
}
|
|
13
26
|
export declare function successToast(title: string, description?: string, opts?: Partial<ToastOptions>): void;
|
|
14
27
|
export declare function errorToast(title: string, description?: string, opts?: Partial<ToastOptions>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/toast/helpers.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/toast/helpers.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,yDAAyD;IACzD,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAkBD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC3B,IAAI,CAEN;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC3B,IAAI,CAEN;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC3B,IAAI,CAEN"}
|
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { toast } from '../hooks/use-toast.js';
|
|
18
18
|
function raise(variant, title, description, opts) {
|
|
19
|
-
toast({
|
|
19
|
+
toast({
|
|
20
|
+
action: opts?.action,
|
|
21
|
+
variant,
|
|
22
|
+
title,
|
|
23
|
+
description,
|
|
24
|
+
duration: opts?.duration,
|
|
25
|
+
id: opts?.id
|
|
26
|
+
});
|
|
20
27
|
}
|
|
21
28
|
export function successToast(title, description, opts) {
|
|
22
29
|
raise('success', title, description, opts);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
IBM Plex Sans: Copyright 2019 IBM Corp. All rights reserved. With Reserved Font Name "Plex".
|
|
2
|
+
IBM Plex Serif: Copyright 2020 IBM Corp. All rights reserved. With Reserved Font Name "Plex".
|
|
3
|
+
IBM Plex Mono: Copyright 2017 IBM Corp. All rights reserved. With Reserved Font Name "Plex".
|
|
4
|
+
Inter: Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter).
|
|
5
|
+
|
|
6
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
7
|
+
This license is copied below, and is also available with a FAQ at:
|
|
8
|
+
http://scripts.sil.org/OFL
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
13
|
+
-----------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
PREAMBLE
|
|
16
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
17
|
+
development of collaborative font projects, to support the font creation
|
|
18
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
19
|
+
open framework in which fonts may be shared and improved in partnership
|
|
20
|
+
with others.
|
|
21
|
+
|
|
22
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
23
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
24
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
25
|
+
redistributed and/or sold with any software provided that any reserved
|
|
26
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
27
|
+
however, cannot be released under any other type of license. The
|
|
28
|
+
requirement for fonts to remain under this license does not apply
|
|
29
|
+
to any document created using the fonts or their derivatives.
|
|
30
|
+
|
|
31
|
+
DEFINITIONS
|
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
33
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
34
|
+
include source files, build scripts and documentation.
|
|
35
|
+
|
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
37
|
+
copyright statement(s).
|
|
38
|
+
|
|
39
|
+
"Original Version" refers to the collection of Font Software components as
|
|
40
|
+
distributed by the Copyright Holder(s).
|
|
41
|
+
|
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
43
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
44
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
45
|
+
new environment.
|
|
46
|
+
|
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
48
|
+
writer or other person who contributed to the Font Software.
|
|
49
|
+
|
|
50
|
+
PERMISSION & CONDITIONS
|
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
52
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
53
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
54
|
+
Software, subject to the following conditions:
|
|
55
|
+
|
|
56
|
+
1) Neither the Font Software nor any of its individual components,
|
|
57
|
+
in Original or Modified Versions, may be sold by itself.
|
|
58
|
+
|
|
59
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
60
|
+
redistributed and/or sold with any software, provided that each copy
|
|
61
|
+
contains the above copyright notice and this license. These can be
|
|
62
|
+
included either as stand-alone text files, human-readable headers or
|
|
63
|
+
in the appropriate machine-readable metadata fields within text or
|
|
64
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
65
|
+
|
|
66
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
67
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
68
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
69
|
+
presented to the users.
|
|
70
|
+
|
|
71
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
72
|
+
Software shall not be used to promote, endorse or advertise any
|
|
73
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
74
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
75
|
+
permission.
|
|
76
|
+
|
|
77
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
78
|
+
must be distributed entirely under this license, and must not be
|
|
79
|
+
distributed under any other license. The requirement for fonts to
|
|
80
|
+
remain under this license does not apply to any document created
|
|
81
|
+
using the Font Software.
|
|
82
|
+
|
|
83
|
+
TERMINATION
|
|
84
|
+
This license becomes null and void if any of the above conditions are
|
|
85
|
+
not met.
|
|
86
|
+
|
|
87
|
+
DISCLAIMER
|
|
88
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
89
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
91
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
92
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
93
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
94
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
95
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
96
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/fonts.css
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* Inter latin, fetched from https://fonts.googleapis.com/css2?family=Inter:wght@100..900 */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Lerian Inter';
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 100 900;
|
|
6
|
+
font-display: swap;
|
|
7
|
+
src: url('./fonts/inter-latin.woff2') format('woff2');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'Lerian Plex Serif';
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
src: url('./fonts/ibm-plex-serif-latin-400.woff2') format('woff2');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: 'Lerian Plex Serif';
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
font-display: swap;
|
|
23
|
+
src: url('./fonts/ibm-plex-serif-latin-500.woff2') format('woff2');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: 'Lerian Plex Mono';
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
font-display: swap;
|
|
31
|
+
src: url('./fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'Lerian Plex Mono';
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
font-display: swap;
|
|
39
|
+
src: url('./fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:root {
|
|
43
|
+
--font-inter: 'Lerian Inter';
|
|
44
|
+
--font-plex-serif: 'Lerian Plex Serif';
|
|
45
|
+
--font-plex-mono: 'Lerian Plex Mono';
|
|
46
|
+
}
|