@fy-/fws-vue 0.1.2 → 0.1.4

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 (92) hide show
  1. package/components/ui/DefaultInput.vue +21 -0
  2. package/index.ts +4 -1
  3. package/package.json +1 -1
  4. package/presets/Lara/accordion/index.js +86 -0
  5. package/presets/Lara/autocomplete/index.js +284 -0
  6. package/presets/Lara/avatar/index.js +46 -0
  7. package/presets/Lara/badge/index.js +44 -0
  8. package/presets/Lara/badgedirective/index.js +49 -0
  9. package/presets/Lara/blockui/index.js +8 -0
  10. package/presets/Lara/breadcrumb/index.js +64 -0
  11. package/presets/Lara/button/index.js +470 -0
  12. package/presets/Lara/calendar/index.js +683 -0
  13. package/presets/Lara/card/index.js +37 -0
  14. package/presets/Lara/carousel/index.js +152 -0
  15. package/presets/Lara/cascadeselect/index.js +228 -0
  16. package/presets/Lara/checkbox/index.js +106 -0
  17. package/presets/Lara/chip/index.js +45 -0
  18. package/presets/Lara/chips/index.js +118 -0
  19. package/presets/Lara/colorpicker/index.js +129 -0
  20. package/presets/Lara/confirmpopup/index.js +107 -0
  21. package/presets/Lara/contextmenu/index.js +130 -0
  22. package/presets/Lara/datatable/index.js +1289 -0
  23. package/presets/Lara/dataview/index.js +40 -0
  24. package/presets/Lara/deferred/index.js +3 -0
  25. package/presets/Lara/dialog/index.js +249 -0
  26. package/presets/Lara/divider/index.js +72 -0
  27. package/presets/Lara/dock/index.js +97 -0
  28. package/presets/Lara/dropdown/index.js +300 -0
  29. package/presets/Lara/fieldset/index.js +98 -0
  30. package/presets/Lara/fileupload/index.js +173 -0
  31. package/presets/Lara/floatlabel/index.js +26 -0
  32. package/presets/Lara/galleria/index.js +351 -0
  33. package/presets/Lara/global.js +90 -0
  34. package/presets/Lara/iconfield/index.js +22 -0
  35. package/presets/Lara/image/index.js +206 -0
  36. package/presets/Lara/index.js +181 -0
  37. package/presets/Lara/inlinemessage/index.js +36 -0
  38. package/presets/Lara/inplace/index.js +27 -0
  39. package/presets/Lara/inputgroup/index.js +5 -0
  40. package/presets/Lara/inputgroupaddon/index.js +28 -0
  41. package/presets/Lara/inputmask/index.js +37 -0
  42. package/presets/Lara/inputnumber/index.js +253 -0
  43. package/presets/Lara/inputotp/index.js +72 -0
  44. package/presets/Lara/inputswitch/index.js +93 -0
  45. package/presets/Lara/inputtext/index.js +61 -0
  46. package/presets/Lara/knob/index.js +47 -0
  47. package/presets/Lara/listbox/index.js +170 -0
  48. package/presets/Lara/megamenu/index.js +207 -0
  49. package/presets/Lara/menu/index.js +98 -0
  50. package/presets/Lara/menubar/index.js +181 -0
  51. package/presets/Lara/message/index.js +87 -0
  52. package/presets/Lara/metergroup/index.js +110 -0
  53. package/presets/Lara/multiselect/index.js +589 -0
  54. package/presets/Lara/orderlist/index.js +266 -0
  55. package/presets/Lara/organizationchart/index.js +142 -0
  56. package/presets/Lara/overlaypanel/index.js +41 -0
  57. package/presets/Lara/paginator/index.js +590 -0
  58. package/presets/Lara/panel/index.js +93 -0
  59. package/presets/Lara/panelmenu/index.js +139 -0
  60. package/presets/Lara/password/index.js +140 -0
  61. package/presets/Lara/picklist/index.js +659 -0
  62. package/presets/Lara/progressbar/index.js +61 -0
  63. package/presets/Lara/progressspinner/index.js +51 -0
  64. package/presets/Lara/radiobutton/index.js +116 -0
  65. package/presets/Lara/rating/index.js +95 -0
  66. package/presets/Lara/ripple/index.js +6 -0
  67. package/presets/Lara/scrollpanel/index.js +77 -0
  68. package/presets/Lara/scrolltop/index.js +45 -0
  69. package/presets/Lara/selectbutton/index.js +60 -0
  70. package/presets/Lara/sidebar/index.js +163 -0
  71. package/presets/Lara/skeleton/index.js +19 -0
  72. package/presets/Lara/slider/index.js +149 -0
  73. package/presets/Lara/speeddial/index.js +535 -0
  74. package/presets/Lara/splitbutton/index.js +1081 -0
  75. package/presets/Lara/splitter/index.js +64 -0
  76. package/presets/Lara/stepper/index.js +183 -0
  77. package/presets/Lara/steps/index.js +115 -0
  78. package/presets/Lara/tabmenu/index.js +82 -0
  79. package/presets/Lara/tabview/index.js +166 -0
  80. package/presets/Lara/tag/index.js +37 -0
  81. package/presets/Lara/terminal/index.js +60 -0
  82. package/presets/Lara/textarea/index.js +39 -0
  83. package/presets/Lara/tieredmenu/index.js +125 -0
  84. package/presets/Lara/timeline/index.js +107 -0
  85. package/presets/Lara/toast/index.js +113 -0
  86. package/presets/Lara/togglebutton/index.js +100 -0
  87. package/presets/Lara/toolbar/index.js +28 -0
  88. package/presets/Lara/tooltip/index.js +73 -0
  89. package/presets/Lara/tree/index.js +281 -0
  90. package/presets/Lara/treeselect/index.js +387 -0
  91. package/presets/Lara/treetable/index.js +509 -0
  92. package/presets/Lara/tristatecheckbox/index.js +112 -0
