@marianmeres/stuic 1.54.0 → 1.56.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.
@@ -9,6 +9,17 @@ import {
9
9
  validate as validateAction,
10
10
  Thc
11
11
  } from "../../index.js";
12
+ const _emptyClasses = () => ({
13
+ box: "",
14
+ wrap: "",
15
+ label: "",
16
+ input: "",
17
+ invalid: "",
18
+ validationMessage: "",
19
+ description: "",
20
+ below: "",
21
+ asterix: ""
22
+ });
12
23
  const _PRESET = {
13
24
  box: "mb-4",
14
25
  wrap: `
@@ -48,8 +59,12 @@ const _PRESET_BY_SIZE = {
48
59
  }
49
60
  };
50
61
  export class FieldConfig {
51
- static class = {};
52
- static classBySize = {};
62
+ static class = _emptyClasses();
63
+ static classBySize = {
64
+ sm: _emptyClasses(),
65
+ md: _emptyClasses(),
66
+ lg: _emptyClasses()
67
+ };
53
68
  }
54
69
  </script>
55
70
 
@@ -5,6 +5,14 @@ import {
5
5
  Thc,
6
6
  validate as validateAction
7
7
  } from "../../index.js";
8
+ const _emptyClasses = () => ({
9
+ box: "",
10
+ label: "",
11
+ input: "",
12
+ invalid: "",
13
+ validationMessage: "",
14
+ description: ""
15
+ });
8
16
  const _PRESET = {
9
17
  box: "flex items-start mb-4",
10
18
  label: "block w-full",
@@ -31,8 +39,12 @@ const _PRESET_BY_SIZE = {
31
39
  lg: { label: "text-base font-bold" }
32
40
  };
33
41
  export class FieldCheckboxConfig {
34
- static class;
35
- static classBySize;
42
+ static class = _emptyClasses();
43
+ static classBySize = {
44
+ sm: _emptyClasses(),
45
+ md: _emptyClasses(),
46
+ lg: _emptyClasses()
47
+ };
36
48
  }
37
49
  </script>
38
50
 
@@ -2,9 +2,22 @@
2
2
  import { twMerge } from "tailwind-merge";
3
3
  import { getId } from "../../index.js";
4
4
  import XFieldRadioInternal from "./XFieldRadioInternal.svelte";
5
+ const _emptyClasses = () => ({
6
+ group: "",
7
+ box: "",
8
+ label: "",
9
+ input: "",
10
+ invalid: "",
11
+ validationMessage: "",
12
+ description: ""
13
+ });
5
14
  export class FieldRadiosConfig {
6
- static class;
7
- static classBySize;
15
+ static class = _emptyClasses();
16
+ static classBySize = {
17
+ sm: _emptyClasses(),
18
+ md: _emptyClasses(),
19
+ lg: _emptyClasses()
20
+ };
8
21
  }
9
22
  </script>
10
23
 
@@ -6,6 +6,17 @@ import {
6
6
  Thc,
7
7
  validate as validateAction
8
8
  } from "../../index.js";
9
+ const _emptyClasses = () => ({
10
+ box: "",
11
+ wrap: "",
12
+ label: "",
13
+ input: "",
14
+ invalid: "",
15
+ validationMessage: "",
16
+ description: "",
17
+ below: "",
18
+ asterix: ""
19
+ });
9
20
  const _PRESET = {
10
21
  box: "mb-4",
11
22
  wrap: `
@@ -30,24 +41,31 @@ const _PRESET = {
30
41
  below: `mx-2 mt-1`,
31
42
  asterix: `after:content-['*'] after:opacity-30 after:pl-1`
32
43
  };
33
- const _PRESET_BY_SIZE = {};
44
+ const _PRESET_BY_SIZE = {
45
+ sm: {
46
+ label: "text-sm",
47
+ input: "text-sm placeholder:text-sm"
48
+ },
49
+ md: {
50
+ label: "text-base",
51
+ input: "text-base placeholder:text-base"
52
+ },
53
+ lg: {
54
+ label: "text-base font-bold",
55
+ input: "text-lg placeholder:text-lg"
56
+ }
57
+ };
34
58
  export class FieldSelectConfig {
35
- static class = {};
36
- static classBySize = {};
59
+ static class = _emptyClasses();
60
+ static classBySize = {
61
+ sm: _emptyClasses(),
62
+ md: _emptyClasses(),
63
+ lg: _emptyClasses()
64
+ };
37
65
  }
38
66
  </script>
39
67
 
40
68
  <script>const dispatch = createEventDispatcher();
41
- const inputSizePreset = {
42
- sm: "text-sm placeholder:text-sm",
43
- md: "text-base placeholder:text-base",
44
- lg: "text-lg placeholder:text-lg"
45
- };
46
- const labelSizePreset = {
47
- sm: "text-sm",
48
- md: "text-base",
49
- lg: "text-base font-bold"
50
- };
51
69
  export let options = [];
52
70
  let _class = {};
53
71
  export { _class as class };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.54.0",
3
+ "version": "1.56.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",