@xds/vue 1.0.1 → 1.2.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/Banner.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/Breadcrumb.js +4 -0
- package/dist/Breadcrumb.vue.d.ts +6 -0
- package/dist/Breadcrumb.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/Button.vue.d.ts +9 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang.js +18 -5
- package/dist/Checkbox.vue.d.ts +13 -10
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang.js +42 -22
- package/dist/Combobox.js +4 -0
- package/dist/Combobox.vue.d.ts +22 -0
- package/dist/Combobox.vue_vue_type_script_setup_true_lang.js +140 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/Dialog.vue.d.ts +5 -2
- package/dist/Dialog.vue_vue_type_script_setup_true_lang.js +6 -5
- package/dist/IconButton.vue.d.ts +9 -1
- package/dist/IconButton.vue_vue_type_script_setup_true_lang.js +18 -5
- package/dist/Labels.vue.d.ts +17 -0
- package/dist/Labels.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/Labels2.js +4 -0
- package/dist/Link.js +4 -0
- package/dist/Link.vue.d.ts +27 -0
- package/dist/Link.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/Menu.vue.d.ts +4 -1
- package/dist/Menu.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/Pagination.js +4 -0
- package/dist/Pagination.vue.d.ts +9 -0
- package/dist/Pagination.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/Popover.js +4 -0
- package/dist/Popover.vue.d.ts +26 -0
- package/dist/Popover.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang.js +13 -7
- package/dist/SearchField.vue.d.ts +11 -8
- package/dist/SearchField.vue_vue_type_script_setup_true_lang.js +40 -22
- package/dist/SegmentedControl.vue.d.ts +3 -7
- package/dist/SegmentedControl.vue_vue_type_script_setup_true_lang.js +13 -14
- package/dist/Select.vue.d.ts +3 -1
- package/dist/Select.vue_vue_type_script_setup_true_lang.js +47 -18
- package/dist/Slider.vue.d.ts +3 -8
- package/dist/Slider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/Switch.vue.d.ts +13 -10
- package/dist/Switch.vue_vue_type_script_setup_true_lang.js +33 -21
- package/dist/Table.js +4 -0
- package/dist/Table.vue.d.ts +10 -0
- package/dist/Table.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/Tabs.vue.d.ts +3 -5
- package/dist/Tabs.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/TextField.vue.d.ts +11 -8
- package/dist/TextField.vue_vue_type_script_setup_true_lang.js +26 -13
- package/dist/TimePicker.js +4 -0
- package/dist/TimePicker.vue.d.ts +10 -0
- package/dist/TimePicker.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/Toast.vue_vue_type_script_setup_true_lang.js +5 -11
- package/dist/ToastQueue.js +4 -0
- package/dist/ToastQueue.vue.d.ts +9 -0
- package/dist/ToastQueue.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/TooltipOverlay.vue.d.ts +1 -0
- package/dist/TooltipOverlay.vue_vue_type_script_setup_true_lang.js +6 -5
- package/dist/base.d.ts +13 -0
- package/dist/base.js +14 -0
- package/dist/controlled.d.ts +46 -0
- package/dist/controlled.js +64 -2
- package/dist/index.d.ts +14 -3
- package/dist/index.js +11 -1
- package/dist/labels.d.ts +9 -0
- package/dist/labels.js +17 -0
- package/dist/preview.d.ts +20 -3
- package/dist/preview.js +37 -7
- package/dist/trigger.d.ts +7 -0
- package/dist/trigger.js +13 -1
- package/eject/files/Accordion.vue +89 -0
- package/eject/files/AccordionPanel.vue +47 -0
- package/eject/files/Avatar.vue +41 -0
- package/eject/files/AvatarStack.vue +46 -0
- package/eject/files/Badge.vue +29 -0
- package/eject/files/Banner.vue +65 -0
- package/eject/files/Breadcrumb.vue +43 -0
- package/eject/files/Button.vue +93 -0
- package/eject/files/Card.vue +85 -0
- package/eject/files/Checkbox.vue +104 -0
- package/eject/files/Chip.vue +32 -0
- package/eject/files/ChipBar.vue +25 -0
- package/eject/files/Combobox.vue +175 -0
- package/eject/files/CountBadge.vue +45 -0
- package/eject/files/DatePicker.vue +223 -0
- package/eject/files/DateRangePicker.vue +317 -0
- package/eject/files/Dialog.vue +105 -0
- package/eject/files/Divider.vue +15 -0
- package/eject/files/EmptyState.vue +28 -0
- package/eject/files/Icon.vue +34 -0
- package/eject/files/IconButton.vue +71 -0
- package/eject/files/Link.vue +48 -0
- package/eject/files/ListRow.vue +33 -0
- package/eject/files/MediaCard.vue +109 -0
- package/eject/files/Menu.vue +181 -0
- package/eject/files/Pagination.vue +88 -0
- package/eject/files/PlaceRow.vue +54 -0
- package/eject/files/Popover.vue +119 -0
- package/eject/files/ProgressBar.vue +34 -0
- package/eject/files/RadioGroup.vue +126 -0
- package/eject/files/SearchField.vue +129 -0
- package/eject/files/SectionHeader.vue +37 -0
- package/eject/files/SegmentedControl.vue +81 -0
- package/eject/files/Select.vue +269 -0
- package/eject/files/Sidebar.vue +101 -0
- package/eject/files/SidebarRailButton.vue +31 -0
- package/eject/files/Skeleton.vue +27 -0
- package/eject/files/Slider.vue +126 -0
- package/eject/files/Spinner.vue +36 -0
- package/eject/files/Switch.vue +88 -0
- package/eject/files/Table.vue +77 -0
- package/eject/files/Tabs.vue +72 -0
- package/eject/files/Text.vue +22 -0
- package/eject/files/TextField.vue +190 -0
- package/eject/files/Thumbnail.vue +62 -0
- package/eject/files/TimePicker.vue +224 -0
- package/eject/files/Toast.vue +83 -0
- package/eject/files/ToastQueue.vue +54 -0
- package/eject/files/Tooltip.vue +28 -0
- package/eject/files/TooltipOverlay.vue +86 -0
- package/eject/files/accordion.css +89 -0
- package/eject/files/accordion.ts +67 -0
- package/eject/files/avatar-stack.ts +57 -0
- package/eject/files/avatar.ts +42 -0
- package/eject/files/badge.ts +30 -0
- package/eject/files/banner.ts +71 -0
- package/eject/files/base.css +38 -0
- package/eject/files/breadcrumb.css +51 -0
- package/eject/files/breadcrumb.ts +42 -0
- package/eject/files/button.css +241 -0
- package/eject/files/button.ts +106 -0
- package/eject/files/card.ts +58 -0
- package/eject/files/checkbox.ts +52 -0
- package/eject/files/chip-bar.ts +16 -0
- package/eject/files/chip.ts +35 -0
- package/eject/files/combobox.css +269 -0
- package/eject/files/combobox.ts +85 -0
- package/eject/files/count-badge.ts +32 -0
- package/eject/files/date-picker.css +375 -0
- package/eject/files/date-picker.ts +280 -0
- package/eject/files/date-range-picker.ts +338 -0
- package/eject/files/dialog.css +139 -0
- package/eject/files/dialog.ts +15 -0
- package/eject/files/divider.ts +5 -0
- package/eject/files/empty-state.ts +22 -0
- package/eject/files/icon.ts +36 -0
- package/eject/files/link.css +64 -0
- package/eject/files/link.ts +63 -0
- package/eject/files/list-row.ts +66 -0
- package/eject/files/media-card.ts +66 -0
- package/eject/files/menu.css +192 -0
- package/eject/files/menu.ts +84 -0
- package/eject/files/overlay.css +40 -0
- package/eject/files/pagination.css +106 -0
- package/eject/files/pagination.ts +68 -0
- package/eject/files/parts.ts +17 -0
- package/eject/files/popover.css +101 -0
- package/eject/files/popover.ts +37 -0
- package/eject/files/progress-bar.ts +26 -0
- package/eject/files/radio-group.css +184 -0
- package/eject/files/radio-group.ts +30 -0
- package/eject/files/section-header.ts +32 -0
- package/eject/files/segmented-control.ts +33 -0
- package/eject/files/select.css +347 -0
- package/eject/files/select.ts +77 -0
- package/eject/files/sidebar.ts +75 -0
- package/eject/files/skeleton.ts +51 -0
- package/eject/files/slider.css +160 -0
- package/eject/files/slider.ts +80 -0
- package/eject/files/spinner.ts +22 -0
- package/eject/files/switch.ts +45 -0
- package/eject/files/table.css +107 -0
- package/eject/files/table.ts +84 -0
- package/eject/files/tabs.css +120 -0
- package/eject/files/tabs.ts +37 -0
- package/eject/files/text-field.css +225 -0
- package/eject/files/text-field.ts +64 -0
- package/eject/files/text.ts +38 -0
- package/eject/files/thumbnail.ts +51 -0
- package/eject/files/time-picker.ts +113 -0
- package/eject/files/toast-queue.ts +64 -0
- package/eject/files/toast.ts +31 -0
- package/eject/files/tooltip.css +111 -0
- package/eject/files/tooltip.ts +21 -0
- package/eject/manifest.json +1122 -0
- package/package.json +11 -4
- package/styles.css +1135 -167
- package/tailwind.css +1295 -218
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Ejected from `@xds/vue` 1.2.0 by `xds eject`. This copy is the app's own: change it
|
|
3
|
+
* as you need. `xds eject --list` says which ejected files differ from what was copied.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Tooltip: Zag's tooltip machine, rendered into the body only while open or animating out.
|
|
7
|
+
*
|
|
8
|
+
* Parts: `.{{prefix}}-tooltip__positioner` (placed by Zag), `.{{prefix}}-tooltip` (role="tooltip"),
|
|
9
|
+
* `.{{prefix}}-tooltip__shortcut` (a key hint after the label).
|
|
10
|
+
* States: `[data-side]` on the tooltip for the side of the control it is on, and
|
|
11
|
+
* `[data-state="closed"]` while it animates out.
|
|
12
|
+
*/
|
|
13
|
+
@layer components {
|
|
14
|
+
.{{prefix}}-tooltip__positioner {
|
|
15
|
+
z-index: calc(var(--{{prefix}}-layer-overlay) + var(--layer-index, 0));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.{{prefix}}-tooltip {
|
|
19
|
+
/* The widest a tooltip gets; a longer label wraps. */
|
|
20
|
+
max-width: 20rem;
|
|
21
|
+
padding: var(--xds-space-1) var(--xds-space-2);
|
|
22
|
+
border-radius: var(--xds-radius-sm);
|
|
23
|
+
background: var(--xds-color-tooltip-background);
|
|
24
|
+
font-size: var(--xds-typography-footnote-size);
|
|
25
|
+
font-weight: var(--xds-typography-footnote-weight);
|
|
26
|
+
line-height: var(--xds-typography-footnote-line-height);
|
|
27
|
+
color: var(--xds-color-tooltip-text);
|
|
28
|
+
transform-origin: var(--transform-origin);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* It grows in from the control's side. */
|
|
32
|
+
.{{prefix}}-tooltip[data-side="top"] {
|
|
33
|
+
animation: {{prefix}}-tooltip-enter-up var(--xds-motion-duration-fast)
|
|
34
|
+
var(--xds-motion-easing-enter);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.{{prefix}}-tooltip[data-side="bottom"] {
|
|
38
|
+
animation: {{prefix}}-tooltip-enter-down var(--xds-motion-duration-fast)
|
|
39
|
+
var(--xds-motion-easing-enter);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.{{prefix}}-tooltip[data-side="left"] {
|
|
43
|
+
animation: {{prefix}}-tooltip-enter-left var(--xds-motion-duration-fast)
|
|
44
|
+
var(--xds-motion-easing-enter);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.{{prefix}}-tooltip[data-side="right"] {
|
|
48
|
+
animation: {{prefix}}-tooltip-enter-right var(--xds-motion-duration-fast)
|
|
49
|
+
var(--xds-motion-easing-enter);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* After the rules above, which it replaces. */
|
|
53
|
+
.{{prefix}}-tooltip[data-state="closed"] {
|
|
54
|
+
animation: {{prefix}}-overlay-exit var(--xds-motion-duration-fast) var(--xds-motion-easing-exit)
|
|
55
|
+
forwards;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
.{{prefix}}-tooltip[data-side],
|
|
60
|
+
.{{prefix}}-tooltip[data-state="closed"] {
|
|
61
|
+
animation: none;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* A key hint: the same text in a hairline box of its own, in the text's color, which is
|
|
66
|
+
the one color known to stand out from the tooltip. */
|
|
67
|
+
.{{prefix}}-tooltip__shortcut {
|
|
68
|
+
margin-inline-start: var(--xds-space-2);
|
|
69
|
+
padding-inline: var(--xds-space-1);
|
|
70
|
+
border: var(--xds-border-width-thin) solid currentColor;
|
|
71
|
+
border-radius: calc(var(--xds-radius-sm) - var(--xds-space-0-5));
|
|
72
|
+
font: inherit;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Forced colors draw no shadow and fill the tooltip in the page's color, so its edge is drawn. */
|
|
76
|
+
@media (forced-colors: active) {
|
|
77
|
+
.{{prefix}}-tooltip {
|
|
78
|
+
outline: var(--xds-border-width-thin) solid CanvasText;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Literal offsets and scales: a custom property inside a keyframe keeps WebKit from running the
|
|
84
|
+
animation on the compositor. */
|
|
85
|
+
@keyframes {{prefix}}-tooltip-enter-up {
|
|
86
|
+
from {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
transform: translate3d(0, 0.25rem, 0) scale(0.9);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes {{prefix}}-tooltip-enter-down {
|
|
93
|
+
from {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transform: translate3d(0, -0.25rem, 0) scale(0.9);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@keyframes {{prefix}}-tooltip-enter-left {
|
|
100
|
+
from {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
transform: translate3d(0.25rem, 0, 0) scale(0.9);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@keyframes {{prefix}}-tooltip-enter-right {
|
|
107
|
+
from {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transform: translate3d(-0.25rem, 0, 0) scale(0.9);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Ejected from `@xds/vue` 1.2.0 by `xds eject`. This copy is the app's own: change it
|
|
2
|
+
// as you need. `xds eject --list` says which ejected files differ from what was copied.
|
|
3
|
+
|
|
4
|
+
/** Tooltip's props in every framework, short of the control it describes. */
|
|
5
|
+
export type TooltipBaseProps = {
|
|
6
|
+
/** What the control is or does, in a word or two. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** A key hint shown after the label, such as `⌘K`. */
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
/** The side of the control the tooltip appears on. It flips when there is no room. */
|
|
11
|
+
placement?: "top" | "bottom";
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The physical side a tooltip beside its control goes on: the end edge in the page's
|
|
16
|
+
* direction. Zag places by physical side. A page rendered by a server, which has no document,
|
|
17
|
+
* takes the right; the tooltip only shows in the browser, which reads the direction again.
|
|
18
|
+
*/
|
|
19
|
+
export function tooltipEndSide(): "left" | "right" {
|
|
20
|
+
return globalThis.document?.documentElement.dir === "rtl" ? "left" : "right";
|
|
21
|
+
}
|