@cooperco/cooper-component-library 0.0.10

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 (139) hide show
  1. package/README.md +11 -0
  2. package/package.json +85 -0
  3. package/src/assets/main.css +155 -0
  4. package/src/assets/theme.css +67 -0
  5. package/src/assets/usercard.jpg +0 -0
  6. package/src/assets/vue.svg +1 -0
  7. package/src/components/Accordion.vue +33 -0
  8. package/src/components/AccordionItem.vue +53 -0
  9. package/src/components/CTA.vue +39 -0
  10. package/src/components/CarouselModule.vue +46 -0
  11. package/src/components/ContainerCollectionModule.vue +33 -0
  12. package/src/components/ContainerModule.vue +116 -0
  13. package/src/components/ContentAndImage.vue +34 -0
  14. package/src/components/ContentMediaModule.vue +50 -0
  15. package/src/components/ContentModule.vue +51 -0
  16. package/src/components/FooterNavigation.vue +57 -0
  17. package/src/components/IconChevron.vue +107 -0
  18. package/src/components/Image.vue +15 -0
  19. package/src/components/LogoCollectionModule.vue +30 -0
  20. package/src/components/LogoContainerModule.vue +30 -0
  21. package/src/components/NavigationElement.vue +92 -0
  22. package/src/components/PrimaryNavigation.vue +68 -0
  23. package/src/components/SplitModule.vue +42 -0
  24. package/src/components/Testimonial.vue +48 -0
  25. package/src/components/TestimonialModule.vue +48 -0
  26. package/src/components/TileCollection.vue +37 -0
  27. package/src/components/TileCollectionModule.vue +45 -0
  28. package/src/components/TileContent.vue +105 -0
  29. package/src/components/Video.vue +18 -0
  30. package/src/components/types/Accordion.ts +18 -0
  31. package/src/components/types/AccordionItem.ts +19 -0
  32. package/src/components/types/CTA.ts +13 -0
  33. package/src/components/types/CarouselModule.ts +21 -0
  34. package/src/components/types/ContainerCollectionModule.ts +12 -0
  35. package/src/components/types/ContainerModule.ts +35 -0
  36. package/src/components/types/ContentAndImage.ts +14 -0
  37. package/src/components/types/ContentMediaModule.ts +14 -0
  38. package/src/components/types/ContentModule.ts +21 -0
  39. package/src/components/types/FooterNavigation.ts +12 -0
  40. package/src/components/types/Image.ts +12 -0
  41. package/src/components/types/LogoCollectionModule.ts +12 -0
  42. package/src/components/types/LogoContainerModule.ts +12 -0
  43. package/src/components/types/NavigationElement.ts +19 -0
  44. package/src/components/types/PrimaryNavigation.ts +10 -0
  45. package/src/components/types/SplitModule.ts +16 -0
  46. package/src/components/types/Testimonial.ts +17 -0
  47. package/src/components/types/TileCollection.ts +14 -0
  48. package/src/components/types/TileContent.ts +34 -0
  49. package/src/components/types/Video.ts +8 -0
  50. package/src/components/types/index.ts +10 -0
  51. package/src/presets/aura/accordion/index.js +81 -0
  52. package/src/presets/aura/autocomplete/index.js +280 -0
  53. package/src/presets/aura/avatar/index.js +46 -0
  54. package/src/presets/aura/badge/index.js +43 -0
  55. package/src/presets/aura/badgedirective/index.js +49 -0
  56. package/src/presets/aura/blockui/index.js +8 -0
  57. package/src/presets/aura/breadcrumb/index.js +63 -0
  58. package/src/presets/aura/button/index.js +511 -0
  59. package/src/presets/aura/calendar/index.js +702 -0
  60. package/src/presets/aura/card/index.js +53 -0
  61. package/src/presets/aura/carousel/index.js +160 -0
  62. package/src/presets/aura/cascadeselect/index.js +220 -0
  63. package/src/presets/aura/checkbox/index.js +107 -0
  64. package/src/presets/aura/chip/index.js +45 -0
  65. package/src/presets/aura/chips/index.js +126 -0
  66. package/src/presets/aura/colorpicker/index.js +132 -0
  67. package/src/presets/aura/confirmpopup/index.js +111 -0
  68. package/src/presets/aura/contextmenu/index.js +132 -0
  69. package/src/presets/aura/datatable/index.js +1290 -0
  70. package/src/presets/aura/dataview/index.js +40 -0
  71. package/src/presets/aura/deferred/index.js +3 -0
  72. package/src/presets/aura/dialog/index.js +250 -0
  73. package/src/presets/aura/divider/index.js +72 -0
  74. package/src/presets/aura/dock/index.js +97 -0
  75. package/src/presets/aura/dropdown/index.js +297 -0
  76. package/src/presets/aura/fieldset/index.js +95 -0
  77. package/src/presets/aura/fileupload/index.js +175 -0
  78. package/src/presets/aura/floatlabel/index.js +26 -0
  79. package/src/presets/aura/galleria/index.js +353 -0
  80. package/src/presets/aura/global.js +90 -0
  81. package/src/presets/aura/iconfield/index.js +22 -0
  82. package/src/presets/aura/image/index.js +206 -0
  83. package/src/presets/aura/index.js +181 -0
  84. package/src/presets/aura/inlinemessage/index.js +46 -0
  85. package/src/presets/aura/inplace/index.js +27 -0
  86. package/src/presets/aura/inputgroup/index.js +5 -0
  87. package/src/presets/aura/inputgroupaddon/index.js +28 -0
  88. package/src/presets/aura/inputmask/index.js +47 -0
  89. package/src/presets/aura/inputnumber/index.js +293 -0
  90. package/src/presets/aura/inputotp/index.js +69 -0
  91. package/src/presets/aura/inputswitch/index.js +94 -0
  92. package/src/presets/aura/inputtext/index.js +63 -0
  93. package/src/presets/aura/knob/index.js +47 -0
  94. package/src/presets/aura/listbox/index.js +158 -0
  95. package/src/presets/aura/megamenu/index.js +206 -0
  96. package/src/presets/aura/menu/index.js +122 -0
  97. package/src/presets/aura/menubar/index.js +184 -0
  98. package/src/presets/aura/message/index.js +112 -0
  99. package/src/presets/aura/metergroup/index.js +110 -0
  100. package/src/presets/aura/multiselect/index.js +579 -0
  101. package/src/presets/aura/orderlist/index.js +281 -0
  102. package/src/presets/aura/organizationchart/index.js +142 -0
  103. package/src/presets/aura/overlaypanel/index.js +34 -0
  104. package/src/presets/aura/paginator/index.js +566 -0
  105. package/src/presets/aura/panel/index.js +102 -0
  106. package/src/presets/aura/panelmenu/index.js +130 -0
  107. package/src/presets/aura/password/index.js +143 -0
  108. package/src/presets/aura/picklist/index.js +718 -0
  109. package/src/presets/aura/progressbar/index.js +64 -0
  110. package/src/presets/aura/progressspinner/index.js +51 -0
  111. package/src/presets/aura/radiobutton/index.js +121 -0
  112. package/src/presets/aura/rating/index.js +95 -0
  113. package/src/presets/aura/ripple/index.js +6 -0
  114. package/src/presets/aura/scrollpanel/index.js +77 -0
  115. package/src/presets/aura/scrolltop/index.js +45 -0
  116. package/src/presets/aura/selectbutton/index.js +66 -0
  117. package/src/presets/aura/sidebar/index.js +160 -0
  118. package/src/presets/aura/skeleton/index.js +19 -0
  119. package/src/presets/aura/slider/index.js +144 -0
  120. package/src/presets/aura/speeddial/index.js +579 -0
  121. package/src/presets/aura/splitbutton/index.js +1185 -0
  122. package/src/presets/aura/splitter/index.js +71 -0
  123. package/src/presets/aura/stepper/index.js +183 -0
  124. package/src/presets/aura/steps/index.js +117 -0
  125. package/src/presets/aura/tabmenu/index.js +75 -0
  126. package/src/presets/aura/tabview/index.js +162 -0
  127. package/src/presets/aura/tag/index.js +44 -0
  128. package/src/presets/aura/terminal/index.js +60 -0
  129. package/src/presets/aura/textarea/index.js +49 -0
  130. package/src/presets/aura/tieredmenu/index.js +125 -0
  131. package/src/presets/aura/timeline/index.js +114 -0
  132. package/src/presets/aura/toast/index.js +151 -0
  133. package/src/presets/aura/togglebutton/index.js +98 -0
  134. package/src/presets/aura/toolbar/index.js +28 -0
  135. package/src/presets/aura/tooltip/index.js +73 -0
  136. package/src/presets/aura/tree/index.js +294 -0
  137. package/src/presets/aura/treeselect/index.js +404 -0
  138. package/src/presets/aura/treetable/index.js +513 -0
  139. package/src/presets/aura/tristatecheckbox/index.js +121 -0
