webcoreui 1.2.0 → 1.3.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.
Files changed (43) hide show
  1. package/README.md +11 -6
  2. package/astro.d.ts +3 -0
  3. package/astro.js +2 -0
  4. package/components/Badge/Badge.astro +2 -0
  5. package/components/Badge/Badge.svelte +2 -0
  6. package/components/Badge/Badge.tsx +2 -0
  7. package/components/Badge/badge.module.scss +26 -0
  8. package/components/Badge/badge.ts +1 -0
  9. package/components/Counter/Counter.astro +164 -0
  10. package/components/Counter/Counter.svelte +141 -0
  11. package/components/Counter/Counter.tsx +161 -0
  12. package/components/Counter/counter.module.scss +155 -0
  13. package/components/Counter/counter.ts +21 -0
  14. package/components/DataTable/DataTable.tsx +1 -1
  15. package/components/Icon/map.ts +2 -0
  16. package/components/List/List.astro +3 -0
  17. package/components/List/List.svelte +12 -9
  18. package/components/List/List.tsx +3 -0
  19. package/components/List/list.module.scss +5 -0
  20. package/components/List/list.ts +40 -39
  21. package/components/Menu/Menu.tsx +1 -1
  22. package/components/Pagination/Pagination.tsx +1 -1
  23. package/components/Pagination/pagination.module.scss +1 -0
  24. package/components/Popover/Popover.astro +28 -26
  25. package/components/Popover/Popover.svelte +2 -0
  26. package/components/Popover/Popover.tsx +2 -0
  27. package/components/Popover/popover.module.scss +6 -0
  28. package/components/Popover/popover.ts +17 -16
  29. package/components/Progress/Progress.astro +6 -2
  30. package/components/Progress/Progress.svelte +6 -2
  31. package/components/Progress/Progress.tsx +6 -2
  32. package/components/Progress/progress.module.scss +15 -0
  33. package/components/Progress/progress.ts +1 -0
  34. package/components/RangeSlider/RangeSlider.astro +5 -0
  35. package/components/RangeSlider/rangeslider.ts +1 -0
  36. package/icons/minus.svg +3 -0
  37. package/icons.d.ts +1 -0
  38. package/icons.js +1 -0
  39. package/package.json +111 -109
  40. package/react.d.ts +3 -0
  41. package/react.js +2 -0
  42. package/svelte.d.ts +3 -0
  43. package/svelte.js +2 -0
@@ -58,6 +58,12 @@ body {
58
58
  }
59
59
  }
60
60
 
61
+ &.indeterminate .progress {
62
+ @include position(relative);
63
+
64
+ animation: load 1s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
65
+ }
66
+
61
67
  .progress {
62
68
  @include transition(width);
63
69
  @include size('h100%');
@@ -68,3 +74,12 @@ body {
68
74
  width: var(--w-progress-width);
69
75
  }
70
76
  }
77
+
78
+ @keyframes load {
79
+ from {
80
+ left: -100%;
81
+ }
82
+ to {
83
+ left: 100%;
84
+ }
85
+ }
@@ -8,5 +8,6 @@ export type ProgressProps = {
8
8
  striped?: boolean
9
9
  stripeLight?: string
10
10
  stripeDark?: string
11
+ indeterminate?: boolean
11
12
  className?: string
12
13
  }
@@ -22,6 +22,7 @@ const {
22
22
  color,
23
23
  background,
24
24
  thumb,
25
+ name,
25
26
  label,
26
27
  subText,
27
28
  minLabel,
@@ -84,6 +85,7 @@ const labelStyle = updateLabels ? `min-width:${minLabelWidth};` : null
84
85
  />
85
86
  <input
86
87
  type="range"
88
+ name={name}
87
89
  class:list={[styles.input, styles.min]}
88
90
  min={min}
89
91
  max={max}
@@ -94,6 +96,7 @@ const labelStyle = updateLabels ? `min-width:${minLabelWidth};` : null
94
96
  />
95
97
  <input
96
98
  type="range"
99
+ name={name}
97
100
  min={min}
98
101
  max={max}
99
102
  class={styles.input}
@@ -189,6 +192,7 @@ const labelStyle = updateLabels ? `min-width:${minLabelWidth};` : null
189
192
  }
