da-style 0.0.12 → 0.1.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 +225 -93
- package/dist/da-style.css +2 -0
- package/dist/da-style.js +2 -0
- package/dist/da-style.mjs +704 -0
- package/dist/src/components/Button/DButton.types.d.ts +23 -0
- package/dist/src/components/Button/DButton.vue.d.ts +29 -0
- package/dist/src/components/Button/index.d.ts +4 -0
- package/dist/src/components/Icon/DIcon.types.d.ts +12 -0
- package/dist/src/components/Icon/DIcon.vue.d.ts +8 -0
- package/dist/src/components/Icon/icons.d.ts +2 -0
- package/dist/src/components/Icon/index.d.ts +5 -0
- package/dist/src/components/Input/DInput.types.d.ts +17 -0
- package/dist/src/components/Input/DInput.vue.d.ts +45 -0
- package/dist/src/components/Input/index.d.ts +9 -0
- package/dist/src/components/Loading/DLoading.types.d.ts +14 -0
- package/dist/src/components/Loading/DLoading.vue.d.ts +10 -0
- package/dist/src/components/Loading/index.d.ts +8 -0
- package/dist/src/components/Tag/DTag.types.d.ts +22 -0
- package/dist/src/components/Tag/DTag.vue.d.ts +25 -0
- package/dist/src/components/Tag/index.d.ts +9 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/shared/index.d.ts +3 -0
- package/dist/src/shared/props.d.ts +24 -0
- package/dist/src/shared/types.d.ts +15 -0
- package/dist/src/shared/utils.d.ts +7 -0
- package/dist/src/token/borders.d.ts +41 -0
- package/dist/src/token/colors.d.ts +84 -0
- package/dist/src/token/index.d.ts +20 -0
- package/dist/src/token/inject.d.ts +24 -0
- package/dist/src/token/shadows.d.ts +43 -0
- package/dist/src/token/spacing.d.ts +58 -0
- package/dist/src/token/typography.d.ts +86 -0
- package/package.json +38 -31
- package/lib/index.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Size, Status } from '../../../shared/types';
|
|
2
|
+
export interface DButtonProps {
|
|
3
|
+
/** Button variant type */
|
|
4
|
+
status?: Status;
|
|
5
|
+
/** Button size */
|
|
6
|
+
size?: Size;
|
|
7
|
+
/** Disabled state */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Loading state (shows spinner) */
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
/** Enable neon glow effect */
|
|
12
|
+
glow?: boolean;
|
|
13
|
+
/** Ghost/outlined mode */
|
|
14
|
+
ghost?: boolean;
|
|
15
|
+
/** Full-width button */
|
|
16
|
+
block?: boolean;
|
|
17
|
+
/** Rounded variant */
|
|
18
|
+
round?: boolean;
|
|
19
|
+
/** Circle variant */
|
|
20
|
+
circle?: boolean;
|
|
21
|
+
/** Native button type */
|
|
22
|
+
nativeType?: 'button' | 'submit' | 'reset';
|
|
23
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DButtonProps } from './DButton.types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<DButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
click: (event: MouseEvent) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<DButtonProps> & Readonly<{
|
|
9
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
status: import('../..').Status;
|
|
12
|
+
size: import('../..').Size;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
glow: boolean;
|
|
16
|
+
ghost: boolean;
|
|
17
|
+
block: boolean;
|
|
18
|
+
round: boolean;
|
|
19
|
+
circle: boolean;
|
|
20
|
+
nativeType: "button" | "submit" | "reset";
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Size } from '../../../shared/types';
|
|
2
|
+
export type IconName = 'close' | 'check' | 'chevron-left' | 'chevron-right' | 'chevron-down' | 'chevron-up' | 'loading' | 'search' | 'info' | 'warning' | 'error' | 'success' | 'eye' | 'eye-off';
|
|
3
|
+
export interface DIconProps {
|
|
4
|
+
/** The icon to render */
|
|
5
|
+
name: IconName;
|
|
6
|
+
/** Icon size: 'small' (16) | 'medium' (24) | 'large' (32) or a direct pixel number */
|
|
7
|
+
size?: Size | number;
|
|
8
|
+
/** Stroke color. Defaults to currentColor if omitted */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Enable continuous 360° rotation (for loading icon) */
|
|
11
|
+
spin?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DIconProps } from './DIcon.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<DIconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DIconProps> & Readonly<{}>, {
|
|
3
|
+
size: import('../..').Size | number;
|
|
4
|
+
color: string;
|
|
5
|
+
spin: boolean;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Size } from '../../../shared/types';
|
|
2
|
+
export type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';
|
|
3
|
+
export interface DInputProps {
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
type?: InputType;
|
|
6
|
+
size?: Size;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
/** Focus glow effect */
|
|
12
|
+
glow?: boolean;
|
|
13
|
+
/** Prefix icon slot */
|
|
14
|
+
prefix?: string;
|
|
15
|
+
/** Suffix icon slot */
|
|
16
|
+
suffix?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InputType } from './DInput.types';
|
|
2
|
+
import { Size } from '../../../shared/types';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
type?: InputType;
|
|
6
|
+
size?: Size;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
glow?: boolean;
|
|
12
|
+
prefix?: string;
|
|
13
|
+
suffix?: string;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_ModelProps = {
|
|
16
|
+
modelValue?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
19
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
prefix?: (props: typeof __VLS_1) => any;
|
|
22
|
+
} & {
|
|
23
|
+
suffix?: (props: typeof __VLS_3) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: string) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
size: Size;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
glow: boolean;
|
|
33
|
+
type: InputType;
|
|
34
|
+
readonly: boolean;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
clearable: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as DInput } from './DInput.vue';
|
|
3
|
+
export type { DInputProps } from './DInput.types';
|
|
4
|
+
export type { InputType } from './DInput.types';
|
|
5
|
+
export { DInput };
|
|
6
|
+
declare const _default: {
|
|
7
|
+
install(app: App): void;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Size } from '../../../shared/types';
|
|
2
|
+
export type LoadingType = 'spinner' | 'dots' | 'pulse';
|
|
3
|
+
export interface DLoadingProps {
|
|
4
|
+
/** Loading animation type */
|
|
5
|
+
type?: LoadingType;
|
|
6
|
+
/** Size of the loader */
|
|
7
|
+
size?: Size;
|
|
8
|
+
/** Custom color (defaults to neon multi-color for spinner, cyan for others) */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Loading text */
|
|
11
|
+
text?: string;
|
|
12
|
+
/** Fullscreen overlay mode */
|
|
13
|
+
fullscreen?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DLoadingProps } from './DLoading.types';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<DLoadingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DLoadingProps> & Readonly<{}>, {
|
|
3
|
+
text: string;
|
|
4
|
+
size: import('../..').Size;
|
|
5
|
+
type: import('./DLoading.types').LoadingType;
|
|
6
|
+
color: string;
|
|
7
|
+
fullscreen: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Size, Status } from '../../../shared/types';
|
|
2
|
+
/** Maps a semantic Status to the matching neon CSS variable name */
|
|
3
|
+
export declare const statusToCssVar: Record<Status, string>;
|
|
4
|
+
/** Maps a semantic Status to the matching glow shadow CSS variable name */
|
|
5
|
+
export declare const statusToGlowVar: Record<Status, string>;
|
|
6
|
+
export interface DTagProps {
|
|
7
|
+
/** Semantic color variant */
|
|
8
|
+
status?: Status;
|
|
9
|
+
/** Size preset */
|
|
10
|
+
size?: Size;
|
|
11
|
+
/** Show a close (×) button */
|
|
12
|
+
closable?: boolean;
|
|
13
|
+
/** Transparent background, border only */
|
|
14
|
+
ghost?: boolean;
|
|
15
|
+
/** Neon glow shadow effect */
|
|
16
|
+
glow?: boolean;
|
|
17
|
+
/** Use clipped geometric border (default) */
|
|
18
|
+
round?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DTagEmits {
|
|
21
|
+
(e: 'close'): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DTagProps } from './DTag.types';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<DTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
close: () => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<DTagProps> & Readonly<{
|
|
9
|
+
onClose?: (() => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
status: import('../..').Status;
|
|
12
|
+
size: import('../..').Size;
|
|
13
|
+
glow: boolean;
|
|
14
|
+
ghost: boolean;
|
|
15
|
+
round: boolean;
|
|
16
|
+
closable: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as DTag } from './DTag.vue';
|
|
3
|
+
export type { DTagProps, DTagEmits } from './DTag.types';
|
|
4
|
+
export { statusToCssVar, statusToGlowVar } from './DTag.types';
|
|
5
|
+
export { DTag };
|
|
6
|
+
declare const _default: {
|
|
7
|
+
install: (app: App) => void;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DButton, DInput, DTag, DLoading, DIcon, } from './components';
|
|
2
|
+
export { bgPrimary, bgSecondary, bgElevated, bgOverlay, textPrimary, textSecondary, textDisabled, textInverse, cyan, magenta, purple, blue, yellow, green, orange, red, colorPrimary, colorSuccess, colorWarning, colorDanger, colorInfo, colors, colorCssVars, space1, space2, space3, space4, space5, space6, space8, space10, space12, containerSm, containerMd, containerLg, containerXl, spacing, spacingCssVars, fontMono, fontSans, fontHeading, fontBody, textXs, textSm, textBase, textLg, textXl, text2xl, text3xl, weightRegular, weightMedium, weightSemibold, weightBold, leadingTight, leadingNormal, leadingRelaxed, trackingTight, trackingNormal, trackingWide, typography, typographyCssVars, radiusNone, radiusSm, radiusMd, radiusLg, radiusFull, borderWidth, borderWidthMd, borderWidthLg, borders, borderCssVars, shadowSm, shadowMd, shadowLg, shadowGlowCyan, shadowGlowMagenta, shadowGlowPurple, shadowGlowGreen, shadowGlowYellow, shadowGlowRed, shadows, shadowCssVars, injectTokens, resetInjection, } from './token';
|
|
3
|
+
export type { ColorTokens, SpacingTokens, TypographyTokens, BorderTokens, ShadowTokens, } from './token';
|
|
4
|
+
export * from './shared';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Prop } from 'vue';
|
|
2
|
+
import { Size, Status } from './types';
|
|
3
|
+
export declare const useSizeProp: (defaultValue?: Size) => {
|
|
4
|
+
readonly type: Prop<Size>;
|
|
5
|
+
readonly default: Size;
|
|
6
|
+
readonly validator: (v: string) => boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const useStatusProp: (defaultValue?: Status) => {
|
|
9
|
+
readonly type: Prop<Status>;
|
|
10
|
+
readonly default: Status;
|
|
11
|
+
readonly validator: (v: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const useDisabledProp: () => {
|
|
14
|
+
readonly type: BooleanConstructor;
|
|
15
|
+
readonly default: false;
|
|
16
|
+
};
|
|
17
|
+
export declare const useLoadingProp: () => {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly default: false;
|
|
20
|
+
};
|
|
21
|
+
export declare const useGlowProp: () => {
|
|
22
|
+
readonly type: BooleanConstructor;
|
|
23
|
+
readonly default: false;
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type Size = 'small' | 'medium' | 'large';
|
|
2
|
+
export type Status = 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
|
+
export type ButtonNativeType = 'button' | 'submit' | 'reset';
|
|
4
|
+
export type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';
|
|
5
|
+
export type LoadingType = 'spinner' | 'dots' | 'pulse';
|
|
6
|
+
export type Placement = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
export interface ComponentSize {
|
|
8
|
+
size?: Size;
|
|
9
|
+
}
|
|
10
|
+
export interface ComponentDisabled {
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ComponentStatus {
|
|
14
|
+
status?: Status;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const isString: (val: unknown) => val is string;
|
|
2
|
+
export declare const isNumber: (val: unknown) => val is number;
|
|
3
|
+
export declare const isBoolean: (val: unknown) => val is boolean;
|
|
4
|
+
export declare const isUndefined: (val: unknown) => val is undefined;
|
|
5
|
+
export declare const isFunction: (val: unknown) => val is Function;
|
|
6
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
7
|
+
export declare const classNames: (...args: (string | Record<string, boolean | undefined | null> | false | undefined | null)[]) => string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* da-style Border System
|
|
3
|
+
*
|
|
4
|
+
* Consistent border-radius scale + border-width tokens.
|
|
5
|
+
* Neon-style components will often use `--d-radius-sm` for
|
|
6
|
+
* a sharp, technical feel, or `--d-radius-lg` for cards.
|
|
7
|
+
*/
|
|
8
|
+
export declare const radiusNone = "0";
|
|
9
|
+
export declare const radiusSm = "2px";
|
|
10
|
+
export declare const radiusMd = "4px";
|
|
11
|
+
export declare const radiusLg = "8px";
|
|
12
|
+
export declare const radiusFull = "9999px";
|
|
13
|
+
export declare const borderWidth = "1px";
|
|
14
|
+
export declare const borderWidthMd = "2px";
|
|
15
|
+
export declare const borderWidthLg = "4px";
|
|
16
|
+
export declare const cssVars: {
|
|
17
|
+
readonly radius: {
|
|
18
|
+
readonly none: "--d-radius-none";
|
|
19
|
+
readonly sm: "--d-radius-sm";
|
|
20
|
+
readonly md: "--d-radius-md";
|
|
21
|
+
readonly lg: "--d-radius-lg";
|
|
22
|
+
readonly full: "--d-radius-full";
|
|
23
|
+
};
|
|
24
|
+
readonly width: {
|
|
25
|
+
readonly default: "--d-border-width";
|
|
26
|
+
readonly md: "--d-border-width-md";
|
|
27
|
+
readonly lg: "--d-border-width-lg";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export interface BorderTokens {
|
|
31
|
+
radiusNone: string;
|
|
32
|
+
radiusSm: string;
|
|
33
|
+
radiusMd: string;
|
|
34
|
+
radiusLg: string;
|
|
35
|
+
radiusFull: string;
|
|
36
|
+
borderWidth: string;
|
|
37
|
+
borderWidthMd: string;
|
|
38
|
+
borderWidthLg: string;
|
|
39
|
+
}
|
|
40
|
+
/** All border tokens as a flat object */
|
|
41
|
+
export declare const borders: BorderTokens;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* da-style Cyberpunk Color Palette
|
|
3
|
+
*
|
|
4
|
+
* Neon-drenched palette: deep black foundation with
|
|
5
|
+
* cyan (#00f0ff) and magenta/pink (#ff00c8) as primary accents,
|
|
6
|
+
* dark purple (#7000ff) and electric blue as auxiliary colors.
|
|
7
|
+
*/
|
|
8
|
+
export declare const bgPrimary = "#0a0a0f";
|
|
9
|
+
export declare const bgSecondary = "#12121a";
|
|
10
|
+
export declare const bgElevated = "#1a1a2e";
|
|
11
|
+
export declare const bgOverlay = "rgba(10,10,15,0.9)";
|
|
12
|
+
export declare const textPrimary = "#e0e0ff";
|
|
13
|
+
export declare const textSecondary = "#8888aa";
|
|
14
|
+
export declare const textDisabled = "#444466";
|
|
15
|
+
export declare const textInverse = "#0a0a0f";
|
|
16
|
+
export declare const cyan = "#00f0ff";
|
|
17
|
+
export declare const magenta = "#ff00c8";
|
|
18
|
+
export declare const purple = "#7000ff";
|
|
19
|
+
export declare const blue = "#0066ff";
|
|
20
|
+
export declare const yellow = "#ffea00";
|
|
21
|
+
export declare const green = "#00ff41";
|
|
22
|
+
export declare const orange = "#ff6600";
|
|
23
|
+
export declare const red = "#ff003c";
|
|
24
|
+
export declare const colorPrimary = "var(--d-cyan)";
|
|
25
|
+
export declare const colorSuccess = "var(--d-green)";
|
|
26
|
+
export declare const colorWarning = "var(--d-yellow)";
|
|
27
|
+
export declare const colorDanger = "var(--d-red)";
|
|
28
|
+
export declare const colorInfo = "var(--d-purple)";
|
|
29
|
+
export declare const cssVars: {
|
|
30
|
+
readonly bg: {
|
|
31
|
+
readonly primary: "--d-bg-primary";
|
|
32
|
+
readonly secondary: "--d-bg-secondary";
|
|
33
|
+
readonly elevated: "--d-bg-elevated";
|
|
34
|
+
readonly overlay: "--d-bg-overlay";
|
|
35
|
+
};
|
|
36
|
+
readonly text: {
|
|
37
|
+
readonly primary: "--d-text-primary";
|
|
38
|
+
readonly secondary: "--d-text-secondary";
|
|
39
|
+
readonly disabled: "--d-text-disabled";
|
|
40
|
+
readonly inverse: "--d-text-inverse";
|
|
41
|
+
};
|
|
42
|
+
readonly accent: {
|
|
43
|
+
readonly cyan: "--d-cyan";
|
|
44
|
+
readonly magenta: "--d-magenta";
|
|
45
|
+
readonly purple: "--d-purple";
|
|
46
|
+
readonly blue: "--d-blue";
|
|
47
|
+
readonly yellow: "--d-yellow";
|
|
48
|
+
readonly green: "--d-green";
|
|
49
|
+
readonly orange: "--d-orange";
|
|
50
|
+
readonly red: "--d-red";
|
|
51
|
+
};
|
|
52
|
+
readonly semantic: {
|
|
53
|
+
readonly primary: "--d-color-primary";
|
|
54
|
+
readonly success: "--d-color-success";
|
|
55
|
+
readonly warning: "--d-color-warning";
|
|
56
|
+
readonly danger: "--d-color-danger";
|
|
57
|
+
readonly info: "--d-color-info";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export interface ColorTokens {
|
|
61
|
+
bgPrimary: string;
|
|
62
|
+
bgSecondary: string;
|
|
63
|
+
bgElevated: string;
|
|
64
|
+
bgOverlay: string;
|
|
65
|
+
textPrimary: string;
|
|
66
|
+
textSecondary: string;
|
|
67
|
+
textDisabled: string;
|
|
68
|
+
textInverse: string;
|
|
69
|
+
cyan: string;
|
|
70
|
+
magenta: string;
|
|
71
|
+
purple: string;
|
|
72
|
+
blue: string;
|
|
73
|
+
yellow: string;
|
|
74
|
+
green: string;
|
|
75
|
+
orange: string;
|
|
76
|
+
red: string;
|
|
77
|
+
colorPrimary: string;
|
|
78
|
+
colorSuccess: string;
|
|
79
|
+
colorWarning: string;
|
|
80
|
+
colorDanger: string;
|
|
81
|
+
colorInfo: string;
|
|
82
|
+
}
|
|
83
|
+
/** All color tokens as a flat object (raw values, not CSS vars) */
|
|
84
|
+
export declare const colors: ColorTokens;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ColorTokens } from './colors';
|
|
2
|
+
import { SpacingTokens } from './spacing';
|
|
3
|
+
import { TypographyTokens } from './typography';
|
|
4
|
+
import { BorderTokens } from './borders';
|
|
5
|
+
import { ShadowTokens } from './shadows';
|
|
6
|
+
export { bgPrimary, bgSecondary, bgElevated, bgOverlay, textPrimary, textSecondary, textDisabled, textInverse, cyan, magenta, purple, blue, yellow, green, orange, red, colorPrimary, colorSuccess, colorWarning, colorDanger, colorInfo, colors, cssVars as colorCssVars, } from './colors';
|
|
7
|
+
export type { ColorTokens } from './colors';
|
|
8
|
+
export { space1, space2, space3, space4, space5, space6, space8, space10, space12, containerSm, containerMd, containerLg, containerXl, spacing, cssVars as spacingCssVars, } from './spacing';
|
|
9
|
+
export type { SpacingTokens } from './spacing';
|
|
10
|
+
export { fontMono, fontSans, fontHeading, fontBody, textXs, textSm, textBase, textLg, textXl, text2xl, text3xl, weightRegular, weightMedium, weightSemibold, weightBold, leadingTight, leadingNormal, leadingRelaxed, trackingTight, trackingNormal, trackingWide, typography, cssVars as typographyCssVars, } from './typography';
|
|
11
|
+
export type { TypographyTokens } from './typography';
|
|
12
|
+
export { radiusNone, radiusSm, radiusMd, radiusLg, radiusFull, borderWidth, borderWidthMd, borderWidthLg, borders, cssVars as borderCssVars, } from './borders';
|
|
13
|
+
export type { BorderTokens } from './borders';
|
|
14
|
+
export { shadowSm, shadowMd, shadowLg, shadowGlowCyan, shadowGlowMagenta, shadowGlowPurple, shadowGlowGreen, shadowGlowYellow, shadowGlowRed, shadows, cssVars as shadowCssVars, } from './shadows';
|
|
15
|
+
export type { ShadowTokens } from './shadows';
|
|
16
|
+
export { injectTokens, resetInjection, buildTokenMap, } from './inject';
|
|
17
|
+
export type { TokenMap } from './inject';
|
|
18
|
+
/** Union type of every token category in the design system */
|
|
19
|
+
export interface DesignTokens extends ColorTokens, SpacingTokens, TypographyTokens, BorderTokens, ShadowTokens {
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* da-style Token Injection
|
|
3
|
+
*
|
|
4
|
+
* `injectTokens()` — A runtime function that programmatically
|
|
5
|
+
* injects all design token CSS custom properties into `:root`.
|
|
6
|
+
*
|
|
7
|
+
* Use this when you want to avoid a separate CSS import and
|
|
8
|
+
* prefer JS-driven token application (e.g. in a Vue plugin).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { injectTokens } from 'da-style/token'
|
|
12
|
+
* injectTokens()
|
|
13
|
+
*/
|
|
14
|
+
export interface TokenMap {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build a flat map of all design tokens (name → value).
|
|
19
|
+
* Each key is the CSS variable name WITHOUT the leading `--d-`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildTokenMap(): TokenMap;
|
|
22
|
+
export declare function injectTokens(): void;
|
|
23
|
+
/** Reset the injection guard (for testing / HMR). */
|
|
24
|
+
export declare function resetInjection(): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* da-style Shadows & Glow Effects
|
|
3
|
+
*
|
|
4
|
+
* Multi-layer neon glow shadows. Each glow uses 3-4 layers
|
|
5
|
+
* with decreasing opacity for a realistic luminous halo.
|
|
6
|
+
*/
|
|
7
|
+
export declare const shadowSm = "0 1px 2px rgba(0,0,0,0.5)";
|
|
8
|
+
export declare const shadowMd = "0 4px 8px rgba(0,0,0,0.6)";
|
|
9
|
+
export declare const shadowLg = "0 8px 24px rgba(0,0,0,0.7)";
|
|
10
|
+
export declare const shadowGlowCyan = "0 0 4px rgba(0,240,255,0.6), 0 0 12px rgba(0,240,255,0.4), 0 0 24px rgba(0,240,255,0.2), 0 0 48px rgba(0,240,255,0.1)";
|
|
11
|
+
export declare const shadowGlowMagenta = "0 0 4px rgba(255,0,200,0.6), 0 0 12px rgba(255,0,200,0.4), 0 0 24px rgba(255,0,200,0.2), 0 0 48px rgba(255,0,200,0.1)";
|
|
12
|
+
export declare const shadowGlowPurple = "0 0 4px rgba(112,0,255,0.6), 0 0 12px rgba(112,0,255,0.4), 0 0 24px rgba(112,0,255,0.2)";
|
|
13
|
+
export declare const shadowGlowGreen = "0 0 4px rgba(0,255,65,0.6), 0 0 12px rgba(0,255,65,0.4), 0 0 24px rgba(0,255,65,0.2)";
|
|
14
|
+
export declare const shadowGlowYellow = "0 0 4px rgba(255,234,0,0.6), 0 0 12px rgba(255,234,0,0.4), 0 0 24px rgba(255,234,0,0.2)";
|
|
15
|
+
export declare const shadowGlowRed = "0 0 4px rgba(255,0,60,0.6), 0 0 12px rgba(255,0,60,0.4), 0 0 24px rgba(255,0,60,0.2)";
|
|
16
|
+
export declare const cssVars: {
|
|
17
|
+
readonly shadow: {
|
|
18
|
+
readonly sm: "--d-shadow-sm";
|
|
19
|
+
readonly md: "--d-shadow-md";
|
|
20
|
+
readonly lg: "--d-shadow-lg";
|
|
21
|
+
};
|
|
22
|
+
readonly glow: {
|
|
23
|
+
readonly cyan: "--d-glow-cyan";
|
|
24
|
+
readonly magenta: "--d-glow-magenta";
|
|
25
|
+
readonly purple: "--d-glow-purple";
|
|
26
|
+
readonly green: "--d-glow-green";
|
|
27
|
+
readonly yellow: "--d-glow-yellow";
|
|
28
|
+
readonly red: "--d-glow-red";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export interface ShadowTokens {
|
|
32
|
+
shadowSm: string;
|
|
33
|
+
shadowMd: string;
|
|
34
|
+
shadowLg: string;
|
|
35
|
+
shadowGlowCyan: string;
|
|
36
|
+
shadowGlowMagenta: string;
|
|
37
|
+
shadowGlowPurple: string;
|
|
38
|
+
shadowGlowGreen: string;
|
|
39
|
+
shadowGlowYellow: string;
|
|
40
|
+
shadowGlowRed: string;
|
|
41
|
+
}
|
|
42
|
+
/** All shadow tokens as a flat object */
|
|
43
|
+
export declare const shadows: ShadowTokens;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* da-style Spacing System
|
|
3
|
+
*
|
|
4
|
+
* 4px-base spacing scale. Every UI gap, padding, and margin
|
|
5
|
+
* should reference these tokens — never raw px values.
|
|
6
|
+
*
|
|
7
|
+
* Scale: 1, 2, 3, 4, 5, 6, 8, 10, 12
|
|
8
|
+
* (gaps intentionally skipped to prevent arbitrary drift)
|
|
9
|
+
*/
|
|
10
|
+
export declare const space1 = "4px";
|
|
11
|
+
export declare const space2 = "8px";
|
|
12
|
+
export declare const space3 = "12px";
|
|
13
|
+
export declare const space4 = "16px";
|
|
14
|
+
export declare const space5 = "20px";
|
|
15
|
+
export declare const space6 = "24px";
|
|
16
|
+
export declare const space8 = "32px";
|
|
17
|
+
export declare const space10 = "40px";
|
|
18
|
+
export declare const space12 = "48px";
|
|
19
|
+
export declare const containerSm = "640px";
|
|
20
|
+
export declare const containerMd = "768px";
|
|
21
|
+
export declare const containerLg = "1024px";
|
|
22
|
+
export declare const containerXl = "1280px";
|
|
23
|
+
export declare const cssVars: {
|
|
24
|
+
readonly space: {
|
|
25
|
+
readonly 1: "--d-spacing-1";
|
|
26
|
+
readonly 2: "--d-spacing-2";
|
|
27
|
+
readonly 3: "--d-spacing-3";
|
|
28
|
+
readonly 4: "--d-spacing-4";
|
|
29
|
+
readonly 5: "--d-spacing-5";
|
|
30
|
+
readonly 6: "--d-spacing-6";
|
|
31
|
+
readonly 8: "--d-spacing-8";
|
|
32
|
+
readonly 10: "--d-spacing-10";
|
|
33
|
+
readonly 12: "--d-spacing-12";
|
|
34
|
+
};
|
|
35
|
+
readonly container: {
|
|
36
|
+
readonly sm: "--d-container-sm";
|
|
37
|
+
readonly md: "--d-container-md";
|
|
38
|
+
readonly lg: "--d-container-lg";
|
|
39
|
+
readonly xl: "--d-container-xl";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export interface SpacingTokens {
|
|
43
|
+
space1: string;
|
|
44
|
+
space2: string;
|
|
45
|
+
space3: string;
|
|
46
|
+
space4: string;
|
|
47
|
+
space5: string;
|
|
48
|
+
space6: string;
|
|
49
|
+
space8: string;
|
|
50
|
+
space10: string;
|
|
51
|
+
space12: string;
|
|
52
|
+
containerSm: string;
|
|
53
|
+
containerMd: string;
|
|
54
|
+
containerLg: string;
|
|
55
|
+
containerXl: string;
|
|
56
|
+
}
|
|
57
|
+
/** All spacing tokens as a flat object */
|
|
58
|
+
export declare const spacing: SpacingTokens;
|