@gild-ui/vue 0.1.0-alpha.0 → 0.1.0-alpha.2
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 +4 -0
- package/dist/Button.d.cts +2 -2
- package/dist/Button.d.mts +2 -2
- package/dist/{Button.types-BnJ28ym9.d.mts → Button.types-CxPFGBO1.d.mts} +21 -2
- package/dist/Direction.cjs +8 -0
- package/dist/Direction.d.cts +2 -0
- package/dist/Direction.d.mts +2 -0
- package/dist/Direction.mjs +1 -0
- package/dist/Flex.d.cts +2 -2
- package/dist/Flex.d.mts +2 -2
- package/dist/Modal.d.cts +2 -2
- package/dist/Modal.d.mts +2 -2
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.d.cts +2 -2
- package/dist/TextInput.d.mts +2 -2
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.d.cts +2 -2
- package/dist/ThemeProvider.d.mts +2 -2
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/View.d.cts +2 -2
- package/dist/View.d.mts +2 -2
- package/dist/{bridge-t6zHXVt-.d.cts → bridge-BL3xjLXh.d.cts} +1 -1
- package/dist/{bridge-D-x2kK4r.d.mts → bridge-BVgyzx-P.d.mts} +1 -1
- package/dist/engine.cjs +15 -1
- package/dist/engine.d.cts +7 -4
- package/dist/engine.d.mts +7 -4
- package/dist/engine.mjs +4 -2
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -1
- package/dist/{props-BRLGZVjJ.d.mts → props-ByhSXZf7.d.mts} +1 -1
- package/dist/{props-Bzm7Wbdv.d.cts → props-CDONVzwC.d.cts} +1 -1
- package/dist/{themes-CgFrk0_b.d.cts → themes-Dj-HzOAq.d.cts} +20 -2
- package/dist/useTheme.d.cts +1 -1
- package/dist/useTheme.d.mts +1 -1
- package/package.json +17 -6
package/README.md
CHANGED
|
@@ -76,6 +76,10 @@ later. Each component's README says how its props map to Vue; [`vue.md`](./vue.m
|
|
|
76
76
|
- **`style`** takes entries of `StyleSheet.create`, as on the web; there is no inline style.
|
|
77
77
|
- **`useTheme()`** is a computed ref: `const theme = useTheme()`, then `theme.value`.
|
|
78
78
|
|
|
79
|
+
## Right to left
|
|
80
|
+
|
|
81
|
+
Opt in once, in `setup()`: `configure({ serverTheme: themes.light, plugins: [rtl()] })`, with `rtl` from `@gild-ui/vue/engine`. Every class then holds both directions and the browser picks by the `dir` attribute of `<html>`; `Direction` (`@gild-ui/vue/Direction`) keeps an area in its own direction, and `dir({ ltr, rtl })` gives a property a value for each. The rules are those of the web's, in [the engine docs](../react/docs/engine.md#right-to-left).
|
|
82
|
+
|
|
79
83
|
## Server rendering
|
|
80
84
|
|
|
81
85
|
```ts
|
package/dist/Button.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import {
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { $ as GapToken, G as ButtonLoadingPosition, J as ButtonShape, K as ButtonOwnerState, Q as ButtonVariant, W as ButtonColor, X as ButtonSlot, Y as ButtonSize, Z as ButtonThemeConfig, q as ButtonProps$1 } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { ButtonHTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/**
|
|
5
5
|
* The props of `Button`: the shared props of `@gild-ui/react` without the icons and the loading
|
package/dist/Button.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { a as ButtonShape, c as ButtonThemeConfig, i as ButtonProps$1, l as ButtonVariant, n as ButtonLoadingPosition, o as ButtonSize, r as ButtonOwnerState, s as ButtonSlot, t as ButtonColor, u as GapToken } from "./Button.types-
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { a as ButtonShape, c as ButtonThemeConfig, i as ButtonProps$1, l as ButtonVariant, n as ButtonLoadingPosition, o as ButtonSize, r as ButtonOwnerState, s as ButtonSlot, t as ButtonColor, u as GapToken } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { ButtonHTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/**
|
|
5
5
|
* The props of `Button`: the shared props of `@gild-ui/react` without the icons and the loading
|
|
@@ -2,8 +2,9 @@ import { SheetStyleProp } from "@umber-style/vue";
|
|
|
2
2
|
import { ButtonVariants, InputVariantKey, OpenScale, Register as Register$1, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
|
|
3
3
|
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
|
|
4
4
|
import "@umber-style/cache";
|
|
5
|
-
import { CSSObject as CSSObject$1 } from "@umber-style/core";
|
|
5
|
+
import { CSSObject as CSSObject$1, ThemeRefs } from "@umber-style/core";
|
|
6
6
|
import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ElementType, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
|
|
7
|
+
import "@umber-style/core/internal";
|
|
7
8
|
/** What the `style` prop of a component takes: an entry of `StyleSheet.create`, or a list of them. */
|
|
8
9
|
type StyleOverride = SheetStyleProp;
|
|
9
10
|
/**
|
|
@@ -1048,6 +1049,24 @@ interface Theme extends Theme$1 {
|
|
|
1048
1049
|
type GildTheme = Theme;
|
|
1049
1050
|
/** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
|
|
1050
1051
|
type AppTheme = RegisteredTheme<Theme>;
|
|
1052
|
+
/** The parts of the theme that a style function reads as they are: the same ones `baseTheme` marks with `asIs`. */
|
|
1053
|
+
interface StyleThemeModes {
|
|
1054
|
+
readonly $modes: {
|
|
1055
|
+
readonly defaults: 'asIs';
|
|
1056
|
+
readonly typography: 'asIs';
|
|
1057
|
+
readonly sizes: 'asIs';
|
|
1058
|
+
readonly layout: 'asIs';
|
|
1059
|
+
readonly transitions: 'asIs';
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* The theme a style function is given (`styled`, `StyleSheet.create`, `keyframes`, `Global`): each token
|
|
1064
|
+
* is the CSS variable that holds it, and the parts that are not CSS values (`sizes`, `typography`,
|
|
1065
|
+
* `layout`, `transitions`, `breakpoints`, `components`, `defaults`) are what they are. A function given to
|
|
1066
|
+
* `Global`, `StyleSheet.create` or `keyframes` (the engine's own, with no modes of the theme) is given
|
|
1067
|
+
* `EngineStyleTheme`.
|
|
1068
|
+
*/
|
|
1069
|
+
type StyleTheme = ThemeRefs<AppTheme & StyleThemeModes>;
|
|
1051
1070
|
/** The corner shapes of a control or a surface. */
|
|
1052
1071
|
type ShapeKey = 'square' | 'rounded' | 'pill';
|
|
1053
1072
|
/** The resolved props Button's styled roots receive - what `ownerState` exposes. */
|
|
@@ -1110,4 +1129,4 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'col
|
|
|
1110
1129
|
/** Overrides for the slots a theme can style: `style`, `className`, `data-*` and `aria-*`. */
|
|
1111
1130
|
slotProps?: SlotProps<ButtonSlot>;
|
|
1112
1131
|
}
|
|
1113
|
-
export {
|
|
1132
|
+
export { ViewThemeConfig as $, TextInputSlot as A, FlexOwnerState as B, TypographyThemeConfig as C, TextInputOwnerState as D, TextInputColor as E, ModalOwnerState as F, ViewBackgroundToken as G, FlexSlot as H, ModalProps as I, ViewBorderWidthToken as J, ViewBorderColorToken as K, ModalScroll as L, TextInputThemeConfig as M, TextInputVariant as N, TextInputProps as O, ModalCloseReason as P, ViewSlot as Q, ModalSlot as R, TypographySlot as S, TextInputClasses as T, FlexThemeConfig as U, FlexProps as V, GapToken$1 as W, ViewOwnerState as X, ViewColorToken as Y, ViewProps as Z, BackgroundToken as _, ButtonShape as a, TypographyOwnerState as b, ButtonThemeConfig as c, AppTheme as d, SlotOverride as et, ComponentConfig as f, ThemeComponents as g, Theme as h, ButtonProps as i, TextInputTextColor as j, TextInputSize as k, ButtonVariant as l, StyleTheme as m, ButtonLoadingPosition as n, StyleOverride as nt, ButtonSize as o, GildTheme as p, ViewBorderRadiusToken as q, ButtonOwnerState as r, ButtonSlot as s, ButtonColor as t, SlotProps as tt, GapToken as u, TextColorToken as v, TypographyVariant as w, TypographyProps as x, TypographyAlign as y, ModalThemeConfig as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Direction } from "@umber-style/vue";
|
package/dist/Flex.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { A as
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { A as FlexOwnerState, M as FlexSlot, N as FlexThemeConfig, P as GapToken, j as FlexProps$1 } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `Flex`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
|
|
5
5
|
export type FlexProps = SharedProps<FlexProps$1> & Listeners<HTMLAttributes>;
|
package/dist/Flex.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { B as
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { B as FlexOwnerState, H as FlexSlot, U as FlexThemeConfig, V as FlexProps$1, W as GapToken } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `Flex`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
|
|
5
5
|
export type FlexProps = SharedProps<FlexProps$1> & Listeners<HTMLAttributes>;
|
package/dist/Modal.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot } from "./props-
|
|
2
|
-
import {
|
|
1
|
+
import { n as SharedProps, r as Slot } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { D as ModalScroll, E as ModalProps$1, O as ModalSlot, T as ModalOwnerState, k as ModalThemeConfig, w as ModalCloseReason } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
/** The props of `Modal`: the shared props of `@gild-ui/react` without the content, which is the default slot. */
|
|
5
5
|
export type ModalProps = SharedProps<ModalProps$1>;
|
package/dist/Modal.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot } from "./props-
|
|
2
|
-
import { F as
|
|
1
|
+
import { n as SharedProps, r as Slot } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { F as ModalOwnerState, I as ModalProps$1, L as ModalScroll, P as ModalCloseReason, R as ModalSlot, z as ModalThemeConfig } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
/** The props of `Modal`: the shared props of `@gild-ui/react` without the content, which is the default slot. */
|
|
5
5
|
export type ModalProps = SharedProps<ModalProps$1>;
|
package/dist/TextInput.cjs
CHANGED
|
@@ -216,7 +216,7 @@ const valueOf = (event) => {
|
|
|
216
216
|
const TextInput = (0, vue.defineComponent)((props, { attrs, emit }) => {
|
|
217
217
|
const theme = (0, _umber_style_vue.useTheme)();
|
|
218
218
|
return () => {
|
|
219
|
-
const { class: className, ...otherAttributes } = attrs;
|
|
219
|
+
const { class: className, style: _style, ...otherAttributes } = attrs;
|
|
220
220
|
const { classes, components, inputProps, slotProps, multiline, rows, resize, minRows } = props;
|
|
221
221
|
const { value } = theme;
|
|
222
222
|
const size = props.size ?? (0, _gild_ui_core_theme.themeDefault)(value, "size", "md");
|
package/dist/TextInput.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Tag, n as SharedProps } from "./props-
|
|
2
|
-
import {
|
|
1
|
+
import { i as Tag, n as SharedProps } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { C as TextInputVariant, S as TextInputThemeConfig, _ as TextInputOwnerState, b as TextInputSlot, g as TextInputColor, h as TextInputClasses, v as TextInputProps$1, x as TextInputTextColor, y as TextInputSize } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { InputHTMLAttributes, SlotsType, TextareaHTMLAttributes } from "vue";
|
|
4
4
|
/** The attributes of the native element: of an input and of a textarea, without `style`. */
|
|
5
5
|
type InputAttributes = Omit<InputHTMLAttributes & TextareaHTMLAttributes, 'style'>;
|
package/dist/TextInput.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Tag, n as SharedProps } from "./props-
|
|
2
|
-
import { A as
|
|
1
|
+
import { i as Tag, n as SharedProps } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { A as TextInputSlot, D as TextInputOwnerState, E as TextInputColor, M as TextInputThemeConfig, N as TextInputVariant, O as TextInputProps$1, T as TextInputClasses, j as TextInputTextColor, k as TextInputSize } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { InputHTMLAttributes, SlotsType, TextareaHTMLAttributes } from "vue";
|
|
4
4
|
/** The attributes of the native element: of an input and of a textarea, without `style`. */
|
|
5
5
|
type InputAttributes = Omit<InputHTMLAttributes & TextareaHTMLAttributes, 'style'>;
|
package/dist/TextInput.mjs
CHANGED
|
@@ -215,7 +215,7 @@ const valueOf = (event) => {
|
|
|
215
215
|
const TextInput = defineComponent((props, { attrs, emit }) => {
|
|
216
216
|
const theme = useTheme();
|
|
217
217
|
return () => {
|
|
218
|
-
const { class: className, ...otherAttributes } = attrs;
|
|
218
|
+
const { class: className, style: _style, ...otherAttributes } = attrs;
|
|
219
219
|
const { classes, components, inputProps, slotProps, multiline, rows, resize, minRows } = props;
|
|
220
220
|
const { value } = theme;
|
|
221
221
|
const size = props.size ?? themeDefault(value, "size", "md");
|
package/dist/ThemeProvider.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./bridge-
|
|
2
|
-
import {
|
|
1
|
+
import "./bridge-BL3xjLXh.cjs";
|
|
2
|
+
import { a as Theme$1, t as AppTheme } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { Register, ThemeDefaults } from "@gild-ui/core/theme";
|
|
4
4
|
/** What the provider takes: `theme` is optional until the app registers its themes, which have no built-in theme to fall back to. */
|
|
5
5
|
export type ThemeProviderProps = Register extends {
|
package/dist/ThemeProvider.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./bridge-
|
|
2
|
-
import { d as AppTheme,
|
|
1
|
+
import "./bridge-BVgyzx-P.mjs";
|
|
2
|
+
import { d as AppTheme, h as Theme$1 } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { Register, ThemeDefaults } from "@gild-ui/core/theme";
|
|
4
4
|
/** What the provider takes: `theme` is optional until the app registers its themes, which have no built-in theme to fall back to. */
|
|
5
5
|
export type ThemeProviderProps = Register extends {
|
package/dist/Typography.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { c as
|
|
1
|
+
import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { c as TextColorToken, d as TypographyProps$1, f as TypographySlot, l as TypographyAlign, m as TypographyVariant, p as TypographyThemeConfig, s as BackgroundToken, u as TypographyOwnerState } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `Typography`: the shared props of `@gild-ui/react`, with `as` a tag or a component, and a listener for each DOM event of the element. */
|
|
5
5
|
export type TypographyProps = SharedProps<TypographyProps$1, 'as'> & Listeners<HTMLAttributes> & {
|
package/dist/Typography.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { C as
|
|
1
|
+
import { i as Tag, n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { C as TypographyThemeConfig, S as TypographySlot, _ as BackgroundToken, b as TypographyOwnerState, v as TextColorToken, w as TypographyVariant, x as TypographyProps$1, y as TypographyAlign } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `Typography`: the shared props of `@gild-ui/react`, with `as` a tag or a component, and a listener for each DOM event of the element. */
|
|
5
5
|
export type TypographyProps = SharedProps<TypographyProps$1, 'as'> & Listeners<HTMLAttributes> & {
|
package/dist/View.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import { B as
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-CDONVzwC.cjs";
|
|
2
|
+
import { B as ViewOwnerState, F as ViewBackgroundToken, H as ViewSlot, I as ViewBorderColorToken, L as ViewBorderRadiusToken, R as ViewBorderWidthToken, U as ViewThemeConfig, V as ViewProps$1, z as ViewColorToken } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `View`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
|
|
5
5
|
export type ViewProps = SharedProps<ViewProps$1> & Listeners<HTMLAttributes>;
|
package/dist/View.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SharedProps, r as Slot, t as Listeners } from "./props-
|
|
2
|
-
import {
|
|
1
|
+
import { n as SharedProps, r as Slot, t as Listeners } from "./props-ByhSXZf7.mjs";
|
|
2
|
+
import { $ as ViewThemeConfig, G as ViewBackgroundToken, J as ViewBorderWidthToken, K as ViewBorderColorToken, Q as ViewSlot, X as ViewOwnerState, Y as ViewColorToken, Z as ViewProps$1, q as ViewBorderRadiusToken } from "./Button.types-CxPFGBO1.mjs";
|
|
3
3
|
import { HTMLAttributes, SlotsType } from "vue";
|
|
4
4
|
/** The props of `View`: the shared props of `@gild-ui/react`, and a listener for each DOM event of the element. */
|
|
5
5
|
export type ViewProps = SharedProps<ViewProps$1> & Listeners<HTMLAttributes>;
|
package/dist/engine.cjs
CHANGED
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_themes = require("./themes-BqxOUMCB.cjs");
|
|
3
3
|
let _umber_style_vue = require("@umber-style/vue");
|
|
4
4
|
let _umber_style_cache = require("@umber-style/cache");
|
|
5
|
+
let _umber_style_rtl = require("@umber-style/rtl");
|
|
5
6
|
let _umber_style_core = require("@umber-style/core");
|
|
6
7
|
// src/engine/styleCache.ts
|
|
7
8
|
/**
|
|
@@ -17,10 +18,11 @@ const styleCache = (0, _umber_style_cache.createCache)({
|
|
|
17
18
|
nonce: typeof document === "undefined" ? void 0 : document.querySelector("script[nonce]")?.nonce || void 0
|
|
18
19
|
});
|
|
19
20
|
// src/engine/configure.ts
|
|
20
|
-
function configure({ serverTheme, cache, prefix } = {}) {
|
|
21
|
+
function configure({ serverTheme, cache, prefix, plugins } = {}) {
|
|
21
22
|
(0, _umber_style_vue.configure)({
|
|
22
23
|
cache: cache ?? styleCache,
|
|
23
24
|
prefix,
|
|
25
|
+
plugins,
|
|
24
26
|
serverTheme: serverTheme ?? require_themes.baseTheme
|
|
25
27
|
});
|
|
26
28
|
}
|
|
@@ -43,6 +45,12 @@ Object.defineProperty(exports, "defineTheme", {
|
|
|
43
45
|
return _umber_style_vue.defineTheme;
|
|
44
46
|
}
|
|
45
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "dir", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function() {
|
|
51
|
+
return _umber_style_rtl.dir;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
46
54
|
Object.defineProperty(exports, "extractPageStyles", {
|
|
47
55
|
enumerable: true,
|
|
48
56
|
get: function() {
|
|
@@ -61,6 +69,12 @@ Object.defineProperty(exports, "globalStyles", {
|
|
|
61
69
|
return _umber_style_vue.globalStyles;
|
|
62
70
|
}
|
|
63
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "rtl", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return _umber_style_rtl.rtl;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
64
78
|
Object.defineProperty(exports, "setNonceSource", {
|
|
65
79
|
enumerable: true,
|
|
66
80
|
get: function() {
|
package/dist/engine.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./bridge-
|
|
2
|
-
import {
|
|
1
|
+
import "./bridge-BL3xjLXh.cjs";
|
|
2
|
+
import { a as Theme$1, t as AppTheme } from "./themes-Dj-HzOAq.cjs";
|
|
3
3
|
import { Register } from "@gild-ui/core/theme";
|
|
4
4
|
import { extractPageStyles } from "@umber-style/core";
|
|
5
5
|
import { createCache } from "@umber-style/cache";
|
|
6
|
-
import { Cache, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
|
|
6
|
+
import { Cache, CachePlugin, CachePlugin as CachePlugin$1, ThemeRefs, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
|
|
7
|
+
import { DirValues, RtlOptions, dir, rtl } from "@umber-style/rtl";
|
|
7
8
|
/**
|
|
8
9
|
* Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
|
|
9
10
|
* extra key is typed `never`, so the error names it. `components` is the one shared value, which
|
|
@@ -18,6 +19,8 @@ interface ConfigureOwnProps<T> {
|
|
|
18
19
|
cache?: Cache;
|
|
19
20
|
/** The class prefix. It is the prefix of the cache, which is `soroush` for `styleCache`, so leave it out unless the cache is your own. */
|
|
20
21
|
prefix?: string;
|
|
22
|
+
/** What each declaration goes through before it is written, in order: `[rtl()]` writes both directions of a style in one class. None by default. */
|
|
23
|
+
plugins?: readonly CachePlugin$1[];
|
|
21
24
|
}
|
|
22
25
|
/** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
|
|
23
26
|
interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
|
|
@@ -43,4 +46,4 @@ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register
|
|
|
43
46
|
* that allows style elements by nonce; an empty string means no nonce.
|
|
44
47
|
*/
|
|
45
48
|
declare const styleCache: UmberCache;
|
|
46
|
-
export { type ConfigureOptions, asIs, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
|
|
49
|
+
export { type CachePlugin, type ConfigureOptions, type DirValues, type RtlOptions, type ThemeRefs, asIs, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
|
package/dist/engine.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "./bridge-
|
|
2
|
-
import { d as AppTheme,
|
|
3
|
-
import { Cache, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
|
|
1
|
+
import "./bridge-BVgyzx-P.mjs";
|
|
2
|
+
import { d as AppTheme, h as Theme$1 } from "./Button.types-CxPFGBO1.mjs";
|
|
3
|
+
import { Cache, CachePlugin, CachePlugin as CachePlugin$1, ThemeRefs, UmberCache, asIs, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
|
|
4
4
|
import { Register } from "@gild-ui/core/theme";
|
|
5
5
|
import { createCache } from "@umber-style/cache";
|
|
6
|
+
import { DirValues, RtlOptions, dir, rtl } from "@umber-style/rtl";
|
|
6
7
|
import { extractPageStyles } from "@umber-style/core";
|
|
7
8
|
/**
|
|
8
9
|
* Once themes are registered, `T` may have no key the registered themes lack, at any depth: each
|
|
@@ -18,6 +19,8 @@ interface ConfigureOwnProps<T> {
|
|
|
18
19
|
cache?: Cache;
|
|
19
20
|
/** The class prefix. It is the prefix of the cache, which is `soroush` for `styleCache`, so leave it out unless the cache is your own. */
|
|
20
21
|
prefix?: string;
|
|
22
|
+
/** What each declaration goes through before it is written, in order: `[rtl()]` writes both directions of a style in one class. None by default. */
|
|
23
|
+
plugins?: readonly CachePlugin$1[];
|
|
21
24
|
}
|
|
22
25
|
/** The options once the app registers its themes: it has no built-in theme to fall back to, so `serverTheme` is required. */
|
|
23
26
|
interface RegisteredConfigureProps<T> extends Omit<ConfigureOwnProps<T>, 'serverTheme'> {
|
|
@@ -43,4 +46,4 @@ export declare function configure<T extends Theme$1 = Theme$1>(...args: Register
|
|
|
43
46
|
* that allows style elements by nonce; an empty string means no nonce.
|
|
44
47
|
*/
|
|
45
48
|
declare const styleCache: UmberCache;
|
|
46
|
-
export { type ConfigureOptions, asIs, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
|
|
49
|
+
export { type CachePlugin, type ConfigureOptions, type DirValues, type RtlOptions, type ThemeRefs, asIs, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
|
package/dist/engine.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as baseTheme } from "./themes-rGHVhV5e.mjs";
|
|
2
2
|
import { asIs, configure as configure$1, defineTheme, fallback, globalStyles, setNonceSource, val, variable } from "@umber-style/vue";
|
|
3
3
|
import { createCache, createCache as createCache$1 } from "@umber-style/cache";
|
|
4
|
+
import { dir, rtl } from "@umber-style/rtl";
|
|
4
5
|
import { extractPageStyles } from "@umber-style/core";
|
|
5
6
|
// src/engine/styleCache.ts
|
|
6
7
|
/**
|
|
@@ -16,11 +17,12 @@ const styleCache = createCache$1({
|
|
|
16
17
|
nonce: typeof document === "undefined" ? void 0 : document.querySelector("script[nonce]")?.nonce || void 0
|
|
17
18
|
});
|
|
18
19
|
// src/engine/configure.ts
|
|
19
|
-
function configure({ serverTheme, cache, prefix } = {}) {
|
|
20
|
+
function configure({ serverTheme, cache, prefix, plugins } = {}) {
|
|
20
21
|
configure$1({
|
|
21
22
|
cache: cache ?? styleCache,
|
|
22
23
|
prefix,
|
|
24
|
+
plugins,
|
|
23
25
|
serverTheme: serverTheme ?? baseTheme
|
|
24
26
|
});
|
|
25
27
|
}
|
|
26
|
-
export { asIs, configure, createCache, defineTheme, extractPageStyles, fallback, globalStyles, setNonceSource, styleCache, val, variable };
|
|
28
|
+
export { asIs, configure, createCache, defineTheme, dir, extractPageStyles, fallback, globalStyles, rtl, setNonceSource, styleCache, val, variable };
|
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_ThemeProvider = require("./ThemeProvider-DIeSdYou.cjs");
|
|
3
3
|
require("./useTheme.cjs");
|
|
4
4
|
const require_useDefaultProps = require("./useDefaultProps-qCDgeYFm.cjs");
|
|
5
|
+
require("./Direction.cjs");
|
|
5
6
|
const require_styled = require("./styled-JHkZtq_1.cjs");
|
|
6
7
|
let _umber_style_vue = require("@umber-style/vue");
|
|
8
|
+
Object.defineProperty(exports, "Direction", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return _umber_style_vue.Direction;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
7
14
|
Object.defineProperty(exports, "Global", {
|
|
8
15
|
enumerable: true,
|
|
9
16
|
get: function() {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider, ThemeProviderProps } from "./ThemeProvider.cjs";
|
|
2
2
|
import { useTheme } from "./useTheme.cjs";
|
|
3
|
-
import {
|
|
3
|
+
import { et as SlotOverride, i as StyleTheme, n as ComponentConfig, nt as StyleOverride, o as ThemeComponents, tt as SlotProps } from "./themes-Dj-HzOAq.cjs";
|
|
4
|
+
import { Direction } from "./Direction.cjs";
|
|
4
5
|
import { Global, Interpolation, StyleSheet, StyledComponent, StyledOptions, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
|
|
5
6
|
import { Component, ComputedRef } from "vue";
|
|
6
7
|
type DefaultPropsOf<N extends keyof ThemeComponents> = Partial<NonNullable<NonNullable<ThemeComponents[N]>['$owner']>>;
|
|
@@ -33,5 +34,5 @@ interface ThemeCustomizationOptions {
|
|
|
33
34
|
* The design system's `styled`: the engine's styled plus theme-level component customization
|
|
34
35
|
* (`theme.components[name].styleOverrides` / `.variants`).
|
|
35
36
|
*/
|
|
36
|
-
export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props>[]) => StyledComponent;
|
|
37
|
-
export { type ComponentConfig, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
|
|
37
|
+
export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props, StyleTheme>[]) => StyledComponent;
|
|
38
|
+
export { type ComponentConfig, Direction, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type StyleTheme, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider, ThemeProviderProps } from "./ThemeProvider.mjs";
|
|
2
2
|
import { useTheme } from "./useTheme.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { et as SlotOverride, f as ComponentConfig, g as ThemeComponents, m as StyleTheme, nt as StyleOverride, tt as SlotProps } from "./Button.types-CxPFGBO1.mjs";
|
|
4
|
+
import { Direction } from "./Direction.mjs";
|
|
4
5
|
import { Component, ComputedRef } from "vue";
|
|
5
6
|
import { Global, Interpolation, StyleSheet, StyledComponent, StyledOptions, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
|
|
6
7
|
type DefaultPropsOf<N extends keyof ThemeComponents> = Partial<NonNullable<NonNullable<ThemeComponents[N]>['$owner']>>;
|
|
@@ -33,5 +34,5 @@ interface ThemeCustomizationOptions {
|
|
|
33
34
|
* The design system's `styled`: the engine's styled plus theme-level component customization
|
|
34
35
|
* (`theme.components[name].styleOverrides` / `.variants`).
|
|
35
36
|
*/
|
|
36
|
-
export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props>[]) => StyledComponent;
|
|
37
|
-
export { type ComponentConfig, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
|
|
37
|
+
export declare function styled(tag: string | Component, options?: StyledOptions & ThemeCustomizationOptions): <Props extends object = Record<string, unknown>>(...styles: readonly Interpolation<Props, StyleTheme>[]) => StyledComponent;
|
|
38
|
+
export { type ComponentConfig, Direction, Global, type SlotOverride, type SlotProps, type StyleOverride, StyleSheet, type StyleTheme, type ThemeComponents, ThemeProvider, ThemeProviderProps, alpha, css, keyframes, negate, useStyle, useTheme };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as ThemeProvider } from "./ThemeProvider-CareN7BO.mjs";
|
|
2
2
|
import { useTheme } from "./useTheme.mjs";
|
|
3
3
|
import { t as useDefaultProps } from "./useDefaultProps--fOGOSGa.mjs";
|
|
4
|
+
import { Direction } from "./Direction.mjs";
|
|
4
5
|
import { r as styled } from "./styled-Cmxvlft5.mjs";
|
|
5
6
|
import { Global, StyleSheet, alpha, css, keyframes, negate, useStyle } from "@umber-style/vue";
|
|
6
|
-
export { Global, StyleSheet, ThemeProvider, alpha, css, keyframes, negate, styled, useDefaultProps, useStyle, useTheme };
|
|
7
|
+
export { Direction, Global, StyleSheet, ThemeProvider, alpha, css, keyframes, negate, styled, useDefaultProps, useStyle, useTheme };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonVariants, InputVariantKey, OpenScale, Register as Register$1, RegisteredTheme, Theme as Theme$1, ThemeBackground, ThemeColor, ThemeFonts, ThemeRadii, ThemeSize, ThemeSpaceKey, ThemeText, ThemeTransitionEasing, ThemeTypography, ThemeZOrder, TypographyVariant, VariantOf } from "@gild-ui/core/theme";
|
|
2
|
+
import { CSSObject as CSSObject$1, ThemeRefs } from "@umber-style/core";
|
|
2
3
|
import { ButtonHTMLAttributes, CSSProperties, ChangeEventHandler, ElementType, HTMLAttributes, InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from "react";
|
|
3
|
-
import { CSSObject as CSSObject$1 } from "@umber-style/core";
|
|
4
4
|
import { BorderProps, FlexboxProps, LayoutFrameProps, LayoutProps, PositionProps, SpaceProps, SpanProps, TypographyProps as TypographyProps$1 } from "@soroush.tech/styled-system";
|
|
5
5
|
import { SheetStyleProp } from "@umber-style/vue";
|
|
6
6
|
/** The defaults a theme may set for every `Accordion`. */
|
|
@@ -1109,4 +1109,22 @@ interface Theme extends Theme$1 {
|
|
|
1109
1109
|
type GildTheme = Theme;
|
|
1110
1110
|
/** The theme the app registered (see `Register` in the core), or this package's `Theme` when it registered none. */
|
|
1111
1111
|
type AppTheme = RegisteredTheme<Theme>;
|
|
1112
|
-
|
|
1112
|
+
/** The parts of the theme that a style function reads as they are: the same ones `baseTheme` marks with `asIs`. */
|
|
1113
|
+
interface StyleThemeModes {
|
|
1114
|
+
readonly $modes: {
|
|
1115
|
+
readonly defaults: 'asIs';
|
|
1116
|
+
readonly typography: 'asIs';
|
|
1117
|
+
readonly sizes: 'asIs';
|
|
1118
|
+
readonly layout: 'asIs';
|
|
1119
|
+
readonly transitions: 'asIs';
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* The theme a style function is given (`styled`, `StyleSheet.create`, `keyframes`, `Global`): each token
|
|
1124
|
+
* is the CSS variable that holds it, and the parts that are not CSS values (`sizes`, `typography`,
|
|
1125
|
+
* `layout`, `transitions`, `breakpoints`, `components`, `defaults`) are what they are. A function given to
|
|
1126
|
+
* `Global`, `StyleSheet.create` or `keyframes` (the engine's own, with no modes of the theme) is given
|
|
1127
|
+
* `EngineStyleTheme`.
|
|
1128
|
+
*/
|
|
1129
|
+
type StyleTheme = ThemeRefs<AppTheme & StyleThemeModes>;
|
|
1130
|
+
export { GapToken$1 as $, FlexOwnerState as A, ViewOwnerState as B, TextInputVariant as C, ModalScroll as D, ModalProps as E, ViewBackgroundToken as F, ButtonLoadingPosition as G, ViewSlot as H, ViewBorderColorToken as I, ButtonShape as J, ButtonOwnerState as K, ViewBorderRadiusToken as L, FlexSlot as M, FlexThemeConfig as N, ModalSlot as O, GapToken as P, ButtonVariant as Q, ViewBorderWidthToken as R, TextInputThemeConfig as S, ModalOwnerState as T, ViewThemeConfig as U, ViewProps as V, ButtonColor as W, ButtonSlot as X, ButtonSize as Y, ButtonThemeConfig as Z, TextInputOwnerState as _, Theme as a, TextInputSlot as b, TextColorToken as c, TypographyProps as d, SlotOverride as et, TypographySlot as f, TextInputColor as g, TextInputClasses as h, StyleTheme as i, FlexProps as j, ModalThemeConfig as k, TypographyAlign as l, TypographyVariant as m, ComponentConfig as n, StyleOverride as nt, ThemeComponents as o, TypographyThemeConfig as p, ButtonProps as q, GildTheme as r, BackgroundToken as s, AppTheme as t, SlotProps as tt, TypographyOwnerState as u, TextInputProps as v, ModalCloseReason as w, TextInputTextColor as x, TextInputSize as y, ViewColorToken as z };
|
package/dist/useTheme.d.cts
CHANGED
package/dist/useTheme.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gild-ui/vue",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "Gild UI for Vue: the same components, props and themes as @gild-ui/react, as Vue components - ThemeProvider, useTheme, View, Flex, Typography, Button, TextInput and Modal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -49,6 +49,16 @@
|
|
|
49
49
|
"default": "./dist/Button.cjs"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
"./Direction": {
|
|
53
|
+
"import": {
|
|
54
|
+
"types": "./dist/Direction.d.mts",
|
|
55
|
+
"default": "./dist/Direction.mjs"
|
|
56
|
+
},
|
|
57
|
+
"require": {
|
|
58
|
+
"types": "./dist/Direction.d.cts",
|
|
59
|
+
"default": "./dist/Direction.cjs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
52
62
|
"./Flex": {
|
|
53
63
|
"import": {
|
|
54
64
|
"types": "./dist/Flex.d.mts",
|
|
@@ -137,10 +147,11 @@
|
|
|
137
147
|
"dependencies": {
|
|
138
148
|
"@soroush.tech/styled-system": "6.1.0",
|
|
139
149
|
"@types/react": "^19.3.3",
|
|
140
|
-
"@umber-style/cache": "0.
|
|
141
|
-
"@umber-style/core": "0.
|
|
142
|
-
"@umber-style/
|
|
143
|
-
"@
|
|
150
|
+
"@umber-style/cache": "0.10.0",
|
|
151
|
+
"@umber-style/core": "0.10.0",
|
|
152
|
+
"@umber-style/rtl": "0.10.0",
|
|
153
|
+
"@umber-style/vue": "0.10.0",
|
|
154
|
+
"@gild-ui/core": "^0.1.0-alpha.3"
|
|
144
155
|
},
|
|
145
156
|
"peerDependencies": {
|
|
146
157
|
"vue": "^3.5.0"
|
|
@@ -158,7 +169,7 @@
|
|
|
158
169
|
"typescript": "~7.0.2",
|
|
159
170
|
"vitest": "^5.1.2",
|
|
160
171
|
"vue": "^3.5.46",
|
|
161
|
-
"@gild-ui/react": "0.1.0-alpha.
|
|
172
|
+
"@gild-ui/react": "0.1.0-alpha.3",
|
|
162
173
|
"@soroush.tech/eslint-config": "0.0.0"
|
|
163
174
|
},
|
|
164
175
|
"scripts": {
|