@bccampus/ui-components 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/CompositeDataItem.js +204 -0
- package/dist/_chunks/createLucideIcon.js +103 -0
- package/dist/_chunks/index.js +125 -0
- package/dist/_chunks/index2.js +44 -0
- package/dist/_chunks/index3.js +533 -0
- package/dist/{utils-CRiPKpXj.js → _chunks/utils.js} +754 -526
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.js +84 -0
- package/dist/components/ui/banner.d.ts +10 -0
- package/dist/components/ui/banner.js +45 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/{button.js → components/ui/button.js} +11 -10
- package/dist/components/ui/card.d.ts +27 -0
- package/dist/components/ui/card.js +109 -0
- package/dist/components/ui/composite/CompositeData.d.ts +20 -0
- package/dist/components/ui/composite/CompositeData.js +89 -0
- package/dist/components/ui/composite/CompositeDataItem.d.ts +28 -0
- package/dist/components/ui/composite/CompositeDataItem.js +5 -0
- package/dist/components/ui/composite/FocusProvider/AbstractFocusProvider.d.ts +41 -0
- package/dist/components/ui/composite/FocusProvider/AbstractFocusProvider.js +35 -0
- package/dist/components/ui/composite/FocusProvider/ListboxFocusProvider.d.ts +16 -0
- package/dist/components/ui/composite/FocusProvider/ListboxFocusProvider.js +67 -0
- package/dist/components/ui/composite/FocusProvider/index.d.ts +2 -0
- package/dist/components/ui/composite/FocusProvider/index.js +6 -0
- package/dist/components/ui/composite/SelectionProvider/AbstractSelectionProvider.d.ts +23 -0
- package/dist/components/ui/composite/SelectionProvider/AbstractSelectionProvider.js +20 -0
- package/dist/components/ui/composite/SelectionProvider/MultipleSelectionProvider.d.ts +9 -0
- package/dist/components/ui/composite/SelectionProvider/MultipleSelectionProvider.js +20 -0
- package/dist/components/ui/composite/SelectionProvider/SingleSelectionProvider.d.ts +9 -0
- package/dist/components/ui/composite/SelectionProvider/SingleSelectionProvider.js +25 -0
- package/dist/components/ui/composite/SelectionProvider/index.d.ts +3 -0
- package/dist/components/ui/composite/SelectionProvider/index.js +8 -0
- package/dist/components/ui/composite/composite-component-item.d.ts +2 -0
- package/dist/components/ui/composite/composite-component-item.js +74 -0
- package/dist/components/ui/composite/composite-component.d.ts +2 -0
- package/dist/components/ui/composite/composite-component.js +66 -0
- package/dist/components/ui/composite/index.d.ts +7 -0
- package/dist/components/ui/composite/index.js +22 -0
- package/dist/components/ui/composite/listbox.d.ts +2 -0
- package/dist/components/ui/composite/listbox.js +58 -0
- package/dist/components/ui/composite/types.d.ts +82 -0
- package/dist/components/ui/composite/types.js +1 -0
- package/dist/components/ui/horizontal-list.d.ts +10 -0
- package/dist/components/ui/horizontal-list.js +82 -0
- package/dist/components/ui/icon-generator/generate-tiles.d.ts +4 -0
- package/dist/components/ui/icon-generator/generate-tiles.js +223 -0
- package/dist/components/ui/icon-generator/icon-generator.d.ts +3 -0
- package/dist/components/ui/icon-generator/icon-generator.js +82 -0
- package/dist/components/ui/icon-generator/index.d.ts +4 -0
- package/dist/components/ui/icon-generator/index.js +11 -0
- package/dist/components/ui/icon-generator/masked-image-generator.d.ts +3 -0
- package/dist/components/ui/icon-generator/masked-image-generator.js +31 -0
- package/dist/{masked-image-generator.d.ts → components/ui/icon-generator/types.d.ts} +48 -58
- package/dist/components/ui/icon-generator/types.js +30 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/{input.js → components/ui/input.js} +8 -8
- package/dist/components/ui/navigation-menu.d.ts +16 -0
- package/dist/components/ui/navigation-menu.js +1041 -0
- package/dist/components/ui/overlay.d.ts +7 -0
- package/dist/{overlay.js → components/ui/overlay.js} +7 -7
- package/dist/components/ui/page-header.d.ts +5 -0
- package/dist/{page-header.js → components/ui/page-header.js} +189 -181
- package/dist/components/ui/page-section.d.ts +8 -0
- package/dist/{page-section.js → components/ui/page-section.js} +7 -7
- package/dist/components/ui/page.d.ts +3 -0
- package/dist/components/ui/page.js +8 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.js +3532 -0
- package/dist/components/ui/search-input.d.ts +3 -0
- package/dist/components/ui/search-input.js +24 -0
- package/dist/components/ui/tag.d.ts +10 -0
- package/dist/{tag.js → components/ui/tag.js} +10 -9
- package/dist/components/ui/typography/caption.d.ts +8 -0
- package/dist/components/ui/typography/caption.js +28 -0
- package/dist/components/ui/typography/index.d.ts +1 -0
- package/dist/components/ui/typography/index.js +5 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/use-effect-after-mount.d.ts +2 -0
- package/dist/hooks/use-effect-after-mount.js +24 -0
- package/dist/hooks/use-id.d.ts +1 -0
- package/dist/hooks/use-id.js +7 -0
- package/dist/hooks/use-keyboard-event.d.ts +59 -0
- package/dist/hooks/use-keyboard-event.js +52 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +16 -0
- package/dist/lib/object.d.ts +5 -0
- package/dist/lib/object.js +38 -0
- package/dist/lib/set-operations.d.ts +5 -0
- package/dist/lib/set-operations.js +51 -0
- package/dist/{utils.d.ts → lib/utils.d.ts} +2 -5
- package/dist/lib/utils.js +4 -0
- package/package.json +9 -76
- package/src/components/index.ts +17 -0
- package/src/components/ui/composite/FocusProvider/index.ts +2 -0
- package/src/components/ui/composite/SelectionProvider/MultipleSelectionProvider.ts +1 -1
- package/src/components/ui/composite/SelectionProvider/index.ts +3 -0
- package/src/components/ui/composite/index.ts +5 -5
- package/src/components/ui/icon-generator/index.ts +2 -0
- package/src/components/ui/typography/index.ts +1 -0
- package/src/hooks/index.ts +3 -0
- package/src/index.ts +3 -0
- package/src/lib/index.ts +3 -0
- package/tsconfig.lib.json +44 -0
- package/vite.config.ts +28 -31
- package/dist/AbstractFocusProvider-CxvlcEki.js +0 -29
- package/dist/AbstractSelectionProvider-BtaROstC.js +0 -30
- package/dist/CompositeDataItem-DuHOHCWy.js +0 -158
- package/dist/ListboxFocusProvider.d.ts +0 -149
- package/dist/ListboxFocusProvider.js +0 -53
- package/dist/MultipleSelectionProvider.d.ts +0 -141
- package/dist/MultipleSelectionProvider.js +0 -19
- package/dist/SingleSelectionProvider.d.ts +0 -141
- package/dist/SingleSelectionProvider.js +0 -23
- package/dist/banner.d.ts +0 -16
- package/dist/banner.js +0 -42
- package/dist/button.d.ts +0 -17
- package/dist/caption.d.ts +0 -13
- package/dist/caption.js +0 -27
- package/dist/card.d.ts +0 -46
- package/dist/card.js +0 -108
- package/dist/composite-component-DSUbd1XS.js +0 -122
- package/dist/composite.d.ts +0 -208
- package/dist/composite.js +0 -82
- package/dist/createLucideIcon-CzehbSja.js +0 -94
- package/dist/generate-tiles-DuagGD1d.js +0 -244
- package/dist/generate-tiles.d.ts +0 -43
- package/dist/generate-tiles.js +0 -7
- package/dist/horizontal-list.d.ts +0 -16
- package/dist/horizontal-list.js +0 -77
- package/dist/icon-generator-tuhuqdpL.js +0 -76
- package/dist/icon-generator.d.ts +0 -58
- package/dist/icon-generator.js +0 -6
- package/dist/index-CQhYMnjT.js +0 -34
- package/dist/index-U7DVCmS_.js +0 -76
- package/dist/input.d.ts +0 -7
- package/dist/listbox.d.ts +0 -171
- package/dist/listbox.js +0 -76
- package/dist/masked-image-generator.js +0 -29
- package/dist/navigation-menu.d.ts +0 -27
- package/dist/navigation-menu.js +0 -1139
- package/dist/overlay.d.ts +0 -13
- package/dist/page-header.d.ts +0 -9
- package/dist/page-section.d.ts +0 -14
- package/dist/page.d.ts +0 -7
- package/dist/page.js +0 -8
- package/dist/search-input.d.ts +0 -7
- package/dist/search-input.js +0 -23
- package/dist/tag.d.ts +0 -16
- package/dist/ui-components.d.ts +0 -215
- package/dist/ui-components.js +0 -54
- package/dist/utils.js +0 -4
- package/src/assets/icons/icon_01.svg +0 -6
- package/src/assets/icons/icon_02.svg +0 -6
- package/src/assets/icons/icon_03.svg +0 -6
- package/src/assets/icons/icon_04.svg +0 -6
- package/src/assets/icons/icon_05.svg +0 -4
- package/src/assets/icons/icon_06.svg +0 -4
- package/src/assets/images/image_01.jpg +0 -0
- package/src/assets/images/image_02.jpg +0 -0
- package/src/assets/images/image_03.webp +0 -0
- package/src/assets/images/image_04.png +0 -0
- package/src/assets/images/image_05.jpg +0 -0
- package/src/assets/images/image_06.jpg +0 -0
- package/src/components/ui/index.ts +0 -15
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { C as c } from "./CompositeDataItem-DuHOHCWy.js";
|
|
2
|
-
import { A as i, u as l, d as n } from "./AbstractSelectionProvider-BtaROstC.js";
|
|
3
|
-
class f extends i {
|
|
4
|
-
select(e, t = !1) {
|
|
5
|
-
const s = e instanceof c ? e : this.data.lookup.get(e);
|
|
6
|
-
if (!s) return;
|
|
7
|
-
const o = s.select(t);
|
|
8
|
-
this.selectedKeys.set(l(this.selectedKeys.get(), o));
|
|
9
|
-
}
|
|
10
|
-
deselect(e, t = !1) {
|
|
11
|
-
const s = e instanceof c ? e : this.data.lookup.get(e);
|
|
12
|
-
if (!s) return;
|
|
13
|
-
const o = s.deselect(t);
|
|
14
|
-
this.selectedKeys.set(n(this.selectedKeys.get(), o));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
f as SingleSelectionProvider
|
|
19
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { PreinitializedMapStore } from 'nanostores';
|
|
2
|
-
import { PreinitializedWritableAtom } from 'nanostores';
|
|
3
|
-
|
|
4
|
-
declare abstract class AbstractFocusProvider<T extends object> implements FocusProvider {
|
|
5
|
-
protected data: CompositeData<T>;
|
|
6
|
-
protected dataOptions: CompositeDataOptions<T>;
|
|
7
|
-
firstFocusableItem: CompositeDataItem<T> | null;
|
|
8
|
-
lastFocusableItem: CompositeDataItem<T> | null;
|
|
9
|
-
focusedItem: PreinitializedWritableAtom<CompositeDataItem<T> | null>;
|
|
10
|
-
init(data: CompositeData<T>, dataOptions: CompositeDataOptions<T>): void;
|
|
11
|
-
isFocusable(itemAtom: CompositeDataItem<T>): boolean;
|
|
12
|
-
focus(itemKey: CompositeItemKey): void;
|
|
13
|
-
focus(item: CompositeDataItem<T>): void;
|
|
14
|
-
abstract setFocusPointers(): readonly [first: CompositeDataItem<T> | null, last: CompositeDataItem<T> | null];
|
|
15
|
-
abstract focusUp(): void;
|
|
16
|
-
abstract focusDown(): void;
|
|
17
|
-
abstract focusLeft(): void;
|
|
18
|
-
abstract focusRight(): void;
|
|
19
|
-
abstract focusPageUp(): void;
|
|
20
|
-
abstract focesPageDown(): void;
|
|
21
|
-
abstract focusToFirst(): void;
|
|
22
|
-
abstract focusToLast(): void;
|
|
23
|
-
abstract focusToFirstInRow(): void;
|
|
24
|
-
abstract focusToLastInRow(): void;
|
|
25
|
-
abstract focusToTypeAheadMatch(): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare abstract class AbstractSelectionProvider<T extends object> {
|
|
29
|
-
protected data: CompositeData<T>;
|
|
30
|
-
protected dataOptions: CompositeDataOptions<T>;
|
|
31
|
-
selectedKeys: PreinitializedWritableAtom<Set<CompositeItemKey>>;
|
|
32
|
-
init(data: CompositeData<T>, dataOptions: CompositeDataOptions<T>): void;
|
|
33
|
-
abstract select(itemKey?: CompositeItemKey, recursive?: boolean): void;
|
|
34
|
-
abstract select(item: CompositeDataItem<T>, recursive?: boolean): void;
|
|
35
|
-
abstract select(item?: CompositeDataItem<T> | CompositeItemKey, recursive?: boolean): void;
|
|
36
|
-
abstract deselect(itemKey?: CompositeItemKey, recursive?: boolean): void;
|
|
37
|
-
abstract deselect(item: CompositeDataItem<T>, recursive?: boolean): void;
|
|
38
|
-
abstract deselect(item?: CompositeDataItem<T> | CompositeItemKey, recursive?: boolean): void;
|
|
39
|
-
toggleSelect(itemKey?: CompositeItemKey, recursive?: boolean): void;
|
|
40
|
-
toggleSelect(item: CompositeDataItem<T>, recursive?: boolean): void;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare class CompositeData<T extends object> implements Iterable<CompositeDataItem<T>> {
|
|
44
|
-
#private;
|
|
45
|
-
lookup: Map<CompositeItemKey, CompositeDataItem<T>>;
|
|
46
|
-
focusProvider: AbstractFocusProvider<T>;
|
|
47
|
-
selectionProvider?: AbstractSelectionProvider<T>;
|
|
48
|
-
disabledKeys: Set<CompositeItemKey>;
|
|
49
|
-
root: CompositeDataItem<T>;
|
|
50
|
-
constructor(items: T[], providerOptions: CompositeProviderOptions<T>, options?: CompositeOptions);
|
|
51
|
-
[Symbol.iterator](): Iterator<CompositeDataItem<T>>;
|
|
52
|
-
toJSON(): T[];
|
|
53
|
-
init(items: T[]): void;
|
|
54
|
-
item(key: CompositeItemKey): CompositeDataItem<T> | undefined;
|
|
55
|
-
descendants(itemKey: CompositeItemKey): CompositeDataItem<T>[] | undefined;
|
|
56
|
-
ancestors(itemKey: CompositeItemKey): CompositeDataItem<T>[] | undefined;
|
|
57
|
-
updateItem(key: CompositeItemKey, data: Partial<T> | ((item: T) => Partial<T>)): void;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare class CompositeDataItem<T extends object> implements Iterable<CompositeDataItem<T>> {
|
|
61
|
-
#private;
|
|
62
|
-
parent: CompositeDataItem<T> | null;
|
|
63
|
-
children?: CompositeDataItem<T>[];
|
|
64
|
-
level: number;
|
|
65
|
-
data: PreinitializedMapStore<T>;
|
|
66
|
-
state: PreinitializedMapStore<CompositeDataItemState>;
|
|
67
|
-
pointers: {
|
|
68
|
-
left?: CompositeItemKey;
|
|
69
|
-
right?: CompositeItemKey;
|
|
70
|
-
up?: CompositeItemKey;
|
|
71
|
-
down?: CompositeItemKey;
|
|
72
|
-
};
|
|
73
|
-
childrenProp: string;
|
|
74
|
-
constructor(item: T, options: CompositeDataItemOptions<T>, parent: CompositeDataItem<T> | null);
|
|
75
|
-
get key(): CompositeItemKey;
|
|
76
|
-
[Symbol.iterator](): Iterator<CompositeDataItem<T>>;
|
|
77
|
-
toJSON(): T;
|
|
78
|
-
descendants(): CompositeDataItem<T>[];
|
|
79
|
-
ancestors(): CompositeDataItem<T>[];
|
|
80
|
-
toggleSelect(recursive?: boolean): void;
|
|
81
|
-
select(recursive?: boolean): CompositeItemKey[];
|
|
82
|
-
deselect(recursive?: boolean): CompositeItemKey[];
|
|
83
|
-
disable(recursive?: boolean): CompositeItemKey[];
|
|
84
|
-
enable(recursive?: boolean): CompositeItemKey[];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
declare type CompositeDataItemOptions<T> = CompositeDataPropGetters<T> & {
|
|
88
|
-
initialState?: CompositeDataItemState;
|
|
89
|
-
itemChildrenProp: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
declare interface CompositeDataItemState {
|
|
93
|
-
focused: boolean;
|
|
94
|
-
selected: boolean;
|
|
95
|
-
disabled: boolean;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
declare type CompositeDataOptions<T> = Required<CompositeOptions> & CompositeDataPropGetters<T>;
|
|
99
|
-
|
|
100
|
-
declare interface CompositeDataPropGetters<T> {
|
|
101
|
-
getItemKey: (item: T) => CompositeItemKey;
|
|
102
|
-
getItemChildren: (item: T) => T[] | undefined;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
declare type CompositeItemKey = string | number;
|
|
106
|
-
|
|
107
|
-
declare interface CompositeOptions {
|
|
108
|
-
disabledKeys?: CompositeItemKey[];
|
|
109
|
-
selectedKeys?: CompositeItemKey[];
|
|
110
|
-
itemKeyProp?: string;
|
|
111
|
-
itemChildrenProp?: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
declare interface CompositeProviderOptions<T extends object> {
|
|
115
|
-
focusProvider: AbstractFocusProvider<T>;
|
|
116
|
-
selectionProvider?: AbstractSelectionProvider<T>;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
declare interface FocusProvider {
|
|
120
|
-
focus(itemKey: CompositeItemKey): void;
|
|
121
|
-
focusUp(): void;
|
|
122
|
-
focusDown(): void;
|
|
123
|
-
focusLeft(): void;
|
|
124
|
-
focusRight(): void;
|
|
125
|
-
focusPageUp(): void;
|
|
126
|
-
focesPageDown(): void;
|
|
127
|
-
focusToFirst(): void;
|
|
128
|
-
focusToLast(): void;
|
|
129
|
-
focusToFirstInRow(): void;
|
|
130
|
-
focusToLastInRow(): void;
|
|
131
|
-
focusToTypeAheadMatch(): void;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export declare class SingleSelectionProvider<T extends object> extends AbstractSelectionProvider<T> {
|
|
135
|
-
select(itemKey?: CompositeItemKey, recursive?: boolean): void;
|
|
136
|
-
select(item: CompositeDataItem<T>, recursive?: boolean): void;
|
|
137
|
-
deselect(itemKey?: CompositeItemKey, recursive?: boolean): void;
|
|
138
|
-
deselect(item: CompositeDataItem<T>, recursive?: boolean): void;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export { }
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { C as c } from "./CompositeDataItem-DuHOHCWy.js";
|
|
2
|
-
import { A as d, d as i } from "./AbstractSelectionProvider-BtaROstC.js";
|
|
3
|
-
class u extends d {
|
|
4
|
-
select(e, r = !1) {
|
|
5
|
-
const t = e ? e instanceof c ? e : this.data.lookup.get(e) : this.data.focusProvider.focusedItem.get();
|
|
6
|
-
if (!t) return;
|
|
7
|
-
this.selectedKeys.get().forEach((a) => {
|
|
8
|
-
const o = this.data.lookup.get(a);
|
|
9
|
-
o && o.deselect(!1);
|
|
10
|
-
});
|
|
11
|
-
const s = t.select(!1);
|
|
12
|
-
this.selectedKeys.set(new Set(s));
|
|
13
|
-
}
|
|
14
|
-
deselect(e, r = !1) {
|
|
15
|
-
const t = e ? e instanceof c ? e : this.data.lookup.get(e) : this.data.focusProvider.focusedItem.get();
|
|
16
|
-
if (!t) return;
|
|
17
|
-
const s = t.deselect(!1);
|
|
18
|
-
this.selectedKeys.set(i(this.selectedKeys.get(), s));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
u as SingleSelectionProvider
|
|
23
|
-
};
|
package/dist/banner.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
export declare function Banner({ className, size, variant, dismissible, children, ...props }: BannerProps): JSX.Element | null;
|
|
6
|
-
|
|
7
|
-
export declare interface BannerProps extends VariantProps<typeof bannerVariants>, React.ComponentProps<"div"> {
|
|
8
|
-
dismissible?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare const bannerVariants: (props?: ({
|
|
12
|
-
variant?: "default" | "alert" | null | undefined;
|
|
13
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
14
|
-
} & ClassProp) | undefined) => string;
|
|
15
|
-
|
|
16
|
-
export { }
|
package/dist/banner.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as l } from "./index-CQhYMnjT.js";
|
|
3
|
-
import { c as d } from "./utils-CRiPKpXj.js";
|
|
4
|
-
import { useState as f } from "react";
|
|
5
|
-
import { Button as p } from "./button.js";
|
|
6
|
-
import { c as u } from "./createLucideIcon-CzehbSja.js";
|
|
7
|
-
/**
|
|
8
|
-
* @license lucide-react v0.544.0 - ISC
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the ISC license.
|
|
11
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
const x = [
|
|
14
|
-
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
15
|
-
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
16
|
-
], b = u("x", x), v = l("flex flex-row items-center justify-between px-(--spacing-section) text-sm", {
|
|
17
|
-
variants: {
|
|
18
|
-
variant: {
|
|
19
|
-
default: "bg-complement-3 text-white",
|
|
20
|
-
alert: "bg-complement-2-200 text-black"
|
|
21
|
-
},
|
|
22
|
-
size: {
|
|
23
|
-
default: "py-2",
|
|
24
|
-
sm: "py-1",
|
|
25
|
-
lg: "py-3 text-md font-semibold"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: "default",
|
|
30
|
-
size: "default"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
function N({ className: e, size: a, variant: s, dismissible: i, children: n, ...r }) {
|
|
34
|
-
const [o, c] = f(!1);
|
|
35
|
-
return o ? null : /* @__PURE__ */ m("div", { "data-slot": "banner", className: d(v({ variant: s, size: a }), e), ...r, children: [
|
|
36
|
-
/* @__PURE__ */ t("div", { className: "flex-auto text-center", children: n }),
|
|
37
|
-
i && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(p, { variant: "ghost", size: "icon", className: "size-6 text-white", onClick: () => c(!0), children: /* @__PURE__ */ t(b, {}) }) })
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
N as Banner
|
|
42
|
-
};
|
package/dist/button.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
export declare function Button({ className, variant, size, block, asChild, ...props }: ButtonProps): JSX.Element;
|
|
6
|
-
|
|
7
|
-
export declare type ButtonProps = React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export declare const buttonVariants: (props?: ({
|
|
12
|
-
variant?: "default" | "secondary" | "outline" | "ghost" | "item" | "destructive" | null | undefined;
|
|
13
|
-
block?: boolean | null | undefined;
|
|
14
|
-
size?: "text" | "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
15
|
-
} & ClassProp) | undefined) => string;
|
|
16
|
-
|
|
17
|
-
export { }
|
package/dist/caption.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
export declare function Caption({ className, variant, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof captionVariants> & {
|
|
6
|
-
asChild?: boolean;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
|
|
9
|
-
export declare const captionVariants: (props?: ({
|
|
10
|
-
variant?: "default" | "light" | null | undefined;
|
|
11
|
-
} & ClassProp) | undefined) => string;
|
|
12
|
-
|
|
13
|
-
export { }
|
package/dist/caption.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { S as i } from "./index-U7DVCmS_.js";
|
|
3
|
-
import { c as e } from "./index-CQhYMnjT.js";
|
|
4
|
-
import { c as m } from "./utils-CRiPKpXj.js";
|
|
5
|
-
const s = e("tracking-tight text-balance", {
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "scroll-mr-5 text-lg/5 font-bold text-secondary dark:text-foreground",
|
|
9
|
-
light: "scroll-mr-4 text-sm/4 font-normal text-primary"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
variant: "default"
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
function x({
|
|
17
|
-
className: t,
|
|
18
|
-
variant: a,
|
|
19
|
-
asChild: r = !1,
|
|
20
|
-
...o
|
|
21
|
-
}) {
|
|
22
|
-
return /* @__PURE__ */ n(r ? i : "div", { className: m(s({ variant: a, className: t })), ...o });
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
x as Caption,
|
|
26
|
-
s as captionVariants
|
|
27
|
-
};
|
package/dist/card.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
-
import { JSX } from 'react/jsx-runtime';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
export declare function Card<T extends boolean = false>({ className, asLink, bordered, rounded, ...props }: CardProps<T>): JSX.Element;
|
|
6
|
-
|
|
7
|
-
export declare function CardArea({ name, className, ...props }: CardAreaProps): JSX.Element;
|
|
8
|
-
|
|
9
|
-
declare type CardAreaProps = React.ComponentProps<"div"> & {
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export declare function CardCaption(props: React.ComponentProps<"div">): JSX.Element;
|
|
14
|
-
|
|
15
|
-
export declare function CardContent(props: React.ComponentProps<"div">): JSX.Element;
|
|
16
|
-
|
|
17
|
-
export declare function CardImage({ className, ...props }: React.ComponentProps<"img">): JSX.Element;
|
|
18
|
-
|
|
19
|
-
export declare function CardItemGroup({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
20
|
-
|
|
21
|
-
export declare function CardMedia({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
22
|
-
|
|
23
|
-
export declare function CardMeta(props: React.ComponentProps<"div">): JSX.Element;
|
|
24
|
-
|
|
25
|
-
export declare type CardProps<T extends boolean> = (T extends true ? React.ComponentProps<"a"> : React.ComponentProps<"div">) & VariantProps<typeof cardVariants> & {
|
|
26
|
-
asLink?: T;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export declare function CardSubcaption(props: React.ComponentProps<"div">): JSX.Element;
|
|
30
|
-
|
|
31
|
-
export declare function CardSubtitle({ size, className, ...props }: CardTitleProps): JSX.Element;
|
|
32
|
-
|
|
33
|
-
export declare function CardTitle({ size, className, ...props }: CardTitleProps): JSX.Element;
|
|
34
|
-
|
|
35
|
-
declare type CardTitleProps = React.ComponentProps<"div"> & {
|
|
36
|
-
size?: "sm" | "md" | "lg";
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export declare function CardToolbar({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
40
|
-
|
|
41
|
-
declare const cardVariants: (props?: ({
|
|
42
|
-
bordered?: boolean | null | undefined;
|
|
43
|
-
rounded?: boolean | null | undefined;
|
|
44
|
-
} & ClassProp) | undefined) => string;
|
|
45
|
-
|
|
46
|
-
export { }
|
package/dist/card.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { c as t } from "./utils-CRiPKpXj.js";
|
|
3
|
-
import { Caption as d } from "./caption.js";
|
|
4
|
-
import { c as u } from "./index-CQhYMnjT.js";
|
|
5
|
-
const m = u("group @container/card w-full max-w-full bg-card text-card-foreground grid gap-(--gap-card)", {
|
|
6
|
-
variants: {
|
|
7
|
-
bordered: {
|
|
8
|
-
true: "p-(--spacing-card) border border-complement-1-100 dark:border-brand-1-900 ",
|
|
9
|
-
false: ""
|
|
10
|
-
},
|
|
11
|
-
rounded: {
|
|
12
|
-
true: "rounded-2xl",
|
|
13
|
-
false: ""
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
bordered: !1,
|
|
18
|
-
rounded: !1
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
function C({ className: r, asLink: a, bordered: n, rounded: o, ...c }) {
|
|
22
|
-
const i = a ? "a" : "div", l = a ? "transition-all hover:bg-complement-1-50 dark:hover:bg-gray-900" : "";
|
|
23
|
-
return (
|
|
24
|
-
//@ts-expect-error: props type will be correct
|
|
25
|
-
/* @__PURE__ */ e(i, { "data-slot": "card", className: t(m({ bordered: n, rounded: o }), l, r), ...c })
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
function b({ name: r, className: a, ...n }) {
|
|
29
|
-
return /* @__PURE__ */ e(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
style: { gridArea: r },
|
|
33
|
-
className: t("@container/card-area relative flex flex-col gap-(--gap-card-area)", a),
|
|
34
|
-
...n
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
function h({ className: r, ...a }) {
|
|
39
|
-
return /* @__PURE__ */ e("div", { className: t("flex flex-col gap-(--gap-card-item-group)", r), ...a });
|
|
40
|
-
}
|
|
41
|
-
function x({ size: r = "md", className: a, ...n }) {
|
|
42
|
-
return /* @__PURE__ */ e(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
className: t(
|
|
46
|
-
{
|
|
47
|
-
"heading-1": r === "lg",
|
|
48
|
-
"heading-2": r === "md",
|
|
49
|
-
"heading-3": r === "sm"
|
|
50
|
-
},
|
|
51
|
-
a
|
|
52
|
-
),
|
|
53
|
-
...n
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
function N({ size: r = "md", className: a, ...n }) {
|
|
58
|
-
return /* @__PURE__ */ e(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
className: t(
|
|
62
|
-
"text-secondary",
|
|
63
|
-
{
|
|
64
|
-
"heading-1": r === "lg",
|
|
65
|
-
"heading-2": r === "md",
|
|
66
|
-
"heading-3": r === "sm"
|
|
67
|
-
},
|
|
68
|
-
a
|
|
69
|
-
),
|
|
70
|
-
...n
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
function w(r) {
|
|
75
|
-
return /* @__PURE__ */ e(d, { ...r });
|
|
76
|
-
}
|
|
77
|
-
function j(r) {
|
|
78
|
-
return /* @__PURE__ */ e(d, { variant: "light", ...r });
|
|
79
|
-
}
|
|
80
|
-
function y(r) {
|
|
81
|
-
return /* @__PURE__ */ e(d, { variant: "light", ...r });
|
|
82
|
-
}
|
|
83
|
-
function k(r) {
|
|
84
|
-
return /* @__PURE__ */ e("div", { ...r });
|
|
85
|
-
}
|
|
86
|
-
function A({ className: r, ...a }) {
|
|
87
|
-
return /* @__PURE__ */ e("div", { className: t("flex flex-wrap items-center gap-(--gap-card-item-group)", r), ...a });
|
|
88
|
-
}
|
|
89
|
-
function s({ className: r, ...a }) {
|
|
90
|
-
return /* @__PURE__ */ e("div", { className: t("relative w-full h-full", r), ...a });
|
|
91
|
-
}
|
|
92
|
-
function I({ className: r, ...a }) {
|
|
93
|
-
return /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e("img", { className: t("w-full h-full rounded-lg aspect-9/5 object-cover object-top", r), ...a }) });
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
C as Card,
|
|
97
|
-
b as CardArea,
|
|
98
|
-
w as CardCaption,
|
|
99
|
-
k as CardContent,
|
|
100
|
-
I as CardImage,
|
|
101
|
-
h as CardItemGroup,
|
|
102
|
-
s as CardMedia,
|
|
103
|
-
y as CardMeta,
|
|
104
|
-
j as CardSubcaption,
|
|
105
|
-
N as CardSubtitle,
|
|
106
|
-
x as CardTitle,
|
|
107
|
-
A as CardToolbar
|
|
108
|
-
};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as b } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as S, useCallback as $, useSyncExternalStore as C, useMemo as g, useId as P, useImperativeHandle as m } from "react";
|
|
3
|
-
function w(o, r, e) {
|
|
4
|
-
let t = new Set(r).add(void 0);
|
|
5
|
-
return o.listen((s, l, n) => {
|
|
6
|
-
t.has(n) && e(s, l, n);
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
let f = (o, r) => (e) => {
|
|
10
|
-
o.current !== e && (o.current = e, r());
|
|
11
|
-
};
|
|
12
|
-
function R(o, { keys: r, deps: e = [o, r] } = {}) {
|
|
13
|
-
let t = S();
|
|
14
|
-
t.current = o.get();
|
|
15
|
-
let s = $((n) => (f(t, n)(o.value), r?.length > 0 ? w(o, r, f(t, n)) : o.listen(f(t, n))), e), l = () => t.current;
|
|
16
|
-
return C(s, l, l);
|
|
17
|
-
}
|
|
18
|
-
function v({
|
|
19
|
-
id: o,
|
|
20
|
-
className: r,
|
|
21
|
-
item: e,
|
|
22
|
-
role: t,
|
|
23
|
-
itemMouseEventHandler: s,
|
|
24
|
-
itemKeyboardEventHandler: l,
|
|
25
|
-
render: n
|
|
26
|
-
}) {
|
|
27
|
-
const i = R(e.data), u = R(e.state), c = g(() => u.disabled ? {} : {
|
|
28
|
-
mouseEventHandler: () => s?.(e),
|
|
29
|
-
keyboardEventHandler: () => l?.(e)
|
|
30
|
-
}, [u.disabled, e, l, s]);
|
|
31
|
-
return /* @__PURE__ */ h(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
id: o,
|
|
35
|
-
role: t,
|
|
36
|
-
"aria-disabled": u.disabled,
|
|
37
|
-
"data-key": e.key,
|
|
38
|
-
tabIndex: u.disabled ? void 0 : u.focused ? 0 : -1,
|
|
39
|
-
className: r,
|
|
40
|
-
children: [
|
|
41
|
-
n({ data: i, key: e.key, level: e.level }, u, c),
|
|
42
|
-
e.children && e.children.length > 0 && [...e.children].map((d) => /* @__PURE__ */ b(
|
|
43
|
-
v,
|
|
44
|
-
{
|
|
45
|
-
id: `${o}-${e.key}`,
|
|
46
|
-
role: t,
|
|
47
|
-
item: d,
|
|
48
|
-
render: n,
|
|
49
|
-
className: r,
|
|
50
|
-
itemMouseEventHandler: s,
|
|
51
|
-
itemKeyboardEventHandler: l
|
|
52
|
-
},
|
|
53
|
-
d.key
|
|
54
|
-
))
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
function j(o) {
|
|
60
|
-
return o ?? P();
|
|
61
|
-
}
|
|
62
|
-
const q = {
|
|
63
|
-
listbox: {
|
|
64
|
-
rootRole: "listbox",
|
|
65
|
-
groupRole: "group",
|
|
66
|
-
itemRole: "option"
|
|
67
|
-
},
|
|
68
|
-
grid: {
|
|
69
|
-
rootRole: "grid",
|
|
70
|
-
groupRole: "rowgroup",
|
|
71
|
-
itemRole: "row"
|
|
72
|
-
},
|
|
73
|
-
custom: void 0
|
|
74
|
-
};
|
|
75
|
-
function B({
|
|
76
|
-
data: o,
|
|
77
|
-
variant: r,
|
|
78
|
-
rootRole: e,
|
|
79
|
-
itemRole: t,
|
|
80
|
-
groupRole: s,
|
|
81
|
-
renderItem: l,
|
|
82
|
-
className: n,
|
|
83
|
-
itemClassName: i,
|
|
84
|
-
ref: u,
|
|
85
|
-
handleRef: c,
|
|
86
|
-
id: d,
|
|
87
|
-
itemMouseEventHandler: x,
|
|
88
|
-
itemKeyboardEventHandler: y,
|
|
89
|
-
...I
|
|
90
|
-
}) {
|
|
91
|
-
const k = j(d);
|
|
92
|
-
m(
|
|
93
|
-
c,
|
|
94
|
-
() => ({
|
|
95
|
-
focusProvider: o.focusProvider,
|
|
96
|
-
selectionProvider: o.selectionProvider
|
|
97
|
-
}),
|
|
98
|
-
[o]
|
|
99
|
-
);
|
|
100
|
-
const a = g(
|
|
101
|
-
() => q[r] ?? { rootRole: e, groupRole: s, itemRole: t },
|
|
102
|
-
[s, t, e, r]
|
|
103
|
-
);
|
|
104
|
-
return /* @__PURE__ */ b("div", { ref: u, id: k, className: n, tabIndex: -1, role: a.rootRole, ...I, children: [...o].map((p) => /* @__PURE__ */ b(
|
|
105
|
-
v,
|
|
106
|
-
{
|
|
107
|
-
className: i,
|
|
108
|
-
id: `${k}-${p.key}`,
|
|
109
|
-
role: a.itemRole,
|
|
110
|
-
groupRole: a.groupRole,
|
|
111
|
-
item: p,
|
|
112
|
-
render: l,
|
|
113
|
-
itemMouseEventHandler: x,
|
|
114
|
-
itemKeyboardEventHandler: y
|
|
115
|
-
},
|
|
116
|
-
p.key
|
|
117
|
-
)) });
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
B as C,
|
|
121
|
-
v as a
|
|
122
|
-
};
|