@hkdigital/lib-sveltekit 0.1.15 → 0.1.16
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/panels/index.d.ts +1 -1
- package/dist/components/panels/index.js +1 -1
- package/dist/components/panels/{plain-panel/PlainPanel.svelte → panel/Panel.svelte} +14 -4
- package/dist/components/panels/{plain-panel/PlainPanel.svelte.d.ts → panel/Panel.svelte.d.ts} +7 -5
- package/dist/design/design-config.js +7 -7
- package/dist/themes/hkdev/components/buttons/button.css +23 -18
- package/dist/themes/hkdev/components/panels/panel.css +27 -0
- package/dist/themes/hkdev/components.css +5 -17
- package/package.json +1 -1
- package/dist/themes/hkdev/components/panels/plain-panel.css +0 -44
- package/dist/themes/hkdev/components/panels/speech-bubble.css +0 -46
@@ -1 +1 @@
|
|
1
|
-
export { default as
|
1
|
+
export { default as Panel } from "./panel/Panel.svelte";
|
@@ -1 +1 @@
|
|
1
|
-
export { default as
|
1
|
+
export { default as Panel } from './panel/Panel.svelte';
|
@@ -9,8 +9,9 @@
|
|
9
9
|
* @type {{
|
10
10
|
* base?: string,
|
11
11
|
* bg?: string,
|
12
|
-
*
|
13
|
-
*
|
12
|
+
* classes?: string,
|
13
|
+
* width?: 'sm' | 'md' | 'lg',
|
14
|
+
* variant?: string,
|
14
15
|
* children?: import('svelte').Snippet,
|
15
16
|
* } & { [attr: string]: any }}
|
16
17
|
*/
|
@@ -18,9 +19,12 @@
|
|
18
19
|
// Style
|
19
20
|
base,
|
20
21
|
bg,
|
21
|
-
width,
|
22
22
|
classes,
|
23
23
|
|
24
|
+
width = 'md',
|
25
|
+
variant = 'light',
|
26
|
+
|
27
|
+
// Snippets
|
24
28
|
children,
|
25
29
|
|
26
30
|
// Attributes
|
@@ -28,6 +32,12 @@
|
|
28
32
|
} = $props();
|
29
33
|
</script>
|
30
34
|
|
31
|
-
<div
|
35
|
+
<div
|
36
|
+
data-component="panel"
|
37
|
+
data-width={width}
|
38
|
+
data-variant={variant}
|
39
|
+
class="{base} {bg} {classes}"
|
40
|
+
{...attrs}
|
41
|
+
>
|
32
42
|
{@render children()}
|
33
43
|
</div>
|
package/dist/components/panels/{plain-panel/PlainPanel.svelte.d.ts → panel/Panel.svelte.d.ts}
RENAMED
@@ -1,21 +1,23 @@
|
|
1
|
-
export default
|
2
|
-
type
|
1
|
+
export default Panel;
|
2
|
+
type Panel = {
|
3
3
|
$on?(type: string, callback: (e: any) => void): () => void;
|
4
4
|
$set?(props: Partial<{
|
5
5
|
base?: string;
|
6
6
|
bg?: string;
|
7
|
-
width?: string;
|
8
7
|
classes?: string;
|
8
|
+
width?: "sm" | "md" | "lg";
|
9
|
+
variant?: string;
|
9
10
|
children?: Snippet<[]>;
|
10
11
|
} & {
|
11
12
|
[attr: string]: any;
|
12
13
|
}>): void;
|
13
14
|
};
|
14
|
-
declare const
|
15
|
+
declare const Panel: import("svelte").Component<{
|
15
16
|
base?: string;
|
16
17
|
bg?: string;
|
17
|
-
width?: string;
|
18
18
|
classes?: string;
|
19
|
+
width?: "sm" | "md" | "lg";
|
20
|
+
variant?: string;
|
19
21
|
children?: import("svelte").Snippet;
|
20
22
|
} & {
|
21
23
|
[attr: string]: any;
|
@@ -40,19 +40,19 @@ export const TEXT_HEADING_SIZES = {
|
|
40
40
|
};
|
41
41
|
|
42
42
|
export const TEXT_UI_SIZES = {
|
43
|
-
sm: { size: 14, lineHeight: 1
|
44
|
-
md: { size: 16, lineHeight: 1
|
45
|
-
lg: { size: 18, lineHeight: 1
|
43
|
+
sm: { size: 14, lineHeight: 1 },
|
44
|
+
md: { size: 16, lineHeight: 1 },
|
45
|
+
lg: { size: 18, lineHeight: 1 }
|
46
46
|
};
|
47
47
|
|
48
48
|
/* == Border radius == */
|
49
49
|
|
50
50
|
export const RADIUS_SIZES = {
|
51
51
|
none: '0px',
|
52
|
-
xs: { size:
|
53
|
-
sm: { size:
|
54
|
-
md: { size:
|
55
|
-
lg: { size:
|
52
|
+
xs: { size: 5 },
|
53
|
+
sm: { size: 10 },
|
54
|
+
md: { size: 25 },
|
55
|
+
lg: { size: 35 },
|
56
56
|
full: '9999px'
|
57
57
|
};
|
58
58
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@define-mixin component-button {
|
2
|
-
[data-component=
|
2
|
+
[data-component='button'] {
|
3
3
|
/* ---- Core Button Variables ---- */
|
4
4
|
|
5
5
|
/* Size variables */
|
6
|
-
--btn-min-width: calc(
|
7
|
-
--btn-min-height: calc(
|
6
|
+
--btn-min-width: calc(150px * var(--scale-ui));
|
7
|
+
--btn-min-height: calc(40px * var(--scale-ui));
|
8
8
|
|
9
9
|
/* ---- Primary Button Variables ---- */
|
10
10
|
--btn-primary-bg: var(--color-primary-500);
|
@@ -48,7 +48,8 @@
|
|
48
48
|
align-items: center;
|
49
49
|
cursor: pointer;
|
50
50
|
position: relative;
|
51
|
-
transition-property:
|
51
|
+
transition-property:
|
52
|
+
background-color, color, border-color, transform, box-shadow;
|
52
53
|
transition-duration: var(--btn-transition-duration);
|
53
54
|
}
|
54
55
|
|
@@ -66,7 +67,7 @@
|
|
66
67
|
}*/
|
67
68
|
|
68
69
|
/* Role-based styling for primary buttons */
|
69
|
-
[data-component=
|
70
|
+
[data-component='button'][data-role='primary'] {
|
70
71
|
@apply border-width-normal;
|
71
72
|
border-color: rgb(var(--btn-primary-border));
|
72
73
|
background-color: rgb(var(--btn-primary-bg));
|
@@ -90,7 +91,7 @@
|
|
90
91
|
}
|
91
92
|
|
92
93
|
/* Role-based styling for secondary buttons */
|
93
|
-
[data-component=
|
94
|
+
[data-component='button'][data-role='secondary'] {
|
94
95
|
@apply border-width-normal;
|
95
96
|
border-color: rgb(var(--btn-secondary-border));
|
96
97
|
color: rgb(var(--btn-secondary-text));
|
@@ -113,23 +114,27 @@
|
|
113
114
|
}
|
114
115
|
}
|
115
116
|
|
116
|
-
/* State-based styling */
|
117
|
-
[data-component="button"].state-active {
|
118
|
-
transform: var(--btn-active-transform);
|
119
|
-
box-shadow: var(--btn-active-shadow);
|
120
|
-
}
|
117
|
+
/* State-based styling for primary and secondary buttons */
|
121
118
|
|
122
|
-
[data-component=
|
123
|
-
|
124
|
-
|
119
|
+
[data-component='button'][data-role='primary'],
|
120
|
+
[data-component='button'][data-role='secondary'] {
|
121
|
+
&.state-active {
|
122
|
+
transform: var(--btn-active-transform);
|
123
|
+
box-shadow: var(--btn-active-shadow);
|
124
|
+
}
|
125
125
|
|
126
|
-
|
127
|
-
|
128
|
-
|
126
|
+
&.state-error {
|
127
|
+
border-color: rgb(var(--btn-error-border));
|
128
|
+
}
|
129
|
+
|
130
|
+
&.state-loading {
|
131
|
+
opacity: var(--btn-loading-opacity);
|
132
|
+
cursor: wait;
|
133
|
+
}
|
129
134
|
}
|
130
135
|
|
131
136
|
/* Disabled state */
|
132
|
-
[data-component=
|
137
|
+
[data-component='button']:disabled {
|
133
138
|
cursor: not-allowed;
|
134
139
|
opacity: var(--btn-disabled-opacity);
|
135
140
|
pointer-events: none;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@define-mixin component-panel {
|
2
|
+
[data-component='panel'] {
|
3
|
+
@apply py-30up px-40up;
|
4
|
+
@apply rounded-md;
|
5
|
+
|
6
|
+
&[data-variant='light'] {
|
7
|
+
@apply bg-surface-50;
|
8
|
+
}
|
9
|
+
|
10
|
+
&[data-variant='dark'] {
|
11
|
+
@apply bg-surface-950;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* Size variants */
|
15
|
+
&[data-width='sm'] {
|
16
|
+
width: calc(400px * var(--scale-ui));
|
17
|
+
}
|
18
|
+
|
19
|
+
&[data-width='md'] {
|
20
|
+
width: calc(600px * var(--scale-ui));
|
21
|
+
}
|
22
|
+
|
23
|
+
&[data-width='lg'] {
|
24
|
+
width: calc(800px * var(--scale-ui));
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -1,8 +1,5 @@
|
|
1
1
|
/* Import component styles */
|
2
2
|
|
3
|
-
/* Panels */
|
4
|
-
/*@import "./components/panels/plain-panel.css";*/
|
5
|
-
|
6
3
|
/* Rows */
|
7
4
|
/*@import "./components/rows/panel-grid-row.css";*/
|
8
5
|
/*@import "./components/rows/panel-row-2.css";*/
|
@@ -17,24 +14,18 @@
|
|
17
14
|
/* Icons */
|
18
15
|
@import './components/icons/icon-steeze.css';
|
19
16
|
|
17
|
+
/* Panels */
|
18
|
+
@import './components/panels/panel.css';
|
19
|
+
|
20
20
|
/* Inputs */
|
21
21
|
@import './components/inputs/text-input.css';
|
22
22
|
|
23
23
|
/* ... */
|
24
|
-
/*@import "./components/select-level.css";*/
|
25
24
|
@import './components/blocks/text-block.css';
|
26
25
|
|
27
|
-
/* Not used */
|
28
|
-
/*@import "./components/hk-tab-icon.css";*/
|
29
|
-
/*@import "./components/avatar-layer.css";*/
|
30
|
-
|
31
26
|
/* Wrap component styles in theme selector */
|
32
27
|
|
33
28
|
[data-theme='hkdev'] {
|
34
|
-
/* Panels */
|
35
|
-
/* @mixin panels-plain-panel;*/
|
36
|
-
/* @mixin panels-speech-bubble;*/
|
37
|
-
|
38
29
|
/* Rows */
|
39
30
|
/* @mixin rows-panel-grid-row;*/
|
40
31
|
/* @mixin rows-panel-row-2;*/
|
@@ -47,13 +38,10 @@
|
|
47
38
|
|
48
39
|
@mixin component-icon-steeze;
|
49
40
|
|
41
|
+
@mixin component-panel;
|
42
|
+
|
50
43
|
@mixin text_block;
|
51
44
|
|
52
45
|
/* Inputs */
|
53
46
|
@mixin inputs-text-input;
|
54
|
-
|
55
|
-
/* ... */
|
56
|
-
/* @mixin hk_tab_icon;*/
|
57
|
-
/* @mixin avatar_layer;*/
|
58
|
-
/* @mixin select_level;*/
|
59
47
|
}
|
package/package.json
CHANGED
@@ -1,44 +0,0 @@
|
|
1
|
-
/*@import "../../global/on-colors.css";*/
|
2
|
-
|
3
|
-
@define-mixin panels-plain-panel {
|
4
|
-
[data-panel='plain-panel'] {
|
5
|
-
@mixin on_surface_light;
|
6
|
-
@apply bg-primary-50;
|
7
|
-
|
8
|
-
@apply p-40p rounded-md;
|
9
|
-
|
10
|
-
max-width: 50vw;
|
11
|
-
/* max-width: 27vw;*/
|
12
|
-
/* width: 26vw; */
|
13
|
-
|
14
|
-
& picture {
|
15
|
-
display: block;
|
16
|
-
max-width: 100%;
|
17
|
-
@apply pr-80p;
|
18
|
-
/* border: solid 1px red; */
|
19
|
-
}
|
20
|
-
|
21
|
-
& > .h1 {
|
22
|
-
@apply text-32p mb-20p;
|
23
|
-
}
|
24
|
-
|
25
|
-
& > .p {
|
26
|
-
@apply text-24p mb-10p;
|
27
|
-
|
28
|
-
& + picture {
|
29
|
-
@apply mt-40p;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
& button {
|
34
|
-
/* @apply min-w-180p; */
|
35
|
-
}
|
36
|
-
|
37
|
-
& .cc_cols-stretch {
|
38
|
-
@apply grid auto-cols-fr grid-flow-col;
|
39
|
-
@apply justify-stretch;
|
40
|
-
|
41
|
-
border: solid 8px red;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
@import '../../global/on-colors.css';
|
2
|
-
|
3
|
-
@define-mixin panels-speech-bubble {
|
4
|
-
[data-panel='speech-bubble'] {
|
5
|
-
@mixin on_surface_light;
|
6
|
-
@apply bg-primary-50;
|
7
|
-
|
8
|
-
@apply pt-20p pb-20p pr-40p pl-40p rounded-tl-lg rounded-tr-lg rounded-bl-lg;
|
9
|
-
|
10
|
-
/* max-width: 26vw;*/
|
11
|
-
/* width: 26vw; */
|
12
|
-
|
13
|
-
&.small {
|
14
|
-
max-width: 16vw;
|
15
|
-
}
|
16
|
-
|
17
|
-
& picture {
|
18
|
-
display: block;
|
19
|
-
max-width: 100%;
|
20
|
-
@apply pr-80p;
|
21
|
-
/* border: solid 1px red; */
|
22
|
-
}
|
23
|
-
|
24
|
-
& [data-section='title'] {
|
25
|
-
& .h1 {
|
26
|
-
@apply text-32p pt-8p pb-8p;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
& [data-section='text'] {
|
31
|
-
& .p {
|
32
|
-
@apply text-20p pb-10p;
|
33
|
-
|
34
|
-
/*& + picture {
|
35
|
-
@apply mt-40p;
|
36
|
-
}*/
|
37
|
-
}
|
38
|
-
}
|
39
|
-
|
40
|
-
/* Footer */
|
41
|
-
|
42
|
-
& [data-row][data-section='footer'] {
|
43
|
-
@apply pt-10p;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|