190
193
 
191
194
  dispatch('rangeSliderOnChange', {
195
+ name: target.name,
192
196
  min: minValue,
193
197
  max: maxValue
194
198
  })
@@ -257,6 +261,7 @@ const labelStyle = updateLabels ? `min-width:${minLabelWidth};` : null
257
261
  }
258
262
 
259
263
  dispatch('rangeSliderOnChange', {
264
+ name: minInput.name,
260
265
  min: minValue,
261
266
  max: maxValue
262
267
  })
@@ -16,6 +16,7 @@ export type RangeSliderProps = {
16
16
  color?: string
17
17
  background?: string
18
18
  thumb?: string
19
+ name?: string
19
20
  label?: string
20
21
  subText?: string
21
22
  minLabel?: string
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 12h12" />
3
+ </svg>
package/icons.d.ts CHANGED
@@ -12,6 +12,7 @@ declare module 'webcoreui/icons' {
12
12
  export const github: string
13
13
  export const home: string
14
14
  export const info: string
15
+ export const minus: string
15
16
  export const moon: string
16
17
  export const order: string
17
18
  export const plus: string
package/icons.js CHANGED
@@ -11,6 +11,7 @@ export { default as copy } from './icons/copy.svg?raw'
11
11
  export { default as github } from './icons/github.svg?raw'
12
12
  export { default as home } from './icons/home.svg?raw'
13
13
  export { default as info } from './icons/info.svg?raw'
14
+ export { default as minus } from './icons/minus.svg?raw'
14
15
  export { default as moon } from './icons/moon.svg?raw'
15
16
  export { default as order } from './icons/order.svg?raw'
16
17
  export { default as plus } from './icons/plus.svg?raw'
package/package.json CHANGED
@@ -1,109 +1,111 @@
1
- {
2
- "name": "webcoreui",
3
- "type": "module",
4
- "version": "1.2.0",
5
- "scripts": {
6
- "prepare": "husky",
7
- "pre-commit": "lint-staged",
8
- "dev": "astro dev",
9
- "start": "astro preview",
10
- "build": "astro check && astro build",
11
- "build:package": "node scripts/build.js",
12
- "compile": "node scripts/sass.js",
13
- "test": "cd .. && vitest run && npm run test:sass",
14
- "test:dev": "vitest",
15
- "test:run": "vitest run",
16
- "test:sass": "vitest run src/tests/unit/scss.test.js --config astro.config.mjs",
17
- "test:e2e": "playwright test",
18
- "test:e2e:update": "playwright test --update-snapshots",
19
- "test:e2e:ui": "playwright test --ui",
20
- "create-component": "node scripts/createComponent.js",
21
- "lint": "eslint src/**/* --fix"
22
- },
23
- "devDependencies": {
24
- "@astrojs/check": "0.9.4",
25
- "@astrojs/node": "9.4.1",
26
- "@astrojs/react": "4.3.0",
27
- "@astrojs/svelte": "7.1.0",
28
- "@eslint/js": "9.23.0",
29
- "@playwright/test": "1.55.1",
30
- "@types/node": "24.6.2",
31
- "@typescript-eslint/parser": "8.39.1",
32
- "astro": "5.13.0",
33
- "astro-eslint-parser": "1.2.2",
34
- "eslint": "9.23.0",
35
- "eslint-plugin-astro": "1.3.1",
36
- "eslint-plugin-react": "7.37.4",
37
- "eslint-plugin-simple-import-sort": "12.1.1",
38
- "eslint-plugin-svelte": "3.3.3",
39
- "husky": "9.1.7",
40
- "jsdom": "26.0.0",
41
- "lint-staged": "15.5.0",
42
- "react": "19.0.0",
43
- "react-dom": "19.0.0",
44
- "sass": "1.90.0",
45
- "sass-true": "8.1.0",
46
- "svelte": "5.38.1",
47
- "svelte-eslint-parser": "1.1.0",
48
- "typescript": "5.9.2",
49
- "typescript-eslint": "8.39.1",
50
- "vite-tsconfig-paths": "5.1.4",
51
- "vitest": "3.0.4"
52
- },
53
- "exports": {
54
- ".": "./index.js",
55
- "./astro": "./astro.js",
56
- "./svelte": "./svelte.js",
57
- "./react": "./react.js",
58
- "./icons": "./icons.js",
59
- "./integration": "./integration.js",
60
- "./styles": "./scss/index.scss",
61
- "./config": "./scss/config.scss"
62
- },
63
- "files": [
64
- "components",
65
- "icons",
66
- "scss",
67
- "utils",
68
- "astro.d.ts",
69
- "astro.js",
70
- "icons.d.ts",
71
- "icons.js",
72
- "svelte.d.ts",
73
- "svelte.js",
74
- "react.d.ts",
75
- "react.js",
76
- "index.js",
77
- "index.d.ts",
78
- "integration.js",
79
- "integration.d.ts",
80
- "README.md",
81
- "LICENSE"
82
- ],
83
- "license": "MIT",
84
- "description": "UI component and template library for Astro, Svelte, and React apps styled with Sass.",
85
- "keywords": [
86
- "webcore",
87
- "component",
88
- "components",
89
- "ui components",
90
- "component library",
91
- "astro components",
92
- "svelte components",
93
- "react components",
94
- "frontend",
95
- "library",
96
- "sass"
97
- ],
98
- "homepage": "https://webcoreui.dev",
99
- "repository": {
100
- "type": "git",
101
- "url": "git+https://github.com/Frontendland/webcoreui.git"
102
- },
103
- "bugs": {
104
- "url": "https://github.com/Frontendland/webcoreui/issues"
105
- },
106
- "lint-staged": {
107
- "*.{js,ts,jsx,tsx,svelte,astro}": "eslint src/**/*"
108
- }
109
- }
1
+ {
2
+ "name": "webcoreui",
3
+ "type": "module",
4
+ "version": "1.3.0",
5
+ "scripts": {
6
+ "prepare": "husky",
7
+ "pre-commit": "lint-staged",
8
+ "dev": "astro dev",
9
+ "start": "astro preview",
10
+ "build": "astro check && astro build",
11
+ "build:package": "node scripts/build.js",
12
+ "compile": "node scripts/sass.js",
13
+ "test": "cd .. && vitest run && npm run test:sass",
14
+ "test:dev": "vitest",
15
+ "test:run": "vitest run",
16
+ "test:sass": "vitest run src/tests/unit/scss.test.js --config astro.config.mjs",
17
+ "test:e2e": "playwright test",
18
+ "test:e2e:update": "playwright test --update-snapshots",
19
+ "test:e2e:ui": "playwright test --ui",
20
+ "create-component": "node scripts/createComponent.js",
21
+ "lint": "eslint src/**/* --fix"
22
+ },
23
+ "devDependencies": {
24
+ "@astrojs/check": "0.9.6",
25
+ "@astrojs/node": "9.5.1",
26
+ "@astrojs/react": "4.4.2",
27
+ "@astrojs/svelte": "7.2.2",
28
+ "@eslint/js": "9.39.1",
29
+ "@playwright/test": "1.57.0",
30
+ "@types/node": "24.10.1",
31
+ "@typescript-eslint/parser": "8.48.1",
32
+ "astro": "5.16.4",
33
+ "astro-eslint-parser": "1.2.2",
34
+ "eslint": "9.39.1",
35
+ "eslint-plugin-astro": "1.5.0",
36
+ "eslint-plugin-react": "7.37.5",
37
+ "eslint-plugin-simple-import-sort": "12.1.1",
38
+ "eslint-plugin-svelte": "3.13.1",
39
+ "husky": "9.1.7",
40
+ "jsdom": "27.2.0",
41
+ "lint-staged": "16.2.7",
42
+ "react": "19.2.1",
43
+ "react-dom": "19.2.1",
44
+ "sass": "1.94.2",
45
+ "sass-true": "10.0.1",
46
+ "svelte": "5.45.6",
47
+ "svelte-eslint-parser": "1.4.1",
48
+ "typescript": "5.9.3",
49
+ "typescript-eslint": "8.48.1",
50
+ "vite-tsconfig-paths": "5.1.4",
51
+ "vitest": "4.0.15"
52
+ },
53
+ "exports": {
54
+ ".": "./index.js",
55
+ "./astro": "./astro.js",
56
+ "./svelte": "./svelte.js",
57
+ "./react": "./react.js",
58
+ "./icons": "./icons.js",
59
+ "./integration": "./integration.js",
60
+ "./styles": "./scss/index.scss",
61
+ "./config": "./scss/config.scss"
62
+ },
63
+ "files": [
64
+ "components",
65
+ "icons",
66
+ "scss",
67
+ "utils",
68
+ "astro.d.ts",
69
+ "astro.js",
70
+ "icons.d.ts",
71
+ "icons.js",
72
+ "svelte.d.ts",
73
+ "svelte.js",
74
+ "react.d.ts",
75
+ "react.js",
76
+ "index.js",
77
+ "index.d.ts",
78
+ "integration.js",
79
+ "integration.d.ts",
80
+ "README.md",
81
+ "LICENSE"
82
+ ],
83
+ "license": "MIT",
84
+ "description": "UI component and template library for Astro, Svelte, and React apps styled with Sass.",
85
+ "keywords": [
86
+ "webcore",
87
+ "components",
88
+ "ui components",
89
+ "ui library",
90
+ "component library",
91
+ "withastro",
92
+ "astro",
93
+ "astro ui",
94
+ "astro ui library",
95
+ "astro-component",
96
+ "astro components",
97
+ "svelte components",
98
+ "react components"
99
+ ],
100
+ "homepage": "https://webcoreui.dev",
101
+ "repository": {
102
+ "type": "git",
103
+ "url": "git+https://github.com/Frontendland/webcoreui.git"
104
+ },
105
+ "bugs": {
106
+ "url": "https://github.com/Frontendland/webcoreui/issues"
107
+ },
108
+ "lint-staged": {
109
+ "*.{js,ts,jsx,tsx,svelte,astro}": "eslint src/**/*"
110
+ }
111
+ }
package/react.d.ts CHANGED
@@ -15,6 +15,7 @@ import type { ReactCollapsibleProps as WReactCollapsibleProps } from './componen
15
15
  import type { ReactConditionalWrapperProps as WReactConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
16
16
  import type { ReactContextMenuProps as WReactContextMenuProps } from './components/ContextMenu/contextmenu'
17
17
  import type { ReactCopyProps as WReactCopyProps } from './components/Copy/copy'
18
+ import type { ReactCounterProps as WReactCounterProps } from './components/Counter/counter'
18
19
  import type { ReactDataTableProps as WReactDataTableProps } from './components/DataTable/datatable'
19
20
  import type { ReactFlexProps as WReactFlexProps } from './components/Flex/flex'
20
21
  import type { ReactFooterProps as WReactFooterProps } from './components/Footer/footer'
@@ -76,6 +77,7 @@ declare module 'webcoreui/react' {
76
77
  export const ConditionalWrapper: FC<WReactConditionalWrapperProps>
77
78
  export const ContextMenu: FC<WReactContextMenuProps>
78
79
  export const Copy: FC<WReactCopyProps>
80
+ export const Counter: FC<WReactCounterProps>
79
81
  export const DataTable: FC<WReactDataTableProps>
80
82
  export const Flex: FC<WReactFlexProps>
81
83
  export const Footer: FC<WReactFooterProps>
@@ -130,6 +132,7 @@ declare module 'webcoreui/react' {
130
132
  export type ConditionalWrapperProps = WReactConditionalWrapperProps
131
133
  export type ContextMenuProps = WReactContextMenuProps
132
134
  export type CopyProps = WReactCopyProps
135
+ export type CounterProps = WReactCounterProps
133
136
  export type DataTableProps = WReactDataTableProps
134
137
  export type FlexProps = WReactFlexProps
135
138
  export type FooterProps = WReactFooterProps
package/react.js CHANGED
@@ -14,6 +14,7 @@ import CollapsibleComponent from './components/Collapsible/Collapsible.tsx'
14
14
  import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.tsx'
15
15
  import ContextMenuComponent from './components/ContextMenu/ContextMenu.tsx'
16
16
  import CopyComponent from './components/Copy/Copy.tsx'
17
+ import CounterComponent from './components/Counter/Counter.tsx'
17
18
  import DataTableComponent from './components/DataTable/DataTable.tsx'
18
19
  import FlexComponent from './components/Flex/Flex.tsx'
19
20
  import FooterComponent from './components/Footer/Footer.tsx'
@@ -68,6 +69,7 @@ export const Collapsible = CollapsibleComponent
68
69
  export const ConditionalWrapper = ConditionalWrapperComponent
69
70
  export const ContextMenu = ContextMenuComponent
70
71
  export const Copy = CopyComponent
72
+ export const Counter = CounterComponent
71
73
  export const DataTable = DataTableComponent
72
74
  export const Flex = FlexComponent
73
75
  export const Footer = FooterComponent
package/svelte.d.ts CHANGED
@@ -15,6 +15,7 @@ import type { SvelteCollapsibleProps as WSvelteCollapsibleProps } from './compon
15
15
  import type { SvelteConditionalWrapperProps as WSvelteConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
16
16
  import type { SvelteContextMenuProps as WSvelteContextMenuProps } from './components/ContextMenu/contextmenu'
17
17
  import type { SvelteCopyProps as WSvelteCopyProps } from './components/Copy/copy'
18
+ import type { SvelteCounterProps as WSvelteCounterProps } from './components/Counter/counter'
18
19
  import type { SvelteDataTableProps as WSvelteDataTableProps } from './components/DataTable/datatable'
19
20
  import type { SvelteFlexProps as WSvelteFlexProps } from './components/Flex/flex'
20
21
  import type { SvelteFooterProps as WSvelteFooterProps } from './components/Footer/footer'
@@ -76,6 +77,7 @@ declare module 'webcoreui/svelte' {
76
77
  export const ConditionalWrapper: Component<WSvelteConditionalWrapperProps>
77
78
  export const ContextMenu: Component<WSvelteContextMenuProps>
78
79
  export const Copy: Component<WSvelteCopyProps>
80
+ export const Counter: Component<WSvelteCounterProps>
79
81
  export const DataTable: Component<WSvelteDataTableProps>
80
82
  export const Flex: Component<WSvelteFlexProps>
81
83
  export const Footer: Component<WSvelteFooterProps>
@@ -130,6 +132,7 @@ declare module 'webcoreui/svelte' {
130
132
  export type ConditionalWrapperProps = WSvelteConditionalWrapperProps
131
133
  export type ContextMenuProps = WSvelteContextMenuProps
132
134
  export type CopyProps = WSvelteCopyProps
135
+ export type CounterProps = WSvelteCounterProps
133
136
  export type DataTableProps = WSvelteDataTableProps
134
137
  export type FlexProps = WSvelteFlexProps
135
138
  export type FooterProps = WSvelteFooterProps
package/svelte.js CHANGED
@@ -14,6 +14,7 @@ import CollapsibleComponent from './components/Collapsible/Collapsible.svelte'
14
14
  import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.svelte'
15
15
  import ContextMenuComponent from './components/ContextMenu/ContextMenu.svelte'
16
16
  import CopyComponent from './components/Copy/Copy.svelte'
17
+ import CounterComponent from './components/Counter/Counter.svelte'
17
18
  import DataTableComponent from './components/DataTable/DataTable.svelte'
18
19
  import FlexComponent from './components/Flex/Flex.svelte'
19
20
  import FooterComponent from './components/Footer/Footer.svelte'
@@ -68,6 +69,7 @@ export const Collapsible = CollapsibleComponent
68
69
  export const ConditionalWrapper = ConditionalWrapperComponent
69
70
  export const ContextMenu = ContextMenuComponent
70
71
  export const Copy = CopyComponent
72
+ export const Counter = CounterComponent
71
73
  export const DataTable = DataTableComponent
72
74
  export const Flex = FlexComponent
73
75
  export const Footer = FooterComponent