@frontile/theme 0.18.0-alpha.10 → 0.18.0-alpha.12
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/declarations/components/index.d.ts +1 -0
- package/declarations/components/skeleton.d.ts +149 -0
- package/declarations/components/table.d.ts +6 -0
- package/dist/{forms-legacy-CgoY8bbm.js → forms-legacy-B5rhfjDu.js} +111 -6
- package/dist/forms-legacy-B5rhfjDu.js.map +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +13 -29
- package/dist/plugin.js.map +1 -1
- package/package.json +12 -12
- package/src/index.css +31 -3
- package/src/styles/font-faces.css +23 -5
- package/declarations/colors/contrast.d.ts +0 -16
- package/declarations/colors/defaults.d.ts +0 -66
- package/declarations/colors/palette-dark.d.ts +0 -123
- package/declarations/colors/palette-light.d.ts +0 -123
- package/dist/forms-legacy-CgoY8bbm.js.map +0 -1
- package/dist/index.css +0 -63
- package/dist/styles/font-faces.css +0 -70
- package/dist/styles/theme.css +0 -48
- package/dist/styles/typography.css +0 -387
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { type VariantProps } from '../tw';
|
|
2
|
+
declare const skeleton: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
shape: {
|
|
4
|
+
text: string;
|
|
5
|
+
circle: string;
|
|
6
|
+
square: string;
|
|
7
|
+
rounded: string;
|
|
8
|
+
rect: string;
|
|
9
|
+
};
|
|
10
|
+
size: {
|
|
11
|
+
xs: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
md: string;
|
|
14
|
+
lg: string;
|
|
15
|
+
xl: string;
|
|
16
|
+
};
|
|
17
|
+
animation: {
|
|
18
|
+
shimmer: string[];
|
|
19
|
+
pulse: string[];
|
|
20
|
+
none: string[];
|
|
21
|
+
};
|
|
22
|
+
}, undefined, string[], {
|
|
23
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
|
24
|
+
size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
25
|
+
shape?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
26
|
+
animation?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
} & import("tailwind-variants/dist/config.js").TWMConfig & {
|
|
29
|
+
twMerge: true;
|
|
30
|
+
twMergeConfig: {
|
|
31
|
+
readonly extend: {
|
|
32
|
+
readonly classGroups: {
|
|
33
|
+
readonly 'icon-size': readonly [{
|
|
34
|
+
readonly 'size-icon': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
35
|
+
}];
|
|
36
|
+
readonly 'border-w': readonly [{
|
|
37
|
+
readonly border: readonly ["thin", "heavy", "aggressive"];
|
|
38
|
+
}];
|
|
39
|
+
readonly rounded: readonly [{
|
|
40
|
+
readonly rounded: readonly ["default", "pill"];
|
|
41
|
+
}];
|
|
42
|
+
readonly shadow: readonly [{
|
|
43
|
+
readonly 'shadow-elevation': string[];
|
|
44
|
+
}];
|
|
45
|
+
readonly opacity: readonly [{
|
|
46
|
+
readonly opacity: readonly ["hover", "disabled"];
|
|
47
|
+
}];
|
|
48
|
+
readonly 'font-size': readonly [{
|
|
49
|
+
readonly 'text-marquee': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
50
|
+
}, {
|
|
51
|
+
readonly 'text-header': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
52
|
+
}, {
|
|
53
|
+
readonly 'text-body': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
54
|
+
}, {
|
|
55
|
+
readonly 'text-code': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
56
|
+
}, {
|
|
57
|
+
readonly 'text-caption': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
58
|
+
}, {
|
|
59
|
+
readonly 'text-label': readonly ["pico", "nano", "micro", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "kilo", "mega"];
|
|
60
|
+
}];
|
|
61
|
+
};
|
|
62
|
+
readonly conflictingClassGroups: {
|
|
63
|
+
readonly 'icon-size': readonly ["w", "h", "size"];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
shape: {
|
|
69
|
+
text: string;
|
|
70
|
+
circle: string;
|
|
71
|
+
square: string;
|
|
72
|
+
rounded: string;
|
|
73
|
+
rect: string;
|
|
74
|
+
};
|
|
75
|
+
size: {
|
|
76
|
+
xs: string;
|
|
77
|
+
sm: string;
|
|
78
|
+
md: string;
|
|
79
|
+
lg: string;
|
|
80
|
+
xl: string;
|
|
81
|
+
};
|
|
82
|
+
animation: {
|
|
83
|
+
shimmer: string[];
|
|
84
|
+
pulse: string[];
|
|
85
|
+
none: string[];
|
|
86
|
+
};
|
|
87
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
88
|
+
shape: {
|
|
89
|
+
text: string;
|
|
90
|
+
circle: string;
|
|
91
|
+
square: string;
|
|
92
|
+
rounded: string;
|
|
93
|
+
rect: string;
|
|
94
|
+
};
|
|
95
|
+
size: {
|
|
96
|
+
xs: string;
|
|
97
|
+
sm: string;
|
|
98
|
+
md: string;
|
|
99
|
+
lg: string;
|
|
100
|
+
xl: string;
|
|
101
|
+
};
|
|
102
|
+
animation: {
|
|
103
|
+
shimmer: string[];
|
|
104
|
+
pulse: string[];
|
|
105
|
+
none: string[];
|
|
106
|
+
};
|
|
107
|
+
}, undefined, string[], import("tailwind-variants/dist/config.js").TVConfig<{
|
|
108
|
+
shape: {
|
|
109
|
+
text: string;
|
|
110
|
+
circle: string;
|
|
111
|
+
square: string;
|
|
112
|
+
rounded: string;
|
|
113
|
+
rect: string;
|
|
114
|
+
};
|
|
115
|
+
size: {
|
|
116
|
+
xs: string;
|
|
117
|
+
sm: string;
|
|
118
|
+
md: string;
|
|
119
|
+
lg: string;
|
|
120
|
+
xl: string;
|
|
121
|
+
};
|
|
122
|
+
animation: {
|
|
123
|
+
shimmer: string[];
|
|
124
|
+
pulse: string[];
|
|
125
|
+
none: string[];
|
|
126
|
+
};
|
|
127
|
+
}, {
|
|
128
|
+
shape: {
|
|
129
|
+
text: string;
|
|
130
|
+
circle: string;
|
|
131
|
+
square: string;
|
|
132
|
+
rounded: string;
|
|
133
|
+
rect: string;
|
|
134
|
+
};
|
|
135
|
+
size: {
|
|
136
|
+
xs: string;
|
|
137
|
+
sm: string;
|
|
138
|
+
md: string;
|
|
139
|
+
lg: string;
|
|
140
|
+
xl: string;
|
|
141
|
+
};
|
|
142
|
+
animation: {
|
|
143
|
+
shimmer: string[];
|
|
144
|
+
pulse: string[];
|
|
145
|
+
none: string[];
|
|
146
|
+
};
|
|
147
|
+
}>, unknown, unknown, undefined>>;
|
|
148
|
+
export type SkeletonVariants = VariantProps<typeof skeleton>;
|
|
149
|
+
export { skeleton };
|
|
@@ -82,6 +82,8 @@ declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
82
82
|
columnVisibilityIcon: string[];
|
|
83
83
|
td: string[];
|
|
84
84
|
empty: string[];
|
|
85
|
+
skeleton: string[];
|
|
86
|
+
skeletonRow: string[];
|
|
85
87
|
}, undefined, {
|
|
86
88
|
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
|
|
87
89
|
size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
|
|
@@ -218,6 +220,8 @@ declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
218
220
|
columnVisibilityIcon: string[];
|
|
219
221
|
td: string[];
|
|
220
222
|
empty: string[];
|
|
223
|
+
skeleton: string[];
|
|
224
|
+
skeletonRow: string[];
|
|
221
225
|
}, import("tailwind-variants").TVReturnType<{
|
|
222
226
|
size: {
|
|
223
227
|
sm: {
|
|
@@ -301,6 +305,8 @@ declare const table: import("tailwind-variants").TVReturnType<{
|
|
|
301
305
|
columnVisibilityIcon: string[];
|
|
302
306
|
td: string[];
|
|
303
307
|
empty: string[];
|
|
308
|
+
skeleton: string[];
|
|
309
|
+
skeletonRow: string[];
|
|
304
310
|
}, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
|
|
305
311
|
size: {
|
|
306
312
|
sm: {
|
|
@@ -143,7 +143,13 @@ const baseButton = tv({
|
|
|
143
143
|
'2xl': 'text-strong-3xl px-12 py-3.5 gap-2.5 rounded-full'
|
|
144
144
|
},
|
|
145
145
|
isInGroup: {
|
|
146
|
-
true: [
|
|
146
|
+
true: [
|
|
147
|
+
// :first-of-type/:last-of-type (not :first-child/:last-child): a
|
|
148
|
+
// grouped Dropdown's trigger can have a trailing portal-marker
|
|
149
|
+
// <script> element as a sibling inside the group, which would make
|
|
150
|
+
// the last button no longer :last-child. -of-type only counts
|
|
151
|
+
// siblings of the same tag (button), so it isn't thrown off by it.
|
|
152
|
+
'rounded-none first-of-type:rounded-s-full last-of-type:rounded-e-full', '[&:not(:first-of-type):not(:last-of-type)]:rounded-none', 'not-last-of-type:-me-px']
|
|
147
153
|
}
|
|
148
154
|
},
|
|
149
155
|
compoundVariants: [
|
|
@@ -374,7 +380,7 @@ const toggleButton = tv({
|
|
|
374
380
|
}]
|
|
375
381
|
});
|
|
376
382
|
const buttonGroup = tv({
|
|
377
|
-
base: ['inline-flex items-
|
|
383
|
+
base: ['inline-flex items-stretch justify-center h-auto']
|
|
378
384
|
});
|
|
379
385
|
|
|
380
386
|
const chip = tv({
|
|
@@ -926,6 +932,92 @@ const divider = tv({
|
|
|
926
932
|
}
|
|
927
933
|
});
|
|
928
934
|
|
|
935
|
+
// Border-radius lives ONLY in the `shape` variants, never in `base`. Frontile's
|
|
936
|
+
// `rounded-default` is a custom value that tailwind-merge does not recognise as
|
|
937
|
+
// part of the `rounded` group, so a base radius would survive alongside a
|
|
938
|
+
// shape's radius instead of being replaced by it.
|
|
939
|
+
const skeleton = tv({
|
|
940
|
+
base: ['block', 'overflow-hidden'],
|
|
941
|
+
variants: {
|
|
942
|
+
shape: {
|
|
943
|
+
text: 'w-full rounded-default',
|
|
944
|
+
circle: 'aspect-square rounded-full',
|
|
945
|
+
// Matches Avatar's squircle radius so the two line up side by side.
|
|
946
|
+
square: 'aspect-square rounded-[20%]',
|
|
947
|
+
rounded: 'w-full rounded-lg',
|
|
948
|
+
rect: 'w-full rounded-none'
|
|
949
|
+
},
|
|
950
|
+
// Resolved per shape in compoundVariants: `circle`/`square` take both
|
|
951
|
+
// dimensions from Avatar's size scale, the rest take a height.
|
|
952
|
+
size: {
|
|
953
|
+
xs: '',
|
|
954
|
+
sm: '',
|
|
955
|
+
md: '',
|
|
956
|
+
lg: '',
|
|
957
|
+
xl: ''
|
|
958
|
+
},
|
|
959
|
+
animation: {
|
|
960
|
+
shimmer: ['bg-linear-to-r', 'from-surface-overlay-soft', 'via-surface-overlay-strong', 'to-surface-overlay-soft', 'bg-[length:200%_100%]', 'animate-shimmer'],
|
|
961
|
+
pulse: ['bg-surface-overlay-medium', 'animate-pulse'],
|
|
962
|
+
none: ['bg-surface-overlay-medium']
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
compoundVariants: [
|
|
966
|
+
// Square-ish shapes: one token sets width and height, reusing Avatar's
|
|
967
|
+
// scale so `<Skeleton @shape="circle" @size="md" />` matches
|
|
968
|
+
// `<Avatar @size="md" />` exactly.
|
|
969
|
+
{
|
|
970
|
+
shape: ['circle', 'square'],
|
|
971
|
+
size: 'xs',
|
|
972
|
+
class: 'size-5'
|
|
973
|
+
}, {
|
|
974
|
+
shape: ['circle', 'square'],
|
|
975
|
+
size: 'sm',
|
|
976
|
+
class: 'size-6'
|
|
977
|
+
}, {
|
|
978
|
+
shape: ['circle', 'square'],
|
|
979
|
+
size: 'md',
|
|
980
|
+
class: 'size-8'
|
|
981
|
+
}, {
|
|
982
|
+
shape: ['circle', 'square'],
|
|
983
|
+
size: 'lg',
|
|
984
|
+
class: 'size-10'
|
|
985
|
+
}, {
|
|
986
|
+
shape: ['circle', 'square'],
|
|
987
|
+
size: 'xl',
|
|
988
|
+
class: 'size-12'
|
|
989
|
+
},
|
|
990
|
+
// Full-width shapes: size sets a height. Every shape gets one so a
|
|
991
|
+
// Skeleton is never zero-height — an invisible placeholder makes a
|
|
992
|
+
// loading state look like an empty state. Override with `@class`.
|
|
993
|
+
{
|
|
994
|
+
shape: ['text', 'rounded', 'rect'],
|
|
995
|
+
size: 'xs',
|
|
996
|
+
class: 'h-2.5'
|
|
997
|
+
}, {
|
|
998
|
+
shape: ['text', 'rounded', 'rect'],
|
|
999
|
+
size: 'sm',
|
|
1000
|
+
class: 'h-3'
|
|
1001
|
+
}, {
|
|
1002
|
+
shape: ['text', 'rounded', 'rect'],
|
|
1003
|
+
size: 'md',
|
|
1004
|
+
class: 'h-4'
|
|
1005
|
+
}, {
|
|
1006
|
+
shape: ['text', 'rounded', 'rect'],
|
|
1007
|
+
size: 'lg',
|
|
1008
|
+
class: 'h-5'
|
|
1009
|
+
}, {
|
|
1010
|
+
shape: ['text', 'rounded', 'rect'],
|
|
1011
|
+
size: 'xl',
|
|
1012
|
+
class: 'h-6'
|
|
1013
|
+
}],
|
|
1014
|
+
defaultVariants: {
|
|
1015
|
+
shape: 'text',
|
|
1016
|
+
size: 'md',
|
|
1017
|
+
animation: 'shimmer'
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
|
|
929
1021
|
const spinner = tv({
|
|
930
1022
|
base: 'text-neutral-muted animate-spin',
|
|
931
1023
|
variants: {
|
|
@@ -966,8 +1058,17 @@ const table = tv({
|
|
|
966
1058
|
sortIcon: ['size-4', 'flex-shrink-0', 'text-neutral-soft', 'transition-opacity', 'data-[sorted=false]:opacity-0', 'group-hover/sort:data-[sorted=false]:opacity-100', 'data-[sorted=true]:opacity-100'],
|
|
967
1059
|
columnVisibilityButton: ['flex'],
|
|
968
1060
|
columnVisibilityIcon: ['size-6'],
|
|
969
|
-
td: ['
|
|
970
|
-
empty: ['text-neutral-soft', 'align-middle', 'text-center', 'py-12']
|
|
1061
|
+
td: ['align-middle', 'text-neutral-strong', '[&:has([role=checkbox])]:pr-0'],
|
|
1062
|
+
empty: ['text-neutral-soft', 'align-middle', 'text-center', 'py-12'],
|
|
1063
|
+
// Deliberately carries no width or height: these classes are merged onto
|
|
1064
|
+
// Skeleton *after* its own shape and size variants, so any dimension set
|
|
1065
|
+
// here would defeat a column's `skeleton: 'circle'` preset. The table
|
|
1066
|
+
// passes its `size` through to Skeleton instead.
|
|
1067
|
+
skeleton: ['max-w-[16ch]'],
|
|
1068
|
+
// Placeholder rows fade in one after another. The per-row `animation-delay`
|
|
1069
|
+
// is set inline by the component, since a delay that scales with the row
|
|
1070
|
+
// index cannot be a static utility class.
|
|
1071
|
+
skeletonRow: ['animate-skeleton-enter', 'motion-reduce:animate-none']
|
|
971
1072
|
},
|
|
972
1073
|
variants: {
|
|
973
1074
|
size: {
|
|
@@ -989,6 +1090,10 @@ const table = tv({
|
|
|
989
1090
|
thead: ['after:absolute', 'after:top-full', 'after:left-0', 'after:w-1/2', 'after:animate-swing', 'after:h-px', 'after:z-10']
|
|
990
1091
|
}
|
|
991
1092
|
},
|
|
1093
|
+
// Declared empty on purpose: these variants exist only so `isLoading` can
|
|
1094
|
+
// pair with them in `compoundVariants` below, where the actual
|
|
1095
|
+
// `thead: after:bg-*` colour is applied. A colour set here would paint the
|
|
1096
|
+
// hairline even when the table is not loading.
|
|
992
1097
|
loadingColor: {
|
|
993
1098
|
default: {},
|
|
994
1099
|
primary: {},
|
|
@@ -1963,5 +2068,5 @@ const formSelect = tv({
|
|
|
1963
2068
|
}
|
|
1964
2069
|
});
|
|
1965
2070
|
|
|
1966
|
-
export { nativeSelect as A, notificationCard as B, notificationTransitions as C, notificationsContainer as D, overlay as E, overlayTransitions as F, popover as G, progressBar as H, radio as I, radioGroup as J, select as K,
|
|
1967
|
-
//# sourceMappingURL=forms-legacy-
|
|
2071
|
+
export { nativeSelect as A, notificationCard as B, notificationTransitions as C, notificationsContainer as D, overlay as E, overlayTransitions as F, popover as G, progressBar as H, radio as I, radioGroup as J, select as K, skeleton as L, spinner as M, switchInput as N, table as O, textarea as P, toggleButton as Q, tv as R, twMerge as S, autocomplete as a, avatar as b, backdrop as c, button as d, buttonGroup as e, checkbox as f, checkboxGroup as g, chip as h, closeButton as i, divider as j, drawer as k, dropdownContent as l, formCheckbox as m, formCheckboxGroup as n, formDescription as o, formFeedback as p, formInput as q, formRadio as r, formRadioGroup as s, formSelect as t, formTextarea as u, input as v, label as w, listbox as x, listboxItem as y, modal as z };
|
|
2072
|
+
//# sourceMappingURL=forms-legacy-B5rhfjDu.js.map
|