@wikicasa-dev/components 2.1.4-alpha.2 → 2.1.4-alpha.20

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 (110) hide show
  1. package/dist/UIKit/BaseAutocomplete.d.ts +14 -12
  2. package/dist/UIKit/BaseAutocomplete.js +3 -2
  3. package/dist/UIKit/BaseBadge.d.ts +2 -38
  4. package/dist/UIKit/BaseDropDown.d.ts +8 -13
  5. package/dist/UIKit/BaseInput.d.ts +4 -5
  6. package/dist/UIKit/BasePagination.d.ts +7 -1
  7. package/dist/UIKit/BasePin.d.ts +22 -0
  8. package/dist/UIKit/BaseSelect.d.ts +26 -0
  9. package/dist/UIKit/BaseSelect.js +5 -0
  10. package/dist/UIKit/BaseTextarea.js +2 -2
  11. package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +3 -3
  12. package/dist/UIKit/types.d.ts +7 -3
  13. package/dist/_virtual/_commonjsHelpers.js +6 -0
  14. package/dist/_virtual/cloneDeep.js +4 -0
  15. package/dist/_virtual/create-plugin.js +4 -0
  16. package/dist/_virtual/createPlugin.js +4 -0
  17. package/dist/_virtual/default-theme.js +4 -0
  18. package/dist/_virtual/defaultTheme.js +7 -0
  19. package/dist/_virtual/plugin.js +7 -0
  20. package/dist/assets/packages/components/lib/UIKit/BaseAlert.css +1 -1
  21. package/dist/assets/packages/components/lib/UIKit/BaseAutocomplete.css +1 -0
  22. package/dist/assets/packages/components/lib/UIKit/BaseBadge.css +1 -1
  23. package/dist/assets/packages/components/lib/UIKit/BaseComplexToggle.css +1 -1
  24. package/dist/assets/packages/components/lib/UIKit/BaseInput.css +1 -1
  25. package/dist/assets/packages/components/lib/UIKit/BasePin.css +1 -1
  26. package/dist/assets/packages/components/lib/UIKit/{NativeSelect.css → BaseSelect.css} +1 -1
  27. package/dist/assets/packages/components/lib/UIKit/BaseTextarea.css +1 -1
  28. package/dist/assets/packages/components/src/tailwind.css +1 -1
  29. package/dist/index.d.ts +3 -1
  30. package/dist/index.js +94 -87
  31. package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/keyboard.js +13 -13
  32. package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/shared/classes-to-selector.js +1 -1
  33. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/defaultTheme.js +11 -0
  34. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/public/create-plugin.js +25 -0
  35. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/public/default-theme.js +26 -0
  36. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/util/cloneDeep.js +23 -0
  37. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/util/createPlugin.js +34 -0
  38. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/plugin.js +11 -0
  39. package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/stubs/config.full.js +1068 -0
  40. package/dist/packages/components/lazyModules/Swiper/autoplay.js +2 -2
  41. package/dist/packages/components/lazyModules/Swiper/controller.js +2 -2
  42. package/dist/packages/components/lazyModules/Swiper/free-mode.js +2 -2
  43. package/dist/packages/components/lazyModules/Swiper/keyboard.js +2 -2
  44. package/dist/packages/components/lazyModules/Swiper/navigation.js +2 -2
  45. package/dist/packages/components/lazyModules/Swiper/pagination.js +2 -2
  46. package/dist/packages/components/lazyModules/Swiper/thumbs.js +2 -2
  47. package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +24 -24
  48. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +10 -9
  49. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +2 -2
  50. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +2 -2
  51. package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +2 -2
  52. package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +106 -141
  53. package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +16 -45
  54. package/dist/packages/components/lib/UIKit/BaseBanner.vue.js +9 -9
  55. package/dist/packages/components/lib/UIKit/BaseButton.vue.js +15 -15
  56. package/dist/packages/components/lib/UIKit/BaseChip.vue.js +2 -2
  57. package/dist/packages/components/lib/UIKit/BaseCollapse.vue.js +2 -2
  58. package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +53 -65
  59. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +4 -4
  60. package/dist/packages/components/lib/UIKit/BaseInput.vue.js +52 -51
  61. package/dist/packages/components/lib/UIKit/BaseModal.vue.js +2 -2
  62. package/dist/packages/components/lib/UIKit/BaseNotificationBadge.vue.js +1 -1
  63. package/dist/packages/components/lib/UIKit/BasePagination.vue.js +63 -40
  64. package/dist/packages/components/lib/UIKit/BasePin.vue.js +1 -1
  65. package/dist/packages/components/lib/UIKit/{NativeSelect.vue.js → BaseSelect.vue.js} +12 -12
  66. package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +2 -2
  67. package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +8 -8
  68. package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +1 -1
  69. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +4 -4
  70. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +7 -9
  71. package/dist/packages/components/lib/UIKit/DatePicker.vue.js +4 -4
  72. package/dist/packages/components/lib/UIKit/InputDropdown.vue.js +30 -30
  73. package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +1 -1
  74. package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +7 -6
  75. package/dist/packages/components/plugins/buttonPlugin.js +232 -0
  76. package/dist/tailwind.config.js +147 -0
  77. package/package.json +24 -31
  78. package/plugins/buttonPlugin.ts +290 -0
  79. package/dist/UIKit/NativeSelect.js +0 -5
  80. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/free-mode.css +0 -0
  81. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/navigation.css +0 -0
  82. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/pagination.css +0 -0
  83. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/zoom.css +0 -0
  84. /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/swiper.css +0 -0
  85. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowFilledIcon.js +0 -0
  86. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -0
  87. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/CheckIcon.js +0 -0
  88. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -0
  89. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -0
  90. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -0
  91. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -0
  92. /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/svg-icons/dist/svgIconFactory-BpnFimFz.js +0 -0
  93. /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.21 → @wikicasa-dev_utilities@1.1.22-alpha.4}/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -0
  94. /package/dist/node_modules/.pnpm/{@wikicasa-dev_utilities@1.1.21 → @wikicasa-dev_utilities@1.1.22-alpha.4}/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -0
  95. /package/dist/node_modules/.pnpm/{@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3 → @wikicasa-dev_vue-composables@0.0.24-alpha.5_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/vue-composables/dist/useBreakpoints.js +0 -0
  96. /package/dist/node_modules/.pnpm/{@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3 → @wikicasa-dev_vue-composables@0.0.24-alpha.5_vue@3.5.16_typescript@5.8.3_}/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -0
  97. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/autoplay.css.js +0 -0
  98. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/autoplay.js +0 -0
  99. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/controller.css.js +0 -0
  100. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/controller.js +0 -0
  101. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/free-mode.js +0 -0
  102. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/keyboard.css.js +0 -0
  103. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/navigation.js +0 -0
  104. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/pagination.js +0 -0
  105. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/thumbs.css.js +0 -0
  106. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/thumbs.js +0 -0
  107. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/zoom.js +0 -0
  108. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
  109. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
  110. /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/shared/utils.js +0 -0
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.1.4-alpha.2",
3
+ "version": "2.1.4-alpha.20",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "files": [
9
- "dist"
9
+ "dist",
10
+ "plugins"
10
11
  ],
11
12
  "sideEffects": [
12
13
  "**/*.css"
@@ -28,7 +29,9 @@
28
29
  "./chart/*": {
29
30
  "import": "./dist/chart/*.js",
30
31
  "types": "./dist/chart/*.d.ts"
31
- }
32
+ },
33
+ "./plugins/buttonPlugin": "./plugins/buttonPlugin.ts",
34
+ "./tailwind.config": "./dist/tailwind.config.js"
32
35
  },
