@designcrowd/fe-shared-lib 1.2.0 → 1.2.1-ast-disabled-1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-ast-disabled-1",
4
4
  "scripts": {
5
5
  "start": "npm run storybook",
6
6
  "build": "npm run build:css --production",
@@ -719,6 +719,9 @@ video {
719
719
  .theme-brandCrowd .tw-ml-auto {
720
720
  margin-left: auto;
721
721
  }
722
+ .theme-brandCrowd .tw-mr-1 {
723
+ margin-right: 0.25rem;
724
+ }
722
725
  .theme-brandCrowd .tw-mr-2 {
723
726
  margin-right: 0.5rem;
724
727
  }
@@ -827,6 +830,10 @@ video {
827
830
  .theme-brandCrowd .tw-h-auto {
828
831
  height: auto;
829
832
  }
833
+ .theme-brandCrowd .tw-h-fit {
834
+ height: -moz-fit-content;
835
+ height: fit-content;
836
+ }
830
837
  .theme-brandCrowd .tw-h-full {
831
838
  height: 100%;
832
839
  }
@@ -1013,6 +1020,9 @@ video {
1013
1020
  .theme-brandCrowd .tw-animate-spin {
1014
1021
  animation: tw-spin 1s linear infinite;
1015
1022
  }
1023
+ .\!tw-cursor-not-allowed {
1024
+ cursor: not-allowed !important;
1025
+ }
1016
1026
  .theme-brandCrowd .tw-cursor-not-allowed {
1017
1027
  cursor: not-allowed;
1018
1028
  }
@@ -1446,6 +1456,17 @@ video {
1446
1456
  .theme-brandCrowd .tw-bg-opacity-80 {
1447
1457
  --tw-bg-opacity: 0.8;
1448
1458
  }
1459
+ .theme-brandCrowd .tw-bg-gradient-to-t {
1460
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1461
+ }
1462
+ .theme-brandCrowd .tw-from-\[\#d946ef\] {
1463
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1464
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1465
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1466
+ }
1467
+ .theme-brandCrowd .tw-to-\[\#8b5cf6\] {
1468
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1469
+ }
1449
1470
  .theme-brandCrowd .tw-bg-no-repeat {
1450
1471
  background-repeat: no-repeat;
1451
1472
  }
@@ -2087,6 +2108,10 @@ video {
2087
2108
  --tw-shadow-color: #0097D7 !important;
2088
2109
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2110
  }
2111
+ .theme-brandCrowd .hover\:tw-brightness-\[0\.85\]:hover {
2112
+ --tw-brightness: brightness(0.85);
2113
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2114
+ }
2090
2115
  .theme-brandCrowd .focus\:tw-border-error-600:focus {
2091
2116
  --tw-border-opacity: 1;
2092
2117
  border-color: rgb(194 22 50 / var(--tw-border-opacity));
@@ -719,6 +719,9 @@ video {
719
719
  .theme-brandPage .tw-ml-auto {
720
720
  margin-left: auto;
721
721
  }
722
+ .theme-brandPage .tw-mr-1 {
723
+ margin-right: 0.25rem;
724
+ }
722
725
  .theme-brandPage .tw-mr-2 {
723
726
  margin-right: 0.5rem;
724
727
  }
@@ -827,6 +830,10 @@ video {
827
830
  .theme-brandPage .tw-h-auto {
828
831
  height: auto;
829
832
  }
833
+ .theme-brandPage .tw-h-fit {
834
+ height: -moz-fit-content;
835
+ height: fit-content;
836
+ }
830
837
  .theme-brandPage .tw-h-full {
831
838
  height: 100%;
832
839
  }
@@ -1013,6 +1020,9 @@ video {
1013
1020
  .theme-brandPage .tw-animate-spin {
1014
1021
  animation: tw-spin 1s linear infinite;
1015
1022
  }
1023
+ .\!tw-cursor-not-allowed {
1024
+ cursor: not-allowed !important;
1025
+ }
1016
1026
  .theme-brandPage .tw-cursor-not-allowed {
1017
1027
  cursor: not-allowed;
1018
1028
  }
@@ -1294,6 +1304,17 @@ video {
1294
1304
  .theme-brandPage .tw-bg-opacity-80 {
1295
1305
  --tw-bg-opacity: 0.8;
1296
1306
  }
1307
+ .theme-brandPage .tw-bg-gradient-to-t {
1308
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1309
+ }
1310
+ .theme-brandPage .tw-from-\[\#d946ef\] {
1311
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1312
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1313
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1314
+ }
1315
+ .theme-brandPage .tw-to-\[\#8b5cf6\] {
1316
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1317
+ }
1297
1318
  .theme-brandPage .tw-bg-no-repeat {
1298
1319
  background-repeat: no-repeat;
1299
1320
  }
@@ -1791,6 +1812,10 @@ video {
1791
1812
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
1792
1813
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1793
1814
  }
1815
+ .theme-brandPage .hover\:tw-brightness-\[0\.85\]:hover {
1816
+ --tw-brightness: brightness(0.85);
1817
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1818
+ }
1794
1819
  .theme-brandPage .focus\:tw-border-grayscale-600:focus {
1795
1820
  --tw-border-opacity: 1;
1796
1821
  border-color: rgb(94 94 94 / var(--tw-border-opacity));
@@ -719,6 +719,9 @@ video {
719
719
  .theme-crazyDomains .tw-ml-auto {
720
720
  margin-left: auto;
721
721
  }
722
+ .theme-crazyDomains .tw-mr-1 {
723
+ margin-right: 0.25rem;
724
+ }
722
725
  .theme-crazyDomains .tw-mr-2 {
723
726
  margin-right: 0.5rem;
724
727
  }
@@ -827,6 +830,10 @@ video {
827
830
  .theme-crazyDomains .tw-h-auto {
828
831
  height: auto;
829
832
  }
833
+ .theme-crazyDomains .tw-h-fit {
834
+ height: -moz-fit-content;
835
+ height: fit-content;
836
+ }
830
837
  .theme-crazyDomains .tw-h-full {
831
838
  height: 100%;
832
839
  }
@@ -1013,6 +1020,9 @@ video {
1013
1020
  .theme-crazyDomains .tw-animate-spin {
1014
1021
  animation: tw-spin 1s linear infinite;
1015
1022
  }
1023
+ .\!tw-cursor-not-allowed {
1024
+ cursor: not-allowed !important;
1025
+ }
1016
1026
  .theme-crazyDomains .tw-cursor-not-allowed {
1017
1027
  cursor: not-allowed;
1018
1028
  }
@@ -1446,6 +1456,17 @@ video {
1446
1456
  .theme-crazyDomains .tw-bg-opacity-80 {
1447
1457
  --tw-bg-opacity: 0.8;
1448
1458
  }
1459
+ .theme-crazyDomains .tw-bg-gradient-to-t {
1460
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1461
+ }
1462
+ .theme-crazyDomains .tw-from-\[\#d946ef\] {
1463
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1464
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1465
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1466
+ }
1467
+ .theme-crazyDomains .tw-to-\[\#8b5cf6\] {
1468
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1469
+ }
1449
1470
  .theme-crazyDomains .tw-bg-no-repeat {
1450
1471
  background-repeat: no-repeat;
1451
1472
  }
@@ -2087,6 +2108,10 @@ video {
2087
2108
  --tw-shadow-color: #00A1EF !important;
2088
2109
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2110
  }
2111
+ .theme-crazyDomains .hover\:tw-brightness-\[0\.85\]:hover {
2112
+ --tw-brightness: brightness(0.85);
2113
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2114
+ }
2090
2115
  .theme-crazyDomains .focus\:tw-border-error-600:focus {
2091
2116
  --tw-border-opacity: 1;
2092
2117
  border-color: rgb(186 24 79 / var(--tw-border-opacity));
@@ -719,6 +719,9 @@ video {
719
719
  .theme-designCom .tw-ml-auto {
720
720
  margin-left: auto;
721
721
  }
722
+ .theme-designCom .tw-mr-1 {
723
+ margin-right: 0.25rem;
724
+ }
722
725
  .theme-designCom .tw-mr-2 {
723
726
  margin-right: 0.5rem;
724
727
  }
@@ -827,6 +830,10 @@ video {
827
830
  .theme-designCom .tw-h-auto {
828
831
  height: auto;
829
832
  }
833
+ .theme-designCom .tw-h-fit {
834
+ height: -moz-fit-content;
835
+ height: fit-content;
836
+ }
830
837
  .theme-designCom .tw-h-full {
831
838
  height: 100%;
832
839
  }
@@ -1013,6 +1020,9 @@ video {
1013
1020
  .theme-designCom .tw-animate-spin {
1014
1021
  animation: tw-spin 1s linear infinite;
1015
1022
  }
1023
+ .\!tw-cursor-not-allowed {
1024
+ cursor: not-allowed !important;
1025
+ }
1016
1026
  .theme-designCom .tw-cursor-not-allowed {
1017
1027
  cursor: not-allowed;
1018
1028
  }
@@ -1446,6 +1456,17 @@ video {
1446
1456
  .theme-designCom .tw-bg-opacity-80 {
1447
1457
  --tw-bg-opacity: 0.8;
1448
1458
  }
1459
+ .theme-designCom .tw-bg-gradient-to-t {
1460
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1461
+ }
1462
+ .theme-designCom .tw-from-\[\#d946ef\] {
1463
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1464
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1465
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1466
+ }
1467
+ .theme-designCom .tw-to-\[\#8b5cf6\] {
1468
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1469
+ }
1449
1470
  .theme-designCom .tw-bg-no-repeat {
1450
1471
  background-repeat: no-repeat;
1451
1472
  }
@@ -2087,6 +2108,10 @@ video {
2087
2108
  --tw-shadow-color: #3f59f6 !important;
2088
2109
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2110
  }
2111
+ .theme-designCom .hover\:tw-brightness-\[0\.85\]:hover {
2112
+ --tw-brightness: brightness(0.85);
2113
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2114
+ }
2090
2115
  .theme-designCom .focus\:tw-border-error-600:focus {
2091
2116
  --tw-border-opacity: 1;
2092
2117
  border-color: rgb(182 58 42 / var(--tw-border-opacity));
@@ -719,6 +719,9 @@ video {
719
719
  .theme-designCrowd .tw-ml-auto {
720
720
  margin-left: auto;
721
721
  }
722
+ .theme-designCrowd .tw-mr-1 {
723
+ margin-right: 0.25rem;
724
+ }
722
725
  .theme-designCrowd .tw-mr-2 {
723
726
  margin-right: 0.5rem;
724
727
  }
@@ -827,6 +830,10 @@ video {
827
830
  .theme-designCrowd .tw-h-auto {
828
831
  height: auto;
829
832
  }
833
+ .theme-designCrowd .tw-h-fit {
834
+ height: -moz-fit-content;
835
+ height: fit-content;
836
+ }
830
837
  .theme-designCrowd .tw-h-full {
831
838
  height: 100%;
832
839
  }
@@ -1013,6 +1020,9 @@ video {
1013
1020
  .theme-designCrowd .tw-animate-spin {
1014
1021
  animation: tw-spin 1s linear infinite;
1015
1022
  }
1023
+ .\!tw-cursor-not-allowed {
1024
+ cursor: not-allowed !important;
1025
+ }
1016
1026
  .theme-designCrowd .tw-cursor-not-allowed {
1017
1027
  cursor: not-allowed;
1018
1028
  }
@@ -1446,6 +1456,17 @@ video {
1446
1456
  .theme-designCrowd .tw-bg-opacity-80 {
1447
1457
  --tw-bg-opacity: 0.8;
1448
1458
  }
1459
+ .theme-designCrowd .tw-bg-gradient-to-t {
1460
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1461
+ }
1462
+ .theme-designCrowd .tw-from-\[\#d946ef\] {
1463
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1464
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1465
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1466
+ }
1467
+ .theme-designCrowd .tw-to-\[\#8b5cf6\] {
1468
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1469
+ }
1449
1470
  .theme-designCrowd .tw-bg-no-repeat {
1450
1471
  background-repeat: no-repeat;
1451
1472
  }
@@ -2087,6 +2108,10 @@ video {
2087
2108
  --tw-shadow-color: #1197EB !important;
2088
2109
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2110
  }
2111
+ .theme-designCrowd .hover\:tw-brightness-\[0\.85\]:hover {
2112
+ --tw-brightness: brightness(0.85);
2113
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2114
+ }
2090
2115
  .theme-designCrowd .focus\:tw-border-error-600:focus {
2091
2116
  --tw-border-opacity: 1;
2092
2117
  border-color: rgb(195 50 48 / var(--tw-border-opacity));
@@ -84,6 +84,7 @@
84
84
  <script>
85
85
  import ButtonOutline from './variants/ButtonOutline.vue';
86
86
  import ButtonPrimary from './variants/ButtonPrimary.vue';
87
+ import ButtonOutlinePrimary from './variants/ButtonOutlinePrimary.vue';
87
88
  import ButtonWarning from './variants/ButtonWarning.vue';
88
89
  import ButtonSecondary from './variants/ButtonSecondary.vue';
89
90
  import ButtonInfoFilled from './variants/ButtonInfoFilled.vue';
@@ -107,6 +108,7 @@ export default {
107
108
  name: 'Button',
108
109
  components: {
109
110
  'button-crazyDomains-primary': ButtonCrazyDomainsPrimary,
111
+ 'button-crazyDomains-outline-primary': ButtonOutlinePrimary,
110
112
  'button-crazyDomains-outline': ButtonCrazyDomainsOutline,
111
113
  'button-crazyDomains-secondary': ButtonSecondary,
112
114
  'button-crazyDomains-primary-with-icon': ButtonPrimaryWithIcon,
@@ -118,6 +120,7 @@ export default {
118
120
  'button-crazyDomains-pill': ButtonPill,
119
121
 
120
122
  'button-brandCrowd-primary': ButtonPrimary,
123
+ 'button-brandCrowd-outline-primary': ButtonOutlinePrimary,
121
124
  'button-brandCrowd-warning': ButtonWarning,
122
125
  'button-brandCrowd-info-filled': ButtonInfoFilled,
123
126
  'button-brandCrowd-outline': ButtonOutline,
@@ -278,6 +278,30 @@ export const PrimarySamples = (args, { argTypes }) => {
278
278
  PrimarySamples.args = controlArgs;
279
279
  PrimarySamples.argTypes = controlArgTypes;
280
280
 
281
+ export const OutlinePrimarySamples = (args, { argTypes }) => {
282
+ return {
283
+ components: {
284
+ StorybookButtonComponent,
285
+ },
286
+ props: Object.keys(argTypes),
287
+ data() {
288
+ return {
289
+ variants: generateSampleButtonVariants('outline-primary'),
290
+ };
291
+ },
292
+ template: `
293
+ <StorybookButtonComponent
294
+ :disabled="disabled"
295
+ :full-width="fullWidth"
296
+ :grey-out-left="greyOutLeft"
297
+ :justify="justify"
298
+ :variants="variants"/>
299
+ `,
300
+ };
301
+ };
302
+ OutlinePrimarySamples.args = controlArgs;
303
+ OutlinePrimarySamples.argTypes = controlArgTypes;
304
+
281
305
  export const SecondarySamples = (args, { argTypes }) => {
282
306
  return {
283
307
  components: {
@@ -2,7 +2,7 @@
2
2
  <button
3
3
  v-if="!url"
4
4
  style="box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;"
5
- class="tw-font-sans tw-bg-gradient-to-t tw-from-[#d946ef] tw-to-[#8b5cf6] tw-border-0 tw-font-bold tw-rounded-xl tw-p-1 tw-text-white tw-duration-300 hover:tw-brightness-[0.85]"
5
+ class="tw-font-sans tw-bg-gradient-to-t tw-from-[#d946ef] tw-to-[#8b5cf6] tw-border-0 tw-font-bold tw-p-1 tw-text-white tw-duration-300 hover:tw-brightness-[0.85]"
6
6
  :class="[
7
7
  classes,
8
8
  {
@@ -25,7 +25,7 @@
25
25
  <a
26
26
  v-else
27
27
  :href="computedUrl"
28
- class="tw-font-sans tw-inline-flex tw-justify-center tw-rounded-xl tw-bg-gradient-to-t tw-from-[#d946ef] tw-to-[#8b5cf6] tw-border-0 tw-font-bold tw-text-white"
28
+ class="tw-font-sans tw-inline-flex tw-justify-center tw-bg-gradient-to-t tw-from-[#d946ef] tw-to-[#8b5cf6] tw-border-0 tw-font-bold tw-text-white"
29
29
  :class="[
30
30
  commonUrlButtonClasses,
31
31
  classes,
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <button
3
+ v-if="!url"
4
+ class="tw-font-sans tw-border-2 tw-border-solid tw-font-bold tw-text-primary-500 tw-uppercase tw-transition-colors tw-duration-300"
5
+ :class="[
6
+ classes,
7
+ computedClasses,
8
+ {
9
+ 'tw-border-grayscale-500 tw-bg-grayscale-400 tw-text-grayscale-600 tw-cursor-not-allowed': disabled,
10
+ 'tw-cursor-pointer': !disabled,
11
+ 'tw-border-primary-500 tw-bg-white hover:tw-bg-primary-100 tw-text-primary-500': !isBusy && !disabled,
12
+ 'tw-border-grayscale-500 tw-bg-grayscale-400 hover:tw-bg-grayscale-300 hover:tw-border-grayscale-400 tw-text-grayscale-600':
13
+ isBusy,
14
+ },
15
+ ]"
16
+ :disabled="disabled"
17
+ :type="type"
18
+ v-bind="attrs"
19
+ @click="onClick"
20
+ >
21
+ <slot />
22
+ </button>
23
+ <a
24
+ v-else
25
+ :href="computedUrl"
26
+ class="tw-justify-center tw-font-sans tw-inline-flex tw-border-2 tw-border-solid tw-font-bold tw-uppercase tw-transition-colors tw-duration-300"
27
+ :class="[
28
+ commonUrlButtonClasses,
29
+ classes,
30
+ computedClasses,
31
+ {
32
+ 'tw-cursor-wait': disabled,
33
+ 'tw-cursor-pointer': !disabled,
34
+ 'tw-border-primary-500 tw-bg-white hover:tw-bg-primary-100 tw-text-primary-500': !isBusy,
35
+ 'tw-border-grayscale-500 tw-bg-grayscale-400 hover:tw-bg-grayscale-300 hover:tw-border-grayscale-400 tw-text-grayscale-600':
36
+ isBusy,
37
+ },
38
+ ]"
39
+ :download="download"
40
+ v-bind="attrs"
41
+ :target="target"
42
+ @click="onClick"
43
+ >
44
+ <slot />
45
+ </a>
46
+ </template>
47
+ <script>
48
+ import ButtonVariant from '../ButtonVariant.mixin.vue';
49
+
50
+ export default {
51
+ mixins: [ButtonVariant],
52
+ };
53
+ </script>
@@ -21,6 +21,7 @@ export const Sample = () => {
21
21
  {
22
22
  label: 'Medium',
23
23
  value: 'medium',
24
+ disabled: true,
24
25
  },
25
26
  {
26
27
  label: 'Large',
@@ -10,11 +10,14 @@
10
10
  <button
11
11
  class="button-group-item tw-text-xs tw-shadow-inner tw-w-full tw-py-2"
12
12
  :class="{
13
- '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected,
14
- '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200 hover:!tw-shadow-info-500': !option.isSelected,
13
+ '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected && !option.disabled,
14
+ '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': !option.isSelected && !option.disabled,
15
+ 'hover:!tw-shadow-info-500': !option.isSelected && !option.disabled,
16
+ 'tw-opacity-50 !tw-cursor-not-allowed !tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': option.disabled,
15
17
  }"
18
+ :disabled="option.disabled"
16
19
  v-bind="option.dataAttribute ? { [option.dataAttribute]: '' } : {}"
17
- @click="$emit('on-select', option)"
20
+ @click="!option.disabled && $emit('on-select', option)"
18
21
  >
19
22
  <slot name="content" :option="option"></slot>
20
23
  </button>
@@ -35,8 +38,10 @@
35
38
  <button
36
39
  v-if="variant === 'icon'"
37
40
  :class="{
38
- '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected,
39
- '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200 hover:!tw-shadow-info-500': !option.isSelected,
41
+ '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected && !option.disabled,
42
+ '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': !option.isSelected && !option.disabled,
43
+ 'hover:!tw-shadow-info-500': !option.isSelected && !option.disabled,
44
+ 'tw-opacity-50 !tw-cursor-not-allowed !tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': option.disabled,
40
45
  'tw-px-2': !option.iconViewBox,
41
46
  'tw-px-px':
42
47
  option.iconViewBox && !option.isSelected && !option.iconName.includes('display-style') && btnStyleVariant, // TODO - move style logic to computed prop
@@ -45,9 +50,10 @@
45
50
  'tw-px-0 tw-py-0': option.iconName.includes('display-style') || btnStyleVariant === 'compressed',
46
51
  }"
47
52
  :style="option.iconName.includes('display-style') ? { lineHeight: 0 } : {}"
53
+ :disabled="option.disabled"
48
54
  class="tw-text-xs button-group-icon-button tw-shadow-inner"
49
55
  v-bind="option.dataAttribute ? { [option.dataAttribute]: '' } : {}"
50
- @click="$emit('on-select', option)"
56
+ @click="!option.disabled && $emit('on-select', option)"
51
57
  >
52
58
  <div
53
59
  :class="{
@@ -67,12 +73,15 @@
67
73
  <button
68
74
  v-else
69
75
  :class="{
70
- '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected,
71
- '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200 hover:!tw-shadow-info-500': !option.isSelected,
76
+ '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected && !option.disabled,
77
+ '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': !option.isSelected && !option.disabled,
78
+ 'hover:!tw-shadow-info-500': !option.isSelected && !option.disabled,
79
+ 'tw-opacity-50 !tw-cursor-not-allowed !tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': option.disabled,
72
80
  }"
81
+ :disabled="option.disabled"
73
82
  class="tw-text-xs button-group-image-button tw-shadow-inner"
74
83
  v-bind="option.dataAttribute ? { [option.dataAttribute]: '' } : {}"
75
- @click="$emit('on-select', option)"
84
+ @click="!option.disabled && $emit('on-select', option)"
76
85
  >
77
86
  <img :src="option.src" :alt="option.alt" class="tw-w-full tw-h-full" />
78
87
  </button>
@@ -90,11 +99,14 @@
90
99
  :key="`button-${option.value}`"
91
100
  :class="{
92
101
  'tw-ml-2': idx > 0 && !columns,
93
- '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected,
94
- '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200 hover:!tw-shadow-info-500': !option.isSelected,
102
+ '!tw-shadow-[0_0_0_2px] !tw-shadow-info-500': option.isSelected && !option.disabled,
103
+ '!tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': !option.isSelected && !option.disabled,
104
+ 'hover:!tw-shadow-info-500': !option.isSelected && !option.disabled,
105
+ 'tw-opacity-50 !tw-cursor-not-allowed !tw-shadow-[0_0_0_1px] !tw-shadow-secondary-200': option.disabled,
95
106
  }"
107
+ :disabled="option.disabled"
96
108
  class="tw-text-xs button-group-button tw-shadow-inner"
97
- @click="$emit('on-select', option)"
109
+ @click="!option.disabled && $emit('on-select', option)"
98
110
  >
99
111
  {{ option.label }}
100
112
  </button>
@@ -18,11 +18,11 @@ export const Sample = () => {
18
18
  data() {
19
19
  return {
20
20
  show: true,
21
- }
21
+ };
22
22
  },
23
23
  template: `
24
24
  <div class="tw-font-sans tw-w-1/4">
25
- <Dropdown menu-align="right" v-model:show="show" @update:show="(visible) => show = visible">
25
+ <Dropdown menu-align="right" v-model:show="show" @update:show="(visible) => show = visible" menu-element-classes="tw-w-full">
26
26
  <DropdownItem @click="() => show = false">
27
27
  <span class="tw-grow">Menu item 1</span>
28
28
  <Pill class="tw-text-white" :style="{ background: 'blue' }">Blue</Pill>
@@ -45,7 +45,7 @@ export const Disabled = () => {
45
45
  },
46
46
  template: `
47
47
  <div class="tw-font-sans tw-w-1/4">
48
- <Dropdown menu-align="right" disabled>
48
+ <Dropdown menu-align="right" disabled menu-element-classes="tw-w-full">
49
49
  <DropdownItem>
50
50
  <span>Menu item 1</span>
51
51
  </DropdownItem>
@@ -67,7 +67,7 @@ export const LongListFixedHeight = () => {
67
67
  },
68
68
  template: `
69
69
  <div class="tw-font-sans tw-w-1/4">
70
- <Dropdown menu-align="right" menu-element-classes="tw-h-40 tw-overflow-y-auto">
70
+ <Dropdown menu-align="right" menu-element-classes="tw-h-40 tw-overflow-y-auto tw-w-full">
71
71
  <DropdownItem v-for="(item, i) in items" :key="i">
72
72
  <span class="tw-grow">{{ item.display }}</span>
73
73
  </DropdownItem>
@@ -123,7 +123,7 @@ export const SampleElementClasses = () => {
123
123
  },
124
124
  template: `
125
125
  <div class="tw-flex tw-gap-2 tw-m-4">
126
- <Dropdown menu-align="right" element-classes="tw-h-12">
126
+ <Dropdown menu-align="right" element-classes="tw-h-12" menu-element-classes="tw-w-full">
127
127
  <DropdownItem>
128
128
  <span class="tw-grow">Menu item 1</span>
129
129
  <Pill class="tw-text-white" :style="{ background: 'blue' }">Blue</Pill>
@@ -138,6 +138,7 @@
138
138
  :element-classes="{
139
139
  'tw-h-12': true,
140
140
  }"
141
+ menu-element-classes="tw-w-full"
141
142
  :disabled="domainTypeValue === DOMAIN_TYPES.slug"
142
143
  :class="{
143
144
  'tw-text-grayscale-600 tw-font-normal': !selectedCustomDomain,
@@ -195,6 +196,7 @@
195
196
  :display-result-limit="4"
196
197
  :domain-search-location="sitePublishedModal"
197
198
  @on-change-search="onSearchTextChanged"
199
+ @on-buy-now-click="onBuyNowClick"
198
200
  />
199
201
  </div>
200
202
  <Button
@@ -488,7 +490,7 @@ export default {
488
490
  this.$emit('on-hide-domain-modal');
489
491
  },
490
492
  onCopyUrlClick() {
491
- this.$emit('copy-url-click');
493
+ this.$emit('copy-url-clicked');
492
494
  },
493
495
  onSlugChanged(e) {
494
496
  this.searchText = e;
@@ -508,6 +510,7 @@ export default {
508
510
  },
509
511
  onSearchTextChanged(val) {
510
512
  this.searchText = val;
513
+ this.$emit('on-change-search', val);
511
514
  },
512
515
  onSelectPurchasedDomain(newVal) {
513
516
  this.selectedCustomDomain = newVal;
@@ -523,6 +526,9 @@ export default {
523
526
  onSellDomainNameListCloseModal() {
524
527
  this.$emit('on-hide-domain-modal');
525
528
  },
529
+ onBuyNowClick() {
530
+ this.$emit('on-buy-now-clicked');
531
+ },
526
532
  async searchDomainName(isUserTriggered) {
527
533
  this.isLoading = true;
528
534
  let searchSlug = '';
@@ -114,6 +114,7 @@ export default {
114
114
  if (typeof this.domainSearchLocation !== 'undefined') {
115
115
  request.domainSearchLocation = this.domainSearchLocation;
116
116
  }
117
+ this.$emit('on-buy-now-click');
117
118
  window.dispatchEvent(
118
119
  new CustomEvent(Events.DomainSelectedEvent, {
119
120
  detail: request,
@@ -25,6 +25,7 @@
25
25
  :load-more-domains-button-text="loadMoreDomainsButtonText"
26
26
  :domain-search-location="domainSearchLocation"
27
27
  @load-more-domains="onLoadMoreDomains"
28
+ @on-buy-now-click="onBuyNowClick"
28
29
  />
29
30
  <div v-else-if="shouldShowDomainNameNotFound" class="tw-flex tw-justify-center tw-text-center">
30
31
  Sorry, we couldn't find any domain for "{{ previousSearchText }}".
@@ -145,6 +146,9 @@ export default {
145
146
  window.dispatchEvent(new CustomEvent(Events.DomainLoadMoreEvent));
146
147
  this.domainNameItemsInView += this.domainNameItemsPerPage;
147
148
  },
149
+ onBuyNowClick() {
150
+ this.$emit('on-buy-now-click');
151
+ },
148
152
  resetDomainNameItemsInView() {
149
153
  this.domainNameItemsInView = this.domainNameItemsPerPage;
150
154
  },
@@ -20,6 +20,7 @@
20
20
  :domain-name-items-per-page="domainNameItemsPerPage"
21
21
  :load-more-domains-button-text="loadMoreDomainsButtonText"
22
22
  :domain-search-location="domainSearchLocation"
23
+ @on-buy-now-click="onBuyNowClick"
23
24
  />
24
25
  </div>
25
26
  </template>
@@ -170,6 +171,9 @@ export default {
170
171
  this.isBusy = false;
171
172
  }
172
173
  },
174
+ onBuyNowClick() {
175
+ this.$emit('on-buy-now-click');
176
+ },
173
177
  cleanText(inputText) {
174
178
  // In this function, we use the Unicode property escapes \p{L} and \p{N} to match any Unicode letters (characters from various scripts) and Unicode numbers, respectively.
175
179
  const cleanedText = inputText.replace(/[^\p{L}\p{N}\-.]+/gu, '');