@cooperco/cooper-component-library 0.0.10 → 0.1.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.
- package/dist/component-lib.js +6947 -0
- package/dist/component-lib.umd.cjs +98 -0
- package/package.json +29 -20
- package/src/assets/fonts/GT-Walsheim-Bold.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Bold.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Bold.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Regular.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-Medium.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Medium.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-Regular.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Regular.woff2 +0 -0
- package/src/assets/fonts/fonts.scss +60 -0
- package/src/assets/fonts/notosanssc-bold-webfont.woff +0 -0
- package/src/assets/fonts/notosanssc-bold-webfont.woff2 +0 -0
- package/src/assets/fonts/notosanssc-regular-webfont.woff +0 -0
- package/src/assets/fonts/notosanssc-regular-webfont.woff2 +0 -0
- package/src/assets/main.css +18 -114
- package/src/assets/theme.css +5 -1
- package/src/components/{types → Accordion}/Accordion.ts +8 -6
- package/src/components/Accordion/Accordion.vue +66 -0
- package/src/components/Accordion/AccordionItem.ts +25 -0
- package/src/components/Accordion/AccordionItem.vue +104 -0
- package/src/components/{AccordionItem.vue → Accordion/AccordionListItem.vue} +22 -14
- package/src/components/Accordion/AccordionTileItem.vue +75 -0
- package/src/components/CTA/CTA.ts +22 -0
- package/src/components/CTA/CTA.vue +65 -0
- package/src/components/CarouselModule/CarouselModule.ts +20 -0
- package/src/components/{CarouselModule.vue → CarouselModule/CarouselModule.vue} +25 -7
- package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +12 -0
- package/src/components/{ContainerCollectionModule.vue → ContainerCollectionModule/ContainerCollectionModule.vue} +12 -3
- package/src/components/ContainerModule/ContainerModule.ts +69 -0
- package/src/components/{ContainerModule.vue → ContainerModule/ContainerModule.vue} +33 -36
- package/src/components/ContentModule/ContentModule.ts +31 -0
- package/src/components/ContentModule/ContentModule.vue +65 -0
- package/src/components/{types → FooterNavigation}/FooterNavigation.ts +3 -2
- package/src/components/{FooterNavigation.vue → FooterNavigation/FooterNavigation.vue} +4 -2
- package/src/components/Image/Image.vue +17 -0
- package/src/components/{types → LogoCollectionModule}/LogoCollectionModule.ts +3 -3
- package/src/components/{LogoCollectionModule.vue → LogoCollectionModule/LogoCollectionModule.vue} +13 -3
- package/src/components/{types → NavigationElement}/NavigationElement.ts +6 -3
- package/src/components/{NavigationElement.vue → NavigationElement/NavigationElement.vue} +18 -9
- package/src/components/{types → PrimaryNavigation}/PrimaryNavigation.ts +2 -2
- package/src/components/{PrimaryNavigation.vue → PrimaryNavigation/PrimaryNavigation.vue} +7 -4
- package/src/components/{types → SplitModule}/SplitModule.ts +6 -5
- package/src/components/SplitModule/SplitModule.vue +57 -0
- package/src/components/TestimonialModule/TestimonialModule.ts +22 -0
- package/src/components/TestimonialModule/TestimonialModule.vue +51 -0
- package/src/components/TileCollectionModule/TileCollectionModule.ts +18 -0
- package/src/components/TileCollectionModule/TileCollectionModule.vue +58 -0
- package/src/components/TileContent/TileContent.ts +60 -0
- package/src/components/{TileContent.vue → TileContent/TileContent.vue} +25 -14
- package/src/components/TileContent/TileContentIconTile.vue +83 -0
- package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +121 -0
- package/src/components/TileContent/TileContentImageTile.vue +80 -0
- package/src/components/TileContent/TileContentTextTile.vue +63 -0
- package/src/components/TileContent/TileContentVideoTile.vue +81 -0
- package/src/components/{types → Video}/Video.ts +1 -1
- package/src/components/{Video.vue → Video/Video.vue} +1 -1
- package/src/assets/usercard.jpg +0 -0
- package/src/assets/vue.svg +0 -1
- package/src/components/Accordion.vue +0 -33
- package/src/components/CTA.vue +0 -39
- package/src/components/ContentAndImage.vue +0 -34
- package/src/components/ContentMediaModule.vue +0 -50
- package/src/components/ContentModule.vue +0 -51
- package/src/components/IconChevron.vue +0 -107
- package/src/components/Image.vue +0 -15
- package/src/components/LogoContainerModule.vue +0 -30
- package/src/components/SplitModule.vue +0 -42
- package/src/components/Testimonial.vue +0 -48
- package/src/components/TestimonialModule.vue +0 -48
- package/src/components/TileCollection.vue +0 -37
- package/src/components/TileCollectionModule.vue +0 -45
- package/src/components/types/AccordionItem.ts +0 -19
- package/src/components/types/CTA.ts +0 -13
- package/src/components/types/CarouselModule.ts +0 -21
- package/src/components/types/ContainerCollectionModule.ts +0 -12
- package/src/components/types/ContainerModule.ts +0 -35
- package/src/components/types/ContentAndImage.ts +0 -14
- package/src/components/types/ContentMediaModule.ts +0 -14
- package/src/components/types/ContentModule.ts +0 -21
- package/src/components/types/LogoContainerModule.ts +0 -12
- package/src/components/types/Testimonial.ts +0 -17
- package/src/components/types/TileCollection.ts +0 -14
- package/src/components/types/TileContent.ts +0 -34
- package/src/components/types/index.ts +0 -10
- package/src/presets/aura/accordion/index.js +0 -81
- package/src/presets/aura/autocomplete/index.js +0 -280
- package/src/presets/aura/avatar/index.js +0 -46
- package/src/presets/aura/badge/index.js +0 -43
- package/src/presets/aura/badgedirective/index.js +0 -49
- package/src/presets/aura/blockui/index.js +0 -8
- package/src/presets/aura/breadcrumb/index.js +0 -63
- package/src/presets/aura/button/index.js +0 -511
- package/src/presets/aura/calendar/index.js +0 -702
- package/src/presets/aura/card/index.js +0 -53
- package/src/presets/aura/carousel/index.js +0 -160
- package/src/presets/aura/cascadeselect/index.js +0 -220
- package/src/presets/aura/checkbox/index.js +0 -107
- package/src/presets/aura/chip/index.js +0 -45
- package/src/presets/aura/chips/index.js +0 -126
- package/src/presets/aura/colorpicker/index.js +0 -132
- package/src/presets/aura/confirmpopup/index.js +0 -111
- package/src/presets/aura/contextmenu/index.js +0 -132
- package/src/presets/aura/datatable/index.js +0 -1290
- package/src/presets/aura/dataview/index.js +0 -40
- package/src/presets/aura/deferred/index.js +0 -3
- package/src/presets/aura/dialog/index.js +0 -250
- package/src/presets/aura/divider/index.js +0 -72
- package/src/presets/aura/dock/index.js +0 -97
- package/src/presets/aura/dropdown/index.js +0 -297
- package/src/presets/aura/fieldset/index.js +0 -95
- package/src/presets/aura/fileupload/index.js +0 -175
- package/src/presets/aura/floatlabel/index.js +0 -26
- package/src/presets/aura/galleria/index.js +0 -353
- package/src/presets/aura/global.js +0 -90
- package/src/presets/aura/iconfield/index.js +0 -22
- package/src/presets/aura/image/index.js +0 -206
- package/src/presets/aura/index.js +0 -181
- package/src/presets/aura/inlinemessage/index.js +0 -46
- package/src/presets/aura/inplace/index.js +0 -27
- package/src/presets/aura/inputgroup/index.js +0 -5
- package/src/presets/aura/inputgroupaddon/index.js +0 -28
- package/src/presets/aura/inputmask/index.js +0 -47
- package/src/presets/aura/inputnumber/index.js +0 -293
- package/src/presets/aura/inputotp/index.js +0 -69
- package/src/presets/aura/inputswitch/index.js +0 -94
- package/src/presets/aura/inputtext/index.js +0 -63
- package/src/presets/aura/knob/index.js +0 -47
- package/src/presets/aura/listbox/index.js +0 -158
- package/src/presets/aura/megamenu/index.js +0 -206
- package/src/presets/aura/menu/index.js +0 -122
- package/src/presets/aura/menubar/index.js +0 -184
- package/src/presets/aura/message/index.js +0 -112
- package/src/presets/aura/metergroup/index.js +0 -110
- package/src/presets/aura/multiselect/index.js +0 -579
- package/src/presets/aura/orderlist/index.js +0 -281
- package/src/presets/aura/organizationchart/index.js +0 -142
- package/src/presets/aura/overlaypanel/index.js +0 -34
- package/src/presets/aura/paginator/index.js +0 -566
- package/src/presets/aura/panel/index.js +0 -102
- package/src/presets/aura/panelmenu/index.js +0 -130
- package/src/presets/aura/password/index.js +0 -143
- package/src/presets/aura/picklist/index.js +0 -718
- package/src/presets/aura/progressbar/index.js +0 -64
- package/src/presets/aura/progressspinner/index.js +0 -51
- package/src/presets/aura/radiobutton/index.js +0 -121
- package/src/presets/aura/rating/index.js +0 -95
- package/src/presets/aura/ripple/index.js +0 -6
- package/src/presets/aura/scrollpanel/index.js +0 -77
- package/src/presets/aura/scrolltop/index.js +0 -45
- package/src/presets/aura/selectbutton/index.js +0 -66
- package/src/presets/aura/sidebar/index.js +0 -160
- package/src/presets/aura/skeleton/index.js +0 -19
- package/src/presets/aura/slider/index.js +0 -144
- package/src/presets/aura/speeddial/index.js +0 -579
- package/src/presets/aura/splitbutton/index.js +0 -1185
- package/src/presets/aura/splitter/index.js +0 -71
- package/src/presets/aura/stepper/index.js +0 -183
- package/src/presets/aura/steps/index.js +0 -117
- package/src/presets/aura/tabmenu/index.js +0 -75
- package/src/presets/aura/tabview/index.js +0 -162
- package/src/presets/aura/tag/index.js +0 -44
- package/src/presets/aura/terminal/index.js +0 -60
- package/src/presets/aura/textarea/index.js +0 -49
- package/src/presets/aura/tieredmenu/index.js +0 -125
- package/src/presets/aura/timeline/index.js +0 -114
- package/src/presets/aura/toast/index.js +0 -151
- package/src/presets/aura/togglebutton/index.js +0 -98
- package/src/presets/aura/toolbar/index.js +0 -28
- package/src/presets/aura/tooltip/index.js +0 -73
- package/src/presets/aura/tree/index.js +0 -294
- package/src/presets/aura/treeselect/index.js +0 -404
- package/src/presets/aura/treetable/index.js +0 -513
- package/src/presets/aura/tristatecheckbox/index.js +0 -121
- /package/src/components/{types → Image}/Image.ts +0 -0
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
root: ({ props }) => ({
|
|
3
|
-
class: [
|
|
4
|
-
'relative',
|
|
5
|
-
|
|
6
|
-
// Size
|
|
7
|
-
{
|
|
8
|
-
'h-[3px]': props.orientation == 'horizontal',
|
|
9
|
-
'w-[3px]': props.orientation == 'vertical',
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
// Shape
|
|
13
|
-
'border-0',
|
|
14
|
-
'rounded-md',
|
|
15
|
-
|
|
16
|
-
// Colors
|
|
17
|
-
'bg-surface-200 dark:bg-surface-800',
|
|
18
|
-
|
|
19
|
-
// States
|
|
20
|
-
{
|
|
21
|
-
'opacity-60 select-none pointer-events-none cursor-default':
|
|
22
|
-
props.disabled,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
}),
|
|
26
|
-
range: ({ props }) => ({
|
|
27
|
-
class: [
|
|
28
|
-
// Position
|
|
29
|
-
'block absolute',
|
|
30
|
-
{
|
|
31
|
-
'top-0 left-0': props.orientation == 'horizontal',
|
|
32
|
-
'bottom-0 left-0': props.orientation == 'vertical',
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
//Size
|
|
36
|
-
{
|
|
37
|
-
'h-full': props.orientation == 'horizontal',
|
|
38
|
-
'w-full': props.orientation == 'vertical',
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
// Shape
|
|
42
|
-
'rounded-md',
|
|
43
|
-
|
|
44
|
-
// Colors
|
|
45
|
-
'bg-primary',
|
|
46
|
-
],
|
|
47
|
-
}),
|
|
48
|
-
handle: ({ props }) => ({
|
|
49
|
-
class: [
|
|
50
|
-
'flex items-center justify-center',
|
|
51
|
-
|
|
52
|
-
// Size
|
|
53
|
-
'h-[20px]',
|
|
54
|
-
'w-[20px]',
|
|
55
|
-
{
|
|
56
|
-
'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
|
|
57
|
-
'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
// Shape
|
|
61
|
-
'rounded-full',
|
|
62
|
-
|
|
63
|
-
'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
|
|
64
|
-
|
|
65
|
-
// Colors
|
|
66
|
-
'bg-surface-200 dark:bg-surface-800',
|
|
67
|
-
|
|
68
|
-
// States
|
|
69
|
-
'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
|
|
70
|
-
'ring-primary-500 dark:ring-primary-400',
|
|
71
|
-
|
|
72
|
-
// Transitions
|
|
73
|
-
'transition duration-200',
|
|
74
|
-
|
|
75
|
-
// Misc
|
|
76
|
-
'cursor-grab',
|
|
77
|
-
'touch-action-none',
|
|
78
|
-
],
|
|
79
|
-
}),
|
|
80
|
-
starthandler: ({ props }) => ({
|
|
81
|
-
class: [
|
|
82
|
-
'flex items-center justify-center',
|
|
83
|
-
|
|
84
|
-
// Size
|
|
85
|
-
'h-[20px]',
|
|
86
|
-
'w-[20px]',
|
|
87
|
-
{
|
|
88
|
-
'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
|
|
89
|
-
'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
// Shape
|
|
93
|
-
'rounded-full',
|
|
94
|
-
|
|
95
|
-
'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
|
|
96
|
-
|
|
97
|
-
// Colors
|
|
98
|
-
'bg-surface-200 dark:bg-surface-800',
|
|
99
|
-
|
|
100
|
-
// States
|
|
101
|
-
'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
|
|
102
|
-
'ring-primary-500 dark:ring-primary-400',
|
|
103
|
-
|
|
104
|
-
// Transitions
|
|
105
|
-
'transition duration-200',
|
|
106
|
-
|
|
107
|
-
// Misc
|
|
108
|
-
'cursor-grab',
|
|
109
|
-
'touch-action-none',
|
|
110
|
-
],
|
|
111
|
-
}),
|
|
112
|
-
endhandler: ({ props }) => ({
|
|
113
|
-
class: [
|
|
114
|
-
'flex items-center justify-center',
|
|
115
|
-
|
|
116
|
-
// Size
|
|
117
|
-
'h-[20px]',
|
|
118
|
-
'w-[20px]',
|
|
119
|
-
{
|
|
120
|
-
'top-[50%] -mt-[10px] -ml-[10px]': props.orientation == 'horizontal',
|
|
121
|
-
'left-[50%] -mb-[10px] -ml-[10px]': props.orientation == 'vertical',
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// Shape
|
|
125
|
-
'rounded-full',
|
|
126
|
-
|
|
127
|
-
'before:block before:w-[16px] before:h-[16px] before:rounded-full before:bg-surface-0 dark:before:bg-surface-950 before:shadow-md',
|
|
128
|
-
|
|
129
|
-
// Colors
|
|
130
|
-
'bg-surface-200 dark:bg-surface-800',
|
|
131
|
-
|
|
132
|
-
// States
|
|
133
|
-
'focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:ring-1',
|
|
134
|
-
'ring-primary-500 dark:ring-primary-400',
|
|
135
|
-
|
|
136
|
-
// Transitions
|
|
137
|
-
'transition duration-200',
|
|
138
|
-
|
|
139
|
-
// Misc
|
|
140
|
-
'cursor-grab',
|
|
141
|
-
'touch-action-none',
|
|
142
|
-
],
|
|
143
|
-
}),
|
|
144
|
-
}
|
|
@@ -1,579 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
root: {
|
|
3
|
-
class: 'absolute flex',
|
|
4
|
-
},
|
|
5
|
-
button: {
|
|
6
|
-
root: ({ props, context, parent }) => ({
|
|
7
|
-
class: [
|
|
8
|
-
'relative',
|
|
9
|
-
'z-20',
|
|
10
|
-
|
|
11
|
-
// Alignments
|
|
12
|
-
'items-center inline-flex text-center align-bottom justify-center',
|
|
13
|
-
|
|
14
|
-
// Sizes & Spacing
|
|
15
|
-
'leading-[normal]',
|
|
16
|
-
'w-10 h-10 p-0 py-2',
|
|
17
|
-
|
|
18
|
-
// Shapes
|
|
19
|
-
'rounded-full',
|
|
20
|
-
'shadow-md',
|
|
21
|
-
// Link Button
|
|
22
|
-
{ 'text-primary-600 bg-transparent border-transparent': props.link },
|
|
23
|
-
|
|
24
|
-
// Plain Button
|
|
25
|
-
{
|
|
26
|
-
'text-white bg-gray-500 border border-gray-500':
|
|
27
|
-
props.plain && !props.outlined && !props.text,
|
|
28
|
-
},
|
|
29
|
-
// Plain Text Button
|
|
30
|
-
{ 'text-surface-500': props.plain && props.text },
|
|
31
|
-
// Plain Outlined Button
|
|
32
|
-
{
|
|
33
|
-
'text-surface-500 border border-gray-500':
|
|
34
|
-
props.plain && props.outlined,
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
// Text Button
|
|
38
|
-
{ 'bg-transparent border-transparent': props.text && !props.plain },
|
|
39
|
-
|
|
40
|
-
// Outlined Button
|
|
41
|
-
{ 'bg-transparent border': props.outlined && !props.plain },
|
|
42
|
-
|
|
43
|
-
// --- Severity Buttons ---
|
|
44
|
-
|
|
45
|
-
// Primary Button
|
|
46
|
-
{
|
|
47
|
-
'text-primary-inverse':
|
|
48
|
-
!props.link &&
|
|
49
|
-
props.severity === null &&
|
|
50
|
-
!props.text &&
|
|
51
|
-
!props.outlined &&
|
|
52
|
-
!props.plain,
|
|
53
|
-
'bg-primary':
|
|
54
|
-
!props.link &&
|
|
55
|
-
props.severity === null &&
|
|
56
|
-
!props.text &&
|
|
57
|
-
!props.outlined &&
|
|
58
|
-
!props.plain,
|
|
59
|
-
'border border-primary':
|
|
60
|
-
!props.link &&
|
|
61
|
-
props.severity === null &&
|
|
62
|
-
!props.text &&
|
|
63
|
-
!props.outlined &&
|
|
64
|
-
!props.plain,
|
|
65
|
-
},
|
|
66
|
-
// Primary Text Button
|
|
67
|
-
{
|
|
68
|
-
'text-primary': props.text && props.severity === null && !props.plain,
|
|
69
|
-
},
|
|
70
|
-
// Primary Outlined Button
|
|
71
|
-
{
|
|
72
|
-
'text-primary border border-primary':
|
|
73
|
-
props.outlined && props.severity === null && !props.plain,
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
// Secondary Button
|
|
77
|
-
{
|
|
78
|
-
'text-surface-900 dark:text-white':
|
|
79
|
-
props.severity === 'secondary' &&
|
|
80
|
-
!props.text &&
|
|
81
|
-
!props.outlined &&
|
|
82
|
-
!props.plain,
|
|
83
|
-
'bg-surface-100 dark:bg-surface-700':
|
|
84
|
-
props.severity === 'secondary' &&
|
|
85
|
-
!props.text &&
|
|
86
|
-
!props.outlined &&
|
|
87
|
-
!props.plain,
|
|
88
|
-
'border border-surface-100 dark:border-surface-700':
|
|
89
|
-
props.severity === 'secondary' &&
|
|
90
|
-
!props.text &&
|
|
91
|
-
!props.outlined &&
|
|
92
|
-
!props.plain,
|
|
93
|
-
},
|
|
94
|
-
// Secondary Text Button
|
|
95
|
-
{
|
|
96
|
-
'text-surface-500 dark:text-surface-300':
|
|
97
|
-
props.text && props.severity === 'secondary' && !props.plain,
|
|
98
|
-
},
|
|
99
|
-
// Secondary Outlined Button
|
|
100
|
-
{
|
|
101
|
-
'text-surface-500 dark:text-surface-300 border border-surface-500 hover:bg-surface-300/10':
|
|
102
|
-
props.outlined && props.severity === 'secondary' && !props.plain,
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
// Success Button
|
|
106
|
-
{
|
|
107
|
-
'text-white dark:text-green-900':
|
|
108
|
-
props.severity === 'success' &&
|
|
109
|
-
!props.text &&
|
|
110
|
-
!props.outlined &&
|
|
111
|
-
!props.plain,
|
|
112
|
-
'bg-green-500 dark:bg-green-400':
|
|
113
|
-
props.severity === 'success' &&
|
|
114
|
-
!props.text &&
|
|
115
|
-
!props.outlined &&
|
|
116
|
-
!props.plain,
|
|
117
|
-
'border border-green-500 dark:border-green-400':
|
|
118
|
-
props.severity === 'success' &&
|
|
119
|
-
!props.text &&
|
|
120
|
-
!props.outlined &&
|
|
121
|
-
!props.plain,
|
|
122
|
-
},
|
|
123
|
-
// Success Text Button
|
|
124
|
-
{
|
|
125
|
-
'text-green-500 dark:text-green-400':
|
|
126
|
-
props.text && props.severity === 'success' && !props.plain,
|
|
127
|
-
},
|
|
128
|
-
// Success Outlined Button
|
|
129
|
-
{
|
|
130
|
-
'text-green-500 border border-green-500 hover:bg-green-300/10':
|
|
131
|
-
props.outlined && props.severity === 'success' && !props.plain,
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
// Info Button
|
|
135
|
-
{
|
|
136
|
-
'text-white dark:text-surface-900':
|
|
137
|
-
props.severity === 'info' &&
|
|
138
|
-
!props.text &&
|
|
139
|
-
!props.outlined &&
|
|
140
|
-
!props.plain,
|
|
141
|
-
'bg-blue-500 dark:bg-blue-400':
|
|
142
|
-
props.severity === 'info' &&
|
|
143
|
-
!props.text &&
|
|
144
|
-
!props.outlined &&
|
|
145
|
-
!props.plain,
|
|
146
|
-
'border border-blue-500 dark:border-blue-400':
|
|
147
|
-
props.severity === 'info' &&
|
|
148
|
-
!props.text &&
|
|
149
|
-
!props.outlined &&
|
|
150
|
-
!props.plain,
|
|
151
|
-
},
|
|
152
|
-
// Info Text Button
|
|
153
|
-
{
|
|
154
|
-
'text-blue-500 dark:text-blue-400':
|
|
155
|
-
props.text && props.severity === 'info' && !props.plain,
|
|
156
|
-
},
|
|
157
|
-
// Info Outlined Button
|
|
158
|
-
{
|
|
159
|
-
'text-blue-500 border border-blue-500 hover:bg-blue-300/10 ':
|
|
160
|
-
props.outlined && props.severity === 'info' && !props.plain,
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
// Warning Button
|
|
164
|
-
{
|
|
165
|
-
'text-white dark:text-surface-900':
|
|
166
|
-
props.severity === 'warning' &&
|
|
167
|
-
!props.text &&
|
|
168
|
-
!props.outlined &&
|
|
169
|
-
!props.plain,
|
|
170
|
-
'bg-orange-500 dark:bg-orange-400':
|
|
171
|
-
props.severity === 'warning' &&
|
|
172
|
-
!props.text &&
|
|
173
|
-
!props.outlined &&
|
|
174
|
-
!props.plain,
|
|
175
|
-
'border border-orange-500 dark:border-orange-400':
|
|
176
|
-
props.severity === 'warning' &&
|
|
177
|
-
!props.text &&
|
|
178
|
-
!props.outlined &&
|
|
179
|
-
!props.plain,
|
|
180
|
-
},
|
|
181
|
-
// Warning Text Button
|
|
182
|
-
{
|
|
183
|
-
'text-orange-500 dark:text-orange-400':
|
|
184
|
-
props.text && props.severity === 'warning' && !props.plain,
|
|
185
|
-
},
|
|
186
|
-
// Warning Outlined Button
|
|
187
|
-
{
|
|
188
|
-
'text-orange-500 border border-orange-500 hover:bg-orange-300/10':
|
|
189
|
-
props.outlined && props.severity === 'warning' && !props.plain,
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
// Help Button
|
|
193
|
-
{
|
|
194
|
-
'text-white dark:text-surface-900':
|
|
195
|
-
props.severity === 'help' &&
|
|
196
|
-
!props.text &&
|
|
197
|
-
!props.outlined &&
|
|
198
|
-
!props.plain,
|
|
199
|
-
'bg-purple-500 dark:bg-purple-400':
|
|
200
|
-
props.severity === 'help' &&
|
|
201
|
-
!props.text &&
|
|
202
|
-
!props.outlined &&
|
|
203
|
-
!props.plain,
|
|
204
|
-
'border border-purple-500 dark:border-purple-400':
|
|
205
|
-
props.severity === 'help' &&
|
|
206
|
-
!props.text &&
|
|
207
|
-
!props.outlined &&
|
|
208
|
-
!props.plain,
|
|
209
|
-
},
|
|
210
|
-
// Help Text Button
|
|
211
|
-
{
|
|
212
|
-
'text-purple-500 dark:text-purple-400':
|
|
213
|
-
props.text && props.severity === 'help' && !props.plain,
|
|
214
|
-
},
|
|
215
|
-
// Help Outlined Button
|
|
216
|
-
{
|
|
217
|
-
'text-purple-500 border border-purple-500 hover:bg-purple-300/10':
|
|
218
|
-
props.outlined && props.severity === 'help' && !props.plain,
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
// Danger Button
|
|
222
|
-
{
|
|
223
|
-
'text-white dark:text-surface-900':
|
|
224
|
-
props.severity === 'danger' &&
|
|
225
|
-
!props.text &&
|
|
226
|
-
!props.outlined &&
|
|
227
|
-
!props.plain,
|
|
228
|
-
'bg-red-500 dark:bg-red-400':
|
|
229
|
-
props.severity === 'danger' &&
|
|
230
|
-
!props.text &&
|
|
231
|
-
!props.outlined &&
|
|
232
|
-
!props.plain,
|
|
233
|
-
'border border-red-500 dark:border-red-400':
|
|
234
|
-
props.severity === 'danger' &&
|
|
235
|
-
!props.text &&
|
|
236
|
-
!props.outlined &&
|
|
237
|
-
!props.plain,
|
|
238
|
-
},
|
|
239
|
-
// Danger Text Button
|
|
240
|
-
{
|
|
241
|
-
'text-red-500 dark:text-red-400':
|
|
242
|
-
props.text && props.severity === 'danger' && !props.plain,
|
|
243
|
-
},
|
|
244
|
-
// Danger Outlined Button
|
|
245
|
-
{
|
|
246
|
-
'text-red-500 border border-red-500 hover:bg-red-300/10':
|
|
247
|
-
props.outlined && props.severity === 'danger' && !props.plain,
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
// Contrast Button
|
|
251
|
-
{
|
|
252
|
-
'text-white dark:text-surface-900':
|
|
253
|
-
props.severity === 'contrast' &&
|
|
254
|
-
!props.text &&
|
|
255
|
-
!props.outlined &&
|
|
256
|
-
!props.plain,
|
|
257
|
-
'bg-surface-900 dark:bg-surface-0':
|
|
258
|
-
props.severity === 'contrast' &&
|
|
259
|
-
!props.text &&
|
|
260
|
-
!props.outlined &&
|
|
261
|
-
!props.plain,
|
|
262
|
-
'border border-surface-900 dark:border-surface-0':
|
|
263
|
-
props.severity === 'contrast' &&
|
|
264
|
-
!props.text &&
|
|
265
|
-
!props.outlined &&
|
|
266
|
-
!props.plain,
|
|
267
|
-
},
|
|
268
|
-
// Contrast Text Button
|
|
269
|
-
{
|
|
270
|
-
'text-surface-900 dark:text-surface-0':
|
|
271
|
-
props.text && props.severity === 'contrast' && !props.plain,
|
|
272
|
-
},
|
|
273
|
-
// Contrast Outlined Button
|
|
274
|
-
{
|
|
275
|
-
'text-surface-900 dark:text-surface-0 border border-surface-900 dark:border-surface-0':
|
|
276
|
-
props.outlined && props.severity === 'contrast' && !props.plain,
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
// --- Severity Button States ---
|
|
280
|
-
'focus:outline-none focus:outline-offset-0 focus:ring-1',
|
|
281
|
-
|
|
282
|
-
// Link
|
|
283
|
-
{ 'focus:ring-primary': props.link },
|
|
284
|
-
|
|
285
|
-
// Plain
|
|
286
|
-
{
|
|
287
|
-
'hover:bg-gray-600 hover:border-gray-600':
|
|
288
|
-
props.plain && !props.outlined && !props.text,
|
|
289
|
-
},
|
|
290
|
-
// Text & Outlined Button
|
|
291
|
-
{
|
|
292
|
-
'hover:bg-surface-300/10':
|
|
293
|
-
props.plain && (props.text || props.outlined),
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
// Primary
|
|
297
|
-
{
|
|
298
|
-
'hover:bg-primary-hover hover:border-primary-hover':
|
|
299
|
-
!props.link &&
|
|
300
|
-
props.severity === null &&
|
|
301
|
-
!props.text &&
|
|
302
|
-
!props.outlined &&
|
|
303
|
-
!props.plain,
|
|
304
|
-
},
|
|
305
|
-
{ 'focus:ring-primary': props.severity === null },
|
|
306
|
-
// Text & Outlined Button
|
|
307
|
-
{
|
|
308
|
-
'hover:bg-primary-300/10':
|
|
309
|
-
(props.text || props.outlined) &&
|
|
310
|
-
props.severity === null &&
|
|
311
|
-
!props.plain,
|
|
312
|
-
},
|
|
313
|
-
|
|
314
|
-
// Secondary
|
|
315
|
-
{
|
|
316
|
-
'hover:bg-surface-200 dark:hover:bg-surface-600 hover:border-surface-200 dark:hover:border-surface-600':
|
|
317
|
-
props.severity === 'secondary' &&
|
|
318
|
-
!props.text &&
|
|
319
|
-
!props.outlined &&
|
|
320
|
-
!props.plain,
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
'focus:ring-surface-500 dark:focus:ring-surface-400':
|
|
324
|
-
props.severity === 'secondary',
|
|
325
|
-
},
|
|
326
|
-
// Text & Outlined Button
|
|
327
|
-
{
|
|
328
|
-
'hover:bg-surface-300/10':
|
|
329
|
-
(props.text || props.outlined) &&
|
|
330
|
-
props.severity === 'secondary' &&
|
|
331
|
-
!props.plain,
|
|
332
|
-
},
|
|
333
|
-
|
|
334
|
-
// Success
|
|
335
|
-
{
|
|
336
|
-
'hover:bg-green-600 dark:hover:bg-green-300 hover:border-green-600 dark:hover:border-green-300':
|
|
337
|
-
props.severity === 'success' &&
|
|
338
|
-
!props.text &&
|
|
339
|
-
!props.outlined &&
|
|
340
|
-
!props.plain,
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
'focus:ring-green-500 dark:focus:ring-green-400':
|
|
344
|
-
props.severity === 'success',
|
|
345
|
-
},
|
|
346
|
-
// Text & Outlined Button
|
|
347
|
-
{
|
|
348
|
-
'hover:bg-green-300/10':
|
|
349
|
-
(props.text || props.outlined) &&
|
|
350
|
-
props.severity === 'success' &&
|
|
351
|
-
!props.plain,
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
// Info
|
|
355
|
-
{
|
|
356
|
-
'hover:bg-blue-600 dark:hover:bg-blue-300 hover:border-blue-600 dark:hover:border-blue-300':
|
|
357
|
-
props.severity === 'info' &&
|
|
358
|
-
!props.text &&
|
|
359
|
-
!props.outlined &&
|
|
360
|
-
!props.plain,
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
'focus:ring-blue-500 dark:focus:ring-blue-400':
|
|
364
|
-
props.severity === 'info',
|
|
365
|
-
},
|
|
366
|
-
// Text & Outlined Button
|
|
367
|
-
{
|
|
368
|
-
'hover:bg-blue-300/10':
|
|
369
|
-
(props.text || props.outlined) &&
|
|
370
|
-
props.severity === 'info' &&
|
|
371
|
-
!props.plain,
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
// Warning
|
|
375
|
-
{
|
|
376
|
-
'hover:bg-orange-600 dark:hover:bg-orange-300 hover:border-orange-600 dark:hover:border-orange-300':
|
|
377
|
-
props.severity === 'warning' &&
|
|
378
|
-
!props.text &&
|
|
379
|
-
!props.outlined &&
|
|
380
|
-
!props.plain,
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
'focus:ring-orange-500 dark:focus:ring-orange-400':
|
|
384
|
-
props.severity === 'warning',
|
|
385
|
-
},
|
|
386
|
-
// Text & Outlined Button
|
|
387
|
-
{
|
|
388
|
-
'hover:bg-orange-300/10':
|
|
389
|
-
(props.text || props.outlined) &&
|
|
390
|
-
props.severity === 'warning' &&
|
|
391
|
-
!props.plain,
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
// Help
|
|
395
|
-
{
|
|
396
|
-
'hover:bg-purple-600 dark:hover:bg-purple-300 hover:border-purple-600 dark:hover:border-purple-300':
|
|
397
|
-
props.severity === 'help' &&
|
|
398
|
-
!props.text &&
|
|
399
|
-
!props.outlined &&
|
|
400
|
-
!props.plain,
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
'focus:ring-purple-500 dark:focus:ring-purple-400':
|
|
404
|
-
props.severity === 'help',
|
|
405
|
-
},
|
|
406
|
-
// Text & Outlined Button
|
|
407
|
-
{
|
|
408
|
-
'hover:bg-purple-300/10':
|
|
409
|
-
(props.text || props.outlined) &&
|
|
410
|
-
props.severity === 'help' &&
|
|
411
|
-
!props.plain,
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
// Danger
|
|
415
|
-
{
|
|
416
|
-
'hover:bg-red-600 dark:hover:bg-red-300 hover:border-red-600 dark:hover:border-red-300':
|
|
417
|
-
props.severity === 'danger' &&
|
|
418
|
-
!props.text &&
|
|
419
|
-
!props.outlined &&
|
|
420
|
-
!props.plain,
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
'focus:ring-red-500 dark:focus:ring-red-400':
|
|
424
|
-
props.severity === 'danger',
|
|
425
|
-
},
|
|
426
|
-
// Text & Outlined Button
|
|
427
|
-
{
|
|
428
|
-
'hover:bg-red-300/10':
|
|
429
|
-
(props.text || props.outlined) &&
|
|
430
|
-
props.severity === 'danger' &&
|
|
431
|
-
!props.plain,
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
// Contrast
|
|
435
|
-
{
|
|
436
|
-
'hover:bg-surface-800 dark:hover:bg-surface-100 hover:border-surface-800 dark:hover:border-surface-100':
|
|
437
|
-
props.severity === 'contrast' &&
|
|
438
|
-
!props.text &&
|
|
439
|
-
!props.outlined &&
|
|
440
|
-
!props.plain,
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
'focus:ring-surface-500 dark:focus:ring-surface-400':
|
|
444
|
-
props.severity === 'contrast',
|
|
445
|
-
},
|
|
446
|
-
// Text & Outlined Button
|
|
447
|
-
{
|
|
448
|
-
'hover:bg-surface-900/10 dark:hover:bg-[rgba(255,255,255,0.03)]':
|
|
449
|
-
(props.text || props.outlined) &&
|
|
450
|
-
props.severity === 'contrast' &&
|
|
451
|
-
!props.plain,
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
// Disabled
|
|
455
|
-
{ 'opacity-60 pointer-events-none cursor-default': context.disabled },
|
|
456
|
-
|
|
457
|
-
// Transitions
|
|
458
|
-
'transition duration-200 ease-in-out',
|
|
459
|
-
parent.state.d_visible ? 'rotate-45' : 'rotate-0',
|
|
460
|
-
|
|
461
|
-
// Misc
|
|
462
|
-
'cursor-pointer overflow-hidden select-none',
|
|
463
|
-
],
|
|
464
|
-
}),
|
|
465
|
-
label: ({ props }) => ({
|
|
466
|
-
class: [
|
|
467
|
-
'duration-200',
|
|
468
|
-
'font-medium',
|
|
469
|
-
{
|
|
470
|
-
'hover:underline': props.link,
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
'flex-1': props.label !== null,
|
|
474
|
-
'invisible w-0': props.label == null,
|
|
475
|
-
},
|
|
476
|
-
],
|
|
477
|
-
}),
|
|
478
|
-
icon: ({ props }) => ({
|
|
479
|
-
class: [
|
|
480
|
-
'mx-0',
|
|
481
|
-
{
|
|
482
|
-
'mr-2': props.iconPos == 'left' && props.label != null,
|
|
483
|
-
'ml-2 order-1': props.iconPos == 'right' && props.label != null,
|
|
484
|
-
'mb-2': props.iconPos == 'top' && props.label != null,
|
|
485
|
-
'mt-2': props.iconPos == 'bottom' && props.label != null,
|
|
486
|
-
},
|
|
487
|
-
],
|
|
488
|
-
}),
|
|
489
|
-
loadingicon: ({ props }) => ({
|
|
490
|
-
class: [
|
|
491
|
-
'h-4 w-4',
|
|
492
|
-
'mx-0',
|
|
493
|
-
{
|
|
494
|
-
'mr-2': props.iconPos == 'left' && props.label != null,
|
|
495
|
-
'ml-2 order-1': props.iconPos == 'right' && props.label != null,
|
|
496
|
-
'mb-2': props.iconPos == 'top' && props.label != null,
|
|
497
|
-
'mt-2': props.iconPos == 'bottom' && props.label != null,
|
|
498
|
-
},
|
|
499
|
-
'animate-spin',
|
|
500
|
-
],
|
|
501
|
-
}),
|
|
502
|
-
badge: ({ props }) => ({
|
|
503
|
-
class: [
|
|
504
|
-
{
|
|
505
|
-
'ml-2 w-4 h-4 leading-none flex items-center justify-center':
|
|
506
|
-
props.badge,
|
|
507
|
-
},
|
|
508
|
-
],
|
|
509
|
-
}),
|
|
510
|
-
},
|
|
511
|
-
menu: {
|
|
512
|
-
class: [
|
|
513
|
-
// Spacing
|
|
514
|
-
'm-0 p-0',
|
|
515
|
-
|
|
516
|
-
// Layout & Flexbox
|
|
517
|
-
'list-none flex items-center justify-center',
|
|
518
|
-
|
|
519
|
-
// Transitions
|
|
520
|
-
'transition delay-200',
|
|
521
|
-
|
|
522
|
-
// Z-Index (Positioning)
|
|
523
|
-
'z-20',
|
|
524
|
-
],
|
|
525
|
-
},
|
|
526
|
-
menuitem: ({ props, context }) => ({
|
|
527
|
-
class: [
|
|
528
|
-
'transform transition-transform duration-200 ease-out transition-opacity duration-800',
|
|
529
|
-
|
|
530
|
-
// Conditional Appearance
|
|
531
|
-
context.hidden ? 'opacity-0 scale-0' : 'opacity-100 scale-100',
|
|
532
|
-
|
|
533
|
-
// Conditional Spacing
|
|
534
|
-
{
|
|
535
|
-
'my-1 first:mb-2': props.direction == 'up' && props.type == 'linear',
|
|
536
|
-
'my-1 first:mt-2': props.direction == 'down' && props.type == 'linear',
|
|
537
|
-
'mx-1 first:mr-2': props.direction == 'left' && props.type == 'linear',
|
|
538
|
-
'mx-1 first:ml-2': props.direction == 'right' && props.type == 'linear',
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
// Conditional Positioning
|
|
542
|
-
{ absolute: props.type !== 'linear' },
|
|
543
|
-
],
|
|
544
|
-
}),
|
|
545
|
-
action: {
|
|
546
|
-
class: [
|
|
547
|
-
// Flexbox & Alignment
|
|
548
|
-
'flex items-center justify-center',
|
|
549
|
-
|
|
550
|
-
// Size
|
|
551
|
-
'w-10 h-10',
|
|
552
|
-
|
|
553
|
-
// Shape
|
|
554
|
-
'rounded-full relative overflow-hidden',
|
|
555
|
-
|
|
556
|
-
// Appearance
|
|
557
|
-
'bg-surface-100 dark:bg-surface-800 text-surface-700 dark:text-surface-0/80',
|
|
558
|
-
|
|
559
|
-
// Hover Effects
|
|
560
|
-
'hover:bg-surface-200 dark:hover:bg-surface-800 dark:hover:text-surface-0',
|
|
561
|
-
|
|
562
|
-
// Transitions
|
|
563
|
-
'transition duration-200',
|
|
564
|
-
],
|
|
565
|
-
},
|
|
566
|
-
mask: ({ state }) => ({
|
|
567
|
-
class: [
|
|
568
|
-
// Base Styles
|
|
569
|
-
'absolute left-0 top-0 w-full h-full transition-opacity duration-250 ease-in-out bg-black/40 z-0',
|
|
570
|
-
|
|
571
|
-
// Conditional Appearance
|
|
572
|
-
{
|
|
573
|
-
'opacity-0 pointer-events-none': !state.d_visible,
|
|
574
|
-
'opacity-100 transition-opacity duration-400 ease-in-out':
|
|
575
|
-
state.d_visible,
|
|
576
|
-
},
|
|
577
|
-
],
|
|
578
|
-
}),
|
|
579
|
-
}
|