@pequity/squirrel 6.0.12 → 6.0.14

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 (69) hide show
  1. package/dist/cjs/chunks/index.js +2645 -0
  2. package/dist/cjs/chunks/p-btn.types.js +3 -0
  3. package/dist/cjs/chunks/p-select.js +2 -2
  4. package/dist/cjs/index.js +49 -52
  5. package/dist/cjs/inputClasses.js +129 -0
  6. package/dist/cjs/inputClassesMixin.js +23 -19
  7. package/dist/cjs/p-btn.js +56 -57
  8. package/dist/cjs/p-input-search.js +3 -3
  9. package/dist/cjs/useInputClasses.js +19 -18
  10. package/dist/es/chunks/index.js +2646 -0
  11. package/dist/es/chunks/p-btn.types.js +4 -0
  12. package/dist/es/chunks/p-select.js +2 -2
  13. package/dist/es/index.js +75 -78
  14. package/dist/es/inputClasses.js +129 -0
  15. package/dist/es/inputClassesMixin.js +23 -19
  16. package/dist/es/p-btn.js +56 -57
  17. package/dist/es/p-input-search.js +3 -3
  18. package/dist/es/useInputClasses.js +23 -22
  19. package/dist/squirrel/components/p-btn/p-btn.types.d.ts +2 -1
  20. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +395 -17
  21. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +30 -22
  22. package/dist/squirrel/components/p-input/p-input.vue.d.ts +11 -7
  23. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +11 -7
  24. package/dist/squirrel/components/p-input-percent/p-input-percent.vue.d.ts +3 -3
  25. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +16 -12
  26. package/dist/squirrel/components/p-select/p-select.vue.d.ts +5 -5
  27. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +30 -22
  28. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  29. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +11 -7
  30. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +11 -7
  31. package/dist/squirrel/composables/useInputClasses.d.ts +3 -3
  32. package/dist/squirrel/index.d.ts +1 -0
  33. package/dist/squirrel/utils/index.d.ts +2 -2
  34. package/dist/squirrel/utils/inputClasses.d.ts +988 -0
  35. package/dist/squirrel/utils/inputClassesMixin.d.ts +12 -8
  36. package/dist/squirrel.css +15 -22
  37. package/package.json +22 -19
  38. package/squirrel/assets/squirrel.css +1 -1
  39. package/squirrel/components/p-action-bar/p-action-bar.stories.js +1 -2
  40. package/squirrel/components/p-btn/p-btn.spec.js +1 -1
  41. package/squirrel/components/p-btn/p-btn.types.ts +3 -1
  42. package/squirrel/components/p-btn/p-btn.vue +60 -74
  43. package/squirrel/components/p-file-upload/p-file-upload.spec.js +3 -8
  44. package/squirrel/components/p-file-upload/p-file-upload.vue +6 -16
  45. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.spec.js +3 -10
  46. package/squirrel/components/p-input/p-input.spec.js +3 -8
  47. package/squirrel/components/p-input-number/p-input-number.spec.js +15 -18
  48. package/squirrel/components/p-input-percent/p-input-percent.spec.js +3 -8
  49. package/squirrel/components/p-input-percent/p-input-percent.vue +3 -3
  50. package/squirrel/components/p-input-search/p-input-search.vue +4 -4
  51. package/squirrel/components/p-select/p-select.spec.js +28 -34
  52. package/squirrel/components/p-select/p-select.vue +4 -4
  53. package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
  54. package/squirrel/components/p-textarea/p-textarea.spec.js +3 -8
  55. package/squirrel/composables/useInputClasses.spec.js +138 -77
  56. package/squirrel/composables/useInputClasses.ts +25 -39
  57. package/squirrel/index.ts +1 -0
  58. package/squirrel/utils/index.ts +3 -36
  59. package/squirrel/utils/inputClasses.ts +130 -0
  60. package/squirrel/utils/inputClassesMixin.spec.js +153 -64
  61. package/squirrel/utils/inputClassesMixin.ts +26 -43
  62. package/dist/cjs/inputClassesShared.js +0 -76
  63. package/dist/es/inputClassesShared.js +0 -76
  64. package/dist/squirrel/utils/inputClassesShared.d.ts +0 -45
  65. package/squirrel/assets/file-upload-drag-over-icon.svg +0 -5
  66. package/squirrel/assets/file-upload-upload-icon.svg +0 -5
  67. package/squirrel/assets/file-upload-x-icon-hover.svg +0 -8
  68. package/squirrel/assets/file-upload-x-icon.svg +0 -8
  69. package/squirrel/utils/inputClassesShared.ts +0 -75
