@aleph-alpha/ui-library 5.3.0 → 5.3.1
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/system/components/UiTooltip/UiTooltip.vue.d.ts +1 -0
- package/dist/system/components/UiTooltip/types.d.ts +8 -0
- package/dist/system/components/core/tooltip/TooltipContent.vue.d.ts +2 -0
- package/dist/system/lib.js +3148 -3137
- package/dist/system/patterns/UiFloatActions/UiFloatActions.vue.d.ts +3 -1
- package/docs/public-docs/quick-start.md +43 -0
- package/package.json +1 -1
- package/src/components/UiAccordion/UiAccordion.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +2 -2
- package/src/components/UiAutocomplete/UiAutocomplete.vue +3 -3
- package/src/components/UiBadge/UiBadge.stories.ts +9 -9
- package/src/components/UiDropdownMenu/UiDropdownMenu.stories.ts +4 -4
- package/src/components/UiField/UiField.stories.ts +6 -6
- package/src/components/UiInput/UiInput.vue +1 -1
- package/src/components/UiKbd/UiKbd.stories.ts +3 -3
- package/src/components/UiKbd/UiKbd.vue +1 -1
- package/src/components/UiNavigationMenu/UiNavigationMenu.stories.ts +28 -28
- package/src/components/UiPopover/UiPopover.stories.ts +20 -20
- package/src/components/UiRadioGroup/UiRadioGroup.stories.ts +24 -24
- package/src/components/UiResizable/UiResizable.stories.ts +14 -14
- package/src/components/UiSelect/UiSelect.stories.ts +1 -1
- package/src/components/UiSheet/UiSheet.stories.ts +14 -14
- package/src/components/UiSlider/UiSlider.stories.ts +8 -8
- package/src/components/UiSpinner/UiSpinner.stories.ts +8 -8
- package/src/components/UiSwitch/UiSwitch.stories.ts +4 -4
- package/src/components/UiTabs/UiTabs.stories.ts +46 -46
- package/src/components/UiToggleGroup/UiToggleGroup.stories.ts +14 -14
- package/src/components/UiTooltip/UiTooltip.vue +2 -0
- package/src/components/UiTooltip/types.ts +9 -0
- package/src/components/core/accordion/AccordionContent.vue +1 -1
- package/src/components/core/accordion/AccordionTrigger.vue +1 -1
- package/src/components/core/alert/AlertDescription.vue +1 -1
- package/src/components/core/alert/index.ts +1 -1
- package/src/components/core/calendar/Calendar.vue +4 -4
- package/src/components/core/calendar/CalendarCell.vue +1 -1
- package/src/components/core/drawer/DrawerDescription.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuLabel.vue +1 -3
- package/src/components/core/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/src/components/core/dropdown-menu/DropdownMenuShortcut.vue +4 -1
- package/src/components/core/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/src/components/core/field/FieldDescription.vue +1 -1
- package/src/components/core/field/FieldLegend.vue +2 -2
- package/src/components/core/field/FieldSeparator.vue +1 -1
- package/src/components/core/input/Input.vue +1 -1
- package/src/components/core/item/index.ts +1 -1
- package/src/components/core/label/Label.vue +1 -1
- package/src/components/core/listbox/ListboxFilter.vue +1 -1
- package/src/components/core/listbox/ListboxGroupLabel.vue +1 -1
- package/src/components/core/listbox/ListboxItem.vue +1 -1
- package/src/components/core/native-select/NativeSelect.vue +1 -1
- package/src/components/core/navigation-menu/NavigationMenuLink.vue +1 -1
- package/src/components/core/navigation-menu/index.ts +1 -1
- package/src/components/core/range-calendar/RangeCalendarCell.vue +1 -1
- package/src/components/core/select/SelectItem.vue +1 -1
- package/src/components/core/select/SelectLabel.vue +3 -1
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupContent.vue +1 -1
- package/src/components/core/sidebar/SidebarGroupLabel.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuBadge.vue +1 -1
- package/src/components/core/sidebar/SidebarMenuSubButton.vue +2 -2
- package/src/components/core/sidebar/index.ts +4 -4
- package/src/components/core/slider/Slider.vue +3 -3
- package/src/components/core/stepper/StepperDescription.vue +1 -1
- package/src/components/core/table/Table.vue +1 -1
- package/src/components/core/table/TableEmpty.vue +1 -1
- package/src/components/core/tabs/TabsTrigger.vue +1 -1
- package/src/components/core/tags-input/TagsInput.vue +1 -1
- package/src/components/core/tags-input/TagsInputItem.vue +1 -1
- package/src/components/core/textarea/Textarea.vue +1 -1
- package/src/components/core/toggle/index.ts +1 -1
- package/src/components/core/toggle-group/index.ts +1 -1
- package/src/components/core/tooltip/TooltipContent.vue +10 -4
- package/src/lib/useDrag.stories.ts +12 -12
- package/src/patterns/UiDatePicker/UiDatePicker.stories.ts +8 -8
- package/src/patterns/UiFloatActions/UiFloatActionItems.vue +9 -3
- package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +159 -26
- package/src/patterns/UiFloatActions/UiFloatActions.vue +5 -1
- package/src/patterns/UiSidebar/UiSidebarGroupLabel.stories.ts +2 -2
- package/src/patterns/UiSidebar/UiSidebarMenuButton.stories.ts +3 -3
|
@@ -42,7 +42,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
42
42
|
<UiPopoverContent>
|
|
43
43
|
<div class="gap-y-2">
|
|
44
44
|
<h4 class="font-medium leading-none">Dimensions</h4>
|
|
45
|
-
<p class="
|
|
45
|
+
<p class="body-14-regular text-muted-foreground">
|
|
46
46
|
Set the dimensions for the layer.
|
|
47
47
|
</p>
|
|
48
48
|
</div>
|
|
@@ -82,7 +82,7 @@ export const Default: Story = {
|
|
|
82
82
|
<UiPopoverContent>
|
|
83
83
|
<div class="gap-y-2">
|
|
84
84
|
<h4 class="font-medium leading-none">Dimensions</h4>
|
|
85
|
-
<p class="
|
|
85
|
+
<p class="body-14-regular text-muted-foreground">
|
|
86
86
|
Set the dimensions for the layer.
|
|
87
87
|
</p>
|
|
88
88
|
</div>
|
|
@@ -116,7 +116,7 @@ const open = ref(false)
|
|
|
116
116
|
<UiPopoverContent>
|
|
117
117
|
<div class="gap-y-2">
|
|
118
118
|
<h4 class="font-medium leading-none">Controlled Popover</h4>
|
|
119
|
-
<p class="
|
|
119
|
+
<p class="body-14-regular text-muted-foreground">
|
|
120
120
|
This popover is controlled via v-model:open.
|
|
121
121
|
</p>
|
|
122
122
|
<UiButton size="sm" @click="open = false">Close</UiButton>
|
|
@@ -146,7 +146,7 @@ export const Controlled: Story = {
|
|
|
146
146
|
<UiPopoverContent>
|
|
147
147
|
<div class="gap-y-2">
|
|
148
148
|
<h4 class="font-medium leading-none">Controlled Popover</h4>
|
|
149
|
-
<p class="
|
|
149
|
+
<p class="body-14-regular text-muted-foreground">
|
|
150
150
|
This popover is controlled via v-model:open.
|
|
151
151
|
</p>
|
|
152
152
|
<UiButton size="sm" @click="open = false">Close</UiButton>
|
|
@@ -176,7 +176,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
176
176
|
<UiButton variant="outline">Top</UiButton>
|
|
177
177
|
</UiPopoverTrigger>
|
|
178
178
|
<UiPopoverContent side="top">
|
|
179
|
-
<p class="
|
|
179
|
+
<p class="body-14-regular">Popover on top</p>
|
|
180
180
|
</UiPopoverContent>
|
|
181
181
|
</UiPopover>
|
|
182
182
|
|
|
@@ -185,7 +185,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
185
185
|
<UiButton variant="outline">Right</UiButton>
|
|
186
186
|
</UiPopoverTrigger>
|
|
187
187
|
<UiPopoverContent side="right">
|
|
188
|
-
<p class="
|
|
188
|
+
<p class="body-14-regular">Popover on right</p>
|
|
189
189
|
</UiPopoverContent>
|
|
190
190
|
</UiPopover>
|
|
191
191
|
|
|
@@ -194,7 +194,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
194
194
|
<UiButton variant="outline">Bottom</UiButton>
|
|
195
195
|
</UiPopoverTrigger>
|
|
196
196
|
<UiPopoverContent side="bottom">
|
|
197
|
-
<p class="
|
|
197
|
+
<p class="body-14-regular">Popover on bottom</p>
|
|
198
198
|
</UiPopoverContent>
|
|
199
199
|
</UiPopover>
|
|
200
200
|
|
|
@@ -203,7 +203,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
203
203
|
<UiButton variant="outline">Left</UiButton>
|
|
204
204
|
</UiPopoverTrigger>
|
|
205
205
|
<UiPopoverContent side="left">
|
|
206
|
-
<p class="
|
|
206
|
+
<p class="body-14-regular">Popover on left</p>
|
|
207
207
|
</UiPopoverContent>
|
|
208
208
|
</UiPopover>
|
|
209
209
|
</div>
|
|
@@ -223,7 +223,7 @@ export const Positions: Story = {
|
|
|
223
223
|
<UiButton variant="outline">Top</UiButton>
|
|
224
224
|
</UiPopoverTrigger>
|
|
225
225
|
<UiPopoverContent side="top">
|
|
226
|
-
<p class="
|
|
226
|
+
<p class="body-14-regular">Popover on top</p>
|
|
227
227
|
</UiPopoverContent>
|
|
228
228
|
</UiPopover>
|
|
229
229
|
|
|
@@ -232,7 +232,7 @@ export const Positions: Story = {
|
|
|
232
232
|
<UiButton variant="outline">Right</UiButton>
|
|
233
233
|
</UiPopoverTrigger>
|
|
234
234
|
<UiPopoverContent side="right">
|
|
235
|
-
<p class="
|
|
235
|
+
<p class="body-14-regular">Popover on right</p>
|
|
236
236
|
</UiPopoverContent>
|
|
237
237
|
</UiPopover>
|
|
238
238
|
|
|
@@ -241,7 +241,7 @@ export const Positions: Story = {
|
|
|
241
241
|
<UiButton variant="outline">Bottom</UiButton>
|
|
242
242
|
</UiPopoverTrigger>
|
|
243
243
|
<UiPopoverContent side="bottom">
|
|
244
|
-
<p class="
|
|
244
|
+
<p class="body-14-regular">Popover on bottom</p>
|
|
245
245
|
</UiPopoverContent>
|
|
246
246
|
</UiPopover>
|
|
247
247
|
|
|
@@ -250,7 +250,7 @@ export const Positions: Story = {
|
|
|
250
250
|
<UiButton variant="outline">Left</UiButton>
|
|
251
251
|
</UiPopoverTrigger>
|
|
252
252
|
<UiPopoverContent side="left">
|
|
253
|
-
<p class="
|
|
253
|
+
<p class="body-14-regular">Popover on left</p>
|
|
254
254
|
</UiPopoverContent>
|
|
255
255
|
</UiPopover>
|
|
256
256
|
</div>
|
|
@@ -277,7 +277,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
277
277
|
<UiButton variant="outline">Align Start</UiButton>
|
|
278
278
|
</UiPopoverTrigger>
|
|
279
279
|
<UiPopoverContent align="start">
|
|
280
|
-
<p class="
|
|
280
|
+
<p class="body-14-regular">Aligned to start</p>
|
|
281
281
|
</UiPopoverContent>
|
|
282
282
|
</UiPopover>
|
|
283
283
|
|
|
@@ -286,7 +286,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
286
286
|
<UiButton variant="outline">Align Center</UiButton>
|
|
287
287
|
</UiPopoverTrigger>
|
|
288
288
|
<UiPopoverContent align="center">
|
|
289
|
-
<p class="
|
|
289
|
+
<p class="body-14-regular">Aligned to center</p>
|
|
290
290
|
</UiPopoverContent>
|
|
291
291
|
</UiPopover>
|
|
292
292
|
|
|
@@ -295,7 +295,7 @@ import { UiPopover, UiPopoverTrigger, UiPopoverContent, UiButton } from '@aleph-
|
|
|
295
295
|
<UiButton variant="outline">Align End</UiButton>
|
|
296
296
|
</UiPopoverTrigger>
|
|
297
297
|
<UiPopoverContent align="end">
|
|
298
|
-
<p class="
|
|
298
|
+
<p class="body-14-regular">Aligned to end</p>
|
|
299
299
|
</UiPopoverContent>
|
|
300
300
|
</UiPopover>
|
|
301
301
|
</div>
|
|
@@ -315,7 +315,7 @@ export const Alignments: Story = {
|
|
|
315
315
|
<UiButton variant="outline">Align Start</UiButton>
|
|
316
316
|
</UiPopoverTrigger>
|
|
317
317
|
<UiPopoverContent align="start">
|
|
318
|
-
<p class="
|
|
318
|
+
<p class="body-14-regular">Aligned to start</p>
|
|
319
319
|
</UiPopoverContent>
|
|
320
320
|
</UiPopover>
|
|
321
321
|
|
|
@@ -324,7 +324,7 @@ export const Alignments: Story = {
|
|
|
324
324
|
<UiButton variant="outline">Align Center</UiButton>
|
|
325
325
|
</UiPopoverTrigger>
|
|
326
326
|
<UiPopoverContent align="center">
|
|
327
|
-
<p class="
|
|
327
|
+
<p class="body-14-regular">Aligned to center</p>
|
|
328
328
|
</UiPopoverContent>
|
|
329
329
|
</UiPopover>
|
|
330
330
|
|
|
@@ -333,7 +333,7 @@ export const Alignments: Story = {
|
|
|
333
333
|
<UiButton variant="outline">Align End</UiButton>
|
|
334
334
|
</UiPopoverTrigger>
|
|
335
335
|
<UiPopoverContent align="end">
|
|
336
|
-
<p class="
|
|
336
|
+
<p class="body-14-regular">Aligned to end</p>
|
|
337
337
|
</UiPopoverContent>
|
|
338
338
|
</UiPopover>
|
|
339
339
|
</div>
|
|
@@ -365,7 +365,7 @@ const open = ref(true)
|
|
|
365
365
|
<UiPopoverContent>
|
|
366
366
|
<div class="gap-y-2">
|
|
367
367
|
<h4 class="font-medium leading-none">Popover Content</h4>
|
|
368
|
-
<p class="
|
|
368
|
+
<p class="body-14-regular text-muted-foreground">
|
|
369
369
|
This popover is open by default for visual testing.
|
|
370
370
|
</p>
|
|
371
371
|
</div>
|
|
@@ -394,7 +394,7 @@ export const OpenByDefault: Story = {
|
|
|
394
394
|
<UiPopoverContent>
|
|
395
395
|
<div class="gap-y-2">
|
|
396
396
|
<h4 class="font-medium leading-none">Popover Content</h4>
|
|
397
|
-
<p class="
|
|
397
|
+
<p class="body-14-regular text-muted-foreground">
|
|
398
398
|
This popover is open by default for visual testing.
|
|
399
399
|
</p>
|
|
400
400
|
</div>
|
|
@@ -49,15 +49,15 @@ const selected = ref('comfortable')
|
|
|
49
49
|
<UiRadioGroup v-model="selected" name="spacing">
|
|
50
50
|
<div class="flex items-center gap-x-2">
|
|
51
51
|
<UiRadioGroupItem id="r1" value="default" />
|
|
52
|
-
<label for="r1" class="
|
|
52
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="flex items-center gap-x-2">
|
|
55
55
|
<UiRadioGroupItem id="r2" value="comfortable" />
|
|
56
|
-
<label for="r2" class="
|
|
56
|
+
<label for="r2" class="label-14-medium">Comfortable</label>
|
|
57
57
|
</div>
|
|
58
58
|
<div class="flex items-center gap-x-2">
|
|
59
59
|
<UiRadioGroupItem id="r3" value="compact" />
|
|
60
|
-
<label for="r3" class="
|
|
60
|
+
<label for="r3" class="label-14-medium">Compact</label>
|
|
61
61
|
</div>
|
|
62
62
|
</UiRadioGroup>
|
|
63
63
|
</template>`;
|
|
@@ -82,15 +82,15 @@ export const Default: Story = {
|
|
|
82
82
|
<UiRadioGroup v-model="selected" name="spacing" :disabled="args.disabled" :orientation="args.orientation">
|
|
83
83
|
<div class="flex items-center gap-x-2">
|
|
84
84
|
<UiRadioGroupItem id="r1" value="default" />
|
|
85
|
-
<label for="r1" class="
|
|
85
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
86
86
|
</div>
|
|
87
87
|
<div class="flex items-center gap-x-2">
|
|
88
88
|
<UiRadioGroupItem id="r2" value="comfortable" />
|
|
89
|
-
<label for="r2" class="
|
|
89
|
+
<label for="r2" class="label-14-medium">Comfortable</label>
|
|
90
90
|
</div>
|
|
91
91
|
<div class="flex items-center gap-x-2">
|
|
92
92
|
<UiRadioGroupItem id="r3" value="compact" />
|
|
93
|
-
<label for="r3" class="
|
|
93
|
+
<label for="r3" class="label-14-medium">Compact</label>
|
|
94
94
|
</div>
|
|
95
95
|
</UiRadioGroup>
|
|
96
96
|
`,
|
|
@@ -115,15 +115,15 @@ const selected = ref('default')
|
|
|
115
115
|
<UiRadioGroup v-model="selected" name="spacing">
|
|
116
116
|
<div class="flex items-center gap-x-2">
|
|
117
117
|
<UiRadioGroupItem id="r1" value="default" />
|
|
118
|
-
<label for="r1" class="
|
|
118
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
119
119
|
</div>
|
|
120
120
|
<div class="flex items-center gap-x-2">
|
|
121
121
|
<UiRadioGroupItem id="r2" value="comfortable" disabled />
|
|
122
|
-
<label for="r2" class="
|
|
122
|
+
<label for="r2" class="label-14-medium text-muted-foreground">Comfortable</label>
|
|
123
123
|
</div>
|
|
124
124
|
<div class="flex items-center gap-x-2">
|
|
125
125
|
<UiRadioGroupItem id="r3" value="compact" />
|
|
126
|
-
<label for="r3" class="
|
|
126
|
+
<label for="r3" class="label-14-medium">Compact</label>
|
|
127
127
|
</div>
|
|
128
128
|
</UiRadioGroup>
|
|
129
129
|
</template>`;
|
|
@@ -142,15 +142,15 @@ export const Disabled: Story = {
|
|
|
142
142
|
<UiRadioGroup v-model="selected" name="spacing" :orientation="args.orientation">
|
|
143
143
|
<div class="flex items-center gap-x-2">
|
|
144
144
|
<UiRadioGroupItem id="r1" value="default" />
|
|
145
|
-
<label for="r1" class="
|
|
145
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
146
146
|
</div>
|
|
147
147
|
<div class="flex items-center gap-x-2">
|
|
148
148
|
<UiRadioGroupItem id="r2" value="comfortable" disabled />
|
|
149
|
-
<label for="r2" class="
|
|
149
|
+
<label for="r2" class="label-14-medium text-muted-foreground">Comfortable</label>
|
|
150
150
|
</div>
|
|
151
151
|
<div class="flex items-center gap-x-2">
|
|
152
152
|
<UiRadioGroupItem id="r3" value="compact" />
|
|
153
|
-
<label for="r3" class="
|
|
153
|
+
<label for="r3" class="label-14-medium">Compact</label>
|
|
154
154
|
</div>
|
|
155
155
|
</UiRadioGroup>
|
|
156
156
|
`,
|
|
@@ -175,15 +175,15 @@ const selected = ref('small')
|
|
|
175
175
|
<UiRadioGroup v-model="selected" name="size" orientation="horizontal">
|
|
176
176
|
<div class="flex items-center gap-x-2">
|
|
177
177
|
<UiRadioGroupItem id="r1" value="small" />
|
|
178
|
-
<label for="r1" class="
|
|
178
|
+
<label for="r1" class="label-14-medium">Small</label>
|
|
179
179
|
</div>
|
|
180
180
|
<div class="flex items-center gap-x-2">
|
|
181
181
|
<UiRadioGroupItem id="r2" value="medium" />
|
|
182
|
-
<label for="r2" class="
|
|
182
|
+
<label for="r2" class="label-14-medium">Medium</label>
|
|
183
183
|
</div>
|
|
184
184
|
<div class="flex items-center gap-x-2">
|
|
185
185
|
<UiRadioGroupItem id="r3" value="large" />
|
|
186
|
-
<label for="r3" class="
|
|
186
|
+
<label for="r3" class="label-14-medium">Large</label>
|
|
187
187
|
</div>
|
|
188
188
|
</UiRadioGroup>
|
|
189
189
|
</template>`;
|
|
@@ -213,15 +213,15 @@ export const HorizontalOrientation: Story = {
|
|
|
213
213
|
<UiRadioGroup v-model="selected" name="size" :orientation="args.orientation">
|
|
214
214
|
<div class="flex items-center gap-x-2">
|
|
215
215
|
<UiRadioGroupItem id="r1" value="small" />
|
|
216
|
-
<label for="r1" class="
|
|
216
|
+
<label for="r1" class="label-14-medium">Small</label>
|
|
217
217
|
</div>
|
|
218
218
|
<div class="flex items-center gap-x-2">
|
|
219
219
|
<UiRadioGroupItem id="r2" value="medium" />
|
|
220
|
-
<label for="r2" class="
|
|
220
|
+
<label for="r2" class="label-14-medium">Medium</label>
|
|
221
221
|
</div>
|
|
222
222
|
<div class="flex items-center gap-x-2">
|
|
223
223
|
<UiRadioGroupItem id="r3" value="large" />
|
|
224
|
-
<label for="r3" class="
|
|
224
|
+
<label for="r3" class="label-14-medium">Large</label>
|
|
225
225
|
</div>
|
|
226
226
|
</UiRadioGroup>
|
|
227
227
|
`,
|
|
@@ -245,14 +245,14 @@ const selected = ref('default')
|
|
|
245
245
|
<template>
|
|
246
246
|
<UiRadioGroup v-model="selected" name="options" as-child>
|
|
247
247
|
<fieldset class="rounded-lg border p-4">
|
|
248
|
-
<legend class="px-2
|
|
248
|
+
<legend class="px-2 label-14-medium">Select an option</legend>
|
|
249
249
|
<div class="flex items-center gap-x-2">
|
|
250
250
|
<UiRadioGroupItem id="r1" value="default" />
|
|
251
|
-
<label for="r1" class="
|
|
251
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
252
252
|
</div>
|
|
253
253
|
<div class="flex items-center gap-x-2">
|
|
254
254
|
<UiRadioGroupItem id="r2" value="second" />
|
|
255
|
-
<label for="r2" class="
|
|
255
|
+
<label for="r2" class="label-14-medium">Second</label>
|
|
256
256
|
</div>
|
|
257
257
|
</fieldset>
|
|
258
258
|
</UiRadioGroup>
|
|
@@ -272,14 +272,14 @@ export const AsChild: Story = {
|
|
|
272
272
|
template: `
|
|
273
273
|
<UiRadioGroup v-model="selected" name="options" as-child>
|
|
274
274
|
<fieldset class="rounded-lg border p-4">
|
|
275
|
-
<legend class="px-2
|
|
275
|
+
<legend class="px-2 label-14-medium">Select an option</legend>
|
|
276
276
|
<div class="flex items-center gap-x-2">
|
|
277
277
|
<UiRadioGroupItem id="r1" value="default" />
|
|
278
|
-
<label for="r1" class="
|
|
278
|
+
<label for="r1" class="label-14-medium">Default</label>
|
|
279
279
|
</div>
|
|
280
280
|
<div class="flex items-center gap-x-2">
|
|
281
281
|
<UiRadioGroupItem id="r2" value="second" />
|
|
282
|
-
<label for="r2" class="
|
|
282
|
+
<label for="r2" class="label-14-medium">Second</label>
|
|
283
283
|
</div>
|
|
284
284
|
</fieldset>
|
|
285
285
|
</UiRadioGroup>
|
|
@@ -41,8 +41,8 @@ export default meta;
|
|
|
41
41
|
type Story = StoryObj<typeof UiResizablePanelGroup>;
|
|
42
42
|
|
|
43
43
|
const panelClasses =
|
|
44
|
-
'flex items-center justify-center rounded-md bg-background-surface-muted p-6
|
|
45
|
-
const sizeValueClasses = 'font-mono
|
|
44
|
+
'flex items-center justify-center rounded-md bg-background-surface-muted p-6 body-14-regular';
|
|
45
|
+
const sizeValueClasses = 'font-mono label-12-regular text-muted-foreground';
|
|
46
46
|
|
|
47
47
|
const defaultTemplateSource = `<script setup lang="ts">
|
|
48
48
|
import { ref } from 'vue'
|
|
@@ -72,10 +72,10 @@ function updateContentWidth(size: number) {
|
|
|
72
72
|
@resize="updateSidebarWidth"
|
|
73
73
|
>
|
|
74
74
|
<div
|
|
75
|
-
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6
|
|
75
|
+
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6 body-14-regular"
|
|
76
76
|
>
|
|
77
77
|
<span>Sidebar</span>
|
|
78
|
-
<span class="font-mono
|
|
78
|
+
<span class="font-mono label-12-regular text-muted-foreground">{{ sidebarWidth }}% wide</span>
|
|
79
79
|
</div>
|
|
80
80
|
</UiResizablePanel>
|
|
81
81
|
<UiResizableHandle with-handle />
|
|
@@ -85,10 +85,10 @@ function updateContentWidth(size: number) {
|
|
|
85
85
|
@resize="updateContentWidth"
|
|
86
86
|
>
|
|
87
87
|
<div
|
|
88
|
-
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6
|
|
88
|
+
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6 body-14-regular"
|
|
89
89
|
>
|
|
90
90
|
<span>Content</span>
|
|
91
|
-
<span class="font-mono
|
|
91
|
+
<span class="font-mono label-12-regular text-muted-foreground">{{ contentWidth }}% wide</span>
|
|
92
92
|
</div>
|
|
93
93
|
</UiResizablePanel>
|
|
94
94
|
</UiResizablePanelGroup>
|
|
@@ -196,10 +196,10 @@ function updateConsoleHeight(size: number) {
|
|
|
196
196
|
@resize="updatePreviewHeight"
|
|
197
197
|
>
|
|
198
198
|
<div
|
|
199
|
-
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6
|
|
199
|
+
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6 body-14-regular"
|
|
200
200
|
>
|
|
201
201
|
<span>Preview</span>
|
|
202
|
-
<span class="font-mono
|
|
202
|
+
<span class="font-mono label-12-regular text-muted-foreground">{{ previewHeight }}% tall</span>
|
|
203
203
|
</div>
|
|
204
204
|
</UiResizablePanel>
|
|
205
205
|
<UiResizableHandle with-handle />
|
|
@@ -209,10 +209,10 @@ function updateConsoleHeight(size: number) {
|
|
|
209
209
|
@resize="updateConsoleHeight"
|
|
210
210
|
>
|
|
211
211
|
<div
|
|
212
|
-
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6
|
|
212
|
+
class="flex h-full flex-col items-center justify-center gap-1 rounded-md bg-background-surface-muted p-6 body-14-regular"
|
|
213
213
|
>
|
|
214
214
|
<span>Console</span>
|
|
215
|
-
<span class="font-mono
|
|
215
|
+
<span class="font-mono label-12-regular text-muted-foreground">{{ consoleHeight }}% tall</span>
|
|
216
216
|
</div>
|
|
217
217
|
</UiResizablePanel>
|
|
218
218
|
</UiResizablePanelGroup>
|
|
@@ -302,13 +302,13 @@ import {
|
|
|
302
302
|
<template>
|
|
303
303
|
<UiResizablePanelGroup direction="horizontal" class="min-h-64 rounded-lg bg-background-surface-secondary p-2 shadow-lg">
|
|
304
304
|
<UiResizablePanel collapsible :collapsed-size="8" :default-size="25" :min-size="20">
|
|
305
|
-
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6
|
|
305
|
+
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6 body-14-regular">
|
|
306
306
|
Collapsible
|
|
307
307
|
</div>
|
|
308
308
|
</UiResizablePanel>
|
|
309
309
|
<UiResizableHandle with-handle />
|
|
310
310
|
<UiResizablePanel :default-size="75" :min-size="30">
|
|
311
|
-
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6
|
|
311
|
+
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6 body-14-regular">
|
|
312
312
|
Main panel
|
|
313
313
|
</div>
|
|
314
314
|
</UiResizablePanel>
|
|
@@ -368,13 +368,13 @@ import {
|
|
|
368
368
|
<template>
|
|
369
369
|
<UiResizablePanelGroup direction="horizontal" class="min-h-64 rounded-lg bg-background-surface-secondary p-2 shadow-lg">
|
|
370
370
|
<UiResizablePanel size-unit="px" :default-size="240" :min-size="160" :max-size="320">
|
|
371
|
-
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6
|
|
371
|
+
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6 body-14-regular">
|
|
372
372
|
Fixed sidebar
|
|
373
373
|
</div>
|
|
374
374
|
</UiResizablePanel>
|
|
375
375
|
<UiResizableHandle with-handle />
|
|
376
376
|
<UiResizablePanel>
|
|
377
|
-
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6
|
|
377
|
+
<div class="flex h-full items-center justify-center rounded-md bg-background-surface-muted p-6 body-14-regular">
|
|
378
378
|
Flexible content
|
|
379
379
|
</div>
|
|
380
380
|
</UiResizablePanel>
|
|
@@ -518,7 +518,7 @@ export const Multiple: Story = {
|
|
|
518
518
|
<UiSelectItem value="mango">Mango</UiSelectItem>
|
|
519
519
|
</UiSelectContent>
|
|
520
520
|
</UiSelect>
|
|
521
|
-
<div class="
|
|
521
|
+
<div class="label-12-regular text-content-on-surface-secondary">Selected: {{ value.join(', ') || '—' }}</div>
|
|
522
522
|
</div>
|
|
523
523
|
`,
|
|
524
524
|
}),
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
A slide-out panel for supplementary content.
|
|
71
71
|
</UiSheetDescription>
|
|
72
72
|
</UiSheetHeader>
|
|
73
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
73
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
74
74
|
Put any content here.
|
|
75
75
|
</div>
|
|
76
76
|
<UiSheetFooter>
|
|
@@ -130,7 +130,7 @@ export const Default: Story = {
|
|
|
130
130
|
A slide-out panel for supplementary content.
|
|
131
131
|
</UiSheetDescription>
|
|
132
132
|
</UiSheetHeader>
|
|
133
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
133
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
134
134
|
Put any content here.
|
|
135
135
|
</div>
|
|
136
136
|
<UiSheetFooter>
|
|
@@ -178,7 +178,7 @@ const open = ref(false)
|
|
|
178
178
|
This sheet is controlled via v-model:open.
|
|
179
179
|
</UiSheetDescription>
|
|
180
180
|
</UiSheetHeader>
|
|
181
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
181
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular gap-y-3">
|
|
182
182
|
<p>Click the buttons below to close programmatically.</p>
|
|
183
183
|
<div class="flex gap-2 flex-wrap">
|
|
184
184
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -226,7 +226,7 @@ export const Controlled: Story = {
|
|
|
226
226
|
This sheet is controlled via v-model:open.
|
|
227
227
|
</UiSheetDescription>
|
|
228
228
|
</UiSheetHeader>
|
|
229
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
229
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular gap-y-3">
|
|
230
230
|
<p>Click the buttons below to close programmatically.</p>
|
|
231
231
|
<div class="flex gap-2 flex-wrap">
|
|
232
232
|
<UiButton size="sm" @click="open = false">Close via model</UiButton>
|
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
This sheet slides in from the {{ side }}.
|
|
272
272
|
</UiSheetDescription>
|
|
273
273
|
</UiSheetHeader>
|
|
274
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
274
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
275
275
|
Content for the {{ side }} sheet.
|
|
276
276
|
</div>
|
|
277
277
|
<UiSheetClose as-child>
|
|
@@ -311,7 +311,7 @@ export const SideVariants: Story = {
|
|
|
311
311
|
This sheet slides in from the {{ side }}.
|
|
312
312
|
</UiSheetDescription>
|
|
313
313
|
</UiSheetHeader>
|
|
314
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
314
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
315
315
|
Content for the {{ side }} sheet.
|
|
316
316
|
</div>
|
|
317
317
|
<UiSheetClose as-child>
|
|
@@ -344,7 +344,7 @@ import {
|
|
|
344
344
|
|
|
345
345
|
<template>
|
|
346
346
|
<div class="gap-y-4">
|
|
347
|
-
<p class="
|
|
347
|
+
<p class="body-14-regular text-muted-foreground">
|
|
348
348
|
Non-modal sheet: you can still interact with the page while it is open.
|
|
349
349
|
</p>
|
|
350
350
|
<UiSheet :modal="false">
|
|
@@ -358,7 +358,7 @@ import {
|
|
|
358
358
|
Outside interaction is allowed.
|
|
359
359
|
</UiSheetDescription>
|
|
360
360
|
</UiSheetHeader>
|
|
361
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
361
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
362
362
|
Try selecting text outside the sheet.
|
|
363
363
|
</div>
|
|
364
364
|
<UiSheetFooter>
|
|
@@ -390,7 +390,7 @@ export const NonModal: Story = {
|
|
|
390
390
|
},
|
|
391
391
|
template: `
|
|
392
392
|
<div class="gap-y-4">
|
|
393
|
-
<p class="
|
|
393
|
+
<p class="body-14-regular text-muted-foreground">
|
|
394
394
|
Non-modal sheet: you can still interact with the page while it is open.
|
|
395
395
|
</p>
|
|
396
396
|
<UiSheet :modal="false">
|
|
@@ -404,7 +404,7 @@ export const NonModal: Story = {
|
|
|
404
404
|
Outside interaction is allowed.
|
|
405
405
|
</UiSheetDescription>
|
|
406
406
|
</UiSheetHeader>
|
|
407
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
407
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
408
408
|
Try selecting text outside the sheet.
|
|
409
409
|
</div>
|
|
410
410
|
<UiSheetFooter>
|
|
@@ -562,7 +562,7 @@ import {
|
|
|
562
562
|
</UiSheetDescription>
|
|
563
563
|
</UiSheetHeader>
|
|
564
564
|
<div class="flex-1 overflow-auto px-4 py-4">
|
|
565
|
-
<div class="gap-y-2
|
|
565
|
+
<div class="gap-y-2 body-14-regular">
|
|
566
566
|
<p v-for="i in 30" :key="i">Item {{ i }} — Lorem ipsum dolor sit amet.</p>
|
|
567
567
|
</div>
|
|
568
568
|
</div>
|
|
@@ -605,7 +605,7 @@ export const LongContent: Story = {
|
|
|
605
605
|
</UiSheetDescription>
|
|
606
606
|
</UiSheetHeader>
|
|
607
607
|
<div class="flex-1 overflow-auto px-4 py-4">
|
|
608
|
-
<div class="gap-y-2
|
|
608
|
+
<div class="gap-y-2 body-14-regular">
|
|
609
609
|
<p v-for="i in 30" :key="i">Item {{ i }} — Lorem ipsum dolor sit amet.</p>
|
|
610
610
|
</div>
|
|
611
611
|
</div>
|
|
@@ -653,7 +653,7 @@ const open = ref(true)
|
|
|
653
653
|
Useful for visual regression testing.
|
|
654
654
|
</UiSheetDescription>
|
|
655
655
|
</UiSheetHeader>
|
|
656
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
656
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
657
657
|
This sheet starts open.
|
|
658
658
|
</div>
|
|
659
659
|
<UiSheetFooter>
|
|
@@ -698,7 +698,7 @@ export const OpenByDefault: Story = {
|
|
|
698
698
|
Useful for visual regression testing.
|
|
699
699
|
</UiSheetDescription>
|
|
700
700
|
</UiSheetHeader>
|
|
701
|
-
<div class="flex-1 overflow-auto px-4 py-4
|
|
701
|
+
<div class="flex-1 overflow-auto px-4 py-4 body-14-regular">
|
|
702
702
|
This sheet starts open.
|
|
703
703
|
</div>
|
|
704
704
|
<UiSheetFooter>
|
|
@@ -67,7 +67,7 @@ const value = ref([50])
|
|
|
67
67
|
<template>
|
|
68
68
|
<div class="w-72 gap-y-3">
|
|
69
69
|
<UiSlider v-model="value" :min="0" :max="100" :step="1" />
|
|
70
|
-
<div class="
|
|
70
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value[0] }}</div>
|
|
71
71
|
</div>
|
|
72
72
|
</template>`;
|
|
73
73
|
|
|
@@ -101,7 +101,7 @@ export const Default: Story = {
|
|
|
101
101
|
:orientation="args.orientation"
|
|
102
102
|
:inverted="args.inverted"
|
|
103
103
|
/>
|
|
104
|
-
<div class="
|
|
104
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value }}</div>
|
|
105
105
|
</div>
|
|
106
106
|
`,
|
|
107
107
|
}),
|
|
@@ -120,7 +120,7 @@ const range = ref([25, 75])
|
|
|
120
120
|
<template>
|
|
121
121
|
<div class="w-72 gap-y-3">
|
|
122
122
|
<UiSlider v-model="range" :min="0" :max="100" :step="1" :min-steps-between-thumbs="5" />
|
|
123
|
-
<div class="
|
|
123
|
+
<div class="body-14-regular text-muted-foreground">Range: {{ range[0] }} – {{ range[1] }}</div>
|
|
124
124
|
</div>
|
|
125
125
|
</template>`;
|
|
126
126
|
|
|
@@ -138,7 +138,7 @@ export const Range: Story = {
|
|
|
138
138
|
template: `
|
|
139
139
|
<div class="w-72 gap-y-3">
|
|
140
140
|
<UiSlider v-model="range" :min="0" :max="100" :step="1" :min-steps-between-thumbs="5" />
|
|
141
|
-
<div class="
|
|
141
|
+
<div class="body-14-regular text-muted-foreground">Range: {{ range[0] }} – {{ range[1] }}</div>
|
|
142
142
|
</div>
|
|
143
143
|
`,
|
|
144
144
|
}),
|
|
@@ -160,7 +160,7 @@ const value = ref([50])
|
|
|
160
160
|
<div class="h-44">
|
|
161
161
|
<UiSlider v-model="value" orientation="vertical" />
|
|
162
162
|
</div>
|
|
163
|
-
<div class="
|
|
163
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value[0] }}</div>
|
|
164
164
|
</div>
|
|
165
165
|
</template>`;
|
|
166
166
|
|
|
@@ -180,7 +180,7 @@ export const Vertical: Story = {
|
|
|
180
180
|
<div class="h-44">
|
|
181
181
|
<UiSlider v-model="value" orientation="vertical" />
|
|
182
182
|
</div>
|
|
183
|
-
<div class="
|
|
183
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value[0] }}</div>
|
|
184
184
|
</div>
|
|
185
185
|
`,
|
|
186
186
|
}),
|
|
@@ -200,7 +200,7 @@ const value = ref([50])
|
|
|
200
200
|
<template>
|
|
201
201
|
<div class="w-72 gap-y-3">
|
|
202
202
|
<UiSlider v-model="value" disabled />
|
|
203
|
-
<div class="
|
|
203
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value[0] }}</div>
|
|
204
204
|
</div>
|
|
205
205
|
</template>`;
|
|
206
206
|
|
|
@@ -218,7 +218,7 @@ export const Disabled: Story = {
|
|
|
218
218
|
template: `
|
|
219
219
|
<div class="w-72 gap-y-3">
|
|
220
220
|
<UiSlider v-model="value" disabled />
|
|
221
|
-
<div class="
|
|
221
|
+
<div class="body-14-regular text-muted-foreground">Value: {{ value[0] }}</div>
|
|
222
222
|
</div>
|
|
223
223
|
`,
|
|
224
224
|
}),
|