@esportsplus/ui 0.34.0 → 0.34.2

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.
@@ -3,8 +3,8 @@ import './scss/index.scss';
3
3
  export default function (this: {
4
4
  attributes?: Attributes;
5
5
  } | any, attributes: Attributes & {
6
- min: number;
7
6
  max: number;
7
+ min: number;
8
8
  state?: {
9
9
  active: boolean;
10
10
  error: string;
@@ -3,7 +3,7 @@ import { html } from '@esportsplus/template';
3
3
  import form from '../../components/form/index.js';
4
4
  import './scss/index.scss';
5
5
  export default function (attributes) {
6
- let state = attributes.state || reactive({
6
+ let { max, min } = attributes, state = attributes.state || reactive({
7
7
  active: false,
8
8
  error: '',
9
9
  value: 0
@@ -14,7 +14,7 @@ export default function (attributes) {
14
14
  return html `
15
15
  <input
16
16
  class='range --border-state --border-black'
17
- style='${() => `--thumb-position: ${((state.value - attributes.min) / (attributes.max - attributes.min)) * 100}%`}'
17
+ style='${() => `--thumb-position: ${((state.value - min) / (max - min)) * 100}%`}'
18
18
  type='range'
19
19
  ${this?.attributes}
20
20
  ${attributes}
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "devDependencies": {
12
12
  "@esportsplus/typescript": "^0.9.2",
13
- "@types/node": "^24.3.0",
13
+ "@types/node": "^24.3.1",
14
14
  "autoprefixer": "^10.4.21",
15
15
  "glob": "^11.0.3",
16
16
  "lightningcss": "^1.30.1",
@@ -46,9 +46,11 @@
46
46
  },
47
47
  "name": "@esportsplus/ui",
48
48
  "private": false,
49
- "sideEffects": false,
49
+ "sideEffects": [
50
+ "**/*.css"
51
+ ],
50
52
  "type": "module",
51
- "version": "0.34.0",
53
+ "version": "0.34.2",
52
54
  "scripts": {
53
55
  "build": "run-s build:vite build:ts",
54
56
  "build:ts": "tsc && tsc-alias",
@@ -6,9 +6,10 @@ import './scss/index.scss';
6
6
 
7
7
  export default function(
8
8
  this: { attributes?: Attributes } | any,
9
- attributes: Attributes & { min: number, max: number, state?: { active: boolean, error: string, value: number } }
9
+ attributes: Attributes & { max: number, min: number, state?: { active: boolean, error: string, value: number } }
10
10
  ) {
11
- let state = attributes.state || reactive({
11
+ let { max, min } = attributes,
12
+ state = attributes.state || reactive({
12
13
  active: false,
13
14
  error: '',
14
15
  value: 0
@@ -21,7 +22,7 @@ export default function(
21
22
  return html`
22
23
  <input
23
24
  class='range --border-state --border-black'
24
- style='${() => `--thumb-position: ${((state.value - attributes.min) / (attributes.max - attributes.min)) * 100}%`}'
25
+ style='${() => `--thumb-position: ${((state.value - min) / (max - min)) * 100}%`}'
25
26
  type='range'
26
27
  ${this?.attributes}
27
28
  ${attributes}