@fragment-build/ui 3.2.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/components/code-snippet/CodeSnippet.d.ts +9 -0
- package/components/code-snippet/CodeSnippet.js +14 -4
- package/components/code-snippet/CodeSnippet.js.map +1 -1
- package/components/code-snippet/code-snippet.css +18 -0
- package/components/segmented-control/SegmentedControl.d.ts +16 -0
- package/components/segmented-control/SegmentedControl.js +18 -0
- package/components/segmented-control/SegmentedControl.js.map +1 -0
- package/components/segmented-control/SegmentedControl.styles.d.ts +46 -0
- package/components/segmented-control/SegmentedControl.styles.js +20 -0
- package/components/segmented-control/SegmentedControl.styles.js.map +1 -0
- package/components/segmented-control/segmented-control.css +41 -0
- package/fragments/empty-state/EmptyState.d.ts +12 -0
- package/fragments/empty-state/EmptyState.js +12 -0
- package/fragments/empty-state/EmptyState.js.map +1 -0
- package/fragments/empty-state/EmptyState.styles.d.ts +55 -0
- package/fragments/empty-state/EmptyState.styles.js +23 -0
- package/fragments/empty-state/EmptyState.styles.js.map +1 -0
- package/fragments/empty-state/empty-state.css +39 -0
- package/fragments/form/FormCard.d.ts +14 -0
- package/fragments/form/FormCard.js +14 -0
- package/fragments/form/FormCard.js.map +1 -0
- package/fragments/form/FormCard.styles.d.ts +49 -0
- package/fragments/form/FormCard.styles.js +23 -0
- package/fragments/form/FormCard.styles.js.map +1 -0
- package/fragments/form/FormSection.d.ts +3 -1
- package/fragments/form/FormSection.js +2 -2
- package/fragments/form/FormSection.js.map +1 -1
- package/fragments/form/FormSection.styles.d.ts +6 -0
- package/fragments/form/FormSection.styles.js +2 -0
- package/fragments/form/FormSection.styles.js.map +1 -1
- package/fragments/form/form-card.css +42 -0
- package/fragments/form/form-section.css +22 -10
- package/fragments/form/form.css +1 -1
- package/fragments/navbar/navbar.css +2 -2
- package/fragments/page/PageHeader.d.ts +7 -2
- package/fragments/page/PageHeader.js +3 -3
- package/fragments/page/PageHeader.js.map +1 -1
- package/fragments/page/PageHeader.styles.d.ts +30 -21
- package/fragments/page/PageHeader.styles.js +10 -0
- package/fragments/page/PageHeader.styles.js.map +1 -1
- package/fragments/page/page-header.css +23 -3
- package/fragments/save-bar/SaveBar.d.ts +12 -0
- package/fragments/save-bar/SaveBar.js +15 -0
- package/fragments/save-bar/SaveBar.js.map +1 -0
- package/fragments/save-bar/SaveBar.styles.d.ts +37 -0
- package/fragments/save-bar/SaveBar.styles.js +16 -0
- package/fragments/save-bar/SaveBar.styles.js.map +1 -0
- package/fragments/save-bar/save-bar.css +28 -0
- package/fragments/shell/shell.css +8 -4
- package/fragments/sidebar/Sidebar.js +4 -1
- package/fragments/sidebar/Sidebar.js.map +1 -1
- package/fragments/sidebar/sidebar.css +52 -30
- package/fragments/stat/StatCard.d.ts +29 -0
- package/fragments/stat/StatCard.js +20 -0
- package/fragments/stat/StatCard.js.map +1 -0
- package/fragments/stat/StatCard.styles.d.ts +85 -0
- package/fragments/stat/StatCard.styles.js +26 -0
- package/fragments/stat/StatCard.styles.js.map +1 -0
- package/fragments/stat/stat-card.css +64 -0
- package/fragments/widget/Widget.d.ts +9 -2
- package/fragments/widget/Widget.js +4 -3
- package/fragments/widget/Widget.js.map +1 -1
- package/fragments/widget/Widget.styles.d.ts +51 -0
- package/fragments/widget/Widget.styles.js +12 -0
- package/fragments/widget/Widget.styles.js.map +1 -1
- package/fragments/widget/widget.css +49 -4
- package/index.css +138 -37
- package/index.d.ts +5 -0
- package/index.js +5 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/code-snippet/code-snippet.css +18 -0
- package/src/components/segmented-control/segmented-control.css +41 -0
- package/src/fragments/empty-state/empty-state.css +39 -0
- package/src/fragments/form/form-card.css +42 -0
- package/src/fragments/form/form-section.css +22 -10
- package/src/fragments/form/form.css +1 -1
- package/src/fragments/navbar/navbar.css +2 -2
- package/src/fragments/page/page-header.css +23 -3
- package/src/fragments/save-bar/save-bar.css +28 -0
- package/src/fragments/shell/shell.css +8 -4
- package/src/fragments/sidebar/sidebar.css +52 -30
- package/src/fragments/stat/stat-card.css +64 -0
- package/src/fragments/widget/widget.css +49 -4
- package/src/index.css +138 -37
- package/src/theme.example.css +26 -0
- package/theme.example.css +26 -0
|
@@ -1,18 +1,59 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-widget {
|
|
3
|
-
@apply
|
|
3
|
+
@apply p-5 gap-4 min-w-0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-widget__header {
|
|
7
|
-
@apply p-0;
|
|
7
|
+
@apply p-0 flex flex-row items-start gap-3;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fragment-widget__header-start {
|
|
11
|
+
@apply shrink-0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fragment-widget__heading {
|
|
15
|
+
@apply min-w-0 flex-1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.fragment-widget__title {
|
|
19
|
+
@apply text-sm font-semibold;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.fragment-widget__description {
|
|
23
|
+
@apply mt-0.5 text-xs text-muted;
|
|
8
24
|
}
|
|
9
25
|
|
|
10
26
|
.fragment-widget__header-end {
|
|
11
|
-
@apply ml-auto;
|
|
27
|
+
@apply ml-auto flex items-center gap-2 shrink-0;
|
|
12
28
|
}
|
|
13
29
|
|
|
14
30
|
.fragment-widget__content {
|
|
15
|
-
@apply p-0 overflow-visible;
|
|
31
|
+
@apply p-0 overflow-visible min-w-0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fragment-widget__footer {
|
|
35
|
+
@apply -mx-5 -mb-5 mt-auto px-5 py-3 border-t border-separator text-xs text-muted;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fragment-widget--padding-sm {
|
|
39
|
+
@apply p-4 gap-3;
|
|
40
|
+
|
|
41
|
+
.fragment-widget__footer {
|
|
42
|
+
@apply -mx-4 -mb-4 px-4;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Edge-to-edge content: the header keeps its inset, the body does not. */
|
|
47
|
+
.fragment-widget--flush {
|
|
48
|
+
@apply p-0 gap-0;
|
|
49
|
+
|
|
50
|
+
.fragment-widget__header {
|
|
51
|
+
@apply px-5 pt-5 pb-4;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fragment-widget__footer {
|
|
55
|
+
@apply mx-0 mb-0;
|
|
56
|
+
}
|
|
16
57
|
}
|
|
17
58
|
|
|
18
59
|
.fragment-widget--sm {
|
|
@@ -26,4 +67,8 @@
|
|
|
26
67
|
.fragment-widget--lg {
|
|
27
68
|
@apply col-span-1 lg:col-span-2 2xl:col-span-3;
|
|
28
69
|
}
|
|
70
|
+
|
|
71
|
+
.fragment-widget--full {
|
|
72
|
+
@apply col-span-full;
|
|
73
|
+
}
|
|
29
74
|
}
|
package/index.css
CHANGED
|
@@ -1,37 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Type scale.
|
|
3
|
+
*
|
|
4
|
+
* Tailwind's own steps (12 / 14 / 16). Fragment used to pin `text-xs` to 13px and `text-sm` to
|
|
5
|
+
* 15px, which made every HeroUI control one step larger than the component library was drawn for
|
|
6
|
+
* and pushed dashboards towards a consumer-app density. Body copy is set to `text-sm` below, which
|
|
7
|
+
* is the size HeroUI's fields, list boxes and tables already use, so running text and controls now
|
|
8
|
+
* share one size.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Fragment surface roles.
|
|
13
|
+
*
|
|
14
|
+
* `inline` so the utilities compile to `var(--sidebar)` / `var(--navbar)` and are
|
|
15
|
+
* therefore resolved on the element, not frozen at `:root`. Each falls back to the
|
|
16
|
+
* page role, so a theme that never declares them renders exactly as before.
|
|
17
|
+
*/
|
|
18
|
+
@theme inline {
|
|
19
|
+
--color-sidebar: var(--sidebar, var(--background));
|
|
20
|
+
--color-sidebar-foreground: var(--sidebar-foreground, var(--foreground));
|
|
21
|
+
|
|
22
|
+
--color-navbar: var(--navbar, var(--background));
|
|
23
|
+
--color-navbar-foreground: var(--navbar-foreground, var(--foreground));
|
|
4
24
|
}
|
|
5
25
|
|
|
6
26
|
@layer base {
|
|
7
27
|
body {
|
|
8
|
-
@apply bg-background text-foreground;
|
|
28
|
+
@apply bg-background text-foreground text-sm antialiased;
|
|
9
29
|
}
|
|
10
30
|
|
|
31
|
+
/*
|
|
32
|
+
* Page title, section, card. A dashboard has many more card titles than page titles, so the
|
|
33
|
+
* steps are tight and the weight carries the hierarchy rather than the size.
|
|
34
|
+
*/
|
|
11
35
|
h1 {
|
|
12
|
-
@apply text-
|
|
36
|
+
@apply text-2xl font-semibold tracking-tight;
|
|
13
37
|
}
|
|
14
38
|
|
|
15
39
|
h2 {
|
|
16
|
-
@apply text-
|
|
40
|
+
@apply text-lg font-semibold tracking-tight;
|
|
17
41
|
}
|
|
18
42
|
|
|
19
43
|
h3 {
|
|
20
|
-
@apply text-
|
|
44
|
+
@apply text-base font-semibold;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
h4 {
|
|
48
|
+
@apply text-sm font-semibold;
|
|
21
49
|
}
|
|
22
50
|
}
|
|
23
51
|
|
|
24
52
|
@layer components {
|
|
53
|
+
/*
|
|
54
|
+
* Fields keep HeroUI's own height and padding. They get a hairline border instead of the
|
|
55
|
+
* default shadow, so a form reads as a set of crisp boxes on a flat surface.
|
|
56
|
+
*/
|
|
25
57
|
.input, .textarea, .select__trigger {
|
|
26
|
-
@apply border border-border
|
|
58
|
+
@apply border border-border shadow-none;
|
|
27
59
|
}
|
|
28
60
|
|
|
29
|
-
.input-group, .search-field__group, .number-field__group{
|
|
30
|
-
@apply border border-border shadow-none
|
|
31
|
-
|
|
32
|
-
.input-group__input, .search-field__input, .number-field__input {
|
|
33
|
-
@apply px-6 py-4;
|
|
34
|
-
}
|
|
61
|
+
.input-group, .search-field__group, .number-field__group {
|
|
62
|
+
@apply border border-border shadow-none;
|
|
35
63
|
}
|
|
36
64
|
|
|
37
65
|
.slider {
|
|
@@ -50,14 +78,6 @@
|
|
|
50
78
|
}
|
|
51
79
|
}
|
|
52
80
|
|
|
53
|
-
.select__indicator {
|
|
54
|
-
@apply right-4;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.select__trigger:has(.select__indicator) {
|
|
58
|
-
@apply pr-10;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
81
|
.select__popover {
|
|
62
82
|
@apply rounded-xl;
|
|
63
83
|
}
|
|
@@ -65,18 +85,18 @@
|
|
|
65
85
|
.tabs {
|
|
66
86
|
&:not(.tabs--secondary) {
|
|
67
87
|
.tabs__list {
|
|
68
|
-
@apply bg-
|
|
69
|
-
|
|
70
|
-
border-radius: calc(var(--radius-
|
|
88
|
+
@apply bg-default p-1;
|
|
89
|
+
|
|
90
|
+
border-radius: calc(var(--radius-xl) + 0.25rem);
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
.tabs__indicator {
|
|
74
|
-
@apply
|
|
94
|
+
@apply bg-surface shadow-sm;
|
|
75
95
|
}
|
|
76
96
|
|
|
77
97
|
.tabs__tab {
|
|
78
98
|
&[data-selected="true"] {
|
|
79
|
-
@apply text-surface-
|
|
99
|
+
@apply text-surface-foreground;
|
|
80
100
|
}
|
|
81
101
|
}
|
|
82
102
|
|
|
@@ -86,7 +106,7 @@
|
|
|
86
106
|
}
|
|
87
107
|
|
|
88
108
|
.tabs__tab {
|
|
89
|
-
@apply h-
|
|
109
|
+
@apply h-8 px-4 text-sm text-nowrap;
|
|
90
110
|
}
|
|
91
111
|
|
|
92
112
|
.tabs__list {
|
|
@@ -95,25 +115,89 @@
|
|
|
95
115
|
}
|
|
96
116
|
}
|
|
97
117
|
|
|
118
|
+
/* Underline tabs size to their label, so a short list sits left instead of spreading out. */
|
|
98
119
|
&.tabs--secondary {
|
|
120
|
+
.tabs__list[data-orientation="horizontal"] {
|
|
121
|
+
@apply gap-6;
|
|
122
|
+
}
|
|
123
|
+
|
|
99
124
|
.tabs__tab {
|
|
100
|
-
@apply h-
|
|
125
|
+
@apply h-11 w-auto min-w-0 px-0.5 gap-2;
|
|
126
|
+
& svg {
|
|
127
|
+
@apply size-4;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
* A static underline for tab lists that render no <Tabs.Indicator>. The animated indicator
|
|
132
|
+
* slides from the previous tab with an inline translate, and when the selection is decided
|
|
133
|
+
* during hydration (a tab read from the URL) its first frame can stick, leaving the line
|
|
134
|
+
* under the wrong tab.
|
|
135
|
+
*/
|
|
136
|
+
&[data-selected="true"]:not(:has(.tabs__indicator))::after {
|
|
137
|
+
content: '';
|
|
138
|
+
@apply absolute inset-x-0 bottom-0 h-0.5 bg-accent;
|
|
139
|
+
}
|
|
101
140
|
}
|
|
102
141
|
}
|
|
103
142
|
}
|
|
104
143
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
144
|
+
/*
|
|
145
|
+
* The primary table as one flat card: a hairline frame, a header band and row dividers, instead
|
|
146
|
+
* of HeroUI's grey frame with a white card inset in it — which on a tinted page reads as a box
|
|
147
|
+
* in a box. Rows get a visible hover, since the default (`surface` at 40%) vanishes on white.
|
|
148
|
+
*/
|
|
149
|
+
.table-root--primary {
|
|
150
|
+
@apply border border-border bg-surface p-0;
|
|
151
|
+
|
|
152
|
+
border-radius: var(--radius-3xl);
|
|
153
|
+
box-shadow: var(--fragment-card-shadow, none);
|
|
108
154
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
@apply h-12 px-6;
|
|
155
|
+
.table__column {
|
|
156
|
+
@apply py-2.5 whitespace-nowrap;
|
|
112
157
|
|
|
113
|
-
|
|
114
|
-
|
|
158
|
+
&::after {
|
|
159
|
+
content: none;
|
|
115
160
|
}
|
|
116
161
|
}
|
|
162
|
+
|
|
163
|
+
.table__header {
|
|
164
|
+
@apply border-b border-separator;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.table__body tr td {
|
|
168
|
+
border-radius: 0 !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.table__cell {
|
|
172
|
+
@apply border-b border-separator;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.table__body tr:last-child .table__cell {
|
|
176
|
+
@apply border-b-0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.table__row {
|
|
180
|
+
@media (hover: hover) {
|
|
181
|
+
&:hover .table__cell,
|
|
182
|
+
&[data-hovered="true"] .table__cell {
|
|
183
|
+
@apply bg-surface-secondary;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.table__footer {
|
|
189
|
+
@apply border-t border-separator;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
* Cards sit apart from the page by a hairline and an optional, very soft lift. The lift is a
|
|
195
|
+
* token so a theme on a white page (where the border is all there is) can turn it off.
|
|
196
|
+
*/
|
|
197
|
+
.card {
|
|
198
|
+
@apply border border-border;
|
|
199
|
+
|
|
200
|
+
box-shadow: var(--fragment-card-shadow, none);
|
|
117
201
|
}
|
|
118
202
|
}
|
|
119
203
|
|
|
@@ -124,10 +208,15 @@
|
|
|
124
208
|
@import "./fragments/widget/widget.css";
|
|
125
209
|
@import "./components/grid/grid.css";
|
|
126
210
|
@import "./components/multi-switch/multi-switch.css";
|
|
211
|
+
@import "./components/segmented-control/segmented-control.css";
|
|
127
212
|
@import "./components/code/code.css";
|
|
128
213
|
@import "./components/code-snippet/code-snippet.css";
|
|
129
214
|
@import "./fragments/form/form.css";
|
|
130
215
|
@import "./fragments/form/form-section.css";
|
|
216
|
+
@import "./fragments/form/form-card.css";
|
|
217
|
+
@import "./fragments/save-bar/save-bar.css";
|
|
218
|
+
@import "./fragments/stat/stat-card.css";
|
|
219
|
+
@import "./fragments/empty-state/empty-state.css";
|
|
131
220
|
|
|
132
221
|
.light,
|
|
133
222
|
.default,
|
|
@@ -137,6 +226,12 @@
|
|
|
137
226
|
--background: #fff;
|
|
138
227
|
--border: rgba(0, 0, 0, 0.07);
|
|
139
228
|
--surface-secondary: rgba(0, 0, 0, 0.02);
|
|
229
|
+
|
|
230
|
+
/* Fragment surfaces: default to the page surface */
|
|
231
|
+
--sidebar: var(--background);
|
|
232
|
+
--sidebar-foreground: var(--foreground);
|
|
233
|
+
--navbar: var(--background);
|
|
234
|
+
--navbar-foreground: var(--foreground);
|
|
140
235
|
}
|
|
141
236
|
|
|
142
237
|
.dark,
|
|
@@ -146,6 +241,12 @@
|
|
|
146
241
|
--foreground: var(--snow);
|
|
147
242
|
--border: rgba(255, 255, 255, 0.07);
|
|
148
243
|
--surface-secondary: rgba(255, 255, 255, 0.02);
|
|
244
|
+
|
|
245
|
+
/* Fragment surfaces: default to the page surface */
|
|
246
|
+
--sidebar: var(--background);
|
|
247
|
+
--sidebar-foreground: var(--foreground);
|
|
248
|
+
--navbar: var(--background);
|
|
249
|
+
--navbar-foreground: var(--foreground);
|
|
149
250
|
}
|
|
150
251
|
|
|
151
252
|
/* @import "./theme.example.css"; */
|
package/index.d.ts
CHANGED
|
@@ -4,10 +4,15 @@ export { CodeSnippet, type CodeSnippetProps } from './components/code-snippet/Co
|
|
|
4
4
|
export { Grid, type GridProps } from './components/grid/Grid';
|
|
5
5
|
export { MultiSwitch, type MultiSwitchProps } from './components/multi-switch/MultiSwitch';
|
|
6
6
|
export { ThemeSwitch, type ThemeSwitchProps } from './components/theme-switch/ThemeSwitch';
|
|
7
|
+
export { SegmentedControl, type SegmentedControlProps, type SegmentedControlOption, } from './components/segmented-control/SegmentedControl';
|
|
7
8
|
export { Form, type FormProps } from './fragments/form/Form';
|
|
8
9
|
export { FormSection, type FormSectionProps } from './fragments/form/FormSection';
|
|
10
|
+
export { FormCard, type FormCardProps } from './fragments/form/FormCard';
|
|
11
|
+
export { SaveBar, type SaveBarProps } from './fragments/save-bar/SaveBar';
|
|
9
12
|
export { PageHeader, type PageHeaderProps } from './fragments/page/PageHeader';
|
|
10
13
|
export { Navbar, type NavbarProps } from './fragments/navbar/Navbar';
|
|
11
14
|
export { Shell, type ShellProps } from './fragments/shell/Shell';
|
|
12
15
|
export { Sidebar, type SidebarProps } from './fragments/sidebar/Sidebar';
|
|
13
16
|
export { Widget, type WidgetProps } from './fragments/widget/Widget';
|
|
17
|
+
export { StatCard, type StatCardProps, type StatCardDelta } from './fragments/stat/StatCard';
|
|
18
|
+
export { EmptyState, type EmptyStateProps } from './fragments/empty-state/EmptyState';
|
package/index.js
CHANGED
|
@@ -6,11 +6,16 @@ export { CodeSnippet } from './components/code-snippet/CodeSnippet';
|
|
|
6
6
|
export { Grid } from './components/grid/Grid';
|
|
7
7
|
export { MultiSwitch } from './components/multi-switch/MultiSwitch';
|
|
8
8
|
export { ThemeSwitch } from './components/theme-switch/ThemeSwitch';
|
|
9
|
+
export { SegmentedControl, } from './components/segmented-control/SegmentedControl';
|
|
9
10
|
export { Form } from './fragments/form/Form';
|
|
10
11
|
export { FormSection } from './fragments/form/FormSection';
|
|
12
|
+
export { FormCard } from './fragments/form/FormCard';
|
|
13
|
+
export { SaveBar } from './fragments/save-bar/SaveBar';
|
|
11
14
|
export { PageHeader } from './fragments/page/PageHeader';
|
|
12
15
|
export { Navbar } from './fragments/navbar/Navbar';
|
|
13
16
|
export { Shell } from './fragments/shell/Shell';
|
|
14
17
|
export { Sidebar } from './fragments/sidebar/Sidebar';
|
|
15
18
|
export { Widget } from './fragments/widget/Widget';
|
|
19
|
+
export { StatCard } from './fragments/stat/StatCard';
|
|
20
|
+
export { EmptyState } from './fragments/empty-state/EmptyState';
|
|
16
21
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,sBAAsB;AACtB,OAAO,EAAE,IAAI,EAAkB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAyB,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAkB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAyB,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAyB,MAAO,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,sBAAsB;AACtB,OAAO,EAAE,IAAI,EAAkB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAyB,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAkB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAyB,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAyB,MAAO,uCAAuC,CAAC;AAC5F,OAAO,EACL,gBAAgB,GACjB,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAkB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAyB,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAsB,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAqB,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAwB,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAoB,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,KAAK,EAAmB,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAqB,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAoB,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAA0C,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAwB,MAAM,oCAAoC,CAAC"}
|
package/package.json
CHANGED
|
@@ -11,3 +11,21 @@
|
|
|
11
11
|
@apply text-muted;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
@layer components {
|
|
16
|
+
.fragment-code-snippet--block {
|
|
17
|
+
@apply overflow-hidden rounded-xl border border-border bg-surface-secondary;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.fragment-code-snippet__header {
|
|
21
|
+
@apply flex items-center justify-between gap-2 border-b border-border py-1 pr-1 pl-4;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.fragment-code-snippet__title {
|
|
25
|
+
@apply text-xs font-medium text-muted;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fragment-code-snippet__block-code {
|
|
29
|
+
@apply overflow-x-auto px-4 py-3 font-mono text-xs leading-relaxed text-foreground;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.fragment-segmented-control {
|
|
3
|
+
@apply inline-flex items-center gap-0.5 rounded-[var(--field-radius)] bg-default p-0.5;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fragment-segmented-control--full-width {
|
|
7
|
+
@apply flex w-full;
|
|
8
|
+
|
|
9
|
+
.fragment-segmented-control__item {
|
|
10
|
+
@apply flex-1;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fragment-segmented-control__item.toggle-button {
|
|
15
|
+
@apply h-8 rounded-[calc(var(--field-radius)-0.125rem)] px-3 text-sm font-medium text-muted md:h-8;
|
|
16
|
+
|
|
17
|
+
--toggle-button-bg: transparent;
|
|
18
|
+
--toggle-button-bg-hover: transparent;
|
|
19
|
+
--toggle-button-bg-pressed: transparent;
|
|
20
|
+
--toggle-button-bg-selected: var(--surface);
|
|
21
|
+
--toggle-button-bg-selected-hover: var(--surface);
|
|
22
|
+
--toggle-button-bg-selected-pressed: var(--surface);
|
|
23
|
+
--toggle-button-fg-selected: var(--surface-foreground, var(--foreground));
|
|
24
|
+
|
|
25
|
+
&:hover, &[data-hovered="true"] {
|
|
26
|
+
@apply text-foreground;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-selected="true"] {
|
|
30
|
+
@apply shadow-sm text-foreground;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& svg {
|
|
34
|
+
@apply size-4;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fragment-segmented-control--sm .fragment-segmented-control__item.toggle-button {
|
|
39
|
+
@apply h-7 px-2.5 text-xs md:h-7;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.fragment-empty-state {
|
|
3
|
+
@apply flex flex-col items-center justify-center text-center px-6 py-12;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fragment-empty-state--sm {
|
|
7
|
+
@apply py-8;
|
|
8
|
+
|
|
9
|
+
.fragment-empty-state__icon {
|
|
10
|
+
@apply size-9 mb-3;
|
|
11
|
+
& svg {
|
|
12
|
+
@apply size-[18px];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fragment-empty-state--bordered {
|
|
18
|
+
@apply rounded-2xl border border-dashed border-border bg-surface;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.fragment-empty-state__icon {
|
|
22
|
+
@apply mb-4 flex size-11 items-center justify-center rounded-xl bg-default text-muted;
|
|
23
|
+
& svg {
|
|
24
|
+
@apply size-5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fragment-empty-state__title {
|
|
29
|
+
@apply text-sm font-semibold text-foreground;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.fragment-empty-state__description {
|
|
33
|
+
@apply mt-1 max-w-sm text-sm text-muted text-balance;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.fragment-empty-state__actions {
|
|
37
|
+
@apply mt-5 flex flex-wrap items-center justify-center gap-2;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.fragment-form-card {
|
|
3
|
+
@apply p-0 gap-0 overflow-visible;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fragment-form-card__header {
|
|
7
|
+
@apply flex items-start gap-4 px-6 pt-5;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fragment-form-card__heading {
|
|
11
|
+
@apply min-w-0 flex-1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fragment-form-card__title {
|
|
15
|
+
@apply text-base font-semibold;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.fragment-form-card__description {
|
|
19
|
+
@apply mt-1 text-sm text-muted;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.fragment-form-card__header-end {
|
|
23
|
+
@apply shrink-0 flex items-center gap-2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.fragment-form-card__body {
|
|
27
|
+
@apply flex flex-col gap-5 px-6 pt-5 pb-6;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fragment-form-card__footer {
|
|
31
|
+
@apply flex items-center justify-between gap-3 rounded-b-[inherit] border-t border-separator bg-surface-secondary px-6 py-3
|
|
32
|
+
text-xs text-muted;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.fragment-form-card--danger {
|
|
36
|
+
@apply border-danger/30;
|
|
37
|
+
|
|
38
|
+
.fragment-form-card__title {
|
|
39
|
+
@apply text-danger;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,41 +1,53 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-form-section__main {
|
|
3
|
-
@apply flex flex-col;
|
|
3
|
+
@apply flex flex-col gap-4;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-form-section__info {
|
|
7
|
-
@apply
|
|
7
|
+
@apply min-w-0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.fragment-form-
|
|
11
|
-
@apply flex
|
|
10
|
+
.fragment-form-section__title-row {
|
|
11
|
+
@apply flex items-center gap-2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fragment-form-section__title {
|
|
15
|
+
@apply text-sm font-semibold;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
.fragment-form-section__description {
|
|
15
|
-
@apply text-sm text-muted;
|
|
19
|
+
@apply mt-1 text-sm text-muted;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.fragment-form-section__content {
|
|
23
|
+
@apply flex flex-col gap-5 flex-1 min-w-0;
|
|
16
24
|
}
|
|
17
25
|
|
|
26
|
+
/*
|
|
27
|
+
* Label column and control column. The label column is narrow and fixed so that, down a long
|
|
28
|
+
* settings page, every control starts on the same vertical line.
|
|
29
|
+
*/
|
|
18
30
|
.fragment-form-section--horizontal {
|
|
19
31
|
.fragment-form-section__main {
|
|
20
|
-
@apply
|
|
32
|
+
@apply md:flex-row md:gap-10;
|
|
21
33
|
}
|
|
22
34
|
.fragment-form-section__info {
|
|
23
|
-
@apply
|
|
35
|
+
@apply md:w-72 md:shrink-0;
|
|
24
36
|
}
|
|
25
37
|
.fragment-form-section__content {
|
|
26
|
-
@apply
|
|
38
|
+
@apply md:max-w-xl;
|
|
27
39
|
}
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
.fragment-form-section--vertical {
|
|
31
43
|
.fragment-form-section__content {
|
|
32
|
-
@apply
|
|
44
|
+
@apply md:max-w-3xl;
|
|
33
45
|
}
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
.fragment-form-section--full-width {
|
|
37
49
|
.fragment-form-section__content {
|
|
38
|
-
@apply
|
|
50
|
+
@apply md:max-w-full;
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-navbar__topbar {
|
|
3
|
-
@apply flex gap-6 items-center px-8 py-5;
|
|
3
|
+
@apply flex gap-6 items-center px-8 py-5 bg-navbar text-navbar-foreground;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-navbar__tabs {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.fragment-navbar__bottom-nav {
|
|
15
|
-
@apply fixed md:hidden z-50 bottom-0 bg-
|
|
15
|
+
@apply fixed md:hidden z-50 bottom-0 bg-navbar text-navbar-foreground flex w-full gap-2 px-2 py-1 border-t border-border;
|
|
16
16
|
& > *,
|
|
17
17
|
& > * > * {
|
|
18
18
|
@apply h-12 flex-1;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-page-header {
|
|
3
|
-
@apply flex
|
|
3
|
+
@apply flex flex-col gap-5 mb-8;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.fragment-page-header--with-footer {
|
|
7
|
+
@apply mb-6;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fragment-page-header__row {
|
|
11
|
+
@apply flex gap-4 justify-between flex-col sm:flex-row sm:items-end;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fragment-page-header__heading {
|
|
15
|
+
@apply min-w-0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.fragment-page-header__eyebrow {
|
|
19
|
+
@apply mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted;
|
|
4
20
|
}
|
|
5
21
|
|
|
6
22
|
.fragment-page-header__description {
|
|
7
|
-
@apply mt-
|
|
23
|
+
@apply mt-1 max-w-2xl text-sm text-muted;
|
|
8
24
|
}
|
|
9
25
|
|
|
10
26
|
.fragment-page-header__actions {
|
|
11
|
-
@apply flex gap-
|
|
27
|
+
@apply flex flex-wrap gap-2 items-center shrink-0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fragment-page-header__footer {
|
|
31
|
+
@apply min-w-0;
|
|
12
32
|
}
|
|
13
33
|
}
|