webcoreui 1.0.0 → 1.1.0-beta.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/README.md +3 -0
- package/components/Carousel/Carousel.svelte +18 -15
- package/components/Pagination/Pagination.svelte +1 -1
- package/components/Switch/Switch.astro +1 -1
- package/components/Switch/Switch.svelte +1 -1
- package/components/Switch/Switch.tsx +6 -1
- package/integration.js +38 -0
- package/package.json +5 -3
- package/scss/config/color-palette.scss +1 -1
- package/scss/config/css-values.scss +1 -1
- package/scss/config/layout.scss +1 -1
- package/scss/config/mixins.scss +1 -1
- package/scss/config/typography.scss +1 -1
- package/scss/config/variables.scss +1 -1
- package/scss/config.scss +1 -1
- package/scss/resets.scss +10 -1
- package/utils/webcore.ts +28 -0
package/README.md
CHANGED
|
@@ -289,7 +289,9 @@ import { Accordion } from 'webcoreui/react'
|
|
|
289
289
|
- [ComponentMap](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/ComponentMap)
|
|
290
290
|
- [DeviceMockup](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/DeviceMockup)
|
|
291
291
|
- [ErrorPage](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/ErrorPage)
|
|
292
|
+
- [ExpandableTable](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/ExpandableTable)
|
|
292
293
|
- [FAQ](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/FAQ)
|
|
294
|
+
- [Form](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/Form)
|
|
293
295
|
- [GridWithIcons](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/GridWithIcons)
|
|
294
296
|
- [Hero](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/Hero)
|
|
295
297
|
- [Icon](https://github.com/Frontendland/webcoreui/tree/main/src/blocks/Icon)
|
|
@@ -307,6 +309,7 @@ import { Accordion } from 'webcoreui/react'
|
|
|
307
309
|
|
|
308
310
|
## Templates
|
|
309
311
|
|
|
312
|
+
- [Authentication](https://github.com/Frontendland/webcoreui/tree/main/src/templates/Authentication)
|
|
310
313
|
- [Blog](https://github.com/Frontendland/webcoreui/tree/main/src/templates/Blog)
|
|
311
314
|
- [Portfolio](https://github.com/Frontendland/webcoreui/tree/main/src/templates/Portfolio)
|
|
312
315
|
- [ProductPage](https://github.com/Frontendland/webcoreui/tree/main/src/templates/ProductPage)
|
|
@@ -13,25 +13,28 @@
|
|
|
13
13
|
|
|
14
14
|
import type { PaginationEventType } from '../Pagination/pagination'
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
let {
|
|
17
|
+
items = 0,
|
|
18
|
+
itemsPerSlide = 1,
|
|
19
|
+
subText,
|
|
20
|
+
scrollSnap = true,
|
|
21
|
+
progress,
|
|
22
|
+
pagination,
|
|
23
|
+
effect,
|
|
24
|
+
debounce = 20,
|
|
25
|
+
className,
|
|
26
|
+
wrapperClassName,
|
|
27
|
+
paginationClassName,
|
|
28
|
+
children,
|
|
29
|
+
onScroll
|
|
30
|
+
}: SvelteCarouselProps = $props()
|
|
28
31
|
|
|
29
32
|
let carouselContainer: HTMLDivElement
|
|
30
33
|
let carousel: HTMLUListElement
|
|
31
34
|
let carouselItems: HTMLCollection | NodeListOf<HTMLLIElement>
|
|
32
|
-
let progressValue = 0
|
|
35
|
+
let progressValue = $state(0)
|
|
33
36
|
let paginated = false
|
|
34
|
-
let currentPage = 1
|
|
37
|
+
let currentPage = $state(1)
|
|
35
38
|
|
|
36
39
|
const classes = classNames([
|
|
37
40
|
styles.carousel,
|
|
@@ -141,7 +144,7 @@
|
|
|
141
144
|
<section class={classes}>
|
|
142
145
|
<div class={containerClasses} bind:this={carouselContainer}>
|
|
143
146
|
<ul class={wrapperClasses} style={style} bind:this={carousel}>
|
|
144
|
-
|
|
147
|
+
{@render children?.()}
|
|
145
148
|
</ul>
|
|
146
149
|
</div>
|
|
147
150
|
<ConditionalWrapper
|
|
@@ -38,5 +38,5 @@ const styleVariables = classNames([
|
|
|
38
38
|
<label class:list={classes} style={styleVariables}>
|
|
39
39
|
<input type="checkbox" checked={toggled} disabled={disabled} {...rest} />
|
|
40
40
|
<span class={styles.toggle}></span>
|
|
41
|
-
{label && <span class={styles.label}
|
|
41
|
+
{label && <span class={styles.label} set:html={label} />}
|
|
42
42
|
</label>
|
|
@@ -42,7 +42,12 @@ const Switch = ({
|
|
|
42
42
|
{...rest}
|
|
43
43
|
/>
|
|
44
44
|
<span className={styles.toggle}></span>
|
|
45
|
-
{label &&
|
|
45
|
+
{label && (
|
|
46
|
+
<span
|
|
47
|
+
className={styles.label}
|
|
48
|
+
dangerouslySetInnerHTML={{ __html: label }}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
46
51
|
</label>
|
|
47
52
|
)
|
|
48
53
|
}
|
package/integration.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import path from 'path'
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
ssr: {
|
|
5
|
+
noExternal: ['webcoreui']
|
|
6
|
+
},
|
|
7
|
+
css: {
|
|
8
|
+
preprocessorOptions: {
|
|
9
|
+
scss: {
|
|
10
|
+
loadPaths: [
|
|
11
|
+
path.resolve(process.cwd())
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const webcore = () => {
|
|
19
|
+
return {
|
|
20
|
+
name: 'webcoreui',
|
|
21
|
+
hooks: {
|
|
22
|
+
'astro:config:setup': ({ updateConfig }) => {
|
|
23
|
+
updateConfig({
|
|
24
|
+
vite: config
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const webcoreVite = () => {
|
|
32
|
+
return {
|
|
33
|
+
name: 'webcoreui',
|
|
34
|
+
config() {
|
|
35
|
+
return config
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcoreui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.1.0-beta.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepare": "husky",
|
|
7
7
|
"pre-commit": "lint-staged",
|
|
8
8
|
"dev": "astro dev",
|
|
9
9
|
"build": "astro check && astro build",
|
|
10
10
|
"build:package": "node scripts/build.js",
|
|
11
|
-
"build:local": "node scripts/build.js --local",
|
|
12
11
|
"compile": "node scripts/sass.js",
|
|
13
12
|
"test": "cd .. && vitest run && npm run test:sass",
|
|
14
13
|
"test:dev": "vitest",
|
|
@@ -23,6 +22,7 @@
|
|
|
23
22
|
"@astrojs/react": "4.2.1",
|
|
24
23
|
"@astrojs/svelte": "7.0.7",
|
|
25
24
|
"@eslint/js": "9.23.0",
|
|
25
|
+
"@types/node": "24.2.1",
|
|
26
26
|
"@typescript-eslint/parser": "8.27.0",
|
|
27
27
|
"astro": "5.5.4",
|
|
28
28
|
"astro-eslint-parser": "1.2.2",
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
"./astro": "./astro.js",
|
|
51
51
|
"./svelte": "./svelte.js",
|
|
52
52
|
"./react": "./react.js",
|
|
53
|
-
"./styles": "./scss/index.scss",
|
|
54
53
|
"./icons": "./icons.js",
|
|
54
|
+
"./integration": "./integration.js",
|
|
55
|
+
"./styles": "./scss/index.scss",
|
|
55
56
|
"./config": "./scss/config.scss"
|
|
56
57
|
},
|
|
57
58
|
"files": [
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"react.js",
|
|
70
71
|
"index.js",
|
|
71
72
|
"index.d.ts",
|
|
73
|
+
"integration.js",
|
|
72
74
|
"README.md",
|
|
73
75
|
"LICENSE"
|
|
74
76
|
],
|
package/scss/config/layout.scss
CHANGED
package/scss/config/mixins.scss
CHANGED
package/scss/config.scss
CHANGED
package/scss/resets.scss
CHANGED
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
strong,
|
|
39
39
|
b {
|
|
40
40
|
font-family: Bold, 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
|
|
41
|
+
|
|
42
|
+
@if ($fontBold) {
|
|
43
|
+
font-weight: normal;
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
a {
|
|
@@ -117,8 +121,13 @@
|
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
thead,
|
|
120
|
-
tfoot
|
|
124
|
+
tfoot,
|
|
125
|
+
th {
|
|
121
126
|
@include typography(bold);
|
|
127
|
+
|
|
128
|
+
@if ($fontBold) {
|
|
129
|
+
font-weight: normal;
|
|
130
|
+
}
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
th,
|
package/utils/webcore.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AstroIntegration } from 'astro'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
export const webcore = (): AstroIntegration => {
|
|
5
|
+
return {
|
|
6
|
+
name: 'webcoreui',
|
|
7
|
+
hooks: {
|
|
8
|
+
'astro:config:setup': ({ updateConfig }) => {
|
|
9
|
+
updateConfig({
|
|
10
|
+
vite: {
|
|
11
|
+
ssr: {
|
|
12
|
+
noExternal: ['webcoreui']
|
|
13
|
+
},
|
|
14
|
+
css: {
|
|
15
|
+
preprocessorOptions: {
|
|
16
|
+
scss: {
|
|
17
|
+
loadPaths: [
|
|
18
|
+
path.resolve(process.cwd())
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|