@eldrajs/ui 0.2.9 → 0.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/CHANGELOG.md +13 -0
- package/README.md +171 -151
- package/dist/{VariantPicker-Da41_oGA.js → VariantPicker-DDFlMvgJ.js} +1222 -833
- package/dist/components/accordion/Accordion.vue.d.ts +1 -2
- package/dist/components/accordion/AccordionItem.vue.d.ts +1 -1
- package/dist/components/accordion/types.d.ts +6 -7
- package/dist/components/avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/avatar/types.d.ts +6 -4
- package/dist/components/badge/types.d.ts +6 -4
- package/dist/components/breadcrumb/types.d.ts +5 -2
- package/dist/components/button/Button.vue.d.ts +3 -3
- package/dist/components/button/ButtonGroup.vue.d.ts +0 -1
- package/dist/components/button/types.d.ts +7 -6
- package/dist/components/card/ContentCard.vue.d.ts +1 -1
- package/dist/components/card/FeatureCard.vue.d.ts +1 -1
- package/dist/components/card/stretchedLink.d.ts +3 -3
- package/dist/components/card/types.d.ts +6 -4
- package/dist/components/carousel/types.d.ts +7 -3
- package/dist/components/checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +10 -4
- package/dist/components/chip/Chip.vue.d.ts +1 -1
- package/dist/components/chip/ChipGroup.vue.d.ts +0 -1
- package/dist/components/chip/types.d.ts +5 -6
- package/dist/components/container/Container.vue.d.ts +0 -1
- package/dist/components/container/types.d.ts +0 -4
- package/dist/components/dialog/Dialog.vue.d.ts +2 -2
- package/dist/components/dialog/types.d.ts +5 -2
- package/dist/components/drawer/Drawer.vue.d.ts +1 -1
- package/dist/components/drawer/types.d.ts +5 -2
- package/dist/components/empty-state/EmptyState.vue.d.ts +1 -1
- package/dist/components/empty-state/types.d.ts +7 -6
- package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +1 -1
- package/dist/components/field-wrapper/types.d.ts +5 -2
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +4 -4
- package/dist/components/filter-panel/facets/shared.d.ts +4 -4
- package/dist/components/filter-panel/types.d.ts +5 -2
- package/dist/components/form-layout/FormLayout.vue.d.ts +1 -1
- package/dist/components/form-layout/types.d.ts +5 -2
- package/dist/components/icon/Icon.vue.d.ts +1 -2
- package/dist/components/icon/types.d.ts +0 -4
- package/dist/components/image/types.d.ts +3 -2
- package/dist/components/input/Input.vue.d.ts +6 -6
- package/dist/components/input/classes.d.ts +25 -19
- package/dist/components/input/types.d.ts +5 -2
- package/dist/components/lightbox/Lightbox.vue.d.ts +1 -1
- package/dist/components/lightbox/types.d.ts +5 -2
- package/dist/components/link/Link.vue.d.ts +1 -1
- package/dist/components/link/types.d.ts +5 -2
- package/dist/components/load-more/types.d.ts +4 -3
- package/dist/components/logo-item/LogoItem.vue.d.ts +1 -1
- package/dist/components/logo-item/types.d.ts +2 -1
- package/dist/components/nav-menu/NavMenu.vue.d.ts +1 -1
- package/dist/components/nav-menu/navLinks.d.ts +1 -1
- package/dist/components/nav-menu/types.d.ts +3 -3
- package/dist/components/pagination/types.d.ts +5 -2
- package/dist/components/popover/Popover.vue.d.ts +1 -1
- package/dist/components/popover/types.d.ts +5 -6
- package/dist/components/price/types.d.ts +3 -2
- package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
- package/dist/components/product-card/types.d.ts +3 -2
- package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +4 -4
- package/dist/components/quantity-stepper/types.d.ts +5 -2
- package/dist/components/radio/Radio.vue.d.ts +3 -3
- package/dist/components/radio/RadioGroup.vue.d.ts +3 -3
- package/dist/components/radio/recipes.d.ts +11 -7
- package/dist/components/radio/types.d.ts +11 -5
- package/dist/components/range-slider/RangeSlider.vue.d.ts +1 -1
- package/dist/components/range-slider/types.d.ts +5 -2
- package/dist/components/rating/Rating.vue.d.ts +1 -1
- package/dist/components/rating/types.d.ts +3 -2
- package/dist/components/search-bar/SearchBar.vue.d.ts +3 -3
- package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +1 -1
- package/dist/components/search-bar/types.d.ts +5 -2
- package/dist/components/search-modal/SearchModal.vue.d.ts +2 -2
- package/dist/components/search-modal/types.d.ts +7 -4
- package/dist/components/section/Section.vue.d.ts +0 -1
- package/dist/components/section/types.d.ts +0 -4
- package/dist/components/select/MultiSelect.vue.d.ts +5 -5
- package/dist/components/select/Select.vue.d.ts +4 -4
- package/dist/components/select/SelectPanel.vue.d.ts +2 -2
- package/dist/components/select/panelParts.d.ts +21 -20
- package/dist/components/select/types.d.ts +10 -4
- package/dist/components/site-form/SiteForm.vue.d.ts +1 -1
- package/dist/components/site-form/types.d.ts +6 -2
- package/dist/components/skeleton/Skeleton.vue.d.ts +3 -2
- package/dist/components/skeleton/types.d.ts +16 -6
- package/dist/components/switch/Switch.vue.d.ts +2 -2
- package/dist/components/switch/types.d.ts +5 -2
- package/dist/components/tabler-icon/TablerIcon.vue.d.ts +2 -3
- package/dist/components/tabler-icon/types.d.ts +0 -4
- package/dist/components/tabs/Tab.vue.d.ts +1 -1
- package/dist/components/tabs/TabPanel.vue.d.ts +1 -3
- package/dist/components/tabs/Tabs.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +13 -11
- package/dist/components/textarea/Textarea.vue.d.ts +4 -4
- package/dist/components/textarea/types.d.ts +5 -2
- package/dist/components/toast/types.d.ts +9 -3
- package/dist/components/tooltip/types.d.ts +4 -3
- package/dist/components/unit-input/UnitInput.vue.d.ts +7 -7
- package/dist/components/unit-input/types.d.ts +5 -2
- package/dist/components/variant-picker/VariantPicker.vue.d.ts +1 -1
- package/dist/components/variant-picker/types.d.ts +3 -2
- package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +0 -1
- package/dist/components/visually-hidden/types.d.ts +0 -4
- package/dist/components.css +1481 -2342
- package/dist/composables/useDialog.d.ts +9 -1
- package/dist/composables/useEldraScope.d.ts +7 -9
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1380 -884
- package/dist/style.css +1487 -2348
- package/dist/tailwind.css +11 -2234
- package/dist/theme.css +108 -0
- package/dist/tokens.css +1 -0
- package/dist/utilities.css +2228 -0
- package/dist/utils/mergeClass.d.ts +3 -0
- package/dist/utils/tagRecipe.d.ts +3 -3
- package/dist/vee-validate.js +1 -1
- package/package.json +4 -3
- package/dist/scoped.css +0 -4623
- package/dist/utils/cx.d.ts +0 -31
package/dist/theme.css
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* Tailwind v4 theme for @eldrajs/ui. Every value is a --eldra-* variable from tokens.css, so a
|
|
2
|
+
consumer restyles by setting variables. Consumers with Tailwind import this file after
|
|
3
|
+
`@import 'tailwindcss'`; consumers without Tailwind use style.css.
|
|
4
|
+
|
|
5
|
+
Two kinds of value cannot be a variable and are written out here, nowhere else:
|
|
6
|
+
- container-query breakpoints, because a `@container (width < ...)` condition may not contain
|
|
7
|
+
`var()` — Tailwind inlines the `--container-*` value into the condition at build time;
|
|
8
|
+
- the spinner's own animation timings, which the spec fixes at 700ms (spin) and 1.2s (pulse). */
|
|
9
|
+
@theme {
|
|
10
|
+
--color-*: initial;
|
|
11
|
+
--color-background: var(--eldra-color-background);
|
|
12
|
+
--color-surface: var(--eldra-color-surface);
|
|
13
|
+
--color-surface-strong: var(--eldra-color-surface-strong);
|
|
14
|
+
--color-border: var(--eldra-color-border);
|
|
15
|
+
--color-border-strong: var(--eldra-color-border-strong);
|
|
16
|
+
--color-text: var(--eldra-color-text);
|
|
17
|
+
--color-muted: var(--eldra-color-muted);
|
|
18
|
+
--color-primary: var(--eldra-color-primary);
|
|
19
|
+
--color-primary-contrast: var(--eldra-color-primary-contrast);
|
|
20
|
+
--color-accent: var(--eldra-color-accent);
|
|
21
|
+
--color-accent-contrast: var(--eldra-color-accent-contrast);
|
|
22
|
+
--color-success: var(--eldra-color-success);
|
|
23
|
+
--color-warning: var(--eldra-color-warning);
|
|
24
|
+
--color-danger: var(--eldra-color-danger);
|
|
25
|
+
--color-focus: var(--eldra-color-focus);
|
|
26
|
+
--color-focus-inner: var(--eldra-color-focus-inner);
|
|
27
|
+
--color-overlay: var(--eldra-color-overlay);
|
|
28
|
+
--color-transparent: transparent;
|
|
29
|
+
--color-current: currentColor;
|
|
30
|
+
|
|
31
|
+
--font-heading: var(--eldra-font-heading);
|
|
32
|
+
--font-body: var(--eldra-font-body);
|
|
33
|
+
--font-mono: var(--eldra-font-mono);
|
|
34
|
+
|
|
35
|
+
--spacing-*: initial;
|
|
36
|
+
--spacing: 0.25rem;
|
|
37
|
+
--spacing-1: var(--eldra-space-1);
|
|
38
|
+
--spacing-2: var(--eldra-space-2);
|
|
39
|
+
--spacing-3: var(--eldra-space-3);
|
|
40
|
+
--spacing-4: var(--eldra-space-4);
|
|
41
|
+
--spacing-5: var(--eldra-space-5);
|
|
42
|
+
--spacing-6: var(--eldra-space-6);
|
|
43
|
+
--spacing-8: var(--eldra-space-8);
|
|
44
|
+
--spacing-12: var(--eldra-space-12);
|
|
45
|
+
--spacing-16: var(--eldra-space-16);
|
|
46
|
+
|
|
47
|
+
--radius-*: initial;
|
|
48
|
+
--radius-sm: var(--eldra-radius-sm);
|
|
49
|
+
--radius-md: var(--eldra-radius-md);
|
|
50
|
+
--radius-lg: var(--eldra-radius-lg);
|
|
51
|
+
--radius-xl: var(--eldra-radius-xl);
|
|
52
|
+
--radius-full: var(--eldra-radius-full);
|
|
53
|
+
|
|
54
|
+
--shadow-*: initial;
|
|
55
|
+
--shadow-sm: var(--eldra-shadow-sm);
|
|
56
|
+
--shadow-md: var(--eldra-shadow-md);
|
|
57
|
+
--shadow-float: var(--eldra-shadow-float);
|
|
58
|
+
|
|
59
|
+
--ease-out: var(--eldra-ease-out);
|
|
60
|
+
--ease-in: var(--eldra-ease-in);
|
|
61
|
+
--ease-in-out: var(--eldra-ease-in-out);
|
|
62
|
+
|
|
63
|
+
/* Container-query conditions cannot reference a custom property — `@container (width >=
|
|
64
|
+
var(--x))` is invalid CSS — so Tailwind requires a literal length in the `--container-*` theme
|
|
65
|
+
namespace before it emits `@narrow:`/`@content:`/`@wide:` variants at all. Shipping these three
|
|
66
|
+
as `var(--eldra-container-*)` (the tokens.css indirection every other value in this file uses)
|
|
67
|
+
compiled all three variants to nothing — no build error, no warning, just an absent rule — so
|
|
68
|
+
`Container`'s own `@content:px-[var(--eldra-gutter-desktop)]` desktop gutter, and every
|
|
69
|
+
starter block's own `@content:` layout, never engaged (bug, fixed 2026-09-27: see the README's
|
|
70
|
+
Deviations entry). The three literals below are `eldra-starter-spec/tokens.json`'s
|
|
71
|
+
`layout.container-{narrow,content,wide}` values, copied by hand — `scripts/build-tokens.mjs`
|
|
72
|
+
only ever emits a `var()`-holding `--eldra-*` custom property into `tokens.css`, never a
|
|
73
|
+
literal into this file, so it cannot generate this block for us —
|
|
74
|
+
`src/__tests__/containerQueryLiterals.spec.ts` asserts the two stay equal, catching the drift a
|
|
75
|
+
future token change could otherwise introduce silently.
|
|
76
|
+
|
|
77
|
+
This does not cost consumers runtime overridability of the three *widths*:
|
|
78
|
+
`--eldra-container-{narrow,content,wide}` in `tokens.css` are untouched, and `Container.vue`
|
|
79
|
+
reads them through its own `eldra-container-{narrow,content,wide}` utilities (declared further
|
|
80
|
+
down this file) rather than through Tailwind's auto-generated `max-w-narrow`/`-content`/
|
|
81
|
+
`-wide`. Those three still compile from the `--container-*` keys below — fine for an ad-hoc
|
|
82
|
+
`max-w-content` in a story or a consumer's own markup — but now to the *literal* number rather
|
|
83
|
+
than a `var()`, which would silently defeat `Container`'s own "a consumer restyles this by
|
|
84
|
+
setting a variable" contract were its width prop to keep reading them. */
|
|
85
|
+
--container-narrow: 40rem;
|
|
86
|
+
--container-content: 64rem;
|
|
87
|
+
--container-wide: 80rem;
|
|
88
|
+
|
|
89
|
+
/* In Tailwind v4 the `--container-*` namespace is the container-query breakpoint scale as well
|
|
90
|
+
as the width scale, so the three layout widths above already name the spec's `desktop`
|
|
91
|
+
(64rem, `--container-content`) and `wide` (80rem, `--container-wide`) breakpoints. The
|
|
92
|
+
mobile/tablet edge at 48rem has no layout width of its own, so it is named here: `@max-tablet`
|
|
93
|
+
is the spec's "narrower than 48rem", the breakpoint the spec's own "primary buttons grow to
|
|
94
|
+
`target-touch` below 48rem" rule would measure. `Button` no longer grows at any container
|
|
95
|
+
width (operator override, recorded under Deviations in the README), so nothing in this
|
|
96
|
+
package uses `@max-tablet` today — it stays declared for a future component that needs the
|
|
97
|
+
same edge. Declaring these keys does not disturb Tailwind's own `@sm`/`@md`/... container
|
|
98
|
+
scale — the theme never resets `--container-*`. */
|
|
99
|
+
--container-tablet: 48rem;
|
|
100
|
+
|
|
101
|
+
/* The two-column form layout's own edge (spec "Form layout" -> Sizes): "the form's container
|
|
102
|
+
>= 36rem", "measured on the containing block, so it works in narrow page-builder columns".
|
|
103
|
+
Like `--container-tablet` above it is a breakpoint with no layout width behind it, so it is
|
|
104
|
+
named here rather than borrowing whichever stock container key happens to be 36rem:
|
|
105
|
+
`@two-col:grid-cols-2` turns the pairs on, `@max-two-col:` is the spec's "narrow container
|
|
106
|
+
(< 36rem)" state, where the actions stack full width with the primary first. */
|
|
107
|
+
--container-two-col: 36rem;
|
|
108
|
+
}
|
package/dist/tokens.css
CHANGED
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
--eldra-duration-base: 200ms;
|
|
120
120
|
--eldra-duration-slow: 250ms;
|
|
121
121
|
--eldra-ease-out: cubic-bezier(0.2, 0, 0, 1);
|
|
122
|
+
--eldra-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
122
123
|
--eldra-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
123
124
|
--eldra-z-sticky: 20;
|
|
124
125
|
--eldra-z-drawer: 40;
|