@@ -0,0 +1,39 @@
1
+ export default {
2
+ root: ({ context, props }) => ({
3
+ class: [
4
+ // Font
5
+ "font-sans leading-none",
6
+
7
+ // Spacing
8
+ "m-0",
9
+ "p-3",
10
+
11
+ // Shape
12
+ "rounded-md",
13
+
14
+ // Colors
15
+ "text-surface-600 dark:text-surface-200",
16
+ "placeholder:text-surface-400 dark:placeholder:text-surface-500",
17
+ "bg-surface-0 dark:bg-surface-900",
18
+ "border",
19
+ { "border-surface-300 dark:border-surface-600": !props.invalid },
20
+
21
+ // Invalid State
22
+ { "border-red-500 dark:border-red-400": props.invalid },
23
+
24
+ // States
25
+ {
26
+ "hover:border-primary-500 dark:hover:border-primary-400":
27
+ !context.disabled && !props.invalid,
28
+ "focus:outline-none focus:outline-offset-0 focus:ring focus:ring-primary-500/50 dark:focus:ring-primary-400/50":
29
+ !context.disabled,
30
+ "opacity-60 select-none pointer-events-none cursor-default":
31
+ context.disabled,
32
+ },
33
+
34
+ // Misc
35
+ "appearance-none",
36
+ "transition-colors duration-200",
37
+ ],
38
+ }),
39
+ };
@@ -0,0 +1,125 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Shape
5
+ "rounded-md",
6
+
7
+ // Size
8
+ "min-w-[12rem]",
9
+ "py-1",
10
+
11
+ // Colors
12
+ "bg-surface-0 dark:bg-surface-700",
13
+ "border border-surface-200 dark:border-surface-700",
14
+ ],
15
+ },
16
+ menu: {
17
+ class: [
18
+ // Spacings and Shape
19
+ "list-none",
20
+ "m-0",
21
+ "p-0",
22
+ "outline-none",
23
+ ],
24
+ },
25
+ menuitem: {
26
+ class: [
27
+ // Position
28
+ "relative",
29
+ ],
30
+ },
31
+ content: ({ context }) => ({
32
+ class: [
33
+ // Shape
34
+ "rounded-none",
35
+
36
+ // Colors
37
+ {
38
+ "text-surface-500 dark:text-white/70":
39
+ !context.focused && !context.active,
40
+ "text-surface-500 dark:text-white/70 bg-surface-200 dark:bg-surface-600/90":
41
+ context.focused && !context.active,
42
+ "text-primary-700 dark:text-surface-0/80 bg-primary-50 dark:bg-primary-400/30":
43
+ context.focused && context.active,
44
+ "text-primary-700 dark:text-surface-0/80 bg-primary-50 dark:bg-primary-400/30":
45
+ !context.focused && context.active,
46
+ },
47
+
48
+ // Hover States
49
+ {
50
+ "hover:bg-surface-100 dark:hover:bg-surface-600/80": !context.active,
51
+ "hover:bg-primary-500/50 dark:hover:bg-primary-300/30 text-primary-700 dark:text-surface-0/80":
52
+ context.active,
53
+ },
54
+
55
+ // Transitions
56
+ "transition-shadow",
57
+ "duration-200",
58
+ ],
59
+ }),
60
+ action: {
61
+ class: [
62
+ "relative",
63
+ // Flexbox
64
+
65
+ "flex",
66
+ "items-center",
67
+
68
+ // Spacing
69
+ "py-3",
70
+ "px-5",
71
+
72
+ // Color
73
+ "text-surface-700 dark:text-white/80",
74
+
75
+ // Misc
76
+ "no-underline",
77
+ "overflow-hidden",
78
+ "cursor-pointer",
79
+ "select-none",
80
+ ],
81
+ },
82
+ icon: {
83
+ class: [
84
+ // Spacing
85
+ "mr-2",
86
+
87
+ // Color
88
+ "text-surface-600 dark:text-white/70",
89
+ ],
90
+ },
91
+ label: {
92
+ class: ["leading-none"],
93
+ },
94
+ submenuicon: {
95
+ class: [
96
+ // Position
97
+ "ml-auto",
98
+ ],
99
+ },
100
+ submenu: {
101
+ class: [
102
+ // Size
103
+ "w-full sm:w-48",
104
+
105
+ // Spacing
106
+ "py-1",
107
+ "m-0",
108
+ "list-none",
109
+
110
+ // Shape
111
+ "shadow-none sm:shadow-md",
112
+ "border-0",
113
+
114
+ // Position
115
+ "static sm:absolute",
116
+ "z-10",
117
+
118
+ // Color
119
+ "bg-surface-0 dark:bg-surface-700",
120
+ ],
121
+ },
122
+ separator: {
123
+ class: "border-t border-surface-200 dark:border-surface-600 my-1",
124
+ },
125
+ };
@@ -0,0 +1,107 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ "flex grow",
5
+ {
6
+ "flex-col": props.layout === "vertical",
7
+ "flex-row flex-1": props.layout === "horizontal",
8
+ },
9
+ ],
10
+ }),
11
+ event: ({ props, context }) => ({
12
+ class: [
13
+ "flex relative min-h-[70px]",
14
+ {
15
+ "flex-row-reverse":
16
+ props.align === "right" ||
17
+ (props.layout === "vertical" &&
18
+ props.align === "alternate" &&
19
+ context.index % 2 === 1),
20
+ "flex-col flex-1": props.layout === "horizontal",
21
+ "flex-col-reverse ":
22
+ props.align === "bottom" ||
23
+ (props.layout === "horizontal" &&
24
+ props.align === "alternate" &&
25
+ context.index % 2 === 1),
26
+ },
27
+ ],
28
+ }),
29
+ opposite: ({ props, context }) => ({
30
+ class: [
31
+ "flex-1",
32
+ {
33
+ "px-4": props.layout === "vertical",
34
+ "py-4": props.layout === "horizontal",
35
+ },
36
+ {
37
+ "text-right":
38
+ props.align === "left" ||
39
+ (props.layout === "vertical" &&
40
+ props.align === "alternate" &&
41
+ context.index % 2 === 0),
42
+ "text-left":
43
+ props.align === "right" ||
44
+ (props.layout === "vertical" &&
45
+ props.align === "alternate" &&
46
+ context.index % 2 === 1),
47
+ },
48
+ ],
49
+ }),
50
+ separator: ({ props }) => ({
51
+ class: [
52
+ "flex items-center flex-initial",
53
+ {
54
+ "flex-col": props.layout === "vertical",
55
+ "flex-row": props.layout === "horizontal",
56
+ },
57
+ ],
58
+ }),
59
+ marker: {
60
+ class: [
61
+ // Display & Flexbox
62
+ "flex self-baseline",
63
+
64
+ // Size
65
+ "w-4 h-4",
66
+
67
+ // Appearance
68
+ "rounded-full border-2 border-primary-500 bg-surface-0 dark:border-primary-300 dark:bg-surface-900/40",
69
+ ],
70
+ },
71
+ connector: ({ props }) => ({
72
+ class: [
73
+ "grow bg-surface-300 dark:bg-surface-700",
74
+ {
75
+ "w-[2px]": props.layout === "vertical",
76
+ "w-full h-[2px]": props.layout === "horizontal",
77
+ },
78
+ ],
79
+ }),
80
+ content: ({ props, context }) => ({
81
+ class: [
82
+ "flex-1",
83
+ {
84
+ "px-4": props.layout === "vertical",
85
+ "py-4": props.layout === "horizontal",
86
+ },
87
+ {
88
+ "text-left":
89
+ props.align === "left" ||
90
+ (props.layout === "vertical" &&
91
+ props.align === "alternate" &&
92
+ context.index % 2 === 0),
93
+ "text-right":
94
+ props.align === "right" ||
95
+ (props.layout === "vertical" &&
96
+ props.align === "alternate" &&
97
+ context.index % 2 === 1),
98
+ },
99
+ {
100
+ "min-h-0":
101
+ props.layout === "vertical" && context.index === context.count,
102
+ "grow-0":
103
+ props.layout === "horizontal" && context.index === context.count,
104
+ },
105
+ ],
106
+ }),
107
+ };
@@ -0,0 +1,113 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ // Size and Shape
5
+ "w-96 rounded-md",
6
+
7
+ // Positioning
8
+ {
9
+ "-translate-x-2/4":
10
+ props.position == "top-center" || props.position == "bottom-center",
11
+ },
12
+ ],
13
+ }),
14
+ container: ({ props }) => ({
15
+ class: [
16
+ "my-4 rounded-md w-full",
17
+ "border-solid border-0 border-l-[6px]",
18
+ "backdrop-blur-[10px] shadow-md",
19
+
20
+ // Colors
21
+ {
22
+ "bg-blue-100/70 dark:bg-blue-500/20": props.message.severity == "info",
23
+ "bg-green-100/70 dark:bg-green-500/20":
24
+ props.message.severity == "success",
25
+ "bg-orange-100/70 dark:bg-orange-500/20":
26
+ props.message.severity == "warn",
27
+ "bg-red-100/70 dark:bg-red-500/20": props.message.severity == "error",
28
+ },
29
+ {
30
+ "border-blue-500 dark:border-blue-400":
31
+ props.message.severity == "info",
32
+ "border-green-500 dark:border-green-400":
33
+ props.message.severity == "success",
34
+ "border-orange-500 dark:border-orange-400":
35
+ props.message.severity == "warn",
36
+ "border-red-500 dark:border-red-400": props.message.severity == "error",
37
+ },
38
+ {
39
+ "text-blue-700 dark:text-blue-300": props.message.severity == "info",
40
+ "text-green-700 dark:text-green-300":
41
+ props.message.severity == "success",
42
+ "text-orange-700 dark:text-orange-300":
43
+ props.message.severity == "warn",
44
+ "text-red-700 dark:text-red-300": props.message.severity == "error",
45
+ },
46
+ ],
47
+ }),
48
+ content: ({ props }) => ({
49
+ class: [
50
+ "flex p-4",
51
+ {
52
+ "items-start": props.message.summary,
53
+ "items-center": !props.message.summary,
54
+ },
55
+ ],
56
+ }),
57
+ icon: {
58
+ class: [
59
+ // Sizing and Spacing
60
+ "w-6 h-6",
61
+ "text-lg leading-none mr-2 shrink-0",
62
+ ],
63
+ },
64
+ text: {
65
+ class: [
66
+ // Font and Text
67
+ "text-base leading-none",
68
+ "ml-2",
69
+ "flex-1",
70
+ ],
71
+ },
72
+ summary: {
73
+ class: "font-bold block",
74
+ },
75
+ detail: ({ props }) => ({
76
+ class: ["block", { "mt-2": props.message.summary }],
77
+ }),
78
+ closebutton: {
79
+ class: [
80
+ // Flexbox
81
+ "flex items-center justify-center",
82
+
83
+ // Size
84
+ "w-8 h-8",
85
+
86
+ // Spacing and Misc
87
+ "ml-auto relative",
88
+
89
+ // Shape
90
+ "rounded-full",
91
+
92
+ // Colors
93
+ "bg-transparent",
94
+
95
+ // Transitions
96
+ "transition duration-200 ease-in-out",
97
+
98
+ // States
99
+ "hover:bg-surface-0/50 dark:hover:bg-surface-0/10",
100
+
101
+ // Misc
102
+ "overflow-hidden",
103
+ ],
104
+ },
105
+ transition: {
106
+ enterFromClass: "opacity-0 translate-y-2/4",
107
+ enterActiveClass: "transition-[transform,opacity] duration-300",
108
+ leaveFromClass: "max-h-[1000px]",
109
+ leaveActiveClass:
110
+ "!transition-[max-height_.45s_cubic-bezier(0,1,0,1),opacity_.3s,margin-bottom_.3s] overflow-hidden",
111
+ leaveToClass: "max-h-0 opacity-0 mb-0",
112
+ },
113
+ };
@@ -0,0 +1,100 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ "relative",
5
+
6
+ // Alignment
7
+ "inline-flex",
8
+ "align-bottom",
9
+
10
+ // Misc
11
+ "cursor-pointer",
12
+ "select-none",
13
+ ],
14
+ },
15
+ box: ({ props }) => ({
16
+ class: [
17
+ // Alignments
18
+ "items-center inline-flex flex-1 text-center align-bottom justify-center",
19
+
20
+ // Sizes & Spacing
21
+ "px-4 py-3 leading-none",
22
+
23
+ // Shapes
24
+ "rounded-md border",
25
+
26
+ // Colors
27
+ {
28
+ "bg-surface-0 dark:bg-surface-900 ": !props.modelValue,
29
+ "border-surface-200 dark:border-surface-700 ":
30
+ !props.modelValue && !props.invalid,
31
+ "text-surface-700 dark:text-white/80": !props.modelValue,
32
+ "bg-primary-500 dark:bg-primary-400 border-primary-500 dark:border-primary-400 text-white dark:text-surface-900":
33
+ props.modelValue,
34
+ },
35
+
36
+ // Invalid State
37
+ { "border-red-500 dark:border-red-400": props.invalid },
38
+
39
+ // States
40
+ {
41
+ "peer-hover:bg-surface-50 dark:peer-hover:bg-surface-800/80 peer-hover:border-surface-200 dark:peer-hover:bg-surface-700 peer-hover:text-surface-700 dark:peer-hover:text-white/80":
42
+ !props.modelValue && !props.invalid,
43
+ "peer-hover:bg-primary-600 peer-hover:border-primary-600 dark:peer-hover:bg-primary-300 dark:peer-hover:border-primary-300":
44
+ props.modelValue,
45
+ "peer-focus-visible:ring peer-focus-visible:ring-primary-400/50 dark:peer-focus-visible:ring-primary-300/50":
46
+ !props.disabled,
47
+ },
48
+
49
+ // Transitions
50
+ "transition-all duration-200",
51
+
52
+ // Misc
53
+ {
54
+ "cursor-pointer": !props.disabled,
55
+ "opacity-60 select-none pointer-events-none cursor-default":
56
+ props.disabled,
57
+ },
58
+ ],
59
+ }),
60
+ label: {
61
+ class: "font-bold text-center w-full",
62
+ },
63
+ input: {
64
+ class: [
65
+ "peer",
66
+
67
+ // Size
68
+ "w-full ",
69
+ "h-full",
70
+
71
+ // Position
72
+ "absolute",
73
+ "top-0 left-0",
74
+ "z-10",
75
+
76
+ // Spacing
77
+ "p-0",
78
+ "m-0",
79
+
80
+ // Shape
81
+ "opacity-0",
82
+ "rounded-md",
83
+ "outline-none",
84
+ "border border-surface-200 dark:border-surface-700",
85
+
86
+ // Misc
87
+ "appearance-none",
88
+ "cursor-pointer",
89
+ ],
90
+ },
91
+ icon: ({ props }) => ({
92
+ class: [
93
+ " mr-2",
94
+ {
95
+ "text-surface-600 dark:text-white/70": !props.modelValue,
96
+ "text-white dark:text-surface-900": props.modelValue,
97
+ },
98
+ ],
99
+ }),
100
+ };
@@ -0,0 +1,28 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Flex & Alignment
5
+ "flex items-center justify-between flex-wrap",
6
+ "gap-2",
7
+
8
+ // Spacing
9
+ "p-5",
10
+
11
+ // Shape
12
+ "rounded-md",
13
+
14
+ // Color
15
+ "bg-surface-50 dark:bg-surface-800",
16
+ "border border-surface-200 dark:border-surface-700",
17
+ ],
18
+ },
19
+ start: {
20
+ class: "flex items-center",
21
+ },
22
+ center: {
23
+ class: "flex items-center",
24
+ },
25
+ end: {
26
+ class: "flex items-center",
27
+ },
28
+ };
@@ -0,0 +1,73 @@
1
+ export default {
2
+ root: ({ context, props }) => ({
3
+ class: [
4
+ // Position and Shadows
5
+ "absolute",
6
+ "shadow-md",
7
+ "p-fadein",
8
+ // Spacing
9
+ {
10
+ "py-0 px-1":
11
+ context?.right ||
12
+ context?.left ||
13
+ (!context?.right &&
14
+ !context?.left &&
15
+ !context?.top &&
16
+ !context?.bottom),
17
+ "py-1 px-0": context?.top || context?.bottom,
18
+ },
19
+ ],
20
+ }),
21
+ arrow: ({ context, props }) => ({
22
+ class: [
23
+ // Position
24
+
25
+ "absolute",
26
+
27
+ // Size
28
+ "w-0",
29
+ "h-0",
30
+
31
+ // Shape
32
+ "border-transparent",
33
+ "border-solid",
34
+ {
35
+ "border-y-[0.25rem] border-r-[0.25rem] border-l-0 border-r-surface-600":
36
+ context?.right ||
37
+ (!context?.right &&
38
+ !context?.left &&
39
+ !context?.top &&
40
+ !context?.bottom),
41
+ "border-y-[0.25rem] border-l-[0.25rem] border-r-0 border-l-surface-600":
42
+ context?.left,
43
+ "border-x-[0.25rem] border-t-[0.25rem] border-b-0 border-t-surface-600":
44
+ context?.top,
45
+ "border-x-[0.25rem] border-b-[0.25rem] border-t-0 border-b-surface-600":
46
+ context?.bottom,
47
+ },
48
+
49
+ // Spacing
50
+ {
51
+ "-mt-1 ":
52
+ context?.right ||
53
+ (!context?.right &&
54
+ !context?.left &&
55
+ !context?.top &&
56
+ !context?.bottom),
57
+ "-mt-1": context?.left,
58
+ "-ml-1": context?.top || context?.bottom,
59
+ },
60
+ ],
61
+ }),
62
+ text: {
63
+ class: [
64
+ "p-3",
65
+ "bg-surface-600 dark:bg-surface-700",
66
+ "text-white",
67
+ "leading-none",
68
+ "rounded-md",
69
+ "whitespace-pre-line",
70
+ "break-words",
71
+ ],
72
+ },
73
+ };