@skewedaspect/sleekspace-ui 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Theme/types.d.ts +18 -3
- package/dist/sleekspace-ui.css +50 -40
- package/docs/guides/design-tokens/advanced.md +6 -1
- package/docs/guides/theming.md +11 -1
- package/package.json +1 -1
- package/src/components/Theme/types.ts +20 -3
- package/src/styles/components/_button.scss +45 -9
- package/src/styles/themes/README.md +6 -2
- package/web-types.json +1 -1
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry of available theme names. Augment this interface to register custom themes:
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* declare module '@skewedaspect/sleekspace-ui' {
|
|
6
|
+
* interface SkThemeNameMap {
|
|
7
|
+
* ocean : true;
|
|
8
|
+
* midnight : true;
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export interface SkThemeNameMap {
|
|
14
|
+
greyscale: true;
|
|
15
|
+
colorful: true;
|
|
16
|
+
}
|
|
1
17
|
/**
|
|
2
18
|
* Available theme names that control the overall color scheme of the application.
|
|
3
|
-
*
|
|
4
|
-
* - 'colorful': A vibrant theme with saturated colors and stronger contrasts
|
|
19
|
+
* Derived from {@link SkThemeNameMap} — augment that interface to add custom themes.
|
|
5
20
|
*/
|
|
6
|
-
export type SkThemeName =
|
|
21
|
+
export type SkThemeName = keyof SkThemeNameMap;
|
|
7
22
|
export interface SkThemeComponentProps {
|
|
8
23
|
/**
|
|
9
24
|
* The active theme name that controls the color scheme for all child components.
|
package/dist/sleekspace-ui.css
CHANGED
|
@@ -2096,8 +2096,8 @@
|
|
|
2096
2096
|
--sk-button-disabled-opacity: var(--sk-opacity-disabled);
|
|
2097
2097
|
--sk-button-loading-opacity: var(--sk-opacity-loading);
|
|
2098
2098
|
--sk-button-outline-bg: rgba(5, 5, 5, 0.15);
|
|
2099
|
-
--sk-button-subtle-opacity:
|
|
2100
|
-
--sk-button-subtle-opacity-hover:
|
|
2099
|
+
--sk-button-subtle-opacity: 0.35;
|
|
2100
|
+
--sk-button-subtle-opacity-hover: 0.65;
|
|
2101
2101
|
--sk-button-subtle-border-opacity: var(--sk-opacity-subtle-border);
|
|
2102
2102
|
--sk-button-subtle-border-opacity-hover: var(--sk-opacity-subtle-border-hover);
|
|
2103
2103
|
--sk-button-glow-size: 8px;
|
|
@@ -3051,9 +3051,8 @@
|
|
|
3051
3051
|
color: var(--sk-button-color-base);
|
|
3052
3052
|
}
|
|
3053
3053
|
.sk-button.sk-subtle.sk-neutral:hover:not(:disabled) {
|
|
3054
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3055
3054
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3056
|
-
background-color:
|
|
3055
|
+
background-color: var(--sk-button-bg-hover);
|
|
3057
3056
|
}
|
|
3058
3057
|
.sk-button.sk-subtle.sk-neutral:active:not(:disabled) {
|
|
3059
3058
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3070,9 +3069,8 @@
|
|
|
3070
3069
|
color: var(--sk-button-color-base);
|
|
3071
3070
|
}
|
|
3072
3071
|
.sk-button.sk-subtle.sk-primary:hover:not(:disabled) {
|
|
3073
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3074
3072
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3075
|
-
background-color:
|
|
3073
|
+
background-color: var(--sk-button-bg-hover);
|
|
3076
3074
|
}
|
|
3077
3075
|
.sk-button.sk-subtle.sk-primary:active:not(:disabled) {
|
|
3078
3076
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3089,9 +3087,8 @@
|
|
|
3089
3087
|
color: var(--sk-button-color-base);
|
|
3090
3088
|
}
|
|
3091
3089
|
.sk-button.sk-subtle.sk-accent:hover:not(:disabled) {
|
|
3092
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3093
3090
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3094
|
-
background-color:
|
|
3091
|
+
background-color: var(--sk-button-bg-hover);
|
|
3095
3092
|
}
|
|
3096
3093
|
.sk-button.sk-subtle.sk-accent:active:not(:disabled) {
|
|
3097
3094
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3108,9 +3105,8 @@
|
|
|
3108
3105
|
color: var(--sk-button-color-base);
|
|
3109
3106
|
}
|
|
3110
3107
|
.sk-button.sk-subtle.sk-info:hover:not(:disabled) {
|
|
3111
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3112
3108
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3113
|
-
background-color:
|
|
3109
|
+
background-color: var(--sk-button-bg-hover);
|
|
3114
3110
|
}
|
|
3115
3111
|
.sk-button.sk-subtle.sk-info:active:not(:disabled) {
|
|
3116
3112
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3127,9 +3123,8 @@
|
|
|
3127
3123
|
color: var(--sk-button-color-base);
|
|
3128
3124
|
}
|
|
3129
3125
|
.sk-button.sk-subtle.sk-success:hover:not(:disabled) {
|
|
3130
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3131
3126
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3132
|
-
background-color:
|
|
3127
|
+
background-color: var(--sk-button-bg-hover);
|
|
3133
3128
|
}
|
|
3134
3129
|
.sk-button.sk-subtle.sk-success:active:not(:disabled) {
|
|
3135
3130
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3146,9 +3141,8 @@
|
|
|
3146
3141
|
color: var(--sk-button-color-base);
|
|
3147
3142
|
}
|
|
3148
3143
|
.sk-button.sk-subtle.sk-warning:hover:not(:disabled) {
|
|
3149
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3150
3144
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3151
|
-
background-color:
|
|
3145
|
+
background-color: var(--sk-button-bg-hover);
|
|
3152
3146
|
}
|
|
3153
3147
|
.sk-button.sk-subtle.sk-warning:active:not(:disabled) {
|
|
3154
3148
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3165,9 +3159,8 @@
|
|
|
3165
3159
|
color: var(--sk-button-color-base);
|
|
3166
3160
|
}
|
|
3167
3161
|
.sk-button.sk-subtle.sk-danger:hover:not(:disabled) {
|
|
3168
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3169
3162
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3170
|
-
background-color:
|
|
3163
|
+
background-color: var(--sk-button-bg-hover);
|
|
3171
3164
|
}
|
|
3172
3165
|
.sk-button.sk-subtle.sk-danger:active:not(:disabled) {
|
|
3173
3166
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3184,9 +3177,8 @@
|
|
|
3184
3177
|
color: var(--sk-button-color-base);
|
|
3185
3178
|
}
|
|
3186
3179
|
.sk-button.sk-subtle.sk-boulder:hover:not(:disabled) {
|
|
3187
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3188
3180
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3189
|
-
background-color:
|
|
3181
|
+
background-color: var(--sk-button-bg-hover);
|
|
3190
3182
|
}
|
|
3191
3183
|
.sk-button.sk-subtle.sk-boulder:active:not(:disabled) {
|
|
3192
3184
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3203,9 +3195,8 @@
|
|
|
3203
3195
|
color: var(--sk-button-color-base);
|
|
3204
3196
|
}
|
|
3205
3197
|
.sk-button.sk-subtle.sk-neon-blue:hover:not(:disabled) {
|
|
3206
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3207
3198
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3208
|
-
background-color:
|
|
3199
|
+
background-color: var(--sk-button-bg-hover);
|
|
3209
3200
|
}
|
|
3210
3201
|
.sk-button.sk-subtle.sk-neon-blue:active:not(:disabled) {
|
|
3211
3202
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3222,9 +3213,8 @@
|
|
|
3222
3213
|
color: var(--sk-button-color-base);
|
|
3223
3214
|
}
|
|
3224
3215
|
.sk-button.sk-subtle.sk-light-blue:hover:not(:disabled) {
|
|
3225
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3226
3216
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3227
|
-
background-color:
|
|
3217
|
+
background-color: var(--sk-button-bg-hover);
|
|
3228
3218
|
}
|
|
3229
3219
|
.sk-button.sk-subtle.sk-light-blue:active:not(:disabled) {
|
|
3230
3220
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3241,9 +3231,8 @@
|
|
|
3241
3231
|
color: var(--sk-button-color-base);
|
|
3242
3232
|
}
|
|
3243
3233
|
.sk-button.sk-subtle.sk-neon-orange:hover:not(:disabled) {
|
|
3244
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3245
3234
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3246
|
-
background-color:
|
|
3235
|
+
background-color: var(--sk-button-bg-hover);
|
|
3247
3236
|
}
|
|
3248
3237
|
.sk-button.sk-subtle.sk-neon-orange:active:not(:disabled) {
|
|
3249
3238
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3260,9 +3249,8 @@
|
|
|
3260
3249
|
color: var(--sk-button-color-base);
|
|
3261
3250
|
}
|
|
3262
3251
|
.sk-button.sk-subtle.sk-neon-purple:hover:not(:disabled) {
|
|
3263
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3264
3252
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3265
|
-
background-color:
|
|
3253
|
+
background-color: var(--sk-button-bg-hover);
|
|
3266
3254
|
}
|
|
3267
3255
|
.sk-button.sk-subtle.sk-neon-purple:active:not(:disabled) {
|
|
3268
3256
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3279,9 +3267,8 @@
|
|
|
3279
3267
|
color: var(--sk-button-color-base);
|
|
3280
3268
|
}
|
|
3281
3269
|
.sk-button.sk-subtle.sk-neon-green:hover:not(:disabled) {
|
|
3282
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3283
3270
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3284
|
-
background-color:
|
|
3271
|
+
background-color: var(--sk-button-bg-hover);
|
|
3285
3272
|
}
|
|
3286
3273
|
.sk-button.sk-subtle.sk-neon-green:active:not(:disabled) {
|
|
3287
3274
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3298,9 +3285,8 @@
|
|
|
3298
3285
|
color: var(--sk-button-color-base);
|
|
3299
3286
|
}
|
|
3300
3287
|
.sk-button.sk-subtle.sk-neon-mint:hover:not(:disabled) {
|
|
3301
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3302
3288
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3303
|
-
background-color:
|
|
3289
|
+
background-color: var(--sk-button-bg-hover);
|
|
3304
3290
|
}
|
|
3305
3291
|
.sk-button.sk-subtle.sk-neon-mint:active:not(:disabled) {
|
|
3306
3292
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3317,9 +3303,8 @@
|
|
|
3317
3303
|
color: var(--sk-button-color-base);
|
|
3318
3304
|
}
|
|
3319
3305
|
.sk-button.sk-subtle.sk-neon-pink:hover:not(:disabled) {
|
|
3320
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3321
3306
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3322
|
-
background-color:
|
|
3307
|
+
background-color: var(--sk-button-bg-hover);
|
|
3323
3308
|
}
|
|
3324
3309
|
.sk-button.sk-subtle.sk-neon-pink:active:not(:disabled) {
|
|
3325
3310
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3336,9 +3321,8 @@
|
|
|
3336
3321
|
color: var(--sk-button-color-base);
|
|
3337
3322
|
}
|
|
3338
3323
|
.sk-button.sk-subtle.sk-yellow:hover:not(:disabled) {
|
|
3339
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3340
3324
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3341
|
-
background-color:
|
|
3325
|
+
background-color: var(--sk-button-bg-hover);
|
|
3342
3326
|
}
|
|
3343
3327
|
.sk-button.sk-subtle.sk-yellow:active:not(:disabled) {
|
|
3344
3328
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3355,9 +3339,8 @@
|
|
|
3355
3339
|
color: var(--sk-button-color-base);
|
|
3356
3340
|
}
|
|
3357
3341
|
.sk-button.sk-subtle.sk-red:hover:not(:disabled) {
|
|
3358
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
3359
3342
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
3360
|
-
background-color:
|
|
3343
|
+
background-color: var(--sk-button-bg-hover);
|
|
3361
3344
|
}
|
|
3362
3345
|
.sk-button.sk-subtle.sk-red:active:not(:disabled) {
|
|
3363
3346
|
--sk-button-border-color: var(--sk-button-border-base);
|
|
@@ -3365,6 +3348,9 @@
|
|
|
3365
3348
|
background-color: var(--sk-button-bg);
|
|
3366
3349
|
color: var(--sk-button-text);
|
|
3367
3350
|
}
|
|
3351
|
+
.sk-button.sk-subtle:disabled, .sk-button.sk-subtle.sk-loading {
|
|
3352
|
+
background-color: oklch(from var(--sk-button-bg) l c h/0.45);
|
|
3353
|
+
}
|
|
3368
3354
|
.sk-button.sk-subtle.sk-neutral {
|
|
3369
3355
|
--sk-button-border-color: oklch(
|
|
3370
3356
|
from color-mix(in oklch, var(--sk-button-border-base), white 50%)
|
|
@@ -4081,14 +4067,38 @@
|
|
|
4081
4067
|
.sk-button.sk-loading .sk-button-content {
|
|
4082
4068
|
opacity: var(--sk-button-loading-opacity);
|
|
4083
4069
|
}
|
|
4084
|
-
.sk-button.sk-pressed.sk-outline, .sk-button.sk-pressed.sk-ghost {
|
|
4085
|
-
background-color: oklch(from var(--sk-button-bg) l c h/var(--sk-button-subtle-opacity));
|
|
4086
|
-
}
|
|
4087
4070
|
.sk-button.sk-pressed.sk-solid {
|
|
4088
|
-
|
|
4071
|
+
--sk-button-border-color: var(--sk-button-border-hover);
|
|
4072
|
+
background-color: var(--sk-button-bg-hover);
|
|
4073
|
+
color: var(--sk-button-text);
|
|
4074
|
+
}
|
|
4075
|
+
.sk-button.sk-pressed.sk-solid:hover:not(:disabled) {
|
|
4076
|
+
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
4077
|
+
background-color: color-mix(in oklch, var(--sk-button-bg) 70%, white 30%);
|
|
4078
|
+
}
|
|
4079
|
+
.sk-button.sk-pressed.sk-outline {
|
|
4080
|
+
--sk-button-border-color: var(--sk-button-border-hover);
|
|
4081
|
+
background-color: var(--sk-button-bg);
|
|
4082
|
+
color: var(--sk-button-text);
|
|
4089
4083
|
}
|
|
4090
4084
|
.sk-button.sk-pressed.sk-subtle {
|
|
4085
|
+
--sk-button-border-color: transparent;
|
|
4091
4086
|
background-color: var(--sk-button-bg);
|
|
4087
|
+
color: var(--sk-button-text);
|
|
4088
|
+
}
|
|
4089
|
+
.sk-button.sk-pressed.sk-subtle:hover:not(:disabled) {
|
|
4090
|
+
--sk-button-border-color: transparent;
|
|
4091
|
+
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
4092
|
+
background-color: var(--sk-button-bg-hover);
|
|
4093
|
+
}
|
|
4094
|
+
.sk-button.sk-pressed.sk-ghost {
|
|
4095
|
+
--sk-button-border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
4096
|
+
border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
4097
|
+
background-color: var(--sk-button-outline-bg);
|
|
4098
|
+
color: var(--sk-button-text);
|
|
4099
|
+
}
|
|
4100
|
+
.sk-button.sk-pressed.sk-link {
|
|
4101
|
+
color: var(--sk-button-text);
|
|
4092
4102
|
}
|
|
4093
4103
|
.sk-button .sk-button-loader {
|
|
4094
4104
|
position: absolute;
|
|
@@ -31,7 +31,12 @@ Add new color primitives in `_foundation-colors.scss`:
|
|
|
31
31
|
1. Create `src/styles/themes/_mytheme.scss`
|
|
32
32
|
2. Define all 7 semantic kinds with the `[data-scheme="mytheme"]` selector
|
|
33
33
|
3. Import in `themes/index.scss`: `@forward 'mytheme';`
|
|
34
|
-
4.
|
|
34
|
+
4. Register the TypeScript type via module augmentation:
|
|
35
|
+
```ts
|
|
36
|
+
declare module '@skewedaspect/sleekspace-ui' {
|
|
37
|
+
interface SkThemeNameMap { mytheme : true; }
|
|
38
|
+
}
|
|
39
|
+
```
|
|
35
40
|
5. Use: `<SkTheme theme="mytheme">`
|
|
36
41
|
|
|
37
42
|
### Component Token Overrides
|
package/docs/guides/theming.md
CHANGED
|
@@ -265,7 +265,17 @@ Apply it with `SkTheme` or `SkPage`:
|
|
|
265
265
|
</SkPage>
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
> **TypeScript note:**
|
|
268
|
+
> **TypeScript note:** To get type-safe autocomplete for custom theme names, augment the `SkThemeNameMap` interface:
|
|
269
|
+
>
|
|
270
|
+
> ```ts
|
|
271
|
+
> declare module '@skewedaspect/sleekspace-ui' {
|
|
272
|
+
> interface SkThemeNameMap {
|
|
273
|
+
> ocean : true;
|
|
274
|
+
> }
|
|
275
|
+
> }
|
|
276
|
+
> ```
|
|
277
|
+
>
|
|
278
|
+
> This registers `'ocean'` as a valid `SkThemeName` throughout your project.
|
|
269
279
|
|
|
270
280
|
### Using Foundation Colors
|
|
271
281
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skewedaspect/sleekspace-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A Vue 3 component library with a cyberpunk aesthetic, featuring OKLCH colors, beveled corners, and a powerful design token system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/sleekspace-ui.umd.js",
|
|
@@ -2,12 +2,29 @@
|
|
|
2
2
|
// Theme Component Types
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Registry of available theme names. Augment this interface to register custom themes:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* declare module '@skewedaspect/sleekspace-ui' {
|
|
10
|
+
* interface SkThemeNameMap {
|
|
11
|
+
* ocean : true;
|
|
12
|
+
* midnight : true;
|
|
13
|
+
* }
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export interface SkThemeNameMap
|
|
18
|
+
{
|
|
19
|
+
greyscale : true;
|
|
20
|
+
colorful : true;
|
|
21
|
+
}
|
|
22
|
+
|
|
5
23
|
/**
|
|
6
24
|
* Available theme names that control the overall color scheme of the application.
|
|
7
|
-
*
|
|
8
|
-
* - 'colorful': A vibrant theme with saturated colors and stronger contrasts
|
|
25
|
+
* Derived from {@link SkThemeNameMap} — augment that interface to add custom themes.
|
|
9
26
|
*/
|
|
10
|
-
export type SkThemeName =
|
|
27
|
+
export type SkThemeName = keyof SkThemeNameMap;
|
|
11
28
|
|
|
12
29
|
//----------------------------------------------------------------------------------------------------------------------
|
|
13
30
|
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
--sk-button-outline-bg: rgba(5, 5, 5, 0.15);
|
|
104
104
|
|
|
105
105
|
/// Subtle variant background opacity (references global foundation token)
|
|
106
|
-
--sk-button-subtle-opacity:
|
|
106
|
+
--sk-button-subtle-opacity: 0.35;
|
|
107
107
|
|
|
108
108
|
/// Subtle variant hover background opacity (references global foundation token)
|
|
109
|
-
--sk-button-subtle-opacity-hover:
|
|
109
|
+
--sk-button-subtle-opacity-hover: 0.65;
|
|
110
110
|
|
|
111
111
|
/// Subtle variant border opacity (references global foundation token)
|
|
112
112
|
--sk-button-subtle-border-opacity: var(--sk-opacity-subtle-border);
|
|
@@ -260,10 +260,9 @@
|
|
|
260
260
|
|
|
261
261
|
&:hover:not(:disabled)
|
|
262
262
|
{
|
|
263
|
-
--sk-button-border-color: oklch(from var(--sk-button-border-base) l c h / var(--sk-button-subtle-border-opacity-hover));
|
|
264
263
|
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
265
264
|
|
|
266
|
-
background-color:
|
|
265
|
+
background-color: var(--sk-button-bg-hover);
|
|
267
266
|
}
|
|
268
267
|
|
|
269
268
|
&:active:not(:disabled)
|
|
@@ -534,6 +533,12 @@
|
|
|
534
533
|
@include button-subtle-kind($kind);
|
|
535
534
|
}
|
|
536
535
|
|
|
536
|
+
&:disabled,
|
|
537
|
+
&.sk-loading
|
|
538
|
+
{
|
|
539
|
+
background-color: oklch(from var(--sk-button-bg) l c h / 0.45);
|
|
540
|
+
}
|
|
541
|
+
|
|
537
542
|
// Special case: neutral text and border are lighter (halfway to white) for better differentiation
|
|
538
543
|
&.sk-neutral
|
|
539
544
|
{
|
|
@@ -624,20 +629,51 @@
|
|
|
624
629
|
|
|
625
630
|
&.sk-pressed
|
|
626
631
|
{
|
|
627
|
-
&.sk-
|
|
628
|
-
&.sk-ghost
|
|
632
|
+
&.sk-solid
|
|
629
633
|
{
|
|
630
|
-
|
|
634
|
+
--sk-button-border-color: var(--sk-button-border-hover);
|
|
635
|
+
background-color: var(--sk-button-bg-hover);
|
|
636
|
+
color: var(--sk-button-text);
|
|
637
|
+
|
|
638
|
+
&:hover:not(:disabled)
|
|
639
|
+
{
|
|
640
|
+
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
641
|
+
background-color: color-mix(in oklch, var(--sk-button-bg) 70%, white 30%);
|
|
642
|
+
}
|
|
631
643
|
}
|
|
632
644
|
|
|
633
|
-
&.sk-
|
|
645
|
+
&.sk-outline
|
|
634
646
|
{
|
|
635
|
-
|
|
647
|
+
--sk-button-border-color: var(--sk-button-border-hover);
|
|
648
|
+
background-color: var(--sk-button-bg);
|
|
649
|
+
color: var(--sk-button-text);
|
|
636
650
|
}
|
|
637
651
|
|
|
638
652
|
&.sk-subtle
|
|
639
653
|
{
|
|
654
|
+
--sk-button-border-color: transparent;
|
|
640
655
|
background-color: var(--sk-button-bg);
|
|
656
|
+
color: var(--sk-button-text);
|
|
657
|
+
|
|
658
|
+
&:hover:not(:disabled)
|
|
659
|
+
{
|
|
660
|
+
--sk-button-border-color: transparent;
|
|
661
|
+
--sk-button-glow-shadow: 0 0 var(--sk-button-glow-size) oklch(from var(--sk-button-border-base) l c h / var(--sk-button-glow-opacity));
|
|
662
|
+
background-color: var(--sk-button-bg-hover);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
&.sk-ghost
|
|
667
|
+
{
|
|
668
|
+
--sk-button-border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
669
|
+
border-color: color-mix(in oklch, var(--sk-button-border-base) 50%, transparent 50%);
|
|
670
|
+
background-color: var(--sk-button-outline-bg);
|
|
671
|
+
color: var(--sk-button-text);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
&.sk-link
|
|
675
|
+
{
|
|
676
|
+
color: var(--sk-button-text);
|
|
641
677
|
}
|
|
642
678
|
}
|
|
643
679
|
|
|
@@ -83,10 +83,14 @@ To create a new theme:
|
|
|
83
83
|
@forward 'mytheme'; // Add your theme
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
4. **
|
|
86
|
+
4. **Register the TypeScript type** via module augmentation (e.g. in a `themes.d.ts` or your app's entry file):
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
|
-
|
|
89
|
+
declare module '@skewedaspect/sleekspace-ui' {
|
|
90
|
+
interface SkThemeNameMap {
|
|
91
|
+
mytheme : true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
90
94
|
```
|
|
91
95
|
|
|
92
96
|
5. **Use your theme**:
|