@hkdigital/lib-sveltekit 0.0.99 → 0.1.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/area/HkArea.svelte +1 -1
- package/dist/components/area/HkGridArea.svelte +1 -1
- package/dist/components/boxes/game-box/GameBox.svelte +112 -0
- package/dist/components/boxes/game-box/GameBox.svelte.d.ts +13 -0
- package/dist/components/boxes/game-box/gamebox.util.d.ts +32 -0
- package/dist/components/boxes/game-box/gamebox.util.js +83 -0
- package/dist/components/boxes/index.d.ts +2 -0
- package/dist/components/boxes/index.js +2 -0
- package/dist/components/boxes/virtual-viewport/VirtualViewport.svelte +199 -0
- package/dist/components/boxes/virtual-viewport/VirtualViewport.svelte.d.ts +20 -0
- package/dist/components/buttons/button/Button.svelte +75 -0
- package/dist/components/buttons/button/Button.svelte.d.ts +19 -0
- package/dist/components/buttons/button-text/TextButton.svelte +21 -0
- package/dist/components/buttons/button-text/TextButton.svelte.d.ts +5 -0
- package/dist/components/buttons/index.d.ts +2 -1
- package/dist/components/buttons/index.js +2 -1
- package/dist/components/hkdev/blocks/TextBlock.svelte +47 -0
- package/dist/components/hkdev/blocks/TextBlock.svelte.d.ts +11 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte +63 -0
- package/dist/components/hkdev/buttons/CheckButton.svelte.d.ts +16 -0
- package/dist/components/icon/HkIcon.svelte +1 -1
- package/dist/components/icon/HkTabIcon.svelte +6 -2
- package/dist/components/image/EnhancedImage.svelte__ +1 -1
- package/dist/components/image/ResponsiveImage.svelte +1 -1
- package/dist/components/image/ResponsiveImage.svelte__ +1 -1
- package/dist/components/inputs/text-input/TestTextInput.svelte__ +2 -2
- package/dist/components/inputs/text-input/TextInput.svelte +1 -1
- package/dist/components/inputs/text-input/TextInput.svelte___ +1 -1
- package/dist/components/layout/HkGridLayers.svelte +1 -1
- package/dist/components/panels/plain-panel/PlainPanel.svelte +1 -1
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte +1 -1
- package/dist/components/rows/panel-row-2/PanelRow2.svelte +1 -1
- package/dist/components/tab-bar/HkTabBar.svelte +1 -1
- package/dist/components/tab-bar/HkTabBarSelector.svelte +1 -1
- package/dist/design-system/design-config.d.ts +156 -0
- package/dist/design-system/design-config.js +73 -0
- package/dist/design-system/tailwind-theme-extend.d.ts +23 -0
- package/dist/design-system/tailwind-theme-extend.js +151 -0
- package/dist/themes/hkdev/components/blocks/text-block.postcss +41 -0
- package/dist/themes/hkdev/components/buttons/button-text.postcss +34 -0
- package/dist/themes/hkdev/components/buttons/button.postcss +138 -0
- package/dist/themes/hkdev/components/buttons/button.postcss__ +40 -0
- package/dist/themes/hkdev/components/buttons/button.postcss___ +91 -0
- package/dist/themes/hkdev/components.postcss +8 -2
- package/dist/themes/hkdev/globals.postcss +5 -6
- package/dist/util/css/css-vars.d.ts +24 -0
- package/dist/util/css/css-vars.js +83 -0
- package/dist/util/css/index.d.ts +1 -0
- package/dist/util/css/index.js +1 -0
- package/dist/util/design-system/components/states.d.ts +15 -0
- package/dist/util/design-system/components/states.js +22 -0
- package/dist/util/design-system/css/clamp.d.ts +17 -0
- package/dist/util/design-system/css/clamp.js +66 -0
- package/dist/util/design-system/css/root-design-vars.d.ts +77 -0
- package/dist/util/design-system/css/root-design-vars.js +100 -0
- package/dist/util/design-system/index.d.ts +5 -0
- package/dist/util/design-system/index.js +5 -0
- package/dist/util/design-system/layout/scaling.d.ts +44 -0
- package/dist/util/design-system/layout/scaling.js +97 -0
- package/dist/util/design-system/tailwind.d.ts +176 -0
- package/dist/util/design-system/tailwind.js +289 -0
- package/package.json +10 -11
- package/dist/components/buttons/plain-button/PlainButton.svelte +0 -37
- package/dist/components/buttons/plain-button/PlainButton.svelte.d.ts +0 -10
- package/dist/config/tailwind.extend.d.ts +0 -56
- package/dist/config/tailwind.extend.js +0 -64
- package/dist/themes/hkdev/components/buttons/plain-button.postcss +0 -73
@@ -0,0 +1,289 @@
|
|
1
|
+
/**
|
2
|
+
* Generates text-based spacing units with with different scaling
|
3
|
+
* units (ut, ct, ht)
|
4
|
+
*
|
5
|
+
* @param {number[]} values
|
6
|
+
* Array of pixel values to generate text-based spacing units for
|
7
|
+
*
|
8
|
+
* @returns {{[key: string]: string}}
|
9
|
+
* Generated text-based spacing units with ut, ct, and ht suffixes
|
10
|
+
*
|
11
|
+
* @throws {Error} If values is not an array or contains non-numeric values
|
12
|
+
*
|
13
|
+
* @example
|
14
|
+
* generateTextBasedSpacing([1, 2, 4, 8])
|
15
|
+
* // Returns:
|
16
|
+
* // {
|
17
|
+
* // '1ut': 'calc(1px * var(--scale-text-ui))',
|
18
|
+
* // '2ut': 'calc(2px * var(--scale-text-ui))',
|
19
|
+
* // '1ct': 'calc(1px * var(--scale-text-content))',
|
20
|
+
* // '2ct': 'calc(2px * var(--scale-text-content))',
|
21
|
+
* // '1ht': 'calc(1px * var(--scale-text-heading))',
|
22
|
+
* // '2ht': 'calc(2px * var(--scale-text-heading))'
|
23
|
+
* // }
|
24
|
+
*/
|
25
|
+
export function generateTextBasedSpacing(values) {
|
26
|
+
if (!Array.isArray(values)) {
|
27
|
+
throw new Error('values must be an array');
|
28
|
+
}
|
29
|
+
|
30
|
+
return values.reduce((units, value) => {
|
31
|
+
if (typeof value !== 'number' || isNaN(value)) {
|
32
|
+
throw new Error(`Invalid spacing value: ${value}. Must be a number.`);
|
33
|
+
}
|
34
|
+
|
35
|
+
// Generate UI text spacing units
|
36
|
+
units[`${value}ut`] = `calc(${value}px * var(--scale-text-ui))`;
|
37
|
+
|
38
|
+
// Generate content text spacing units
|
39
|
+
units[`${value}ct`] = `calc(${value}px * var(--scale-text-content))`;
|
40
|
+
|
41
|
+
// Generate heading text spacing units
|
42
|
+
units[`${value}ht`] = `calc(${value}px * var(--scale-text-heading))`;
|
43
|
+
|
44
|
+
return units;
|
45
|
+
}, {});
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Generates viewport-based spacing units with different scaling
|
50
|
+
* units (p, vp, wp, hp)
|
51
|
+
*
|
52
|
+
* @param {number[]} values
|
53
|
+
* Array of pixel values to generate viewport-based spacing units for
|
54
|
+
*
|
55
|
+
* @returns {Object.<string, string>}
|
56
|
+
* Generated viewport-based spacing units:
|
57
|
+
* - p: UI points (clamped scaling)
|
58
|
+
* - vp: Viewport points (min of width/height)
|
59
|
+
* - wp: Width points
|
60
|
+
* - hp: Height points
|
61
|
+
*
|
62
|
+
* @throws {Error} If values is not an array or contains non-numeric values
|
63
|
+
*
|
64
|
+
* @example
|
65
|
+
* generateViewportBasedSpacing([1, 2, 4])
|
66
|
+
* // Returns:
|
67
|
+
* // {
|
68
|
+
* // '1p': 'calc(1px * var(--scale-ui))',
|
69
|
+
* // '1vp': 'calc(1px * var(--scale-viewport))',
|
70
|
+
* // '1wp': 'calc(1px * var(--scale-w))',
|
71
|
+
* // '1hp': 'calc(1px * var(--scale-h))'
|
72
|
+
* // }
|
73
|
+
*/
|
74
|
+
export function generateViewportBasedSpacing(values) {
|
75
|
+
if (!Array.isArray(values)) {
|
76
|
+
throw new Error('values must be an array');
|
77
|
+
}
|
78
|
+
|
79
|
+
return values.reduce((units, value) => {
|
80
|
+
if (typeof value !== 'number' || isNaN(value)) {
|
81
|
+
throw new Error(`Invalid spacing value: ${value}. Must be a number.`);
|
82
|
+
}
|
83
|
+
|
84
|
+
// Viewport points (min of width/height)
|
85
|
+
units[`${value}vp`] = `calc(${value}px * var(--scale-viewport))`;
|
86
|
+
// Width points
|
87
|
+
units[`${value}wp`] = `calc(${value}px * var(--scale-w))`;
|
88
|
+
// Height points
|
89
|
+
units[`${value}hp`] = `calc(${value}px * var(--scale-h))`;
|
90
|
+
// UI points
|
91
|
+
units[`${value}p`] = `calc(${value}px * var(--scale-ui))`;
|
92
|
+
return units;
|
93
|
+
}, {});
|
94
|
+
}
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Generates semantic text style definitions for a specific text category
|
98
|
+
* (content, UI, or heading). Each style includes a scaled font size and
|
99
|
+
* line height.
|
100
|
+
*
|
101
|
+
* @param {{[key: string]: {size: number, lineHeight?: number}}} sizes
|
102
|
+
* Set of text sizes to generate styles for
|
103
|
+
*
|
104
|
+
* @param {'content' | 'ui' | 'heading'} category
|
105
|
+
* Text category to generate styles for
|
106
|
+
*
|
107
|
+
* @returns {{[key: string]: [string, {lineHeight: number}]}}
|
108
|
+
* Generated text styles in Tailwind format
|
109
|
+
*
|
110
|
+
* @throws {Error} If a size has an invalid size or lineHeight
|
111
|
+
*
|
112
|
+
* @example
|
113
|
+
* const TEXT_CONTENT_SIZES = {
|
114
|
+
* sm: { size: 16, lineHeight: 1.5 },
|
115
|
+
* base: { size: 20, lineHeight: 1.5 },
|
116
|
+
* lg: { size: 24, lineHeight: 1.4 }
|
117
|
+
* };
|
118
|
+
*
|
119
|
+
* generateTextStyles(TEXT_CONTENT_SIZES, 'content');
|
120
|
+
* // Returns:
|
121
|
+
* // {
|
122
|
+
* // 'content-sm':
|
123
|
+
* // ['calc(16px * var(--scale-text-content))', { lineHeight: 1.5 }],
|
124
|
+
* // 'content-base':
|
125
|
+
* // ['calc(20px * var(--scale-text-content))', { lineHeight: 1.5 }],
|
126
|
+
* // 'content-lg':
|
127
|
+
* // ['calc(24px * var(--scale-text-content))', { lineHeight: 1.4 }]
|
128
|
+
* // }
|
129
|
+
*/
|
130
|
+
export function generateTextStyles(sizes, category) {
|
131
|
+
if (!sizes || typeof sizes !== 'object') {
|
132
|
+
throw new Error('sizes must be an object');
|
133
|
+
}
|
134
|
+
|
135
|
+
if (!['content', 'ui', 'heading'].includes(category)) {
|
136
|
+
throw new Error('category must be one of: content, ui, heading');
|
137
|
+
}
|
138
|
+
|
139
|
+
return Object.entries(sizes).reduce((result, [variant, config]) => {
|
140
|
+
// Validate config
|
141
|
+
if (!config || typeof config !== 'object') {
|
142
|
+
throw new Error(
|
143
|
+
`Invalid size config for "${variant}": must be an object`
|
144
|
+
);
|
145
|
+
}
|
146
|
+
|
147
|
+
if (typeof config.size !== 'number') {
|
148
|
+
throw new Error(
|
149
|
+
`Invalid size for "${category}-${variant}": must be a number`
|
150
|
+
);
|
151
|
+
}
|
152
|
+
|
153
|
+
if (
|
154
|
+
config.lineHeight !== undefined &&
|
155
|
+
typeof config.lineHeight !== 'number'
|
156
|
+
) {
|
157
|
+
throw new Error(
|
158
|
+
`Invalid lineHeight for "${category}-${variant}": must be a number`
|
159
|
+
);
|
160
|
+
}
|
161
|
+
|
162
|
+
const { size, lineHeight = 1.5 } = config;
|
163
|
+
|
164
|
+
result[`${category}-${variant}`] = [
|
165
|
+
`calc(${size}px * var(--scale-text-${category}))`,
|
166
|
+
{ lineHeight }
|
167
|
+
];
|
168
|
+
|
169
|
+
return result;
|
170
|
+
}, {});
|
171
|
+
}
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Generates border radius styles with UI scaling
|
175
|
+
*
|
176
|
+
* @param {{[key: string]: string | {size: number}}} sizes
|
177
|
+
* Set of radius sizes to generate, either as:
|
178
|
+
* - Object with size property (e.g., { size: 10 })
|
179
|
+
* - Direct string value (e.g., '0px', '9999px')
|
180
|
+
*
|
181
|
+
* @returns {Object.<string, string>}
|
182
|
+
* Generated border radius styles in Tailwind format
|
183
|
+
*
|
184
|
+
* @throws {Error} If a value has an invalid type
|
185
|
+
*
|
186
|
+
* @example
|
187
|
+
* const RADIUS_SIZES = {
|
188
|
+
* none: '0px',
|
189
|
+
* sm: { size: 10 },
|
190
|
+
* md: { size: 15 },
|
191
|
+
* full: '9999px'
|
192
|
+
* };
|
193
|
+
*
|
194
|
+
* generateBorderRadiusStyles(RADIUS_SIZES)
|
195
|
+
* // Returns:
|
196
|
+
* // {
|
197
|
+
* // 'none': '0px',
|
198
|
+
* // 'sm': 'calc(10px * var(--scale-ui))',
|
199
|
+
* // 'md': 'calc(15px * var(--scale-ui))',
|
200
|
+
* // 'full': '9999px'
|
201
|
+
* // }
|
202
|
+
*/
|
203
|
+
export function generateBorderRadiusStyles(sizes) {
|
204
|
+
if (!sizes || typeof sizes !== 'object') {
|
205
|
+
throw new Error('sizes must be an object');
|
206
|
+
}
|
207
|
+
|
208
|
+
return Object.entries(sizes).reduce((result, [variant, value]) => {
|
209
|
+
if (typeof value === 'object' && value !== null) {
|
210
|
+
// Handle {size: 10} format
|
211
|
+
if (typeof value.size !== 'number') {
|
212
|
+
throw new Error(
|
213
|
+
`Invalid radius size for "${variant}": size must be a number`
|
214
|
+
);
|
215
|
+
}
|
216
|
+
result[variant] = `calc(${value.size}px * var(--scale-ui))`;
|
217
|
+
} else if (typeof value === 'string') {
|
218
|
+
// Handle direct strings (like '0px' or '9999px')
|
219
|
+
result[variant] = value;
|
220
|
+
} else {
|
221
|
+
throw new Error(
|
222
|
+
`Invalid radius value for "${variant}": ` +
|
223
|
+
`must be an object with size property or a string`
|
224
|
+
);
|
225
|
+
}
|
226
|
+
return result;
|
227
|
+
}, {});
|
228
|
+
}
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Generates width styles for various CSS properties with UI scaling and explicit naming
|
232
|
+
*
|
233
|
+
* @param {{[key: string]: {size: number}}} sizes
|
234
|
+
* Set of width sizes to generate
|
235
|
+
*
|
236
|
+
* @param {string} [prefix='width']
|
237
|
+
* Prefix to add before each variant name (default: 'width')
|
238
|
+
*
|
239
|
+
* @param {string} scaleVar
|
240
|
+
* CSS variable to use for scaling (default: '--scale-ui')
|
241
|
+
*
|
242
|
+
* @returns {{[key: string]: string}}
|
243
|
+
* Generated width styles in Tailwind format
|
244
|
+
*
|
245
|
+
* @throws {Error} If a size has an invalid type
|
246
|
+
*
|
247
|
+
* @example
|
248
|
+
* const WIDTH_SIZES = {
|
249
|
+
* thin: { size: 1 },
|
250
|
+
* normal: { size: 2 },
|
251
|
+
* thick: { size: 4 }
|
252
|
+
* };
|
253
|
+
*
|
254
|
+
* generateWidthStyles(WIDTH_SIZES, 'width')
|
255
|
+
* // Returns:
|
256
|
+
* // {
|
257
|
+
* // 'width-thin': 'calc(1px * var(--scale-ui))',
|
258
|
+
* // 'width-normal': 'calc(2px * var(--scale-ui))',
|
259
|
+
* // 'width-thick': 'calc(4px * var(--scale-ui))'
|
260
|
+
* // }
|
261
|
+
*/
|
262
|
+
export function generateWidthStyles(
|
263
|
+
sizes,
|
264
|
+
prefix = 'width',
|
265
|
+
scaleVar = '--scale-ui'
|
266
|
+
) {
|
267
|
+
if (!sizes || typeof sizes !== 'object') {
|
268
|
+
throw new Error('sizes must be an object');
|
269
|
+
}
|
270
|
+
|
271
|
+
return Object.entries(sizes).reduce((result, [variant, value]) => {
|
272
|
+
if (typeof value === 'object' && value !== null) {
|
273
|
+
if (typeof value.size !== 'number') {
|
274
|
+
throw new Error(
|
275
|
+
`Invalid width size for "${variant}": size must be a number`
|
276
|
+
);
|
277
|
+
}
|
278
|
+
|
279
|
+
result[`${prefix}${prefix.length ? '-' : ''}${variant}`] =
|
280
|
+
`calc(${value.size}px * var(${scaleVar}))`;
|
281
|
+
} else {
|
282
|
+
throw new Error(
|
283
|
+
`Invalid width value for "${variant}": ` +
|
284
|
+
`must be an object with size property`
|
285
|
+
);
|
286
|
+
}
|
287
|
+
return result;
|
288
|
+
}, {});
|
289
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hkdigital/lib-sveltekit",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.1.1",
|
4
4
|
"author": {
|
5
5
|
"name": "HKdigital",
|
6
6
|
"url": "https://hkdigital.nl"
|
@@ -20,19 +20,19 @@
|
|
20
20
|
],
|
21
21
|
"scripts": {
|
22
22
|
"dev": "vite dev",
|
23
|
-
"build": "
|
23
|
+
"build": "vite build && npm run package",
|
24
24
|
"preview": "vite preview",
|
25
|
-
"package": "
|
26
|
-
"prepublishOnly": "
|
27
|
-
"publish:npm": "
|
28
|
-
"check": "
|
29
|
-
"check:watch": "
|
25
|
+
"package": "svelte-kit sync && svelte-package && publint",
|
26
|
+
"prepublishOnly": "npm run package",
|
27
|
+
"publish:npm": "npm version patch && npm publish --access public && git push",
|
28
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
|
29
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
|
30
30
|
"format": "prettier --write .",
|
31
|
-
"lint": "
|
31
|
+
"lint": "prettier --check . && eslint .",
|
32
32
|
"test:unit": "vitest",
|
33
|
-
"test": "
|
33
|
+
"test": "npm run test:unit -- --run && npm run test:e2e",
|
34
34
|
"test:e2e": "playwright test",
|
35
|
-
"upgrade:all": "
|
35
|
+
"upgrade:all": "ncu -u && pnpm install"
|
36
36
|
},
|
37
37
|
"files": [
|
38
38
|
"dist",
|
@@ -73,7 +73,6 @@
|
|
73
73
|
"@tailwindcss/typography": "^0.5.16",
|
74
74
|
"@types/eslint": "^9.6.1",
|
75
75
|
"autoprefixer": "^10.4.20",
|
76
|
-
"cross-env": "^7.0.3",
|
77
76
|
"eslint": "^9.18.0",
|
78
77
|
"eslint-config-prettier": "^10.0.1",
|
79
78
|
"eslint-plugin-svelte": "^2.46.1",
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<script>
|
2
|
-
/**
|
3
|
-
* @type {{
|
4
|
-
* base?: string,
|
5
|
-
* bg?: string,
|
6
|
-
* variant?: string,
|
7
|
-
* classes?: string,
|
8
|
-
* role?: 'primary' | 'secondary',
|
9
|
-
* children: import('svelte').Snippet,
|
10
|
-
* [key: string]: any
|
11
|
-
* }}
|
12
|
-
*/
|
13
|
-
const {
|
14
|
-
// Style
|
15
|
-
base,
|
16
|
-
bg,
|
17
|
-
variant,
|
18
|
-
classes,
|
19
|
-
|
20
|
-
role = 'primary',
|
21
|
-
|
22
|
-
// Snippets
|
23
|
-
children,
|
24
|
-
|
25
|
-
// Attributes
|
26
|
-
...attrs
|
27
|
-
} = $props();
|
28
|
-
</script>
|
29
|
-
|
30
|
-
<button
|
31
|
-
data-button="plain-button"
|
32
|
-
type="button"
|
33
|
-
class="{base} {bg} {variant} {classes} role-{role}"
|
34
|
-
{...attrs}
|
35
|
-
>
|
36
|
-
<p class="p">{@render children()}</p>
|
37
|
-
</button>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
export default PlainButton;
|
2
|
-
declare const PlainButton: import("svelte").Component<{
|
3
|
-
[key: string]: any;
|
4
|
-
base?: string;
|
5
|
-
bg?: string;
|
6
|
-
variant?: string;
|
7
|
-
classes?: string;
|
8
|
-
role?: "primary" | "secondary";
|
9
|
-
children: import("svelte").Snippet;
|
10
|
-
}, {}, "">;
|
@@ -1,56 +0,0 @@
|
|
1
|
-
export const spacing: {
|
2
|
-
'5p': string;
|
3
|
-
'10p': string;
|
4
|
-
'20p': string;
|
5
|
-
'30p': string;
|
6
|
-
'40p': string;
|
7
|
-
'50p': string;
|
8
|
-
'60p': string;
|
9
|
-
'80p': string;
|
10
|
-
'100p': string;
|
11
|
-
'120p': string;
|
12
|
-
'160p': string;
|
13
|
-
'180p': string;
|
14
|
-
'1p': string;
|
15
|
-
'2p': string;
|
16
|
-
'4p': string;
|
17
|
-
'6p': string;
|
18
|
-
'8p': string;
|
19
|
-
'16p': string;
|
20
|
-
'24p': string;
|
21
|
-
};
|
22
|
-
export const fontSize: {
|
23
|
-
'12p': string;
|
24
|
-
'14p': string;
|
25
|
-
'16p': string;
|
26
|
-
'18p': string;
|
27
|
-
'20p': string;
|
28
|
-
'24p': string;
|
29
|
-
'32p': string;
|
30
|
-
'50p': string;
|
31
|
-
sm: string;
|
32
|
-
base: string;
|
33
|
-
lg: string;
|
34
|
-
xl: string;
|
35
|
-
};
|
36
|
-
export namespace borderRadius {
|
37
|
-
let none: number;
|
38
|
-
let xs: string;
|
39
|
-
let sm: string;
|
40
|
-
let md: string;
|
41
|
-
let lg: string;
|
42
|
-
let xl: string;
|
43
|
-
let full: string;
|
44
|
-
}
|
45
|
-
export const borderWidth: {
|
46
|
-
'1p': string;
|
47
|
-
'2p': string;
|
48
|
-
'4p': string;
|
49
|
-
};
|
50
|
-
export const strokeWidth: {
|
51
|
-
'1p': string;
|
52
|
-
'2p': string;
|
53
|
-
'4p': string;
|
54
|
-
'6p': string;
|
55
|
-
'8p': string;
|
56
|
-
};
|
@@ -1,64 +0,0 @@
|
|
1
|
-
export const spacing = {
|
2
|
-
// Between elements spacing
|
3
|
-
'5p': '0.3125rem',
|
4
|
-
'10p': '0.625rem',
|
5
|
-
'20p': '1.25rem',
|
6
|
-
'30p': '1.875rem',
|
7
|
-
'40p': '2.5rem',
|
8
|
-
'50p': '3.125rem',
|
9
|
-
'60p': '3.75rem',
|
10
|
-
'80p': '5rem',
|
11
|
-
'100p': '6.25rem',
|
12
|
-
'120p': '7.5rem',
|
13
|
-
'160p': '10rem',
|
14
|
-
'180p': '11.25rem',
|
15
|
-
|
16
|
-
// Text related spacing
|
17
|
-
'1p': '0.0625rem',
|
18
|
-
'2p': '0.125rem',
|
19
|
-
'4p': '0.25rem',
|
20
|
-
'6p': '0.375rem',
|
21
|
-
'8p': '0.5rem',
|
22
|
-
'16p': '1rem',
|
23
|
-
'24p': '1.5rem'
|
24
|
-
};
|
25
|
-
|
26
|
-
export const fontSize = {
|
27
|
-
'12p': '0.75rem',
|
28
|
-
'14p': '0.875rem',
|
29
|
-
'16p': '1rem',
|
30
|
-
'18p': '1.125rem',
|
31
|
-
'20p': '1.25rem',
|
32
|
-
'24p': '1.5rem',
|
33
|
-
'32p': '2rem',
|
34
|
-
'50p': '3.125rem',
|
35
|
-
|
36
|
-
sm: '0.875rem',
|
37
|
-
base: '1rem',
|
38
|
-
lg: '1.125rem',
|
39
|
-
xl: '1.25rem'
|
40
|
-
};
|
41
|
-
|
42
|
-
export const borderRadius = {
|
43
|
-
none: 0,
|
44
|
-
xs: '0.250rem',
|
45
|
-
sm: '0.875rem',
|
46
|
-
md: '1.25rem',
|
47
|
-
lg: '2rem',
|
48
|
-
xl: '3.125rem',
|
49
|
-
full: '9999px'
|
50
|
-
};
|
51
|
-
|
52
|
-
export const borderWidth = {
|
53
|
-
'1p': '0.0625rem',
|
54
|
-
'2p': '0.125rem',
|
55
|
-
'4p': '0.250rem'
|
56
|
-
};
|
57
|
-
|
58
|
-
export const strokeWidth = {
|
59
|
-
'1p': '0.0625rem',
|
60
|
-
'2p': '0.125rem',
|
61
|
-
'4p': '0.250rem',
|
62
|
-
'6p': '0.375rem',
|
63
|
-
'8p': '0.5rem'
|
64
|
-
};
|
@@ -1,73 +0,0 @@
|
|
1
|
-
|
2
|
-
@import "../../global/on-colors.postcss";
|
3
|
-
|
4
|
-
@define-mixin buttons-plain-button {
|
5
|
-
|
6
|
-
[data-button="plain-button"] {
|
7
|
-
@apply py-6p rounded-sm;
|
8
|
-
|
9
|
-
& p {
|
10
|
-
@apply text-20p base-font-family font-black my-0 mx-16p uppercase;
|
11
|
-
}
|
12
|
-
|
13
|
-
/* not disabled */
|
14
|
-
|
15
|
-
&:not([disabled]) {
|
16
|
-
&.role-primary {
|
17
|
-
@apply border-4p border-primary-500 bg-primary-500;
|
18
|
-
& .p {
|
19
|
-
color: rgb(var(--color-primary-50));
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
&.role-secondary {
|
24
|
-
@apply border-4p border-primary-500;
|
25
|
-
|
26
|
-
& .p {
|
27
|
-
color: rgb(var(--color-primary-500));
|
28
|
-
}
|
29
|
-
|
30
|
-
&.variant-white
|
31
|
-
{
|
32
|
-
@apply border-surface-50;
|
33
|
-
|
34
|
-
& .p {
|
35
|
-
color: rgb(var(--color-surface-50));
|
36
|
-
}
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
/* disabled */
|
42
|
-
|
43
|
-
&[disabled] {
|
44
|
-
&.role-primary {
|
45
|
-
@apply bg-surface-500;
|
46
|
-
& .p {
|
47
|
-
color: rgb(var(--color-surface-300));
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
&.role-secondary {
|
52
|
-
@apply border-4p bg-primary-50;
|
53
|
-
|
54
|
-
& .p {
|
55
|
-
color: rgb(var(--color-surface-300));
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
/*[data-button-round-arrow-next] {
|
65
|
-
/ * @apply bg-primary-500; * /
|
66
|
-
@apply text-24p base-font-family font-bold;
|
67
|
-
|
68
|
-
& svg {
|
69
|
-
color: rgb(var(--color-primary-500));
|
70
|
-
@apply w-80p h-80p;
|
71
|
-
}
|
72
|
-
}*/
|
73
|
-
}
|