@@ -0,0 +1,181 @@
1
+ import global from './global.js'
2
+ import autocomplete from './autocomplete/index.js'
3
+ import calendar from './calendar/index.js'
4
+ import cascadeselect from './cascadeselect/index.js'
5
+ import checkbox from './checkbox/index.js'
6
+ import chips from './chips/index.js'
7
+ import colorpicker from './colorpicker/index.js'
8
+ import dropdown from './dropdown/index.js'
9
+ import floatlabel from './floatlabel/index.js'
10
+ import iconfield from './iconfield/index.js'
11
+ import inputgroup from './inputgroup/index.js'
12
+ import inputotp from './inputotp/index.js'
13
+ import inputgroupaddon from './inputgroupaddon/index.js'
14
+ import inputmask from './inputmask/index.js'
15
+ import inputnumber from './inputnumber/index.js'
16
+ import inputswitch from './inputswitch/index.js'
17
+ import inputtext from './inputtext/index.js'
18
+ import knob from './knob/index.js'
19
+ import listbox from './listbox/index.js'
20
+ import multiselect from './multiselect/index.js'
21
+ import password from './password/index.js'
22
+ import radiobutton from './radiobutton/index.js'
23
+ import rating from './rating/index.js'
24
+ import selectbutton from './selectbutton/index.js'
25
+ import slider from './slider/index.js'
26
+ import textarea from './textarea/index.js'
27
+ import togglebutton from './togglebutton/index.js'
28
+ import treeselect from './treeselect/index.js'
29
+ import tristatecheckbox from './tristatecheckbox/index.js'
30
+ import button from './button/index.js'
31
+ import speeddial from './speeddial/index.js'
32
+ import splitbutton from './splitbutton/index.js'
33
+ import datatable from './datatable/index.js'
34
+ import dataview from './dataview/index.js'
35
+ import orderlist from './orderlist/index.js'
36
+ import organizationchart from './organizationchart/index.js'
37
+ import paginator from './paginator/index.js'
38
+ import picklist from './picklist/index.js'
39
+ import tree from './tree/index.js'
40
+ import treetable from './treetable/index.js'
41
+ import timeline from './timeline/index.js'
42
+ import accordion from './accordion/index.js'
43
+ import card from './card/index.js'
44
+ import deferred from './deferred/index.js'
45
+ import divider from './divider/index.js'
46
+ import fieldset from './fieldset/index.js'
47
+ import panel from './panel/index.js'
48
+ import scrollpanel from './scrollpanel/index.js'
49
+ import splitter from './splitter/index.js'
50
+ import stepper from './stepper/index.js'
51
+ import tabview from './tabview/index.js'
52
+ import toolbar from './toolbar/index.js'
53
+ import confirmpopup from './confirmpopup/index.js'
54
+ import dialog from './dialog/index.js'
55
+ import overlaypanel from './overlaypanel/index.js'
56
+ import sidebar from './sidebar/index.js'
57
+ import tooltip from './tooltip/index.js'
58
+ import fileupload from './fileupload/index.js'
59
+ import breadcrumb from './breadcrumb/index.js'
60
+ import contextmenu from './contextmenu/index.js'
61
+ import dock from './dock/index.js'
62
+ import menu from './menu/index.js'
63
+ import menubar from './menubar/index.js'
64
+ import megamenu from './megamenu/index.js'
65
+ import panelmenu from './panelmenu/index.js'
66
+ import steps from './steps/index.js'
67
+ import tabmenu from './tabmenu/index.js'
68
+ import tieredmenu from './tieredmenu/index.js'
69
+ import message from './message/index.js'
70
+ import inlinemessage from './inlinemessage/index.js'
71
+ import toast from './toast/index.js'
72
+ import carousel from './carousel/index.js'
73
+ import galleria from './galleria/index.js'
74
+ import image from './image/index.js'
75
+ import avatar from './avatar/index.js'
76
+ import badge from './badge/index.js'
77
+ import badgedirective from './badgedirective/index.js'
78
+ import blockui from './blockui/index.js'
79
+ import chip from './chip/index.js'
80
+ import inplace from './inplace/index.js'
81
+ import metergroup from './metergroup/index.js'
82
+ import scrolltop from './scrolltop/index.js'
83
+ import skeleton from './skeleton/index.js'
84
+ import progressbar from './progressbar/index.js'
85
+ import progressspinner from './progressspinner/index.js'
86
+ import ripple from './ripple/index.js'
87
+ import tag from './tag/index.js'
88
+ import terminal from './terminal/index.js'
89
+
90
+ export default {
91
+ global,
92
+ directives: {
93
+ tooltip,
94
+ badgedirective,
95
+ ripple,
96
+ },
97
+ autocomplete,
98
+ calendar,
99
+ cascadeselect,
100
+ checkbox,
101
+ chips,
102
+ colorpicker,
103
+ dropdown,
104
+ floatlabel,
105
+ iconfield,
106
+ inputgroup,
107
+ inputotp,
108
+ inputgroupaddon,
109
+ inputmask,
110
+ inputnumber,
111
+ inputswitch,
112
+ inputtext,
113
+ knob,
114
+ listbox,
115
+ multiselect,
116
+ password,
117
+ radiobutton,
118
+ rating,
119
+ selectbutton,
120
+ slider,
121
+ textarea,
122
+ togglebutton,
123
+ treeselect,
124
+ tristatecheckbox,
125
+ button,
126
+ speeddial,
127
+ splitbutton,
128
+ datatable,
129
+ dataview,
130
+ orderlist,
131
+ organizationchart,
132
+ paginator,
133
+ picklist,
134
+ tree,
135
+ treetable,
136
+ timeline,
137
+ accordion,
138
+ card,
139
+ deferred,
140
+ divider,
141
+ fieldset,
142
+ panel,
143
+ scrollpanel,
144
+ splitter,
145
+ stepper,
146
+ tabview,
147
+ toolbar,
148
+ confirmpopup,
149
+ dialog,
150
+ overlaypanel,
151
+ sidebar,
152
+ fileupload,
153
+ breadcrumb,
154
+ contextmenu,
155
+ dock,
156
+ menu,
157
+ menubar,
158
+ megamenu,
159
+ panelmenu,
160
+ steps,
161
+ tabmenu,
162
+ tieredmenu,
163
+ message,
164
+ inlinemessage,
165
+ toast,
166
+ carousel,
167
+ galleria,
168
+ image,
169
+ avatar,
170
+ badge,
171
+ blockui,
172
+ chip,
173
+ inplace,
174
+ metergroup,
175
+ scrolltop,
176
+ skeleton,
177
+ progressbar,
178
+ progressspinner,
179
+ tag,
180
+ terminal,
181
+ }
@@ -0,0 +1,46 @@
1
+ export default {
2
+ root: ({ props }) => ({
3
+ class: [
4
+ 'inline-flex items-center justify-center align-top gap-2',
5
+ 'p-3 m-0 rounded-md border',
6
+ {
7
+ 'bg-blue-100/70 dark:bg-blue-500/20': props.severity == 'info',
8
+ 'bg-green-100/70 dark:bg-green-500/20': props.severity == 'success',
9
+ 'bg-surface-100/70 dark:bg-surface-500/20':
10
+ props.severity == 'secondary',
11
+ 'bg-orange-100/70 dark:bg-orange-500/20': props.severity == 'warn',
12
+ 'bg-red-100/70 dark:bg-red-500/20': props.severity == 'error',
13
+ 'bg-surface-950 dark:bg-surface-0': props.severity == 'contrast',
14
+ },
15
+ {
16
+ 'border-blue-200 dark:border-blue-500/20': props.severity == 'info',
17
+ 'border-green-200 dark:border-green-500/20':
18
+ props.severity == 'success',
19
+ 'border-surface-200 dark:border-surface-500/20':
20
+ props.severity == 'secondary',
21
+ 'border-orange-200 dark:border-orange-500/20': props.severity == 'warn',
22
+ 'border-red-200 dark:border-red-500/20': props.severity == 'error',
23
+ 'border-surface-950 dark:border-surface-0':
24
+ props.severity == 'contrast',
25
+ },
26
+ {
27
+ 'text-blue-700 dark:text-blue-300': props.severity == 'info',
28
+ 'text-green-700 dark:text-green-300': props.severity == 'success',
29
+ 'text-surface-700 dark:text-surface-300': props.severity == 'secondary',
30
+ 'text-orange-700 dark:text-orange-300': props.severity == 'warn',
31
+ 'text-red-700 dark:text-red-300': props.severity == 'error',
32
+ 'text-surface-0 dark:text-surface-950': props.severity == 'contrast',
33
+ },
34
+ ],
35
+ }),
36
+ icon: {
37
+ class: 'text-base',
38
+ },
39
+ text: {
40
+ class: [
41
+ // Font and Text
42
+ 'text-base leading-none',
43
+ 'font-medium',
44
+ ],
45
+ },
46
+ }
@@ -0,0 +1,27 @@
1
+ export default {
2
+ display: {
3
+ class: [
4
+ // Display
5
+ 'inline',
6
+
7
+ // Spacing
8
+ 'px-3 py-2',
9
+
10
+ // Shape
11
+ 'rounded-md',
12
+
13
+ // Colors
14
+ 'text-surface-700 dark:text-white/80',
15
+
16
+ // States
17
+ 'hover:bg-surface-100 hover:text-surface-700 dark:hover:bg-surface-800 dark:hover:text-white/80',
18
+
19
+ // Transitions
20
+ 'transition',
21
+ 'duration-200',
22
+
23
+ // Misc
24
+ 'cursor-pointer',
25
+ ],
26
+ },
27
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ root: {
3
+ class: ['flex items-stretch', 'w-full'],
4
+ },
5
+ }
@@ -0,0 +1,28 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Flex
5
+ 'flex items-center justify-center',
6
+
7
+ // Shape
8
+ 'first:rounded-l-md',
9
+ 'last:rounded-r-md',
10
+ 'border-y',
11
+
12
+ 'last:border-r',
13
+ 'border-l',
14
+ 'border-r-0',
15
+
16
+ // Space
17
+ 'p-2',
18
+
19
+ // Size
20
+ 'min-w-[2.5rem]',
21
+
22
+ // Color
23
+ 'bg-transparent dark:bg-surface-900',
24
+ 'text-surface-800 dark:text-white/80',
25
+ 'border-surface-300 dark:border-surface-700',
26
+ ],
27
+ },
28
+ }
@@ -0,0 +1,47 @@
1
+ export default {
2
+ root: ({ context, props, parent }) => ({
3
+ class: [
4
+ // Font
5
+ 'leading-none',
6
+
7
+ // Spacing
8
+ 'm-0 py-2 px-3',
9
+
10
+ // Colors
11
+ 'text-surface-800 dark:text-white/80',
12
+ 'placeholder:text-surface-400 dark:placeholder:text-surface-500',
13
+ { 'bg-surface-0 dark:bg-surface-950': !context.disabled },
14
+
15
+ 'border',
16
+ { 'border-surface-300 dark:border-surface-700': !props.invalid },
17
+
18
+ // Invalid State
19
+ 'invalid:focus:ring-red-200',
20
+ 'invalid:hover:border-red-500',
21
+ { 'border-red-500 dark:border-red-400': props.invalid },
22
+
23
+ // States
24
+ {
25
+ 'hover:border-surface-400 dark:hover:border-surface-600':
26
+ !context.disabled && !props.invalid,
27
+ 'focus:outline-none focus:outline-offset-0 focus:ring-1 focus:ring-primary-500 dark:focus:ring-primary-400 focus:z-10':
28
+ !context.disabled,
29
+ 'bg-surface-200 dark:bg-surface-700 select-none pointer-events-none cursor-default':
30
+ context.disabled,
31
+ },
32
+
33
+ // Filled State *for FloatLabel
34
+ {
35
+ filled:
36
+ parent.instance?.$name == 'FloatLabel' &&
37
+ props.modelValue !== null &&
38
+ props.modelValue?.length !== 0,
39
+ },
40
+
41
+ // Misc
42
+ 'rounded-md',
43
+ 'appearance-none',
44
+ 'transition-colors duration-200',
45
+ ],
46
+ }),
47
+ }
@@ -0,0 +1,293 @@
1
+ export default {
2
+ root: ({ props, parent }) => ({
3
+ class: [
4
+ // Flex
5
+ 'inline-flex',
6
+ 'relative',
7
+ { 'flex-col': props.showButtons && props.buttonLayout == 'vertical' },
8
+ { 'flex-1 w-[1%]': parent.instance.$name == 'InputGroup' },
9
+
10
+ // Shape
11
+ {
12
+ 'first:rounded-l-md rounded-none last:rounded-r-md':
13
+ parent.instance.$name == 'InputGroup' && !props.showButtons,
14
+ },
15
+ {
16
+ 'border-0 border-y border-l last:border-r border-surface-300 dark:border-surface-700':
17
+ parent.instance.$name == 'InputGroup' && !props.showButtons,
18
+ },
19
+ {
20
+ 'first:ml-0 -ml-px':
21
+ parent.instance.$name == 'InputGroup' && !props.showButtons,
22
+ },
23
+
24
+ //Sizing
25
+ { '!w-16': props.showButtons && props.buttonLayout == 'vertical' },
26
+ ],
27
+ }),
28
+ input: {
29
+ root: ({ parent, context }) => ({
30
+ class: [
31
+ // Font
32
+ 'leading-none',
33
+
34
+ // Display
35
+ 'flex flex-auto',
36
+
37
+ //Text
38
+ {
39
+ 'text-center':
40
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
41
+ },
42
+
43
+ // Spacing
44
+ 'py-2 px-3',
45
+ 'm-0',
46
+
47
+ // Shape
48
+ 'rounded-md',
49
+ {
50
+ 'rounded-l-none rounded-r-none':
51
+ parent.props.showButtons &&
52
+ parent.props.buttonLayout == 'horizontal',
53
+ },
54
+ {
55
+ 'rounded-none':
56
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
57
+ },
58
+
59
+ {
60
+ 'border-0':
61
+ parent.instance.$parentInstance?.$name == 'InputGroup' &&
62
+ !parent.props.showButtons,
63
+ },
64
+
65
+ // Colors
66
+ 'text-surface-800 dark:text-white/80',
67
+ 'placeholder:text-surface-400 dark:placeholder:text-surface-500',
68
+ { 'bg-surface-0 dark:bg-surface-950': !context.disabled },
69
+ 'border',
70
+ { 'border-surface-300 dark:border-surface-700': !parent.props.invalid },
71
+
72
+ // Invalid State
73
+ 'invalid:focus:ring-red-200',
74
+ 'invalid:hover:border-red-500',
75
+ { 'border-red-500 dark:border-red-400': parent.props.invalid },
76
+
77
+ // States
78
+ { 'hover:border-primary': !parent.props.invalid },
79
+ 'focus:outline-none focus:outline-offset-0 focus:ring-1 focus:ring-primary-500 dark:focus:ring-primary-400 focus:z-10',
80
+ {
81
+ 'bg-surface-200 dark:bg-surface-700 select-none pointer-events-none cursor-default':
82
+ context.disabled,
83
+ },
84
+
85
+ // Filled State *for FloatLabel
86
+ {
87
+ filled:
88
+ parent.instance?.$parentInstance?.$name == 'FloatLabel' &&
89
+ parent.state.d_modelValue !== null,
90
+ },
91
+
92
+ //Position
93
+ {
94
+ 'order-2':
95
+ parent.props.buttonLayout == 'horizontal' ||
96
+ parent.props.buttonLayout == 'vertical',
97
+ },
98
+ ],
99
+ }),
100
+ },
101
+ buttongroup: ({ props }) => ({
102
+ class: [
103
+ // Flex
104
+ 'flex',
105
+ 'flex-col',
106
+ {
107
+ 'absolute top-px right-px h-[calc(100%-2px)] z-20':
108
+ props.showButtons && props.buttonLayout == 'stacked',
109
+ },
110
+ ],
111
+ }),
112
+
113
+ incrementbutton: {
114
+ root: ({ parent }) => ({
115
+ class: [
116
+ // Display
117
+ 'flex flex-auto',
118
+
119
+ // Alignment
120
+ 'items-center',
121
+ 'justify-center',
122
+ 'text-center align-bottom',
123
+
124
+ //Position
125
+ 'relative',
126
+ {
127
+ 'order-3':
128
+ parent.props.showButtons &&
129
+ parent.props.buttonLayout == 'horizontal',
130
+ },
131
+ {
132
+ 'order-1':
133
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
134
+ },
135
+
136
+ //Color
137
+ 'text-surface-800 dark:text-surface-0',
138
+ 'bg-transparent',
139
+ {
140
+ 'dark:bg-surface-900':
141
+ parent.props.showButtons && parent.props.buttonLayout !== 'stacked',
142
+ },
143
+ 'border border-surface-300 dark:border-surface-700',
144
+ {
145
+ 'border-0':
146
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
147
+ },
148
+ {
149
+ 'border-l-0':
150
+ parent.props.showButtons &&
151
+ parent.props.buttonLayout !== 'stacked' &&
152
+ parent.props.buttonLayout == 'horizontal',
153
+ },
154
+ {
155
+ 'border-b-0':
156
+ parent.props.showButtons &&
157
+ parent.props.buttonLayout !== 'stacked' &&
158
+ parent.props.buttonLayout == 'vertical',
159
+ },
160
+
161
+ // Sizing
162
+ 'w-[3rem]',
163
+ {
164
+ 'px-4 py-3':
165
+ parent.props.showButtons && parent.props.buttonLayout !== 'stacked',
166
+ },
167
+ {
168
+ 'p-0':
169
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
170
+ },
171
+ {
172
+ 'w-full':
173
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
174
+ },
175
+
176
+ // Shape
177
+ 'rounded-md',
178
+ {
179
+ 'rounded-md':
180
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
181
+ },
182
+ {
183
+ 'rounded-bl-none rounded-tl-none':
184
+ parent.props.showButtons &&
185
+ parent.props.buttonLayout == 'horizontal',
186
+ },
187
+ {
188
+ 'rounded-bl-none rounded-br-none':
189
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
190
+ },
191
+
192
+ //States
193
+ 'hover:bg-surface-100 dark:hover:bg-[rgba(255,255,255,0.03)]',
194
+
195
+ //Misc
196
+ 'cursor-pointer overflow-hidden select-none',
197
+ ],
198
+ }),
199
+ label: {
200
+ class: 'h-0 w-0',
201
+ },
202
+ },
203
+ decrementbutton: {
204
+ root: ({ parent }) => ({
205
+ class: [
206
+ // Display
207
+ 'flex flex-auto',
208
+
209
+ // Alignment
210
+ 'items-center',
211
+ 'justify-center',
212
+ 'text-center align-bottom',
213
+
214
+ //Position
215
+ 'relative',
216
+ {
217
+ 'order-1':
218
+ parent.props.showButtons &&
219
+ parent.props.buttonLayout == 'horizontal',
220
+ },
221
+ {
222
+ 'order-3':
223
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
224
+ },
225
+
226
+ //Color
227
+ 'text-surface-800 dark:text-surface-0',
228
+ 'bg-transparent',
229
+ {
230
+ 'dark:bg-surface-900':
231
+ parent.props.showButtons && parent.props.buttonLayout !== 'stacked',
232
+ },
233
+ 'border border-surface-300 dark:border-surface-700',
234
+ {
235
+ 'border-0':
236
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
237
+ },
238
+ {
239
+ 'border-r-0':
240
+ parent.props.showButtons &&
241
+ parent.props.buttonLayout !== 'stacked' &&
242
+ parent.props.buttonLayout == 'horizontal',
243
+ },
244
+ {
245
+ 'border-t-0':
246
+ parent.props.showButtons &&
247
+ parent.props.buttonLayout !== 'stacked' &&
248
+ parent.props.buttonLayout == 'vertical',
249
+ },
250
+
251
+ // Sizing
252
+ 'w-[3rem]',
253
+ {
254
+ 'px-4 py-3':
255
+ parent.props.showButtons && parent.props.buttonLayout !== 'stacked',
256
+ },
257
+ {
258
+ 'p-0':
259
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
260
+ },
261
+ {
262
+ 'w-full':
263
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
264
+ },
265
+
266
+ // Shape
267
+ 'rounded-md',
268
+ {
269
+ 'rounded-tr-none rounded-tl-none rounded-bl-none':
270
+ parent.props.showButtons && parent.props.buttonLayout == 'stacked',
271
+ },
272
+ {
273
+ 'rounded-tr-none rounded-br-none ':
274
+ parent.props.showButtons &&
275
+ parent.props.buttonLayout == 'horizontal',
276
+ },
277
+ {
278
+ 'rounded-tr-none rounded-tl-none ':
279
+ parent.props.showButtons && parent.props.buttonLayout == 'vertical',
280
+ },
281
+
282
+ //States
283
+ 'hover:bg-surface-100 dark:hover:bg-[rgba(255,255,255,0.03)]',
284
+
285
+ //Misc
286
+ 'cursor-pointer overflow-hidden select-none',
287
+ ],
288
+ }),
289
+ label: {
290
+ class: 'h-0 w-0',
291
+ },
292
+ },
293
+ }
@@ -0,0 +1,69 @@
1
+ export default {
2
+ root: {
3
+ class: [
4
+ // Alignment
5
+ 'flex items-center',
6
+ 'gap-2',
7
+ ],
8
+ },
9
+ input: {
10
+ root: ({ props, context, parent }) => ({
11
+ class: [
12
+ // Font
13
+ 'leading-none',
14
+
15
+ // Flex & Alignment
16
+ { 'flex-1 w-[1%]': parent.instance.$name == 'InputGroup' },
17
+ 'text-center',
18
+
19
+ // Spacing
20
+ 'm-0',
21
+ 'py-2 px-3',
22
+
23
+ // Size
24
+ 'w-10',
25
+
26
+ // Shape
27
+ { 'rounded-md': parent.instance.$name !== 'InputGroup' },
28
+ {
29
+ 'first:rounded-l-md rounded-none last:rounded-r-md':
30
+ parent.instance.$name == 'InputGroup',
31
+ },
32
+ {
33
+ 'border-0 border-y border-l last:border-r':
34
+ parent.instance.$name == 'InputGroup',
35
+ },
36
+ {
37
+ 'first:ml-0 ml-[-1px]':
38
+ parent.instance.$name == 'InputGroup' && !props.showButtons,
39
+ },
40
+
41
+ // Colors
42
+ 'text-surface-800 dark:text-white/80',
43
+ 'placeholder:text-surface-400 dark:placeholder:text-surface-500',
44
+ { 'bg-surface-0 dark:bg-surface-950': !context.disabled },
45
+ 'border',
46
+ { 'border-surface-300 dark:border-surface-700': !props.invalid },
47
+
48
+ // Invalid State
49
+ 'invalid:focus:ring-red-200',
50
+ 'invalid:hover:border-red-500',
51
+ { 'border-red-500 dark:border-red-400': props.invalid },
52
+
53
+ // States
54
+ {
55
+ 'hover:border-surface-400 dark:hover:border-surface-600':
56
+ !context.disabled && !props.invalid,
57
+ 'focus:outline-none focus:outline-offset-0 focus:ring-1 focus:ring-primary-500 dark:focus:ring-primary-400 focus:z-10':
58
+ !context.disabled,
59
+ 'bg-surface-200 dark:bg-surface-700 select-none pointer-events-none cursor-default':
60
+ context.disabled,
61
+ },
62
+
63
+ // Misc
64
+ 'appearance-none',
65
+ 'transition-colors duration-200',
66
+ ],
67
+ }),
68
+ },
69
+ }