@skewedaspect/sleekspace-ui 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/SkAlert.vue.d.ts +18 -8
- package/dist/components/Alert/types.d.ts +3 -2
- package/dist/components/Page/SkPage.vue.d.ts +9 -0
- package/dist/components/Page/types.d.ts +3 -0
- package/dist/sleekspace-ui.css +47 -24
- package/dist/sleekspace-ui.es.js +67 -41
- package/dist/sleekspace-ui.umd.js +67 -41
- package/dist/tokens.css +23 -0
- package/docs/guides/design-tokens/foundation-other.md +16 -3
- package/docs/guides/design-tokens/semantic-states.md +26 -11
- package/docs/guides/design-tokens/themes.md +13 -2
- package/docs/guides/getting-started.md +31 -30
- package/docs/guides/theming.md +262 -8
- package/package.json +4 -4
- package/src/components/Alert/SkAlert.vue +50 -17
- package/src/components/Alert/types.ts +7 -2
- package/src/components/Page/SkPage.vue +36 -2
- package/src/components/Page/types.ts +6 -0
- package/src/styles/_scrollbar.scss +2 -2
- package/src/styles/base/_global.scss +3 -3
- package/src/styles/components/_alert.scss +5 -5
- package/src/styles/components/_page.scss +2 -2
- package/src/styles/tokens/_foundation-colors.scss +4 -0
- package/src/styles/tokens/_foundation-transitions.scss +8 -0
- package/src/styles/tokens/_semantic-surfaces.scss +15 -0
- package/web-types.json +24 -4
|
@@ -2,19 +2,28 @@ import { SkAlertKind } from './types';
|
|
|
2
2
|
import { ComponentCustomColors } from '../../types';
|
|
3
3
|
export interface SkAlertComponentProps extends ComponentCustomColors {
|
|
4
4
|
/**
|
|
5
|
-
* Semantic kind that determines the alert's color scheme and default icon.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Semantic kind that determines the alert's color scheme and default icon. Supports all
|
|
6
|
+
* semantic kinds (neutral, primary, accent, info, success, warning, danger) as well as
|
|
7
|
+
* direct color kinds (neon-blue, neon-purple, etc.). Default icons are provided for the
|
|
8
|
+
* four feedback kinds (info, success, warning, danger).
|
|
8
9
|
* @default 'info'
|
|
9
10
|
*/
|
|
10
11
|
kind?: SkAlertKind;
|
|
11
12
|
/**
|
|
12
|
-
* When true, applies
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* When true, applies subdued styling with a lighter, semi-transparent background.
|
|
14
|
+
* Use subtle alerts for less critical messages that shouldn't dominate the visual
|
|
15
|
+
* hierarchy, such as tips or supplementary information.
|
|
15
16
|
* @default false
|
|
16
17
|
*/
|
|
17
|
-
|
|
18
|
+
subtle?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Controls visibility of the icon container. When undefined (default), the icon is shown
|
|
21
|
+
* automatically if there's a default icon for the kind (info, success, warning, danger)
|
|
22
|
+
* or if custom content is provided via the icon slot. Set to false to force-hide the icon,
|
|
23
|
+
* or true to force-show the container even when empty.
|
|
24
|
+
* @default undefined
|
|
25
|
+
*/
|
|
26
|
+
showIcon?: boolean;
|
|
18
27
|
}
|
|
19
28
|
declare function __VLS_template(): {
|
|
20
29
|
attrs: Partial<{}>;
|
|
@@ -27,8 +36,9 @@ declare function __VLS_template(): {
|
|
|
27
36
|
};
|
|
28
37
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
38
|
declare const __VLS_component: import('vue').DefineComponent<SkAlertComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkAlertComponentProps> & Readonly<{}>, {
|
|
39
|
+
subtle: boolean;
|
|
30
40
|
kind: SkAlertKind;
|
|
31
|
-
|
|
41
|
+
showIcon: boolean;
|
|
32
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
33
43
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
44
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { ComponentKind } from '../../types';
|
|
1
2
|
/**
|
|
2
|
-
* Alert semantic
|
|
3
|
+
* Alert kind - supports all semantic and color kinds
|
|
3
4
|
*/
|
|
4
|
-
export type SkAlertKind =
|
|
5
|
+
export type SkAlertKind = ComponentKind;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkThemeName } from '../Theme/types';
|
|
1
2
|
import { SkPageSidebarPosition } from './types';
|
|
2
3
|
export interface SkPageComponentProps {
|
|
3
4
|
/**
|
|
@@ -27,6 +28,13 @@ export interface SkPageComponentProps {
|
|
|
27
28
|
* Only applies when the sidebar slot is provided.
|
|
28
29
|
*/
|
|
29
30
|
sidebarWidth?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional theme name. When provided, SkPage acts as a theme provider — setting
|
|
33
|
+
* `data-scheme` on the root element and providing theme context for descendant
|
|
34
|
+
* components (including portal components like dropdowns and modals).
|
|
35
|
+
* When omitted, SkPage has no theme behavior.
|
|
36
|
+
*/
|
|
37
|
+
theme?: SkThemeName;
|
|
30
38
|
}
|
|
31
39
|
declare function __VLS_template(): {
|
|
32
40
|
attrs: Partial<{}>;
|
|
@@ -41,6 +49,7 @@ declare function __VLS_template(): {
|
|
|
41
49
|
};
|
|
42
50
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
43
51
|
declare const __VLS_component: import('vue').DefineComponent<SkPageComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkPageComponentProps> & Readonly<{}>, {
|
|
52
|
+
theme: SkThemeName;
|
|
44
53
|
sidebarPosition: SkPageSidebarPosition;
|
|
45
54
|
fixedHeader: boolean;
|
|
46
55
|
fixedFooter: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SkThemeName } from '../Theme/types';
|
|
1
2
|
/** Sidebar position */
|
|
2
3
|
export type SkPageSidebarPosition = 'left' | 'right';
|
|
3
4
|
/** Page props interface */
|
|
@@ -10,4 +11,6 @@ export interface SkPageProps {
|
|
|
10
11
|
fixedFooter?: boolean;
|
|
11
12
|
/** Custom sidebar width */
|
|
12
13
|
sidebarWidth?: string;
|
|
14
|
+
/** Optional theme name — when provided, SkPage acts as a theme provider */
|
|
15
|
+
theme?: SkThemeName;
|
|
13
16
|
}
|
package/dist/sleekspace-ui.css
CHANGED
|
@@ -158,6 +158,9 @@
|
|
|
158
158
|
--sk-opacity-medium: 0.40;
|
|
159
159
|
--sk-opacity-strong: 0.60;
|
|
160
160
|
--sk-opacity-opaque: 1;
|
|
161
|
+
/* Semantic opacity aliases */
|
|
162
|
+
--sk-opacity-disabled: 0.5;
|
|
163
|
+
--sk-opacity-loading: 0.6;
|
|
161
164
|
/* ===================================================================
|
|
162
165
|
* Color Mixing Percentages
|
|
163
166
|
* Tokenized mixing amounts for color-mix() function
|
|
@@ -351,6 +354,12 @@
|
|
|
351
354
|
--sk-transition-easing-ease-in: ease-in;
|
|
352
355
|
--sk-transition-easing-ease-out: ease-out;
|
|
353
356
|
--sk-transition-easing-ease-in-out: ease-in-out;
|
|
357
|
+
/* ===================================================================
|
|
358
|
+
* Default Aliases
|
|
359
|
+
* Generic names that resolve to the most common values
|
|
360
|
+
* =================================================================== */
|
|
361
|
+
--sk-transition-duration-base: var(--sk-transition-duration-normal);
|
|
362
|
+
--sk-transition-easing: var(--sk-transition-easing-ease-out);
|
|
354
363
|
/* ===================================================================
|
|
355
364
|
* Common Transition Combinations
|
|
356
365
|
* Convenience tokens for frequently used transitions
|
|
@@ -652,6 +661,10 @@
|
|
|
652
661
|
*
|
|
653
662
|
* Background and text colors for surfaces and general use.
|
|
654
663
|
* These provide a consistent color system independent of component kinds.
|
|
664
|
+
*
|
|
665
|
+
* Defaults are defined on :root as fallbacks. Themes can override any of these
|
|
666
|
+
* via [data-scheme] selectors. The [data-scheme] rule also applies background
|
|
667
|
+
* and text color so that any themed element gets the correct surface treatment.
|
|
655
668
|
*/
|
|
656
669
|
:root {
|
|
657
670
|
/* ===================================================================
|
|
@@ -677,6 +690,16 @@
|
|
|
677
690
|
--sk-border-subtle: var(--sk-color-gray-80); /* Subtle borders/dividers */
|
|
678
691
|
}
|
|
679
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Apply text color to any themed element so descendants inherit the correct
|
|
695
|
+
* color without needing to set it themselves. Background is intentionally NOT
|
|
696
|
+
* set here — page-level containers like SkPage handle their own background
|
|
697
|
+
* via the surface tokens.
|
|
698
|
+
*/
|
|
699
|
+
[data-scheme] {
|
|
700
|
+
color: var(--sk-text-primary);
|
|
701
|
+
}
|
|
702
|
+
|
|
680
703
|
/**
|
|
681
704
|
* Semantic Tokens - Interactive
|
|
682
705
|
*
|
|
@@ -1215,7 +1238,7 @@
|
|
|
1215
1238
|
body {
|
|
1216
1239
|
margin: 0;
|
|
1217
1240
|
min-height: 100svh;
|
|
1218
|
-
color: var(--sk-
|
|
1241
|
+
color: var(--sk-text-primary);
|
|
1219
1242
|
}
|
|
1220
1243
|
img,
|
|
1221
1244
|
svg,
|
|
@@ -1228,8 +1251,8 @@
|
|
|
1228
1251
|
font: inherit;
|
|
1229
1252
|
}
|
|
1230
1253
|
:focus-visible {
|
|
1231
|
-
outline: var(--sk-focus-
|
|
1232
|
-
outline-offset: var(--sk-focus-
|
|
1254
|
+
outline: var(--sk-focus-ring-width) solid currentColor;
|
|
1255
|
+
outline-offset: var(--sk-focus-ring-offset);
|
|
1233
1256
|
}
|
|
1234
1257
|
h1,
|
|
1235
1258
|
h2,
|
|
@@ -1390,7 +1413,7 @@
|
|
|
1390
1413
|
min-height: var(--sk-scrollbar-thumb-min-size);
|
|
1391
1414
|
min-width: var(--sk-scrollbar-thumb-min-size);
|
|
1392
1415
|
/* Smooth transitions for interactive states */
|
|
1393
|
-
transition: background-color var(--sk-transition-duration-fast) var(--sk-transition-easing-
|
|
1416
|
+
transition: background-color var(--sk-transition-duration-fast) var(--sk-transition-easing-ease-out), border-color var(--sk-transition-duration-fast) var(--sk-transition-easing-ease-out);
|
|
1394
1417
|
}
|
|
1395
1418
|
/* Hover State */
|
|
1396
1419
|
*::-webkit-scrollbar-thumb:hover {
|
|
@@ -1658,7 +1681,7 @@
|
|
|
1658
1681
|
.sk-alert .sk-alert-content > *:last-child {
|
|
1659
1682
|
margin-bottom: 0;
|
|
1660
1683
|
}
|
|
1661
|
-
.sk-alert.sk-
|
|
1684
|
+
.sk-alert:not(.sk-subtle) {
|
|
1662
1685
|
--sk-alert-padding: 1rem;
|
|
1663
1686
|
--sk-alert-icon-size: 1.5rem;
|
|
1664
1687
|
--sk-alert-cut-size: 1rem;
|
|
@@ -1675,7 +1698,7 @@
|
|
|
1675
1698
|
color: var(--sk-alert-fg);
|
|
1676
1699
|
border-color: var(--sk-alert-border-color);
|
|
1677
1700
|
}
|
|
1678
|
-
.sk-alert.sk-neutral.sk-
|
|
1701
|
+
.sk-alert.sk-neutral:not(.sk-subtle) {
|
|
1679
1702
|
--sk-alert-fg: var(--sk-neutral-text);
|
|
1680
1703
|
}
|
|
1681
1704
|
.sk-alert.sk-primary {
|
|
@@ -1686,7 +1709,7 @@
|
|
|
1686
1709
|
color: var(--sk-alert-fg);
|
|
1687
1710
|
border-color: var(--sk-alert-border-color);
|
|
1688
1711
|
}
|
|
1689
|
-
.sk-alert.sk-primary.sk-
|
|
1712
|
+
.sk-alert.sk-primary:not(.sk-subtle) {
|
|
1690
1713
|
--sk-alert-fg: var(--sk-primary-text);
|
|
1691
1714
|
}
|
|
1692
1715
|
.sk-alert.sk-accent {
|
|
@@ -1697,7 +1720,7 @@
|
|
|
1697
1720
|
color: var(--sk-alert-fg);
|
|
1698
1721
|
border-color: var(--sk-alert-border-color);
|
|
1699
1722
|
}
|
|
1700
|
-
.sk-alert.sk-accent.sk-
|
|
1723
|
+
.sk-alert.sk-accent:not(.sk-subtle) {
|
|
1701
1724
|
--sk-alert-fg: var(--sk-accent-text);
|
|
1702
1725
|
}
|
|
1703
1726
|
.sk-alert.sk-info {
|
|
@@ -1708,7 +1731,7 @@
|
|
|
1708
1731
|
color: var(--sk-alert-fg);
|
|
1709
1732
|
border-color: var(--sk-alert-border-color);
|
|
1710
1733
|
}
|
|
1711
|
-
.sk-alert.sk-info.sk-
|
|
1734
|
+
.sk-alert.sk-info:not(.sk-subtle) {
|
|
1712
1735
|
--sk-alert-fg: var(--sk-info-text);
|
|
1713
1736
|
}
|
|
1714
1737
|
.sk-alert.sk-success {
|
|
@@ -1719,7 +1742,7 @@
|
|
|
1719
1742
|
color: var(--sk-alert-fg);
|
|
1720
1743
|
border-color: var(--sk-alert-border-color);
|
|
1721
1744
|
}
|
|
1722
|
-
.sk-alert.sk-success.sk-
|
|
1745
|
+
.sk-alert.sk-success:not(.sk-subtle) {
|
|
1723
1746
|
--sk-alert-fg: var(--sk-success-text);
|
|
1724
1747
|
}
|
|
1725
1748
|
.sk-alert.sk-warning {
|
|
@@ -1730,7 +1753,7 @@
|
|
|
1730
1753
|
color: var(--sk-alert-fg);
|
|
1731
1754
|
border-color: var(--sk-alert-border-color);
|
|
1732
1755
|
}
|
|
1733
|
-
.sk-alert.sk-warning.sk-
|
|
1756
|
+
.sk-alert.sk-warning:not(.sk-subtle) {
|
|
1734
1757
|
--sk-alert-fg: var(--sk-warning-text);
|
|
1735
1758
|
}
|
|
1736
1759
|
.sk-alert.sk-danger {
|
|
@@ -1741,7 +1764,7 @@
|
|
|
1741
1764
|
color: var(--sk-alert-fg);
|
|
1742
1765
|
border-color: var(--sk-alert-border-color);
|
|
1743
1766
|
}
|
|
1744
|
-
.sk-alert.sk-danger.sk-
|
|
1767
|
+
.sk-alert.sk-danger:not(.sk-subtle) {
|
|
1745
1768
|
--sk-alert-fg: var(--sk-danger-text);
|
|
1746
1769
|
}
|
|
1747
1770
|
.sk-alert.sk-boulder {
|
|
@@ -1752,7 +1775,7 @@
|
|
|
1752
1775
|
color: var(--sk-alert-fg);
|
|
1753
1776
|
border-color: var(--sk-alert-border-color);
|
|
1754
1777
|
}
|
|
1755
|
-
.sk-alert.sk-boulder.sk-
|
|
1778
|
+
.sk-alert.sk-boulder:not(.sk-subtle) {
|
|
1756
1779
|
--sk-alert-fg: var(--sk-boulder-text);
|
|
1757
1780
|
}
|
|
1758
1781
|
.sk-alert.sk-neon-blue {
|
|
@@ -1763,7 +1786,7 @@
|
|
|
1763
1786
|
color: var(--sk-alert-fg);
|
|
1764
1787
|
border-color: var(--sk-alert-border-color);
|
|
1765
1788
|
}
|
|
1766
|
-
.sk-alert.sk-neon-blue.sk-
|
|
1789
|
+
.sk-alert.sk-neon-blue:not(.sk-subtle) {
|
|
1767
1790
|
--sk-alert-fg: var(--sk-neon-blue-text);
|
|
1768
1791
|
}
|
|
1769
1792
|
.sk-alert.sk-light-blue {
|
|
@@ -1774,7 +1797,7 @@
|
|
|
1774
1797
|
color: var(--sk-alert-fg);
|
|
1775
1798
|
border-color: var(--sk-alert-border-color);
|
|
1776
1799
|
}
|
|
1777
|
-
.sk-alert.sk-light-blue.sk-
|
|
1800
|
+
.sk-alert.sk-light-blue:not(.sk-subtle) {
|
|
1778
1801
|
--sk-alert-fg: var(--sk-light-blue-text);
|
|
1779
1802
|
}
|
|
1780
1803
|
.sk-alert.sk-neon-orange {
|
|
@@ -1785,7 +1808,7 @@
|
|
|
1785
1808
|
color: var(--sk-alert-fg);
|
|
1786
1809
|
border-color: var(--sk-alert-border-color);
|
|
1787
1810
|
}
|
|
1788
|
-
.sk-alert.sk-neon-orange.sk-
|
|
1811
|
+
.sk-alert.sk-neon-orange:not(.sk-subtle) {
|
|
1789
1812
|
--sk-alert-fg: var(--sk-neon-orange-text);
|
|
1790
1813
|
}
|
|
1791
1814
|
.sk-alert.sk-neon-purple {
|
|
@@ -1796,7 +1819,7 @@
|
|
|
1796
1819
|
color: var(--sk-alert-fg);
|
|
1797
1820
|
border-color: var(--sk-alert-border-color);
|
|
1798
1821
|
}
|
|
1799
|
-
.sk-alert.sk-neon-purple.sk-
|
|
1822
|
+
.sk-alert.sk-neon-purple:not(.sk-subtle) {
|
|
1800
1823
|
--sk-alert-fg: var(--sk-neon-purple-text);
|
|
1801
1824
|
}
|
|
1802
1825
|
.sk-alert.sk-neon-green {
|
|
@@ -1807,7 +1830,7 @@
|
|
|
1807
1830
|
color: var(--sk-alert-fg);
|
|
1808
1831
|
border-color: var(--sk-alert-border-color);
|
|
1809
1832
|
}
|
|
1810
|
-
.sk-alert.sk-neon-green.sk-
|
|
1833
|
+
.sk-alert.sk-neon-green:not(.sk-subtle) {
|
|
1811
1834
|
--sk-alert-fg: var(--sk-neon-green-text);
|
|
1812
1835
|
}
|
|
1813
1836
|
.sk-alert.sk-neon-mint {
|
|
@@ -1818,7 +1841,7 @@
|
|
|
1818
1841
|
color: var(--sk-alert-fg);
|
|
1819
1842
|
border-color: var(--sk-alert-border-color);
|
|
1820
1843
|
}
|
|
1821
|
-
.sk-alert.sk-neon-mint.sk-
|
|
1844
|
+
.sk-alert.sk-neon-mint:not(.sk-subtle) {
|
|
1822
1845
|
--sk-alert-fg: var(--sk-neon-mint-text);
|
|
1823
1846
|
}
|
|
1824
1847
|
.sk-alert.sk-neon-pink {
|
|
@@ -1829,7 +1852,7 @@
|
|
|
1829
1852
|
color: var(--sk-alert-fg);
|
|
1830
1853
|
border-color: var(--sk-alert-border-color);
|
|
1831
1854
|
}
|
|
1832
|
-
.sk-alert.sk-neon-pink.sk-
|
|
1855
|
+
.sk-alert.sk-neon-pink:not(.sk-subtle) {
|
|
1833
1856
|
--sk-alert-fg: var(--sk-neon-pink-text);
|
|
1834
1857
|
}
|
|
1835
1858
|
.sk-alert.sk-yellow {
|
|
@@ -1840,7 +1863,7 @@
|
|
|
1840
1863
|
color: var(--sk-alert-fg);
|
|
1841
1864
|
border-color: var(--sk-alert-border-color);
|
|
1842
1865
|
}
|
|
1843
|
-
.sk-alert.sk-yellow.sk-
|
|
1866
|
+
.sk-alert.sk-yellow:not(.sk-subtle) {
|
|
1844
1867
|
--sk-alert-fg: var(--sk-yellow-text);
|
|
1845
1868
|
}
|
|
1846
1869
|
.sk-alert.sk-red {
|
|
@@ -1851,7 +1874,7 @@
|
|
|
1851
1874
|
color: var(--sk-alert-fg);
|
|
1852
1875
|
border-color: var(--sk-alert-border-color);
|
|
1853
1876
|
}
|
|
1854
|
-
.sk-alert.sk-red.sk-
|
|
1877
|
+
.sk-alert.sk-red:not(.sk-subtle) {
|
|
1855
1878
|
--sk-alert-fg: var(--sk-red-text);
|
|
1856
1879
|
}
|
|
1857
1880
|
.sk-avatar {
|
|
@@ -6252,8 +6275,8 @@
|
|
|
6252
6275
|
display: flex;
|
|
6253
6276
|
flex-direction: column;
|
|
6254
6277
|
min-height: 100vh;
|
|
6255
|
-
background: var(--sk-
|
|
6256
|
-
color: var(--sk-
|
|
6278
|
+
background: var(--sk-surface-base);
|
|
6279
|
+
color: var(--sk-text-primary);
|
|
6257
6280
|
}
|
|
6258
6281
|
.sk-page .sk-page-header {
|
|
6259
6282
|
flex-shrink: 0;
|
package/dist/sleekspace-ui.es.js
CHANGED
|
@@ -15205,7 +15205,10 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
15205
15205
|
}
|
|
15206
15206
|
});
|
|
15207
15207
|
const SkAccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5e73d91f"]]);
|
|
15208
|
-
const _hoisted_1$w = {
|
|
15208
|
+
const _hoisted_1$w = {
|
|
15209
|
+
key: 0,
|
|
15210
|
+
class: "sk-alert-icon"
|
|
15211
|
+
};
|
|
15209
15212
|
const _hoisted_2$h = {
|
|
15210
15213
|
key: 0,
|
|
15211
15214
|
viewBox: "0 0 24 24",
|
|
@@ -15234,24 +15237,35 @@ const _hoisted_5$6 = {
|
|
|
15234
15237
|
stroke: "currentColor",
|
|
15235
15238
|
"stroke-width": "2"
|
|
15236
15239
|
};
|
|
15237
|
-
const _hoisted_6$
|
|
15240
|
+
const _hoisted_6$4 = { class: "sk-alert-content" };
|
|
15238
15241
|
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
15239
15242
|
__name: "SkAlert",
|
|
15240
15243
|
props: {
|
|
15241
15244
|
kind: { default: "info" },
|
|
15242
|
-
|
|
15245
|
+
subtle: { type: Boolean, default: false },
|
|
15246
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
15243
15247
|
baseColor: {},
|
|
15244
15248
|
textColor: {}
|
|
15245
15249
|
},
|
|
15246
15250
|
setup(__props) {
|
|
15251
|
+
const FEEDBACK_KINDS = ["info", "success", "warning", "danger"];
|
|
15247
15252
|
const props = __props;
|
|
15253
|
+
const slots = useSlots();
|
|
15248
15254
|
const classes = computed(() => {
|
|
15249
15255
|
return {
|
|
15250
15256
|
"sk-alert": true,
|
|
15251
15257
|
[`sk-${props.kind}`]: true,
|
|
15252
|
-
"sk-
|
|
15258
|
+
"sk-subtle": props.subtle
|
|
15253
15259
|
};
|
|
15254
15260
|
});
|
|
15261
|
+
const shouldShowIcon = computed(() => {
|
|
15262
|
+
if (props.showIcon !== void 0) {
|
|
15263
|
+
return props.showIcon;
|
|
15264
|
+
}
|
|
15265
|
+
const hasDefaultIcon = FEEDBACK_KINDS.includes(props.kind);
|
|
15266
|
+
const hasSlotContent = !!slots.icon;
|
|
15267
|
+
return hasDefaultIcon || hasSlotContent;
|
|
15268
|
+
});
|
|
15255
15269
|
const customColorStyles = useCustomColors(
|
|
15256
15270
|
"alert",
|
|
15257
15271
|
toRef(() => props.baseColor),
|
|
@@ -15263,7 +15277,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
15263
15277
|
style: normalizeStyle(unref(customColorStyles)),
|
|
15264
15278
|
role: "alert"
|
|
15265
15279
|
}, [
|
|
15266
|
-
|
|
15280
|
+
shouldShowIcon.value ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
|
|
15267
15281
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
15268
15282
|
__props.kind === "info" ? (openBlock(), createElementBlock("svg", _hoisted_2$h, [..._cache[0] || (_cache[0] = [
|
|
15269
15283
|
createElementVNode("circle", {
|
|
@@ -15320,8 +15334,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
15320
15334
|
}, null, -1)
|
|
15321
15335
|
])])) : createCommentVNode("", true)
|
|
15322
15336
|
])
|
|
15323
|
-
]),
|
|
15324
|
-
createElementVNode("div", _hoisted_6$
|
|
15337
|
+
])) : createCommentVNode("", true),
|
|
15338
|
+
createElementVNode("div", _hoisted_6$4, [
|
|
15325
15339
|
renderSlot(_ctx.$slots, "default")
|
|
15326
15340
|
])
|
|
15327
15341
|
], 6);
|
|
@@ -16994,17 +17008,38 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16994
17008
|
}
|
|
16995
17009
|
});
|
|
16996
17010
|
const SkNumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-b589687f"]]);
|
|
16997
|
-
const
|
|
17011
|
+
const ThemeSymbol = Symbol("SkTheme");
|
|
17012
|
+
function provideTheme(initialTheme = "greyscale") {
|
|
17013
|
+
const currentTheme = ref(initialTheme);
|
|
17014
|
+
const setTheme = (theme) => {
|
|
17015
|
+
currentTheme.value = theme;
|
|
17016
|
+
};
|
|
17017
|
+
const context2 = {
|
|
17018
|
+
currentTheme,
|
|
17019
|
+
setTheme
|
|
17020
|
+
};
|
|
17021
|
+
provide(ThemeSymbol, context2);
|
|
17022
|
+
return context2;
|
|
17023
|
+
}
|
|
17024
|
+
function useTheme() {
|
|
17025
|
+
const context2 = inject(ThemeSymbol);
|
|
17026
|
+
if (!context2) {
|
|
17027
|
+
throw new Error("useTheme must be called within an SkTheme component");
|
|
17028
|
+
}
|
|
17029
|
+
return context2;
|
|
17030
|
+
}
|
|
17031
|
+
const _hoisted_1$e = ["data-scheme"];
|
|
17032
|
+
const _hoisted_2$8 = {
|
|
16998
17033
|
key: 0,
|
|
16999
17034
|
class: "sk-page-header"
|
|
17000
17035
|
};
|
|
17001
|
-
const
|
|
17002
|
-
const
|
|
17036
|
+
const _hoisted_3$6 = { class: "sk-page-main" };
|
|
17037
|
+
const _hoisted_4$5 = {
|
|
17003
17038
|
key: 0,
|
|
17004
17039
|
class: "sk-page-sidebar"
|
|
17005
17040
|
};
|
|
17006
|
-
const
|
|
17007
|
-
const
|
|
17041
|
+
const _hoisted_5$3 = { class: "sk-page-content" };
|
|
17042
|
+
const _hoisted_6$3 = {
|
|
17008
17043
|
key: 1,
|
|
17009
17044
|
class: "sk-page-footer"
|
|
17010
17045
|
};
|
|
@@ -17014,7 +17049,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
17014
17049
|
sidebarPosition: { default: "left" },
|
|
17015
17050
|
fixedHeader: { type: Boolean, default: false },
|
|
17016
17051
|
fixedFooter: { type: Boolean, default: false },
|
|
17017
|
-
sidebarWidth: { default: void 0 }
|
|
17052
|
+
sidebarWidth: { default: void 0 },
|
|
17053
|
+
theme: { default: void 0 }
|
|
17018
17054
|
},
|
|
17019
17055
|
setup(__props) {
|
|
17020
17056
|
const props = __props;
|
|
@@ -17032,30 +17068,40 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
17032
17068
|
"--sk-page-sidebar-width": props.sidebarWidth
|
|
17033
17069
|
};
|
|
17034
17070
|
});
|
|
17071
|
+
if (props.theme) {
|
|
17072
|
+
const { currentTheme, setTheme } = provideTheme(props.theme);
|
|
17073
|
+
provide("sk-theme", currentTheme);
|
|
17074
|
+
watch(() => props.theme, (newTheme) => {
|
|
17075
|
+
if (newTheme) {
|
|
17076
|
+
setTheme(newTheme);
|
|
17077
|
+
}
|
|
17078
|
+
});
|
|
17079
|
+
}
|
|
17035
17080
|
return (_ctx, _cache) => {
|
|
17036
17081
|
return openBlock(), createElementBlock("div", {
|
|
17037
17082
|
class: normalizeClass(classes.value),
|
|
17038
|
-
style: normalizeStyle(customStyles.value)
|
|
17083
|
+
style: normalizeStyle(customStyles.value),
|
|
17084
|
+
"data-scheme": __props.theme
|
|
17039
17085
|
}, [
|
|
17040
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("header",
|
|
17086
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_2$8, [
|
|
17041
17087
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
17042
17088
|
])) : createCommentVNode("", true),
|
|
17043
|
-
createElementVNode("div",
|
|
17044
|
-
_ctx.$slots.sidebar ? (openBlock(), createElementBlock("aside",
|
|
17089
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
17090
|
+
_ctx.$slots.sidebar ? (openBlock(), createElementBlock("aside", _hoisted_4$5, [
|
|
17045
17091
|
renderSlot(_ctx.$slots, "sidebar", {}, void 0, true)
|
|
17046
17092
|
])) : createCommentVNode("", true),
|
|
17047
|
-
createElementVNode("main",
|
|
17093
|
+
createElementVNode("main", _hoisted_5$3, [
|
|
17048
17094
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
17049
17095
|
])
|
|
17050
17096
|
]),
|
|
17051
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer",
|
|
17097
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_6$3, [
|
|
17052
17098
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
17053
17099
|
])) : createCommentVNode("", true)
|
|
17054
|
-
],
|
|
17100
|
+
], 14, _hoisted_1$e);
|
|
17055
17101
|
};
|
|
17056
17102
|
}
|
|
17057
17103
|
});
|
|
17058
|
-
const SkPage = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
17104
|
+
const SkPage = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ad672949"]]);
|
|
17059
17105
|
const _hoisted_1$d = ["disabled", "aria-label", "aria-current"];
|
|
17060
17106
|
const _hoisted_2$7 = { key: 0 };
|
|
17061
17107
|
const _hoisted_3$5 = { key: 1 };
|
|
@@ -18863,26 +18909,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
18863
18909
|
};
|
|
18864
18910
|
}
|
|
18865
18911
|
});
|
|
18866
|
-
const ThemeSymbol = Symbol("SkTheme");
|
|
18867
|
-
function provideTheme(initialTheme = "greyscale") {
|
|
18868
|
-
const currentTheme = ref(initialTheme);
|
|
18869
|
-
const setTheme = (theme) => {
|
|
18870
|
-
currentTheme.value = theme;
|
|
18871
|
-
};
|
|
18872
|
-
const context2 = {
|
|
18873
|
-
currentTheme,
|
|
18874
|
-
setTheme
|
|
18875
|
-
};
|
|
18876
|
-
provide(ThemeSymbol, context2);
|
|
18877
|
-
return context2;
|
|
18878
|
-
}
|
|
18879
|
-
function useTheme() {
|
|
18880
|
-
const context2 = inject(ThemeSymbol);
|
|
18881
|
-
if (!context2) {
|
|
18882
|
-
throw new Error("useTheme must be called within an SkTheme component");
|
|
18883
|
-
}
|
|
18884
|
-
return context2;
|
|
18885
|
-
}
|
|
18886
18912
|
const _hoisted_1 = ["data-scheme"];
|
|
18887
18913
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18888
18914
|
__name: "SkTheme",
|