@@ -1,31 +1,14 @@
1
- import {
2
- ERROR_MSG,
3
- INPUT_BASE,
4
- INPUT_ERROR,
5
- INPUT_NORMAL,
6
- INPUT_SIZES,
7
- type InputSize,
8
- LABEL_BASE,
9
- LABEL_REQUIRED,
10
- LABEL_SIZES,
11
- SELECT_ARROW,
12
- SELECT_BASE,
13
- SELECT_SIZES,
14
- SPACING_LEFT,
15
- SPACING_PREFIX,
16
- SPACING_RIGHT,
17
- SPACING_SUFFIX,
18
- TEXTAREA_BASE,
19
- } from '@squirrel/utils/inputClassesShared';
1
+ import { type Size, SIZES } from '@squirrel/components/p-btn/p-btn.types';
2
+ import { inputClasses, selectClasses, textareaClasses } from '@squirrel/utils/inputClasses';
20
3
  import { defineComponent, type PropType } from 'vue';
21
4
 
22
5
  export default defineComponent({
23
6
  props: {
24
7
  size: {
25
- type: String as PropType<InputSize>,
8
+ type: String as PropType<Size>,
26
9
  default: 'md',
27
- validator(value: InputSize) {
28
- return Object.keys(INPUT_SIZES).includes(value);
10
+ validator(value: Size) {
11
+ return SIZES.includes(value);
29
12
  },
30
13
  },
31
14
  errorMsg: {
@@ -41,37 +24,37 @@ export default defineComponent({
41
24
  default: false,
42
25
  },
43
26
  },
44
- data() {
45
- return {
46
- errorMsgClasses: ERROR_MSG,
47
- };
48
- },
49
27
  computed: {
50
- inputClasses() {
51
- const base = `${INPUT_BASE} ${INPUT_SIZES[this.size]}`;
52
- const spacingLeft = this.$slots.prefix ? SPACING_PREFIX[this.size] : SPACING_LEFT[this.size];
53
- const spacingRight = this.$slots.suffix ? SPACING_SUFFIX[this.size] : SPACING_RIGHT[this.size];
54
- const res = `${base} ${spacingLeft} ${spacingRight} ${this.errorMsg ? INPUT_ERROR : INPUT_NORMAL}${this.rounded ? ' rounded-full' : ''}`;
28
+ allClasses() {
29
+ const { input, label, errorMessage } = inputClasses({
30
+ size: this.size,
31
+ prefix: !!this.$slots.prefix,
32
+ suffix: !!this.$slots.suffix,
33
+ required: this.required,
34
+ error: !!this.errorMsg,
35
+ rounded: this.rounded,
36
+ });
55
37
 
56
- return res;
38
+ return { input: input(), label: label(), errorMessage: errorMessage() };
39
+ },
40
+ inputClasses() {
41
+ return this.allClasses.input;
57
42
  },
58
43
  labelClasses() {
59
- const base = `${LABEL_BASE} ${LABEL_SIZES[this.size]}`;
60
- const res = this.required ? `${base} ${LABEL_REQUIRED}` : base;
61
-
62
- return res;
44
+ return this.allClasses.label;
45
+ },
46
+ errorMsgClasses() {
47
+ return this.allClasses.errorMessage;
63
48
  },
64
49
  selectClasses() {
65
- const res = `${this.inputClasses.replace(` ${SPACING_RIGHT[this.size]}`, '')} ${SELECT_BASE} ${SELECT_ARROW} ${
66
- SELECT_SIZES[this.size]
67
- }`;
50
+ const { input } = selectClasses({ size: this.size, required: this.required, error: !!this.errorMsg });
68
51
 
69
- return res;
52
+ return input();
70
53
  },
71
54
  textareaClasses() {
72
- const res = `${this.inputClasses} ${TEXTAREA_BASE}`;
55
+ const { input } = textareaClasses({ required: this.required, error: !!this.errorMsg });
73
56
 
74
- return res;
57
+ return input();
75
58
  },
76
59
  },
77
60
  });
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const LABEL_BASE = `block mb-1 font-medium`;
4
- const LABEL_SIZES = {
5
- sm: `text-xs`,
6
- md: `text-sm`,
7
- lg: `text-base`
8
- };
9
- const LABEL_REQUIRED = `after:content-['_*'] after:text-on-error`;
10
- const ERROR_MSG = `text-xs text-on-error mt-1`;
11
- const INPUT_BASE = [
12
- "text-night",
13
- "w-full",
14
- "bg-surface",
15
- "focus:outline-none",
16
- "border-0",
17
- "ring-1",
18
- "ring-inset",
19
- "focus:ring-2",
20
- "disabled:ring-p-gray-30",
21
- "disabled:hover:ring-p-gray-30",
22
- "disabled:bg-p-blue-10",
23
- "disabled:cursor-default",
24
- "placeholder:text-p-gray-40"
25
- ].join(" ");
26
- const INPUT_NORMAL = `ring-p-gray-30 hover:ring-primary focus:ring-primary`;
27
- const INPUT_ERROR = `ring-on-error hover:ring-on-error focus:ring-on-error`;
28
- const INPUT_SIZES = {
29
- sm: `h-8 text-sm rounded`,
30
- md: `h-10 text-base rounded`,
31
- lg: `h-12 text-lg rounded`
32
- };
33
- const TEXTAREA_BASE = `resize-y px-3 py-3 overflow-auto h-auto`;
34
- const SELECT_BASE = "truncate";
35
- const SELECT_ARROW = `squirrel-bg-chevron-down bg-no-repeat appearance-none`;
36
- const SELECT_SIZES = {
37
- sm: `bg-[right_0.675rem_center] pr-8`,
38
- md: `bg-[right_1rem_center] pr-10`,
39
- lg: `bg-[right_1.25rem_center] pr-12`
40
- };
41
- const SPACING_LEFT = {
42
- sm: `pl-3`,
43
- md: `pl-4`,
44
- lg: `pl-5`
45
- };
46
- const SPACING_RIGHT = {
47
- sm: `pr-3`,
48
- md: `pr-4`,
49
- lg: `pr-5`
50
- };
51
- const SPACING_PREFIX = {
52
- sm: `pl-6`,
53
- md: `pl-8`,
54
- lg: `pl-12`
55
- };
56
- const SPACING_SUFFIX = {
57
- sm: `pr-6`,
58
- md: `pr-8`,
59
- lg: `pr-12`
60
- };
61
- exports.ERROR_MSG = ERROR_MSG;
62
- exports.INPUT_BASE = INPUT_BASE;
63
- exports.INPUT_ERROR = INPUT_ERROR;
64
- exports.INPUT_NORMAL = INPUT_NORMAL;
65
- exports.INPUT_SIZES = INPUT_SIZES;
66
- exports.LABEL_BASE = LABEL_BASE;
67
- exports.LABEL_REQUIRED = LABEL_REQUIRED;
68
- exports.LABEL_SIZES = LABEL_SIZES;
69
- exports.SELECT_ARROW = SELECT_ARROW;
70
- exports.SELECT_BASE = SELECT_BASE;
71
- exports.SELECT_SIZES = SELECT_SIZES;
72
- exports.SPACING_LEFT = SPACING_LEFT;
73
- exports.SPACING_PREFIX = SPACING_PREFIX;
74
- exports.SPACING_RIGHT = SPACING_RIGHT;
75
- exports.SPACING_SUFFIX = SPACING_SUFFIX;
76
- exports.TEXTAREA_BASE = TEXTAREA_BASE;
@@ -1,76 +0,0 @@
1
- const LABEL_BASE = `block mb-1 font-medium`;
2
- const LABEL_SIZES = {
3
- sm: `text-xs`,
4
- md: `text-sm`,
5
- lg: `text-base`
6
- };
7
- const LABEL_REQUIRED = `after:content-['_*'] after:text-on-error`;
8
- const ERROR_MSG = `text-xs text-on-error mt-1`;
9
- const INPUT_BASE = [
10
- "text-night",
11
- "w-full",
12
- "bg-surface",
13
- "focus:outline-none",
14
- "border-0",
15
- "ring-1",
16
- "ring-inset",
17
- "focus:ring-2",
18
- "disabled:ring-p-gray-30",
19
- "disabled:hover:ring-p-gray-30",
20
- "disabled:bg-p-blue-10",
21
- "disabled:cursor-default",
22
- "placeholder:text-p-gray-40"
23
- ].join(" ");
24
- const INPUT_NORMAL = `ring-p-gray-30 hover:ring-primary focus:ring-primary`;
25
- const INPUT_ERROR = `ring-on-error hover:ring-on-error focus:ring-on-error`;
26
- const INPUT_SIZES = {
27
- sm: `h-8 text-sm rounded`,
28
- md: `h-10 text-base rounded`,
29
- lg: `h-12 text-lg rounded`
30
- };
31
- const TEXTAREA_BASE = `resize-y px-3 py-3 overflow-auto h-auto`;
32
- const SELECT_BASE = "truncate";
33
- const SELECT_ARROW = `squirrel-bg-chevron-down bg-no-repeat appearance-none`;
34
- const SELECT_SIZES = {
35
- sm: `bg-[right_0.675rem_center] pr-8`,
36
- md: `bg-[right_1rem_center] pr-10`,
37
- lg: `bg-[right_1.25rem_center] pr-12`
38
- };
39
- const SPACING_LEFT = {
40
- sm: `pl-3`,
41
- md: `pl-4`,
42
- lg: `pl-5`
43
- };
44
- const SPACING_RIGHT = {
45
- sm: `pr-3`,
46
- md: `pr-4`,
47
- lg: `pr-5`
48
- };
49
- const SPACING_PREFIX = {
50
- sm: `pl-6`,
51
- md: `pl-8`,
52
- lg: `pl-12`
53
- };
54
- const SPACING_SUFFIX = {
55
- sm: `pr-6`,
56
- md: `pr-8`,
57
- lg: `pr-12`
58
- };
59
- export {
60
- ERROR_MSG,
61
- INPUT_BASE,
62
- INPUT_ERROR,
63
- INPUT_NORMAL,
64
- INPUT_SIZES,
65
- LABEL_BASE,
66
- LABEL_REQUIRED,
67
- LABEL_SIZES,
68
- SELECT_ARROW,
69
- SELECT_BASE,
70
- SELECT_SIZES,
71
- SPACING_LEFT,
72
- SPACING_PREFIX,
73
- SPACING_RIGHT,
74
- SPACING_SUFFIX,
75
- TEXTAREA_BASE
76
- };
@@ -1,45 +0,0 @@
1
- export declare const LABEL_BASE = "block mb-1 font-medium";
2
- export declare const LABEL_SIZES: {
3
- sm: string;
4
- md: string;
5
- lg: string;
6
- };
7
- export declare const LABEL_REQUIRED = "after:content-['_*'] after:text-on-error";
8
- export declare const ERROR_MSG = "text-xs text-on-error mt-1";
9
- export declare const INPUT_BASE: string;
10
- export declare const INPUT_NORMAL = "ring-p-gray-30 hover:ring-primary focus:ring-primary";
11
- export declare const INPUT_ERROR = "ring-on-error hover:ring-on-error focus:ring-on-error";
12
- export declare const INPUT_SIZES: {
13
- readonly sm: "h-8 text-sm rounded";
14
- readonly md: "h-10 text-base rounded";
15
- readonly lg: "h-12 text-lg rounded";
16
- };
17
- export type InputSize = keyof typeof INPUT_SIZES;
18
- export declare const TEXTAREA_BASE = "resize-y px-3 py-3 overflow-auto h-auto";
19
- export declare const SELECT_BASE = "truncate";
20
- export declare const SELECT_ARROW = "squirrel-bg-chevron-down bg-no-repeat appearance-none";
21
- export declare const SELECT_SIZES: {
22
- sm: string;
23
- md: string;
24
- lg: string;
25
- };
26
- export declare const SPACING_LEFT: {
27
- sm: string;
28
- md: string;
29
- lg: string;
30
- };
31
- export declare const SPACING_RIGHT: {
32
- sm: string;
33
- md: string;
34
- lg: string;
35
- };
36
- export declare const SPACING_PREFIX: {
37
- sm: string;
38
- md: string;
39
- lg: string;
40
- };
41
- export declare const SPACING_SUFFIX: {
42
- sm: string;
43
- md: string;
44
- lg: string;
45
- };
@@ -1,5 +0,0 @@
1
- <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M33 12H14V44H42V21L33 12Z" stroke="#1A123B" stroke-width="3" />
3
- <path d="M9 36H6V4H25L28 7" stroke="#1A123B" stroke-width="3" />
4
- <path d="M37 30H19M28 21V39" stroke="#1A123B" stroke-width="3" />
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M5.8335 6.25016L10.0002 2.0835L14.1668 6.25016" stroke="#767189" stroke-width="1.25" />
3
- <path d="M10 2.0835V13.7502" stroke="#767189" stroke-width="1.25" />
4
- <path d="M2.91675 15V18.3333H17.0834V15" stroke="#767189" stroke-width="1.25" />
5
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- d="M0 8C0 9.58225 0.469192 11.129 1.34824 12.4446C2.22729 13.7602 3.47672 14.7855 4.93853 15.391C6.40034 15.9965 8.00887 16.155 9.56072 15.8463C11.1126 15.5376 12.538 14.7757 13.6569 13.6569C14.7757 12.538 15.5376 11.1126 15.8463 9.56072C16.155 8.00887 15.9965 6.40034 15.391 4.93853C14.7855 3.47672 13.7602 2.22729 12.4446 1.34824C11.129 0.469192 9.58225 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8ZM14.3333 8C14.3333 9.25262 13.9619 10.4771 13.266 11.5186C12.5701 12.5601 11.5809 13.3719 10.4237 13.8512C9.2664 14.3306 7.99298 14.456 6.76443 14.2116C5.53588 13.9673 4.40739 13.3641 3.52166 12.4783C2.63592 11.5926 2.03273 10.4641 1.78836 9.23557C1.54399 8.00703 1.66941 6.7336 2.14876 5.57634C2.62812 4.41907 3.43988 3.42994 4.48139 2.73403C5.5229 2.03811 6.74739 1.66667 8 1.66667C9.67916 1.66843 11.289 2.33626 12.4764 3.52361C13.6637 4.71096 14.3316 6.32084 14.3333 8Z"
4
- fill="#BB1410" />
5
- <path
6
- d="M5.88634 4.71322C5.73075 4.55763 5.51972 4.47021 5.29967 4.47021C5.07963 4.47021 4.8686 4.55763 4.71301 4.71322C4.55741 4.86881 4.47 5.07984 4.47 5.29989C4.47 5.51993 4.55741 5.73096 4.71301 5.88655L6.71301 7.88655C6.72914 7.9021 6.74197 7.92074 6.75073 7.94136C6.7595 7.96198 6.76401 7.98415 6.76401 8.00655C6.76401 8.02896 6.7595 8.05113 6.75073 8.07175C6.74197 8.09237 6.72914 8.11101 6.71301 8.12655L4.71301 10.1266C4.63561 10.2034 4.57417 10.2948 4.53225 10.3955C4.49033 10.4962 4.46875 10.6042 4.46875 10.7132C4.46875 10.8223 4.49033 10.9303 4.53225 11.031C4.57417 11.1317 4.63561 11.223 4.71301 11.2999C4.78939 11.3781 4.88063 11.4403 4.98138 11.4827C5.08213 11.5251 5.19035 11.547 5.29967 11.547C5.409 11.547 5.51721 11.5251 5.61796 11.4827C5.71871 11.4403 5.80996 11.3781 5.88634 11.2999L7.88634 9.29989C7.91934 9.27037 7.96207 9.25405 8.00634 9.25405C8.05062 9.25405 8.09334 9.27037 8.12634 9.29989L10.1263 11.2999C10.2027 11.3781 10.294 11.4403 10.3947 11.4827C10.4955 11.5251 10.6037 11.547 10.713 11.547C10.8223 11.547 10.9305 11.5251 11.0313 11.4827C11.132 11.4403 11.2233 11.3781 11.2997 11.2999C11.3771 11.223 11.4385 11.1317 11.4804 11.031C11.5224 10.9303 11.5439 10.8223 11.5439 10.7132C11.5439 10.6042 11.5224 10.4962 11.4804 10.3955C11.4385 10.2948 11.3771 10.2034 11.2997 10.1266L9.29967 8.12655C9.27016 8.09355 9.25384 8.05083 9.25384 8.00655C9.25384 7.96228 9.27016 7.91955 9.29967 7.88655L11.2997 5.88655C11.4553 5.73096 11.5427 5.51993 11.5427 5.29989C11.5427 5.07984 11.4553 4.86881 11.2997 4.71322C11.1441 4.55763 10.9331 4.47021 10.713 4.47021C10.493 4.47021 10.2819 4.55763 10.1263 4.71322L8.12634 6.71322C8.09334 6.74274 8.05062 6.75906 8.00634 6.75906C7.96207 6.75906 7.91934 6.74274 7.88634 6.71322L5.88634 4.71322Z"
7
- fill="#BB1410" />
8
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path
3
- d="M0 8C0 9.58225 0.469192 11.129 1.34824 12.4446C2.22729 13.7602 3.47672 14.7855 4.93853 15.391C6.40034 15.9965 8.00887 16.155 9.56072 15.8463C11.1126 15.5376 12.538 14.7757 13.6569 13.6569C14.7757 12.538 15.5376 11.1126 15.8463 9.56072C16.155 8.00887 15.9965 6.40034 15.391 4.93853C14.7855 3.47672 13.7602 2.22729 12.4446 1.34824C11.129 0.469192 9.58225 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8ZM14.3333 8C14.3333 9.25262 13.9619 10.4771 13.266 11.5186C12.5701 12.5601 11.5809 13.3719 10.4237 13.8512C9.2664 14.3306 7.99298 14.456 6.76443 14.2116C5.53588 13.9673 4.40739 13.3641 3.52166 12.4783C2.63592 11.5926 2.03273 10.4641 1.78836 9.23557C1.54399 8.00703 1.66941 6.7336 2.14876 5.57634C2.62812 4.41907 3.43988 3.42994 4.48139 2.73403C5.5229 2.03811 6.74739 1.66667 8 1.66667C9.67916 1.66843 11.289 2.33626 12.4764 3.52361C13.6637 4.71096 14.3316 6.32084 14.3333 8Z"
4
- fill="#718096" />
5
- <path
6
- d="M5.88634 4.71322C5.73075 4.55763 5.51972 4.47021 5.29967 4.47021C5.07963 4.47021 4.8686 4.55763 4.71301 4.71322C4.55741 4.86881 4.47 5.07984 4.47 5.29989C4.47 5.51993 4.55741 5.73096 4.71301 5.88655L6.71301 7.88655C6.72914 7.9021 6.74197 7.92074 6.75073 7.94136C6.7595 7.96198 6.76401 7.98415 6.76401 8.00655C6.76401 8.02896 6.7595 8.05113 6.75073 8.07175C6.74197 8.09237 6.72914 8.11101 6.71301 8.12655L4.71301 10.1266C4.63561 10.2034 4.57417 10.2948 4.53225 10.3955C4.49033 10.4962 4.46875 10.6042 4.46875 10.7132C4.46875 10.8223 4.49033 10.9303 4.53225 11.031C4.57417 11.1317 4.63561 11.223 4.71301 11.2999C4.78939 11.3781 4.88063 11.4403 4.98138 11.4827C5.08213 11.5251 5.19035 11.547 5.29967 11.547C5.409 11.547 5.51721 11.5251 5.61796 11.4827C5.71871 11.4403 5.80996 11.3781 5.88634 11.2999L7.88634 9.29989C7.91934 9.27037 7.96207 9.25405 8.00634 9.25405C8.05062 9.25405 8.09334 9.27037 8.12634 9.29989L10.1263 11.2999C10.2027 11.3781 10.294 11.4403 10.3947 11.4827C10.4955 11.5251 10.6037 11.547 10.713 11.547C10.8223 11.547 10.9305 11.5251 11.0313 11.4827C11.132 11.4403 11.2233 11.3781 11.2997 11.2999C11.3771 11.223 11.4385 11.1317 11.4804 11.031C11.5224 10.9303 11.5439 10.8223 11.5439 10.7132C11.5439 10.6042 11.5224 10.4962 11.4804 10.3955C11.4385 10.2948 11.3771 10.2034 11.2997 10.1266L9.29967 8.12655C9.27016 8.09355 9.25384 8.05083 9.25384 8.00655C9.25384 7.96228 9.27016 7.91955 9.29967 7.88655L11.2997 5.88655C11.4553 5.73096 11.5427 5.51993 11.5427 5.29989C11.5427 5.07984 11.4553 4.86881 11.2997 4.71322C11.1441 4.55763 10.9331 4.47021 10.713 4.47021C10.493 4.47021 10.2819 4.55763 10.1263 4.71322L8.12634 6.71322C8.09334 6.74274 8.05062 6.75906 8.00634 6.75906C7.96207 6.75906 7.91934 6.74274 7.88634 6.71322L5.88634 4.71322Z"
7
- fill="#718096" />
8
- </svg>
@@ -1,75 +0,0 @@
1
- export const LABEL_BASE = `block mb-1 font-medium`;
2
-
3
- export const LABEL_SIZES = {
4
- sm: `text-xs`,
5
- md: `text-sm`,
6
- lg: `text-base`,
7
- };
8
-
9
- export const LABEL_REQUIRED = `after:content-['_*'] after:text-on-error`;
10
-
11
- export const ERROR_MSG = `text-xs text-on-error mt-1`;
12
-
13
- export const INPUT_BASE = [
14
- 'text-night',
15
- 'w-full',
16
- 'bg-surface',
17
- 'focus:outline-none',
18
- 'border-0',
19
- 'ring-1',
20
- 'ring-inset',
21
- 'focus:ring-2',
22
- 'disabled:ring-p-gray-30',
23
- 'disabled:hover:ring-p-gray-30',
24
- 'disabled:bg-p-blue-10',
25
- 'disabled:cursor-default',
26
- 'placeholder:text-p-gray-40',
27
- ].join(' ');
28
-
29
- export const INPUT_NORMAL = `ring-p-gray-30 hover:ring-primary focus:ring-primary`;
30
-
31
- export const INPUT_ERROR = `ring-on-error hover:ring-on-error focus:ring-on-error`;
32
-
33
- export const INPUT_SIZES = {
34
- sm: `h-8 text-sm rounded`,
35
- md: `h-10 text-base rounded`,
36
- lg: `h-12 text-lg rounded`,
37
- } as const;
38
-
39
- export type InputSize = keyof typeof INPUT_SIZES;
40
-
41
- export const TEXTAREA_BASE = `resize-y px-3 py-3 overflow-auto h-auto`;
42
-
43
- export const SELECT_BASE = 'truncate';
44
-
45
- export const SELECT_ARROW = `squirrel-bg-chevron-down bg-no-repeat appearance-none`;
46
-
47
- export const SELECT_SIZES = {
48
- sm: `bg-[right_0.675rem_center] pr-8`,
49
- md: `bg-[right_1rem_center] pr-10`,
50
- lg: `bg-[right_1.25rem_center] pr-12`,
51
- };
52
-
53
- export const SPACING_LEFT = {
54
- sm: `pl-3`,
55
- md: `pl-4`,
56
- lg: `pl-5`,
57
- };
58
-
59
- export const SPACING_RIGHT = {
60
- sm: `pr-3`,
61
- md: `pr-4`,
62
- lg: `pr-5`,
63
- };
64
-
65
- export const SPACING_PREFIX = {
66
- sm: `pl-6`,
67
- md: `pl-8`,
68
- lg: `pl-12`,
69
- };
70
-
71
- export const SPACING_SUFFIX = {
72
- sm: `pr-6`,
73
- md: `pr-8`,
74
- lg: `pr-12`,
75
- };