33
36
  "repository": {
34
37
  "type": "git",
@@ -42,45 +45,35 @@
42
45
  "homepage": "https://bitbucket.org/wikicasa/wikicasa-fe#readme",
43
46
  "dependencies": {
44
47
  "@vuepic/vue-datepicker": "^11.0.2",
45
- "caniuse-lite": "^1.0.30001722",
46
- "chart.js": "^4.4.9",
48
+ "caniuse-lite": "^1.0.30001726",
49
+ "chart.js": "^4.5.0",
47
50
  "chartjs-adapter-date-fns": "^3.0.0",
48
51
  "date-fns": "^4.1.0",
49
- "reka-ui": "^2.3.1",
50
- "swiper": "^11.2.8",
51
- "vue": "^3.5.13",
52
- "vue-chartjs": "^5.3.2",
53
- "vue-router": "^4.5.0"
52
+ "reka-ui": "^2.3.2",
53
+ "swiper": "^11.2.10",
54
+ "vue-chartjs": "^5.3.2"
54
55
  },
55
56
  "devDependencies": {
56
- "@babel/eslint-parser": "^7.27.5",
57
+ "@babel/eslint-parser": "^7.28.0",
57
58
  "@histoire/plugin-vue": "^1.0.0-alpha.2",
58
- "@types/node": "^24.0.1",
59
- "@vitejs/plugin-vue": "^5.2.4",
60
- "@vue/eslint-config-prettier": "^10.2.0",
61
- "@vue/eslint-config-typescript": "^14.5.0",
62
- "@wikicasa-dev/svg-icons": "1.2.12",
59
+ "@wikicasa-dev/svg-icons": "1.2.15-alpha.1",
63
60
  "@wikicasa-dev/tailwind-plugins": "^0.0.3",
64
- "@wikicasa-dev/types": "2.2.0",
65
- "@wikicasa-dev/utilities": "1.1.21",
66
- "@wikicasa-dev/vue-composables": "0.0.23",
61
+ "@wikicasa-dev/types": "2.3.2-alpha.3",
62
+ "@wikicasa-dev/utilities": "1.1.22-alpha.4",
63
+ "@wikicasa-dev/vue-composables": "0.0.24-alpha.5",
67
64
  "ajv": "^8.17.1",
68
65
  "autoprefixer": "^10.4.21",
69
- "eslint": "^9.28",
70
- "eslint-plugin-vue": "^10.2.0",
71
- "glob": "^11.0.2",
72
66
  "histoire": "^1.0.0-alpha.2",
73
- "postcss": "^8.5.5",
74
- "prettier": "^3.5.3",
75
- "prettier-plugin-tailwindcss": "^0.6.12",
67
+ "postcss": "^8.5.6",
76
68
  "rollup-plugin-visualizer": "^6.0.3",
77
- "tailwindcss": "^3.4.15",
78
- "typescript": "^5.8.3",
79
- "vite": "^6.3.5",
80
- "vite-plugin-dts": "^4.5.4",
69
+ "tailwindcss": "3.4.15",
81
70
  "vite-plugin-lib-inject-css": "^2.2.2",
82
- "vite-plugin-vue-devtools": "^7.7.6",
83
- "vue-tsc": "^2.2.10"
71
+ "vue": "^3.5.13",
72
+ "@vitejs/plugin-vue": "^6.0.0",
73
+ "vite-plugin-dts": "^4.5.4"
74
+ },
75
+ "peerDependencies": {
76
+ "vue": "^3.5.13"
84
77
  },
85
78
  "readme": "ERROR: No README data found!",
86
79
  "scripts": {
@@ -0,0 +1,290 @@
1
+ import plugin from "tailwindcss/plugin";
2
+
3
+ const colors = {
4
+ //New colors
5
+ primary: { value: "#F20282", hover: "#E30C79", outlineHover: "#FFF8FB" },
6
+ secondary: { value: "#2b5dff", hover: "#244FD9" },
7
+ lightgray: { value: "#C1C8D5", hover: "" },
8
+ ghost: { value: "#FAFBFF", hover: "" },
9
+
10
+ //Old colors
11
+ darkPrimary: { value: "#2A3761", hover: "" },
12
+ lavender: { value: "#E9EFFE", hover: "" },
13
+ cultured: { value: "#F4F7FF", hover: "" },
14
+ carbon: { value: "#3C474D", hover: "" },
15
+ gray: { value: "#6D7687", hover: "" },
16
+ black: { value: "#222222", hover: "" },
17
+ warning: { value: "#FFD167", hover: "" },
18
+ white: { value: "#FFF", hover: "" },
19
+ danger: { value: "#FA4F64", hover: "" },
20
+ } as const;
21
+
22
+ export const buttonPlugin = plugin(({ addComponents, theme }) => {
23
+ addComponents({
24
+ ".btn": {
25
+ "--btn-px": "25px",
26
+ "--btn-py": "11px",
27
+ "--btn-bg-color": "transparent",
28
+ "--btn-text-color": colors.black.value,
29
+ "--btn-border-color": "unset",
30
+ "--btn-border-width": "0",
31
+ "--btn-border-radius": "24px",
32
+ "--btn-border-style": "solid",
33
+ "--btn-height": "40px",
34
+ "--btn-width": "auto",
35
+ "--btn-font-size": theme("fontSize.16"),
36
+ "--btn-transition":
37
+ "color, background-color cubic-bezier(0.4, 0, 0.2, 1) 150ms",
38
+ "--btn-font-weight": `${theme("fontWeight.semibold")}`,
39
+ display: "inline-flex",
40
+ "align-items": "center",
41
+ "justify-content": "center",
42
+ "font-size": "var(--btn-font-size)",
43
+ "font-weight": "var(--btn-font-weight)",
44
+ "white-space": "nowrap",
45
+ border:
46
+ "var(--btn-border-width) var(--btn-border-color) var(--btn-border-style)",
47
+ "border-radius": "var(--btn-border-radius)",
48
+ cursor: "pointer",
49
+ height: "var(--btn-height)",
50
+ width: "var(--btn-width)",
51
+ "background-color": "var(--btn-bg-color)",
52
+ color: "var(--btn-text-color)",
53
+ padding: "var(--btn-py) var(--btn-px)",
54
+ transition: "var(--btn-transition)",
55
+ "line-height": "1",
56
+ "-webkit-tap-highlight-color": "transparent",
57
+ "&.btn-lg": {
58
+ "--btn-height": "48px",
59
+ "--btn-px": "24px",
60
+ "--btn-py": "12px",
61
+ },
62
+ "&.btn-sm": {
63
+ "--btn-px": "24px",
64
+ "--btn-py": "8px",
65
+ "--btn-height": "40px",
66
+ },
67
+ "&.btn-rounded": {
68
+ "--btn-px": "0",
69
+ "--btn-py": "0",
70
+ },
71
+ "&.btn-outline": {
72
+ "--btn-border-width": "1px",
73
+ "--btn-bg-color": colors.white.value,
74
+ },
75
+ "&.btn-primary": {
76
+ ...createBtn(
77
+ {
78
+ bgColor: colors.primary.value,
79
+ textColor: colors.white.value,
80
+ hoverBgColor: colors.primary.hover,
81
+ hoverDisabledBgColor: colors.primary.value,
82
+ },
83
+ {
84
+ mainColor: colors.white.hover,
85
+ textColor: colors.primary.value,
86
+ hoverBgColor: colors.primary.outlineHover,
87
+ },
88
+ ),
89
+ "text-transform": "uppercase",
90
+ },
91
+ "&.btn-secondary": createBtn(
92
+ {
93
+ bgColor: colors.secondary.value,
94
+ textColor: colors.white.value,
95
+ hoverBgColor: colors.secondary.hover,
96
+ hoverDisabledBgColor: colors.secondary.value,
97
+ },
98
+ {
99
+ mainColor: colors.secondary.value,
100
+ textColor: colors.secondary.value,
101
+ },
102
+ ),
103
+ "&.btn-ternary": {
104
+ ...createBtn({
105
+ bgColor: colors.white.value,
106
+ textColor: colors.secondary.value,
107
+ hoverBgColor: colors.white.value,
108
+ hoverDisabledBgColor: colors.secondary.value,
109
+ hoverTextColor: colors.secondary.hover,
110
+ }),
111
+ "--btn-border-color": colors.lightgray.value,
112
+ "--btn-border-width": "1px",
113
+ "--btn-border-radius": "24px",
114
+ },
115
+ "&.btn-quaternary": {
116
+ "--btn-px": "0",
117
+ "--btn-py": "0",
118
+ "--btn-text-color": colors.secondary.value,
119
+ "--btn-height": "auto",
120
+ "&:hover": {
121
+ "text-decoration": "underline",
122
+ "--btn-text-color": colors.secondary.hover,
123
+ },
124
+ "&:disabled": {
125
+ "--btn-bg-color": "transparent",
126
+ "--btn-text-color": colors.lightgray.value,
127
+ },
128
+ },
129
+ "&.btn-single-selection": {
130
+ "--btn-px": "16px",
131
+ "--btn-py": "8px",
132
+ "--btn-border-radius": theme("borderRadius.2xs"),
133
+ "--btn-border-color": colors.lightgray.value,
134
+ "--btn-border-width": "1px",
135
+ "--btn-font-weight": theme("fontWeight.regular"),
136
+ "&:hover": {
137
+ "--btn-border-color": colors.secondary.value,
138
+ },
139
+ "&:active,&.active,&[data-active='true']": {
140
+ "--btn-bg-color": colors.ghost.value,
141
+ "--btn-text-color": colors.secondary.value,
142
+ "--btn-border-color": colors.secondary.value,
143
+ },
144
+ },
145
+ },
146
+ //OLD style. Kept for retro-compatibility
147
+ ".btn-light": createBtn({
148
+ textColor: colors.primary.value,
149
+ bgColor: colors.white.value,
150
+ hoverTextColor: colors.primary.value,
151
+ hoverBgColor: "#FAFAFA",
152
+ hoverDisabledBgColor: colors.white.value,
153
+ }),
154
+ ".btn-warning": createBtn({
155
+ bgColor: colors.warning.value,
156
+ textColor: "#2A3761",
157
+ hoverBgColor: "#F2C761",
158
+ hoverDisabledBgColor: colors.warning.value,
159
+ }),
160
+ ".btn-danger": createBtn(
161
+ {
162
+ bgColor: colors.danger.value,
163
+ textColor: colors.white.value,
164
+ hoverBgColor: "#E0485A",
165
+ hoverDisabledBgColor: colors.danger.value,
166
+ },
167
+ {
168
+ mainColor: colors.danger.value,
169
+ textColor: colors.danger.value,
170
+ },
171
+ ),
172
+ ".btn-multi-selection": {
173
+ "--btn-py": "10px",
174
+ "--btn-height": "40px",
175
+ "font-weight": theme("fontWeight.regular"),
176
+ "--btn-border-radius": theme("borderRadius.xs"),
177
+ "--btn-border-color": "#EAEFFD",
178
+ "--btn-border-width": "1px",
179
+ "white-space": "normal",
180
+ ...createBtn({
181
+ textColor: colors.black.value,
182
+ bgColor: "#F5F7FA",
183
+ hoverBgColor: colors.lavender.value,
184
+ hoverDisabledBgColor: colors.white.value,
185
+ hoverBorderColor: "#385CF6",
186
+ }),
187
+ },
188
+
189
+ ".btn-facile": {
190
+ "--btn-facile-color": "#FF6600",
191
+ "--btn-facile-hover-color": "#b34700",
192
+ ...createBtn({
193
+ bgColor: "var(--btn-facile-color)",
194
+ textColor: colors.white.value,
195
+ hoverBgColor: "var(--btn-facile-hover-color)",
196
+ hoverTextColor: colors.white.value,
197
+ hoverDisabledBgColor: "var(--btn-facile-color)",
198
+ }),
199
+ },
200
+ ".btn-show-more": {
201
+ "--btn-border-radius": "0",
202
+ "--btn-border-color": colors.white.value,
203
+ ...createBtn({
204
+ textColor: "#2B5DFF",
205
+ bgColor: colors.white.value,
206
+ hoverTextColor: "#3646B3",
207
+ hoverBgColor: colors.white.value,
208
+ hoverDisabledBgColor: colors.white.value,
209
+ }),
210
+ },
211
+ ".btn-transparent": {
212
+ "--border-color": "transparent",
213
+ "--btn-px": "0",
214
+ "--btn-py": "0",
215
+ "&:hover": {
216
+ "--btn-bg-color": "transparent",
217
+ "--border-color": "transparent",
218
+ },
219
+ },
220
+ });
221
+ });
222
+
223
+ type BtnAttributes = {
224
+ bgColor: string;
225
+ textColor: string;
226
+ hoverBgColor: string;
227
+ hoverTextColor?: string;
228
+ /* The border color will be applied to desktop mode */
229
+ hoverBorderColor?: string;
230
+ activeBorderColor?: string;
231
+ activeBgColor?: string;
232
+ activeTextColor?: string;
233
+ hoverDisabledBgColor: string;
234
+ };
235
+ type BtnOutlineVariantAttributes = {
236
+ /* If present, it will be used to set the color to borders, text and background */
237
+ mainColor?: string;
238
+ borderColor?: string;
239
+ textColor?: string;
240
+ /* The hover bg color will be activated only from tablet mode on */
241
+ hoverBgColor?: string;
242
+ hoverDisabledBgColor?: string;
243
+ /* The hover text color will be activated only from tablet mode on */
244
+ hoverTextColor?: string;
245
+ activeBgColor?: string;
246
+ activeTextColor?: string;
247
+ };
248
+
249
+ const createBtn = (
250
+ btnProps: BtnAttributes,
251
+ btnOutlineProps?: BtnOutlineVariantAttributes,
252
+ ): any => ({
253
+ "--btn-bg-color": btnProps.bgColor,
254
+ "--btn-text-color": btnProps.textColor,
255
+ "&:disabled": {
256
+ cursor: "not-allowed",
257
+ },
258
+ "&:hover:not(:disabled)": {
259
+ "--btn-text-color": btnProps.hoverTextColor,
260
+ "--btn-bg-color": btnProps.hoverBgColor,
261
+ },
262
+ ...(btnOutlineProps
263
+ ? {
264
+ "&.btn-outline": createOutlineVariant(btnOutlineProps),
265
+ }
266
+ : {}),
267
+ });
268
+
269
+ const createOutlineVariant = (props: BtnOutlineVariantAttributes): any => ({
270
+ "--btn-border-color": props.mainColor ?? props.borderColor,
271
+ "--btn-text-color": props.textColor,
272
+ "--btn-bg-color": "#fff",
273
+ //By default, the active section is the same of the hover section in desktop mode
274
+ "&:active": {
275
+ "--btn-bg-color":
276
+ (props.mainColor ?? props.activeBgColor ?? props.hoverBgColor) +
277
+ " !important",
278
+ //By default, on active the text is white
279
+ ...(props.activeTextColor || props.hoverTextColor
280
+ ? {
281
+ "--btn-text-color": props.activeTextColor ?? props.hoverTextColor,
282
+ }
283
+ : {}),
284
+ },
285
+ "&:hover": {
286
+ //By default, the text color is white
287
+ ...(props.hoverBgColor ? { "--btn-bg-color": props.hoverBgColor } : {}),
288
+ "--btn-text-color": props.hoverTextColor ?? props.textColor,
289
+ },
290
+ });
@@ -1,5 +0,0 @@
1
- import o from "../packages/components/lib/UIKit/NativeSelect.vue.js";
2
- import '../assets/packages/components/lib/UIKit/NativeSelect.css';/* empty css */
3
- export {
4
- o as default
5
- };