@ttt-productions/ui-core 0.11.32 → 0.11.34
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/dist/browser/index.d.ts +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/reload-recovery-watch.d.ts +2 -2
- package/dist/browser/reload-recovery-watch.d.ts.map +1 -1
- package/dist/browser/reload-recovery-watch.js +5 -5
- package/dist/browser/reload-recovery-watch.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/format-numbers.js +2 -2
- package/dist/lib/format-numbers.js.map +1 -1
- package/dist/lib/reload-recovery.js +13 -13
- package/dist/lib/reload-recovery.js.map +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/react/components/accordion.d.ts +2 -2
- package/dist/react/components/accordion.d.ts.map +1 -1
- package/dist/react/components/accordion.js +8 -8
- package/dist/react/components/accordion.js.map +1 -1
- package/dist/react/components/action-row.d.ts +32 -0
- package/dist/react/components/action-row.d.ts.map +1 -0
- package/dist/react/components/action-row.js +16 -0
- package/dist/react/components/action-row.js.map +1 -0
- package/dist/react/components/alert-dialog.d.ts +2 -2
- package/dist/react/components/alert-dialog.d.ts.map +1 -1
- package/dist/react/components/alert-dialog.js +15 -15
- package/dist/react/components/alert-dialog.js.map +1 -1
- package/dist/react/components/alert.d.ts +2 -2
- package/dist/react/components/alert.d.ts.map +1 -1
- package/dist/react/components/alert.js +12 -12
- package/dist/react/components/alert.js.map +1 -1
- package/dist/react/components/avatar.d.ts +2 -2
- package/dist/react/components/avatar.d.ts.map +1 -1
- package/dist/react/components/avatar.js +7 -7
- package/dist/react/components/avatar.js.map +1 -1
- package/dist/react/components/badge.d.ts +2 -2
- package/dist/react/components/badge.d.ts.map +1 -1
- package/dist/react/components/badge.js +9 -9
- package/dist/react/components/badge.js.map +1 -1
- package/dist/react/components/button.d.ts +2 -2
- package/dist/react/components/button.d.ts.map +1 -1
- package/dist/react/components/button.js +28 -28
- package/dist/react/components/button.js.map +1 -1
- package/dist/react/components/card.d.ts +1 -1
- package/dist/react/components/card.d.ts.map +1 -1
- package/dist/react/components/card.js +15 -15
- package/dist/react/components/card.js.map +1 -1
- package/dist/react/components/checkbox.d.ts +2 -2
- package/dist/react/components/checkbox.d.ts.map +1 -1
- package/dist/react/components/checkbox.js +6 -6
- package/dist/react/components/checkbox.js.map +1 -1
- package/dist/react/components/collapsible.d.ts +1 -1
- package/dist/react/components/collapsible.d.ts.map +1 -1
- package/dist/react/components/collapsible.js +2 -2
- package/dist/react/components/collapsible.js.map +1 -1
- package/dist/react/components/consequence-dialog.d.ts.map +1 -1
- package/dist/react/components/consequence-dialog.js +4 -2
- package/dist/react/components/consequence-dialog.js.map +1 -1
- package/dist/react/components/date-picker.d.ts +1 -1
- package/dist/react/components/date-picker.d.ts.map +1 -1
- package/dist/react/components/date-picker.js +102 -66
- package/dist/react/components/date-picker.js.map +1 -1
- package/dist/react/components/date-time-picker.d.ts +1 -1
- package/dist/react/components/date-time-picker.d.ts.map +1 -1
- package/dist/react/components/date-time-picker.js +20 -18
- package/dist/react/components/date-time-picker.js.map +1 -1
- package/dist/react/components/dialog.d.ts +2 -2
- package/dist/react/components/dialog.d.ts.map +1 -1
- package/dist/react/components/dialog.js +14 -14
- package/dist/react/components/dialog.js.map +1 -1
- package/dist/react/components/dropdown-menu.d.ts +2 -2
- package/dist/react/components/dropdown-menu.d.ts.map +1 -1
- package/dist/react/components/dropdown-menu.js +23 -18
- package/dist/react/components/dropdown-menu.js.map +1 -1
- package/dist/react/components/end-of-list-indicator.d.ts +1 -1
- package/dist/react/components/end-of-list-indicator.js +3 -3
- package/dist/react/components/end-of-list-indicator.js.map +1 -1
- package/dist/react/components/form.d.ts +3 -3
- package/dist/react/components/form.d.ts.map +1 -1
- package/dist/react/components/form.js +17 -17
- package/dist/react/components/form.js.map +1 -1
- package/dist/react/components/format-control.d.ts +12 -5
- package/dist/react/components/format-control.d.ts.map +1 -1
- package/dist/react/components/format-control.js +23 -7
- package/dist/react/components/format-control.js.map +1 -1
- package/dist/react/components/input.d.ts +10 -10
- package/dist/react/components/input.d.ts.map +1 -1
- package/dist/react/components/input.js +11 -7
- package/dist/react/components/input.js.map +1 -1
- package/dist/react/components/label.d.ts +3 -3
- package/dist/react/components/label.d.ts.map +1 -1
- package/dist/react/components/label.js +6 -6
- package/dist/react/components/label.js.map +1 -1
- package/dist/react/components/layout/screen-adaptive-view.d.ts +2 -2
- package/dist/react/components/layout/screen-adaptive-view.d.ts.map +1 -1
- package/dist/react/components/layout/screen-adaptive-view.js +39 -35
- package/dist/react/components/layout/screen-adaptive-view.js.map +1 -1
- package/dist/react/components/list-pagination.d.ts +1 -1
- package/dist/react/components/list-pagination.js +10 -10
- package/dist/react/components/list-pagination.js.map +1 -1
- package/dist/react/components/menubar.d.ts +2 -2
- package/dist/react/components/menubar.d.ts.map +1 -1
- package/dist/react/components/menubar.js +17 -17
- package/dist/react/components/menubar.js.map +1 -1
- package/dist/react/components/opener-focus.d.ts +1 -1
- package/dist/react/components/opener-focus.d.ts.map +1 -1
- package/dist/react/components/opener-focus.js +3 -3
- package/dist/react/components/opener-focus.js.map +1 -1
- package/dist/react/components/pending-guard.d.ts +1 -1
- package/dist/react/components/pending-guard.d.ts.map +1 -1
- package/dist/react/components/pending-guard.js +1 -1
- package/dist/react/components/pending-guard.js.map +1 -1
- package/dist/react/components/popover.d.ts +2 -2
- package/dist/react/components/popover.d.ts.map +1 -1
- package/dist/react/components/popover.js +5 -5
- package/dist/react/components/popover.js.map +1 -1
- package/dist/react/components/progress.d.ts +2 -2
- package/dist/react/components/progress.d.ts.map +1 -1
- package/dist/react/components/progress.js +5 -5
- package/dist/react/components/progress.js.map +1 -1
- package/dist/react/components/radio-group.d.ts +2 -2
- package/dist/react/components/radio-group.d.ts.map +1 -1
- package/dist/react/components/radio-group.js +7 -7
- package/dist/react/components/radio-group.js.map +1 -1
- package/dist/react/components/relative-time.d.ts +1 -1
- package/dist/react/components/relative-time.d.ts.map +1 -1
- package/dist/react/components/relative-time.js +8 -7
- package/dist/react/components/relative-time.js.map +1 -1
- package/dist/react/components/reload-recovery-notice.d.ts +3 -3
- package/dist/react/components/reload-recovery-notice.js +7 -7
- package/dist/react/components/reload-recovery-notice.js.map +1 -1
- package/dist/react/components/scroll-area.d.ts +2 -2
- package/dist/react/components/scroll-area.d.ts.map +1 -1
- package/dist/react/components/scroll-area.js +6 -8
- package/dist/react/components/scroll-area.js.map +1 -1
- package/dist/react/components/scroll-to-top-button.d.ts +5 -5
- package/dist/react/components/scroll-to-top-button.js +9 -9
- package/dist/react/components/scroll-to-top-button.js.map +1 -1
- package/dist/react/components/search-dropdown.d.ts.map +1 -1
- package/dist/react/components/search-dropdown.js +8 -3
- package/dist/react/components/search-dropdown.js.map +1 -1
- package/dist/react/components/select.d.ts +2 -2
- package/dist/react/components/select.d.ts.map +1 -1
- package/dist/react/components/select.js +19 -19
- package/dist/react/components/select.js.map +1 -1
- package/dist/react/components/separator.d.ts +2 -2
- package/dist/react/components/separator.d.ts.map +1 -1
- package/dist/react/components/separator.js +5 -5
- package/dist/react/components/separator.js.map +1 -1
- package/dist/react/components/sheet.d.ts +3 -3
- package/dist/react/components/sheet.d.ts.map +1 -1
- package/dist/react/components/sheet.js +21 -21
- package/dist/react/components/sheet.js.map +1 -1
- package/dist/react/components/show-more-toggle.d.ts +2 -2
- package/dist/react/components/show-more-toggle.d.ts.map +1 -1
- package/dist/react/components/show-more-toggle.js +6 -6
- package/dist/react/components/show-more-toggle.js.map +1 -1
- package/dist/react/components/skeleton.d.ts +1 -1
- package/dist/react/components/skeleton.d.ts.map +1 -1
- package/dist/react/components/skeleton.js +3 -3
- package/dist/react/components/skeleton.js.map +1 -1
- package/dist/react/components/slider.d.ts +2 -2
- package/dist/react/components/slider.d.ts.map +1 -1
- package/dist/react/components/slider.js +5 -5
- package/dist/react/components/slider.js.map +1 -1
- package/dist/react/components/spinner.d.ts +1 -1
- package/dist/react/components/spinner.d.ts.map +1 -1
- package/dist/react/components/spinner.js +10 -10
- package/dist/react/components/spinner.js.map +1 -1
- package/dist/react/components/switch.d.ts +2 -2
- package/dist/react/components/switch.d.ts.map +1 -1
- package/dist/react/components/switch.js +13 -8
- package/dist/react/components/switch.js.map +1 -1
- package/dist/react/components/table.d.ts +2 -2
- package/dist/react/components/table.d.ts.map +1 -1
- package/dist/react/components/table.js +24 -24
- package/dist/react/components/table.js.map +1 -1
- package/dist/react/components/tabs.d.ts +2 -2
- package/dist/react/components/tabs.d.ts.map +1 -1
- package/dist/react/components/tabs.js +7 -7
- package/dist/react/components/tabs.js.map +1 -1
- package/dist/react/components/textarea.d.ts +5 -5
- package/dist/react/components/textarea.d.ts.map +1 -1
- package/dist/react/components/textarea.js +11 -7
- package/dist/react/components/textarea.js.map +1 -1
- package/dist/react/components/toast.d.ts +4 -4
- package/dist/react/components/toast.d.ts.map +1 -1
- package/dist/react/components/toast.js +25 -25
- package/dist/react/components/toast.js.map +1 -1
- package/dist/react/components/toaster.d.ts.map +1 -1
- package/dist/react/components/toaster.js +5 -5
- package/dist/react/components/toaster.js.map +1 -1
- package/dist/react/components/tooltip.d.ts +2 -2
- package/dist/react/components/tooltip.d.ts.map +1 -1
- package/dist/react/components/tooltip.js +5 -5
- package/dist/react/components/tooltip.js.map +1 -1
- package/dist/react/hooks/use-async-action.js +2 -2
- package/dist/react/hooks/use-async-action.js.map +1 -1
- package/dist/react/hooks/use-cursor-page.d.ts +1 -1
- package/dist/react/hooks/use-cursor-page.js +2 -2
- package/dist/react/hooks/use-cursor-page.js.map +1 -1
- package/dist/react/hooks/use-media-query.js +5 -5
- package/dist/react/hooks/use-media-query.js.map +1 -1
- package/dist/react/hooks/use-paged-list.js +2 -2
- package/dist/react/hooks/use-paged-list.js.map +1 -1
- package/dist/react/hooks/use-return-scroll.d.ts +1 -1
- package/dist/react/hooks/use-return-scroll.d.ts.map +1 -1
- package/dist/react/hooks/use-return-scroll.js +11 -11
- package/dist/react/hooks/use-return-scroll.js.map +1 -1
- package/dist/react/hooks/use-toast.d.ts +3 -3
- package/dist/react/hooks/use-toast.d.ts.map +1 -1
- package/dist/react/hooks/use-toast.js +17 -17
- package/dist/react/hooks/use-toast.js.map +1 -1
- package/dist/react/index.d.ts +74 -72
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +51 -50
- package/dist/react/index.js.map +1 -1
- package/package.json +8 -6
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { createReloadRecoveryWatch } from
|
|
2
|
-
export type { ReloadRecoveryTarget, ReloadRecoveryWatch } from
|
|
1
|
+
export { createReloadRecoveryWatch } from './reload-recovery-watch.js';
|
|
2
|
+
export type { ReloadRecoveryTarget, ReloadRecoveryWatch } from './reload-recovery-watch.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Browser runtime with no React: what a client entry starts before the app mounts.\nexport { createReloadRecoveryWatch } from
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Browser runtime with no React: what a client entry starts before the app mounts.\nexport { createReloadRecoveryWatch } from './reload-recovery-watch.js';\nexport type { ReloadRecoveryTarget, ReloadRecoveryWatch } from './reload-recovery-watch.js';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ReloadRecoveryKind } from
|
|
1
|
+
import { type ReloadRecoveryKind } from '../lib/reload-recovery.js';
|
|
2
2
|
/** What the watch listens on: the page's window. */
|
|
3
|
-
export type ReloadRecoveryTarget = Pick<Window,
|
|
3
|
+
export type ReloadRecoveryTarget = Pick<Window, 'addEventListener' | 'removeEventListener'>;
|
|
4
4
|
export interface ReloadRecoveryWatch {
|
|
5
5
|
/** The first failure only a reload repairs since the watch started, or `null` while there is none. */
|
|
6
6
|
current: () => ReloadRecoveryKind | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reload-recovery-watch.d.ts","sourceRoot":"","sources":["../../src/browser/reload-recovery-watch.ts"],"names":[],"mappings":"AAKA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,oDAAoD;AACpD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;AAE5F,MAAM,WAAW,mBAAmB;IAClC,sGAAsG;IACtG,OAAO,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACzC,0FAA0F;IAC1F,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,yDAAyD;IACzD,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,wBAAgB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"reload-recovery-watch.d.ts","sourceRoot":"","sources":["../../src/browser/reload-recovery-watch.ts"],"names":[],"mappings":"AAKA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,oDAAoD;AACpD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,CAAC;AAE5F,MAAM,WAAW,mBAAmB;IAClC,sGAAsG;IACtG,OAAO,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACzC,0FAA0F;IAC1F,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,yDAAyD;IACzD,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,wBAAgB,yBAAyB,CACvC,MAAM,GAAE,oBAA6B,GACpC,mBAAmB,CA6BrB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// entry, before React mounts, so a failure raised during startup is recorded for the notice to show
|
|
3
3
|
// once it mounts. It only listens: it never calls `preventDefault`, so the app's monitoring still
|
|
4
4
|
// captures every event once, and it never reloads the page.
|
|
5
|
-
import { reloadRecoveryKindOf } from
|
|
5
|
+
import { reloadRecoveryKindOf } from '../lib/reload-recovery.js';
|
|
6
6
|
export function createReloadRecoveryWatch(target = window) {
|
|
7
7
|
let recorded = null;
|
|
8
8
|
const listeners = new Set();
|
|
@@ -17,8 +17,8 @@ export function createReloadRecoveryWatch(target = window) {
|
|
|
17
17
|
// An error event's `error` is the thrown value; a cross-origin script's carries only the message.
|
|
18
18
|
const onError = (event) => record(reloadRecoveryKindOf(event.error) ?? reloadRecoveryKindOf({ message: event.message }));
|
|
19
19
|
const onRejection = (event) => record(reloadRecoveryKindOf(event.reason));
|
|
20
|
-
target.addEventListener(
|
|
21
|
-
target.addEventListener(
|
|
20
|
+
target.addEventListener('error', onError);
|
|
21
|
+
target.addEventListener('unhandledrejection', onRejection);
|
|
22
22
|
return {
|
|
23
23
|
current: () => recorded,
|
|
24
24
|
subscribe: (listener) => {
|
|
@@ -26,8 +26,8 @@ export function createReloadRecoveryWatch(target = window) {
|
|
|
26
26
|
return () => listeners.delete(listener);
|
|
27
27
|
},
|
|
28
28
|
stop: () => {
|
|
29
|
-
target.removeEventListener(
|
|
30
|
-
target.removeEventListener(
|
|
29
|
+
target.removeEventListener('error', onError);
|
|
30
|
+
target.removeEventListener('unhandledrejection', onRejection);
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reload-recovery-watch.js","sourceRoot":"","sources":["../../src/browser/reload-recovery-watch.ts"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AAE,GAAG,EAAE,CAAC,QAAQ;QACvB,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE;YACtB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Watches the page for the first failure only a reload repairs. Started once at the app's client\n// entry, before React mounts, so a failure raised during startup is recorded for the notice to show\n// once it mounts. It only listens: it never calls `preventDefault`, so the app's monitoring still\n// captures every event once, and it never reloads the page.\n\nimport { reloadRecoveryKindOf, type ReloadRecoveryKind } from '../lib/reload-recovery.js';\n\n/** What the watch listens on: the page's window. */\nexport type ReloadRecoveryTarget = Pick<Window, 'addEventListener' | 'removeEventListener'>;\n\nexport interface ReloadRecoveryWatch {\n /** The first failure only a reload repairs since the watch started, or `null` while there is none. */\n current: () => ReloadRecoveryKind | null;\n /** Calls `listener` once, when the first failure is recorded. Answers the unsubscribe. */\n subscribe: (listener: () => void) => () => void;\n /** Stops listening; a failure already recorded stays. */\n stop: () => void;\n}\n\nexport function createReloadRecoveryWatch(\n target: ReloadRecoveryTarget = window,\n): ReloadRecoveryWatch {\n let recorded: ReloadRecoveryKind | null = null;\n const listeners = new Set<() => void>();\n\n const record = (kind: ReloadRecoveryKind | null) => {\n // The first failure stands: a repeat of it, or the other one after it, changes nothing.\n if (kind === null || recorded !== null) return;\n recorded = kind;\n for (const listener of [...listeners]) listener();\n };\n // An error event's `error` is the thrown value; a cross-origin script's carries only the message.\n const onError = (event: ErrorEvent) =>\n record(reloadRecoveryKindOf(event.error) ?? reloadRecoveryKindOf({ message: event.message }));\n const onRejection = (event: PromiseRejectionEvent) => record(reloadRecoveryKindOf(event.reason));\n\n target.addEventListener('error', onError);\n target.addEventListener('unhandledrejection', onRejection);\n\n return {\n current: () => recorded,\n subscribe: (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n stop: () => {\n target.removeEventListener('error', onError);\n target.removeEventListener('unhandledrejection', onRejection);\n },\n };\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './lib/utils.js';
|
|
2
|
+
export * from './lib/format-numbers.js';
|
|
3
|
+
export * from './lib/reload-recovery.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Server-safe utilities only. React components and hooks live behind ./react.
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
2
|
+
export * from './lib/utils.js';
|
|
3
|
+
export * from './lib/format-numbers.js';
|
|
4
|
+
export * from './lib/reload-recovery.js';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC","sourcesContent":["// Server-safe utilities only. React components and hooks live behind ./react.\nexport * from
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC","sourcesContent":["// Server-safe utilities only. React components and hooks live behind ./react.\nexport * from './lib/utils.js';\nexport * from './lib/format-numbers.js';\nexport * from './lib/reload-recovery.js';\n"]}
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
export function formatLargeNumber(num) {
|
|
8
8
|
if (num >= 1_000_000) {
|
|
9
9
|
const formatted = (num / 1_000_000).toFixed(1);
|
|
10
|
-
return (formatted.endsWith(
|
|
10
|
+
return (formatted.endsWith('.0') ? formatted.slice(0, -2) : formatted) + 'M';
|
|
11
11
|
}
|
|
12
12
|
if (num >= 10_000) {
|
|
13
13
|
const formatted = (num / 1000).toFixed(1);
|
|
14
|
-
return (formatted.endsWith(
|
|
14
|
+
return (formatted.endsWith('.0') ? formatted.slice(0, -2) : formatted) + 'k';
|
|
15
15
|
}
|
|
16
16
|
return num.toString();
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-numbers.js","sourceRoot":"","sources":["../../src/lib/format-numbers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;QACrB,MAAM,SAAS,GAAG,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;IAC/E,CAAC;IACD,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;QAClB,MAAM,SAAS,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;IAC/E,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC","sourcesContent":["/**\n * Compact number formatter:\n * < 10,000 → \"1234\"\n * 10,000 ≤ n < 1,000,000 → \"12.3k\" (trailing \".0\" stripped)\n * ≥ 1,000,000 → \"1.2M\" (trailing \".0\" stripped)\n */\nexport function formatLargeNumber(num: number): string {\n if (num >= 1_000_000) {\n const formatted = (num / 1_000_000).toFixed(1);\n return (formatted.endsWith(
|
|
1
|
+
{"version":3,"file":"format-numbers.js","sourceRoot":"","sources":["../../src/lib/format-numbers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,IAAI,GAAG,IAAI,SAAS,EAAE,CAAC;QACrB,MAAM,SAAS,GAAG,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;IAC/E,CAAC;IACD,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;QAClB,MAAM,SAAS,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;IAC/E,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC","sourcesContent":["/**\n * Compact number formatter:\n * < 10,000 → \"1234\"\n * 10,000 ≤ n < 1,000,000 → \"12.3k\" (trailing \".0\" stripped)\n * ≥ 1,000,000 → \"1.2M\" (trailing \".0\" stripped)\n */\nexport function formatLargeNumber(num: number): string {\n if (num >= 1_000_000) {\n const formatted = (num / 1_000_000).toFixed(1);\n return (formatted.endsWith('.0') ? formatted.slice(0, -2) : formatted) + 'M';\n }\n if (num >= 10_000) {\n const formatted = (num / 1000).toFixed(1);\n return (formatted.endsWith('.0') ? formatted.slice(0, -2) : formatted) + 'k';\n }\n return num.toString();\n}\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// The failures that leave a page only a reload repairs, recognised narrowly. Server-safe: pure
|
|
2
2
|
// predicates over whatever an `error` or `unhandledrejection` event carries.
|
|
3
3
|
/** Each failure only a reload repairs. */
|
|
4
|
-
export const RELOAD_RECOVERY_KINDS = [
|
|
5
|
-
const STORAGE_DISCONNECT_NAME =
|
|
6
|
-
const STORAGE_DISCONNECT_MESSAGE =
|
|
7
|
-
const STALE_CHUNK_NAME =
|
|
8
|
-
const STALE_CHUNK_MESSAGE =
|
|
4
|
+
export const RELOAD_RECOVERY_KINDS = ['storageDisconnect', 'staleChunk'];
|
|
5
|
+
const STORAGE_DISCONNECT_NAME = 'UnknownError';
|
|
6
|
+
const STORAGE_DISCONNECT_MESSAGE = 'Connection to Indexed Database server lost';
|
|
7
|
+
const STALE_CHUNK_NAME = 'ChunkLoadError';
|
|
8
|
+
const STALE_CHUNK_MESSAGE = 'Failed to load chunk';
|
|
9
9
|
function fieldOf(reason, field) {
|
|
10
|
-
if (typeof reason !==
|
|
10
|
+
if (typeof reason !== 'object' || reason === null)
|
|
11
11
|
return null;
|
|
12
12
|
const value = reason[field];
|
|
13
|
-
return typeof value ===
|
|
13
|
+
return typeof value === 'string' ? value : null;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* WebKit dropping a page's IndexedDB connection when it reclaims a backgrounded tab: an
|
|
@@ -19,20 +19,20 @@ function fieldOf(reason, field) {
|
|
|
19
19
|
* storage, or network failure, is this one.
|
|
20
20
|
*/
|
|
21
21
|
export function isStorageDisconnectError(reason) {
|
|
22
|
-
return (fieldOf(reason,
|
|
23
|
-
(fieldOf(reason,
|
|
22
|
+
return (fieldOf(reason, 'name') === STORAGE_DISCONNECT_NAME &&
|
|
23
|
+
(fieldOf(reason, 'message')?.includes(STORAGE_DISCONNECT_MESSAGE) ?? false));
|
|
24
24
|
}
|
|
25
25
|
/** A code chunk the deployed build no longer serves: a `ChunkLoadError`, or "Failed to load chunk". */
|
|
26
26
|
export function isStaleChunkError(reason) {
|
|
27
|
-
return (fieldOf(reason,
|
|
28
|
-
(fieldOf(reason,
|
|
27
|
+
return (fieldOf(reason, 'name') === STALE_CHUNK_NAME ||
|
|
28
|
+
(fieldOf(reason, 'message')?.includes(STALE_CHUNK_MESSAGE) ?? false));
|
|
29
29
|
}
|
|
30
30
|
/** Which failure only a reload repairs `reason` is, or `null` for any other. */
|
|
31
31
|
export function reloadRecoveryKindOf(reason) {
|
|
32
32
|
if (isStorageDisconnectError(reason))
|
|
33
|
-
return
|
|
33
|
+
return 'storageDisconnect';
|
|
34
34
|
if (isStaleChunkError(reason))
|
|
35
|
-
return
|
|
35
|
+
return 'staleChunk';
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=reload-recovery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reload-recovery.js","sourceRoot":"","sources":["../../src/lib/reload-recovery.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,6EAA6E;AAE7E,0CAA0C;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,mBAAmB,EAAE,YAAY,CAAU,CAAC;AAGlF,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAC/C,MAAM,0BAA0B,GAAG,4CAA4C,CAAC;AAChF,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAC1C,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAEnD,SAAS,OAAO,CAAC,MAAe,EAAE,KAAyB;IACzD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,KAAK,GAAI,MAAkC,CAAC,KAAK,CAAC,CAAC;IACzD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAe;IACtD,OAAO,CACL,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,uBAAuB;QACnD,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,0BAA0B,CAAC,IAAI,KAAK,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,iBAAiB,CAAC,MAAe;IAC/C,OAAO,CACL,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,gBAAgB;QAC5C,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC,IAAI,KAAK,CAAC,CACrE,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,IAAI,wBAAwB,CAAC,MAAM,CAAC;QAAE,OAAO,mBAAmB,CAAC;IACjE,IAAI,iBAAiB,CAAC,MAAM,CAAC;QAAE,OAAO,YAAY,CAAC;IACnD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// The failures that leave a page only a reload repairs, recognised narrowly. Server-safe: pure\n// predicates over whatever an `error` or `unhandledrejection` event carries.\n\n/** Each failure only a reload repairs. */\nexport const RELOAD_RECOVERY_KINDS = [
|
|
1
|
+
{"version":3,"file":"reload-recovery.js","sourceRoot":"","sources":["../../src/lib/reload-recovery.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,6EAA6E;AAE7E,0CAA0C;AAC1C,MAAM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ent":["// The failures that leave a page only a reload repairs, recognised narrowly. Server-safe: pure\n// predicates over whatever an `error` or `unhandledrejection` event carries.\n\n/** Each failure only a reload repairs. */\nexport const RELOAD_RECOVERY_KINDS = ['storageDisconnect', 'staleChunk'] as const;\nexport type ReloadRecoveryKind = (typeof RELOAD_RECOVERY_KINDS)[number];\n\nconst STORAGE_DISCONNECT_NAME = 'UnknownError';\nconst STORAGE_DISCONNECT_MESSAGE = 'Connection to Indexed Database server lost';\nconst STALE_CHUNK_NAME = 'ChunkLoadError';\nconst STALE_CHUNK_MESSAGE = 'Failed to load chunk';\n\nfunction fieldOf(reason: unknown, field: 'name' | 'message'): string | null {\n if (typeof reason !== 'object' || reason === null) return null;\n const value = (reason as Record<string, unknown>)[field];\n return typeof value === 'string' ? value : null;\n}\n\n/**\n * WebKit dropping a page's IndexedDB connection when it reclaims a backgrounded tab: an\n * `UnknownError` whose message says the connection to the Indexed Database server was lost. Every\n * storage call after it fails until the page reloads. No other `UnknownError`, and no quota, blocked\n * storage, or network failure, is this one.\n */\nexport function isStorageDisconnectError(reason: unknown): boolean {\n return (\n fieldOf(reason, 'name') === STORAGE_DISCONNECT_NAME &&\n (fieldOf(reason, 'message')?.includes(STORAGE_DISCONNECT_MESSAGE) ?? false)\n );\n}\n\n/** A code chunk the deployed build no longer serves: a `ChunkLoadError`, or \"Failed to load chunk\". */\nexport function isStaleChunkError(reason: unknown): boolean {\n return (\n fieldOf(reason, 'name') === STALE_CHUNK_NAME ||\n (fieldOf(reason, 'message')?.includes(STALE_CHUNK_MESSAGE) ?? false)\n );\n}\n\n/** Which failure only a reload repairs `reason` is, or `null` for any other. */\nexport function reloadRecoveryKindOf(reason: unknown): ReloadRecoveryKind | null {\n if (isStorageDisconnectError(reason)) return 'storageDisconnect';\n if (isStaleChunkError(reason)) return 'staleChunk';\n return null;\n}\n"]}
|
package/dist/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind CSS classes with proper precedence\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Merge Tailwind CSS classes with proper precedence\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as AccordionPrimitive from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
3
|
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/react/components/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/react/components/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAKhE,QAAA,MAAM,SAAS,8JAA0B,CAAC;AAE1C,QAAA,MAAM,aAAa,iKAKjB,CAAC;AAGH,QAAA,MAAM,gBAAgB,0KAiBpB,CAAC;AAGH,QAAA,MAAM,gBAAgB,oKAcpB,CAAC;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as AccordionPrimitive from
|
|
5
|
-
import { ChevronDown } from
|
|
6
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
5
|
+
import { ChevronDown } from 'lucide-react';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
7
|
const Accordion = AccordionPrimitive.Root;
|
|
8
8
|
const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn(className), ...props })));
|
|
9
|
-
AccordionItem.displayName =
|
|
10
|
-
const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn(
|
|
9
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
10
|
+
const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn('flex flex-1 items-center justify-between py-4 font-medium hover:underline [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]" })] }) })));
|
|
11
11
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
12
|
-
const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "overflow-clip text-sm
|
|
12
|
+
const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "overflow-clip text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn('pb-4 pt-0', className), children: children }) })));
|
|
13
13
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
14
14
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
15
15
|
//# sourceMappingURL=accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/react/components/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/react/components/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,WAAW,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CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn(className)} {...props} />\n));\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex flex-1 items-center justify-between py-4 font-medium hover:underline [&[data-state=open]>svg]:rotate-180',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n // `overflow-clip`, never `overflow-hidden`: a hidden box is still a scroll container, so a focus or\n // scroll-into-view while it animates open scrolls it, and the content snaps back down when the\n // animation ends — carrying an open select or popover out of a scroll-locked viewport.\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-clip text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn('pb-4 pt-0', className)}>{children}</div>\n </AccordionPrimitive.Content>\n));\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** What the app's link element must carry to be a row's link target. */
|
|
3
|
+
export interface ActionRowLinkTargetProps {
|
|
4
|
+
className: string;
|
|
5
|
+
'aria-labelledby': string;
|
|
6
|
+
}
|
|
7
|
+
interface ActionRowCommonProps {
|
|
8
|
+
/** Layout of the content (padding, flex, borders). */
|
|
9
|
+
className?: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface ActionRowButtonProps extends ActionRowCommonProps {
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The row's own action is in flight. */
|
|
16
|
+
busy?: boolean;
|
|
17
|
+
renderLink?: never;
|
|
18
|
+
}
|
|
19
|
+
export interface ActionRowLinkProps extends ActionRowCommonProps {
|
|
20
|
+
/**
|
|
21
|
+
* Renders the row's target as the app's own link element (its guarded in-app link), spreading
|
|
22
|
+
* the given props onto it. The link takes no children: the row's content names it.
|
|
23
|
+
*/
|
|
24
|
+
renderLink: (target: ActionRowLinkTargetProps) => React.ReactElement;
|
|
25
|
+
onClick?: never;
|
|
26
|
+
disabled?: never;
|
|
27
|
+
busy?: never;
|
|
28
|
+
}
|
|
29
|
+
export type ActionRowProps = ActionRowButtonProps | ActionRowLinkProps;
|
|
30
|
+
export declare function ActionRow(props: ActionRowProps): React.JSX.Element;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=action-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-row.d.ts","sourceRoot":"","sources":["../../../src/react/components/action-row.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,wEAAwE;AACxE,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,UAAU,oBAAoB;IAC5B,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D;;;OAGG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,KAAK,CAAC,YAAY,CAAC;IACrE,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAEvE,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,qBAqB9C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// A whole-row action that can still hold controls of its own (FRONTEND-001, FRONTEND-203). A row can
|
|
4
|
+
// never be a single <button> or <a>: a control inside it would be nested in the row's target. So the
|
|
5
|
+
// target is a sibling laid over the row, named by the row's content, and the content sits above it
|
|
6
|
+
// letting clicks through everywhere but on its own controls. The target comes first in tab order,
|
|
7
|
+
// then any control inside the row.
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { cn } from '../../lib/utils.js';
|
|
10
|
+
const TARGET_CLASS = 'peer absolute inset-0 w-full cursor-pointer transition-colors duration-[var(--motion-fast)] ease-[var(--motion-ease)] group-hover/action-row:bg-accent disabled:cursor-default disabled:group-hover/action-row:bg-transparent';
|
|
11
|
+
const CONTENT_CLASS = 'relative pointer-events-none peer-disabled:opacity-70 [&_:is(a,button,input,select,textarea,[role=button])]:pointer-events-auto';
|
|
12
|
+
export function ActionRow(props) {
|
|
13
|
+
const contentId = React.useId();
|
|
14
|
+
return (_jsxs("div", { className: "ui-action-row group/action-row relative", children: [props.renderLink ? (props.renderLink({ className: TARGET_CLASS, 'aria-labelledby': contentId })) : (_jsx("button", { type: "button", className: TARGET_CLASS, onClick: props.onClick, disabled: props.disabled ?? false, "aria-busy": props.busy || undefined, "aria-labelledby": contentId })), _jsx("div", { id: contentId, className: cn(CONTENT_CLASS, props.className), children: props.children })] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=action-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-row.js","sourceRoot":"","sources":["../../../src/react/components/action-row.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,qGAAqG;AACrG,qGAAqG;AACrG,mGAAmG;AACnG,kGAAkG;AAClG,mCAAmC;AAEnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,YAAY,GAChB,+NAA+N,CAAC;AAElO,MAAM,aAAa,GACjB,iIAAiI,CAAC;AAmCpI,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAChC,OAAO,CACL,eAAK,SAAS,EAAC,yCAAyC,aACrD,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAClB,KAAK,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,CAC5E,CAAC,CAAC,CAAC,CACF,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,eACtB,KAAK,CAAC,IAAI,IAAI,SAAS,qBACjB,SAAS,GAC1B,CACH,EACD,cAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,YAC9D,KAAK,CAAC,QAAQ,GACX,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\n// A whole-row action that can still hold controls of its own (FRONTEND-001, FRONTEND-203). A row can\n// never be a single <button> or <a>: a control inside it would be nested in the row's target. So the\n// target is a sibling laid over the row, named by the row's content, and the content sits above it\n// letting clicks through everywhere but on its own controls. The target comes first in tab order,\n// then any control inside the row.\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils.js';\n\nconst TARGET_CLASS =\n 'peer absolute inset-0 w-full cursor-pointer transition-colors duration-[var(--motion-fast)] ease-[var(--motion-ease)] group-hover/action-row:bg-accent disabled:cursor-default disabled:group-hover/action-row:bg-transparent';\n\nconst CONTENT_CLASS =\n 'relative pointer-events-none peer-disabled:opacity-70 [&_:is(a,button,input,select,textarea,[role=button])]:pointer-events-auto';\n\n/** What the app's link element must carry to be a row's link target. */\nexport interface ActionRowLinkTargetProps {\n className: string;\n 'aria-labelledby': string;\n}\n\ninterface ActionRowCommonProps {\n /** Layout of the content (padding, flex, borders). */\n className?: string;\n children: React.ReactNode;\n}\n\nexport interface ActionRowButtonProps extends ActionRowCommonProps {\n onClick: () => void;\n disabled?: boolean;\n /** The row's own action is in flight. */\n busy?: boolean;\n renderLink?: never;\n}\n\nexport interface ActionRowLinkProps extends ActionRowCommonProps {\n /**\n * Renders the row's target as the app's own link element (its guarded in-app link), spreading\n * the given props onto it. The link takes no children: the row's content names it.\n */\n renderLink: (target: ActionRowLinkTargetProps) => React.ReactElement;\n onClick?: never;\n disabled?: never;\n busy?: never;\n}\n\nexport type ActionRowProps = ActionRowButtonProps | ActionRowLinkProps;\n\nexport function ActionRow(props: ActionRowProps) {\n const contentId = React.useId();\n return (\n <div className=\"ui-action-row group/action-row relative\">\n {props.renderLink ? (\n props.renderLink({ className: TARGET_CLASS, 'aria-labelledby': contentId })\n ) : (\n <button\n type=\"button\"\n className={TARGET_CLASS}\n onClick={props.onClick}\n disabled={props.disabled ?? false}\n aria-busy={props.busy || undefined}\n aria-labelledby={contentId}\n />\n )}\n <div id={contentId} className={cn(CONTENT_CLASS, props.className)}>\n {props.children}\n </div>\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as AlertDialogPrimitive from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
3
|
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
4
|
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/react/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/react/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAMrE,QAAA,MAAM,WAAW,iDAA4B,CAAC;AAC9C,QAAA,MAAM,kBAAkB,wHAA+B,CAAC;AACxD,QAAA,MAAM,iBAAiB,uDAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,wKAYtB,CAAC;AAGH,QAAA,MAAM,kBAAkB,wKAmBtB,CAAC;AAGH,QAAA,MAAM,iBAAiB;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAEvF,CAAC;AAGF,QAAA,MAAM,iBAAiB;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKvF,CAAC;AAGF,QAAA,MAAM,gBAAgB,8KASpB,CAAC;AAGH,QAAA,MAAM,sBAAsB,wLAS1B,CAAC;AAGH,QAAA,MAAM,iBAAiB,6KAKrB,CAAC;AAGH,QAAA,MAAM,iBAAiB,6KASrB,CAAC;AAGH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as AlertDialogPrimitive from
|
|
5
|
-
import { cn } from
|
|
6
|
-
import { buttonVariants } from
|
|
7
|
-
import { useOpenerFocus } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { buttonVariants } from './button.js';
|
|
7
|
+
import { useOpenerFocus } from './opener-focus.js';
|
|
8
8
|
const AlertDialog = AlertDialogPrimitive.Root;
|
|
9
9
|
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
10
10
|
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
11
|
-
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Overlay, { className: cn(
|
|
11
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Overlay, { className: cn('fixed inset-0 z-50 bg-[color:var(--scrim)] duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props, ref: ref })));
|
|
12
12
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
13
13
|
const AlertDialogContent = React.forwardRef(({ className, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {
|
|
14
14
|
const openerFocus = useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus });
|
|
15
|
-
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { ref: ref, className: cn(
|
|
15
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 elevation-raised duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg [&>*]:min-w-0', className), ...props, ...openerFocus })] }));
|
|
16
16
|
});
|
|
17
17
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
18
|
-
const AlertDialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn(
|
|
19
|
-
AlertDialogHeader.displayName =
|
|
20
|
-
const AlertDialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn(
|
|
21
|
-
AlertDialogFooter.displayName =
|
|
22
|
-
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Title, { ref: ref, className: cn(
|
|
18
|
+
const AlertDialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-2 text-center sm:text-left', className), ...props }));
|
|
19
|
+
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
20
|
+
const AlertDialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
|
|
21
|
+
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
22
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold break-words', className), ...props })));
|
|
23
23
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
24
|
-
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Description, { ref: ref, className: cn(
|
|
24
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground break-words', className), ...props })));
|
|
25
25
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
26
26
|
const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
|
|
27
27
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
28
|
-
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Cancel, { ref: ref, className: cn(buttonVariants({ variant:
|
|
28
|
+
const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Cancel, { ref: ref, className: cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className), ...props })));
|
|
29
29
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
30
30
|
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
31
31
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../../src/react/components/alert-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../../src/react/components/alert-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC;AAC9C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC;AACxD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,CAAC;AAEtD,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CAGzC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,oBAAoB,CAAC,OAAO,IAC3B,SAAS,EAAE,EAAE,CACX,6NAA6N,EAC7N,SAAS,CACV,KACG,KAAK,EACT,GAAG,EAAE,GAAG,GACR,CACH,CAAC,CAAC;AACH,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC,OAAO,CA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B,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '../../lib/utils.js';\nimport { buttonVariants } from './button.js';\nimport { useOpenerFocus } from './opener-focus.js';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-[color:var(--scrim)] duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n const openerFocus = useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus });\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 elevation-raised duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg [&>*]:min-w-0',\n className,\n )}\n {...props}\n {...openerFocus}\n />\n </AlertDialogPortal>\n );\n});\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold break-words', className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground break-words', className)}\n {...props}\n />\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/react/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/react/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBlE,QAAA,MAAM,KAAK;;sHAKT,CAAC;AAGH,QAAA,MAAM,UAAU,uHAQf,CAAC;AAGF,QAAA,MAAM,gBAAgB,yHASpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from
|
|
3
|
-
import { cva } from
|
|
4
|
-
import { cn } from
|
|
5
|
-
const alertVariants = cva(
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
const alertVariants = cva('relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
|
-
default:
|
|
9
|
-
destructive:
|
|
8
|
+
default: 'bg-background text-foreground',
|
|
9
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
10
10
|
},
|
|
11
11
|
},
|
|
12
12
|
defaultVariants: {
|
|
13
|
-
variant:
|
|
13
|
+
variant: 'default',
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
16
|
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
|
|
17
|
-
Alert.displayName =
|
|
18
|
-
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn(
|
|
19
|
-
AlertTitle.displayName =
|
|
20
|
-
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(
|
|
21
|
-
AlertDescription.displayName =
|
|
17
|
+
Alert.displayName = 'Alert';
|
|
18
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn('mb-1 font-medium leading-none tracking-tight break-words', className), ...props })));
|
|
19
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
20
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm [&_p]:leading-relaxed break-words', className), ...props })));
|
|
21
|
+
AlertDescription.displayName = 'AlertDescription';
|
|
22
22
|
export { Alert, AlertTitle, AlertDescription };
|
|
23
23
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/react/components/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../src/react/components/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,aAAa,GAAG,GAAG,CACvB,2JAA2J,EAC3J;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,+BAA+B;YACxC,WAAW,EACT,yFAAyF;SAC5F;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAC;AAEF,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,cAAK,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAChG,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0DAA0D,EAAE,SAAS,CAAC,KAChF,KAAK,GACT,CACH,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,2CAA2C,EAAE,SAAS,CAAC,KACjE,KAAK,GACT,CACH,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',\n {\n variants: {\n variant: {\n default: 'bg-background text-foreground',\n destructive:\n 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div ref={ref} role=\"alert\" className={cn(alertVariants({ variant }), className)} {...props} />\n));\nAlert.displayName = 'Alert';\n\nconst AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn('mb-1 font-medium leading-none tracking-tight break-words', className)}\n {...props}\n />\n ),\n);\nAlertTitle.displayName = 'AlertTitle';\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('text-sm [&_p]:leading-relaxed break-words', className)}\n {...props}\n />\n));\nAlertDescription.displayName = 'AlertDescription';\n\nexport { Alert, AlertTitle, AlertDescription };\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as AvatarPrimitive from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
3
|
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
4
|
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
5
5
|
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/react/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/react/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,QAAA,MAAM,MAAM,yJASV,CAAC;AAGH,QAAA,MAAM,WAAW,gKAaf,CAAC;AAGH,QAAA,MAAM,cAAc,iKAYlB,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC"}
|