@ship-ui/core 0.19.4 → 0.22.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.
Files changed (153) hide show
  1. package/README.md +3 -0
  2. package/assets/mcp/components.json +32 -4212
  3. package/bin/mcp/index.js +6544 -444
  4. package/bin/ship-fg-scanner +0 -0
  5. package/bin/ship-fg.mjs +18 -16
  6. package/bin/src/subset.ts +3 -1
  7. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs +42 -0
  8. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs.map +1 -0
  9. package/fesm2022/ship-ui-core-ship-accordion.mjs +127 -0
  10. package/fesm2022/ship-ui-core-ship-accordion.mjs.map +1 -0
  11. package/fesm2022/ship-ui-core-ship-alert.mjs +305 -0
  12. package/fesm2022/ship-ui-core-ship-alert.mjs.map +1 -0
  13. package/fesm2022/ship-ui-core-ship-blueprint.mjs +1156 -0
  14. package/fesm2022/ship-ui-core-ship-blueprint.mjs.map +1 -0
  15. package/fesm2022/ship-ui-core-ship-button-group.mjs +41 -0
  16. package/fesm2022/ship-ui-core-ship-button-group.mjs.map +1 -0
  17. package/fesm2022/ship-ui-core-ship-button.mjs +38 -0
  18. package/fesm2022/ship-ui-core-ship-button.mjs.map +1 -0
  19. package/fesm2022/ship-ui-core-ship-card.mjs +35 -0
  20. package/fesm2022/ship-ui-core-ship-card.mjs.map +1 -0
  21. package/fesm2022/ship-ui-core-ship-checkbox.mjs +113 -0
  22. package/fesm2022/ship-ui-core-ship-checkbox.mjs.map +1 -0
  23. package/fesm2022/ship-ui-core-ship-chip.mjs +44 -0
  24. package/fesm2022/ship-ui-core-ship-chip.mjs.map +1 -0
  25. package/fesm2022/ship-ui-core-ship-color-picker.mjs +947 -0
  26. package/fesm2022/ship-ui-core-ship-color-picker.mjs.map +1 -0
  27. package/fesm2022/ship-ui-core-ship-datepicker.mjs +951 -0
  28. package/fesm2022/ship-ui-core-ship-datepicker.mjs.map +1 -0
  29. package/fesm2022/ship-ui-core-ship-dialog.mjs +263 -0
  30. package/fesm2022/ship-ui-core-ship-dialog.mjs.map +1 -0
  31. package/fesm2022/ship-ui-core-ship-divider.mjs +22 -0
  32. package/fesm2022/ship-ui-core-ship-divider.mjs.map +1 -0
  33. package/fesm2022/ship-ui-core-ship-event-card.mjs +50 -0
  34. package/fesm2022/ship-ui-core-ship-event-card.mjs.map +1 -0
  35. package/fesm2022/ship-ui-core-ship-file-upload.mjs +112 -0
  36. package/fesm2022/ship-ui-core-ship-file-upload.mjs.map +1 -0
  37. package/fesm2022/ship-ui-core-ship-form-field.mjs +310 -0
  38. package/fesm2022/ship-ui-core-ship-form-field.mjs.map +1 -0
  39. package/fesm2022/ship-ui-core-ship-icon.mjs +81 -0
  40. package/fesm2022/ship-ui-core-ship-icon.mjs.map +1 -0
  41. package/fesm2022/ship-ui-core-ship-list.mjs +22 -0
  42. package/fesm2022/ship-ui-core-ship-list.mjs.map +1 -0
  43. package/fesm2022/ship-ui-core-ship-menu.mjs +545 -0
  44. package/fesm2022/ship-ui-core-ship-menu.mjs.map +1 -0
  45. package/fesm2022/ship-ui-core-ship-popover.mjs +286 -0
  46. package/fesm2022/ship-ui-core-ship-popover.mjs.map +1 -0
  47. package/fesm2022/ship-ui-core-ship-progress-bar.mjs +37 -0
  48. package/fesm2022/ship-ui-core-ship-progress-bar.mjs.map +1 -0
  49. package/fesm2022/ship-ui-core-ship-radio.mjs +102 -0
  50. package/fesm2022/ship-ui-core-ship-radio.mjs.map +1 -0
  51. package/fesm2022/ship-ui-core-ship-range-slider.mjs +277 -0
  52. package/fesm2022/ship-ui-core-ship-range-slider.mjs.map +1 -0
  53. package/fesm2022/ship-ui-core-ship-select.mjs +971 -0
  54. package/fesm2022/ship-ui-core-ship-select.mjs.map +1 -0
  55. package/fesm2022/ship-ui-core-ship-sidenav.mjs +248 -0
  56. package/fesm2022/ship-ui-core-ship-sidenav.mjs.map +1 -0
  57. package/fesm2022/ship-ui-core-ship-sortable.mjs +485 -0
  58. package/fesm2022/ship-ui-core-ship-sortable.mjs.map +1 -0
  59. package/fesm2022/ship-ui-core-ship-spinner.mjs +28 -0
  60. package/fesm2022/ship-ui-core-ship-spinner.mjs.map +1 -0
  61. package/fesm2022/ship-ui-core-ship-stepper.mjs +76 -0
  62. package/fesm2022/ship-ui-core-ship-stepper.mjs.map +1 -0
  63. package/fesm2022/ship-ui-core-ship-table-filter-bar.mjs +28 -0
  64. package/fesm2022/ship-ui-core-ship-table-filter-bar.mjs.map +1 -0
  65. package/fesm2022/ship-ui-core-ship-table.mjs +442 -0
  66. package/fesm2022/ship-ui-core-ship-table.mjs.map +1 -0
  67. package/fesm2022/ship-ui-core-ship-tabs.mjs +38 -0
  68. package/fesm2022/ship-ui-core-ship-tabs.mjs.map +1 -0
  69. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs +119 -0
  70. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs.map +1 -0
  71. package/fesm2022/ship-ui-core-ship-toggle-card.mjs +75 -0
  72. package/fesm2022/ship-ui-core-ship-toggle-card.mjs.map +1 -0
  73. package/fesm2022/ship-ui-core-ship-toggle.mjs +105 -0
  74. package/fesm2022/ship-ui-core-ship-toggle.mjs.map +1 -0
  75. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs +186 -0
  76. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs.map +1 -0
  77. package/fesm2022/ship-ui-core.mjs +880 -8782
  78. package/fesm2022/ship-ui-core.mjs.map +1 -1
  79. package/package.json +147 -3
  80. package/styles/core.scss +43 -0
  81. package/styles/helpers.scss +2 -0
  82. package/styles/index.scss +12 -123
  83. package/types/ship-ui-core-sh-form-field-experimental.d.ts +11 -0
  84. package/types/ship-ui-core-ship-accordion.d.ts +19 -0
  85. package/types/ship-ui-core-ship-alert.d.ts +68 -0
  86. package/types/ship-ui-core-ship-blueprint.d.ts +112 -0
  87. package/types/ship-ui-core-ship-button-group.d.ts +15 -0
  88. package/types/ship-ui-core-ship-button.d.ts +13 -0
  89. package/types/ship-ui-core-ship-card.d.ts +11 -0
  90. package/types/ship-ui-core-ship-checkbox.d.ts +22 -0
  91. package/types/ship-ui-core-ship-chip.d.ts +15 -0
  92. package/types/ship-ui-core-ship-color-picker.d.ts +105 -0
  93. package/types/ship-ui-core-ship-datepicker.d.ts +96 -0
  94. package/types/ship-ui-core-ship-dialog.d.ts +76 -0
  95. package/types/ship-ui-core-ship-divider.d.ts +8 -0
  96. package/types/ship-ui-core-ship-event-card.d.ts +11 -0
  97. package/types/ship-ui-core-ship-file-upload.d.ts +20 -0
  98. package/types/ship-ui-core-ship-form-field.d.ts +32 -0
  99. package/types/ship-ui-core-ship-icon.d.ts +18 -0
  100. package/types/ship-ui-core-ship-list.d.ts +8 -0
  101. package/types/ship-ui-core-ship-menu.d.ts +49 -0
  102. package/types/ship-ui-core-ship-popover.d.ts +40 -0
  103. package/types/ship-ui-core-ship-progress-bar.d.ts +14 -0
  104. package/types/ship-ui-core-ship-radio.d.ts +22 -0
  105. package/types/ship-ui-core-ship-range-slider.d.ts +31 -0
  106. package/types/ship-ui-core-ship-select.d.ts +81 -0
  107. package/types/ship-ui-core-ship-sidenav.d.ts +36 -0
  108. package/types/ship-ui-core-ship-sortable.d.ts +72 -0
  109. package/types/ship-ui-core-ship-spinner.d.ts +10 -0
  110. package/types/ship-ui-core-ship-stepper.d.ts +13 -0
  111. package/types/ship-ui-core-ship-table-filter-bar.d.ts +8 -0
  112. package/types/ship-ui-core-ship-table.d.ts +69 -0
  113. package/types/ship-ui-core-ship-tabs.d.ts +14 -0
  114. package/types/ship-ui-core-ship-theme-toggle.d.ts +28 -0
  115. package/types/ship-ui-core-ship-toggle-card.d.ts +15 -0
  116. package/types/ship-ui-core-ship-toggle.d.ts +21 -0
  117. package/types/ship-ui-core-ship-virtual-scroll.d.ts +22 -0
  118. package/types/ship-ui-core.d.ts +88 -1070
  119. package/styles/components/ship-accordion.scss +0 -113
  120. package/styles/components/ship-alert-container.scss +0 -49
  121. package/styles/components/ship-alert.scss +0 -177
  122. package/styles/components/ship-blueprint.scss +0 -242
  123. package/styles/components/ship-button-group.scss +0 -165
  124. package/styles/components/ship-button.scss +0 -141
  125. package/styles/components/ship-card.scss +0 -56
  126. package/styles/components/ship-checkbox.scss +0 -116
  127. package/styles/components/ship-chip.scss +0 -104
  128. package/styles/components/ship-color-picker.scss +0 -150
  129. package/styles/components/ship-datepicker.scss +0 -317
  130. package/styles/components/ship-dialog.scss +0 -152
  131. package/styles/components/ship-divider.scss +0 -27
  132. package/styles/components/ship-event-card.scss +0 -51
  133. package/styles/components/ship-file-upload.scss +0 -47
  134. package/styles/components/ship-form-field.scss +0 -408
  135. package/styles/components/ship-icon.scss +0 -54
  136. package/styles/components/ship-list.scss +0 -165
  137. package/styles/components/ship-menu.scss +0 -237
  138. package/styles/components/ship-popover.scss +0 -205
  139. package/styles/components/ship-progress-bar.scss +0 -173
  140. package/styles/components/ship-radio.scss +0 -113
  141. package/styles/components/ship-range-slider.scss +0 -421
  142. package/styles/components/ship-select.scss +0 -153
  143. package/styles/components/ship-sidenav.scss +0 -195
  144. package/styles/components/ship-sortable.scss +0 -45
  145. package/styles/components/ship-spinner.scss +0 -53
  146. package/styles/components/ship-stepper.scss +0 -158
  147. package/styles/components/ship-table.scss +0 -443
  148. package/styles/components/ship-tabs.scss +0 -125
  149. package/styles/components/ship-theme-toggle.scss +0 -41
  150. package/styles/components/ship-toggle-card.scss +0 -69
  151. package/styles/components/ship-toggle.scss +0 -255
  152. package/styles/components/ship-tooltip.scss +0 -151
  153. package/styles/components/ship-virtual-scroll.scss +0 -12
@@ -1,165 +0,0 @@
1
- @use '../helpers.scss' as *;
2
- $shipButtonGroup: true !default;
3
-
4
- @if $shipButtonGroup == true {
5
- sh-button-group {
6
- --btng-bg: var(--base-1);
7
- --btng-item-bg: var(--base-3);
8
- --btng-c: var(--base-12);
9
- --btng-ic: var(--base-12);
10
- --btng-bc: var(--base-4);
11
- --btng-h: #{p2r(40)};
12
- --btng-p: #{p2r(0 12)};
13
- --btng-s: var(--shape-2);
14
- --btng-f: var(--paragraph-30);
15
-
16
- display: inline-flex;
17
- border: var(--border-10);
18
- border-color: var(--btng-bc);
19
- border-radius: var(--btng-s);
20
- height: var(--btng-h);
21
- background: var(--btng-bg);
22
- overflow: hidden;
23
- position: relative;
24
-
25
- &.small {
26
- --btng-h: #{p2r(32)};
27
- --btng-p: #{p2r(0 8)};
28
- }
29
-
30
- &.type-b {
31
- --btng-bg: var(--base-3);
32
- --btng-item-bg: var(--base-1);
33
- --btng-s-a: var(--shape-2);
34
-
35
- padding: p2r(3);
36
- gap: p2r(4);
37
- border: 0;
38
-
39
- button {
40
- border-radius: calc((var(--btng-s) / 3) * 2);
41
- border: 0;
42
-
43
- &:focus-visible {
44
- outline-offset: -2px;
45
- }
46
-
47
- @supports not (anchor-name: --anchor) {
48
- --btng-item-bg: var(--base-3);
49
- }
50
-
51
- &:hover {
52
- --btng-bg: var(--base-2);
53
- }
54
-
55
- &:hover,
56
- &.active {
57
- --btng-bg: var(--base-1);
58
- box-shadow: var(--box-shadow-10);
59
-
60
- @supports not (anchor-name: --anchor) {
61
- --btng-item-bg: var(--base-1);
62
- }
63
- }
64
- }
65
-
66
- &:after {
67
- border-radius: calc((var(--btng-s) / 3) * 2);
68
- }
69
- }
70
-
71
- button {
72
- border: 0;
73
- flex: 1 0;
74
- appearance: none;
75
- display: inline-flex;
76
- align-items: center;
77
- justify-content: center;
78
- gap: p2r(8);
79
- position: relative;
80
- padding: var(--btng-p);
81
- min-width: auto;
82
- cursor: pointer;
83
- outline: none;
84
- line-height: inherit;
85
- user-select: none;
86
- appearance: none;
87
- overflow: visible;
88
- vertical-align: middle;
89
- white-space: nowrap;
90
- background: transparent;
91
- color: var(--btng-c);
92
- font: var(--btng-f);
93
- border-left: 1px solid var(--btng-bc);
94
- transition:
95
- color 80ms linear,
96
- transform 125ms linear;
97
- transform: scale(1);
98
-
99
- &:focus-visible {
100
- outline: 2px solid var(--primary-8);
101
- outline-offset: -4px;
102
- }
103
-
104
- &:active {
105
- transform: scale(0.96);
106
- }
107
-
108
- &:first-child {
109
- border-left: 0;
110
- }
111
-
112
- @supports not (anchor-name: --anchor) {
113
- --btng-item-bg: var(--base-1);
114
- background: var(--btng-item-bg);
115
-
116
- &:hover,
117
- &.active {
118
- --btng-c: var(--base-12);
119
- --btng-ic: var(--base-12);
120
- --btng-bg: var(--base-3);
121
- --btng-item-bg: var(--base-3);
122
- }
123
- }
124
-
125
- @supports (anchor-name: --anchor) {
126
- z-index: 1;
127
- &.active {
128
- position: relative;
129
- anchor-name: var(--btng-id);
130
- }
131
- }
132
- }
133
-
134
- @supports (anchor-name: --anchor) {
135
- &:after {
136
- content: '';
137
- background: var(--btng-item-bg);
138
- pointer-events: none;
139
- position: absolute;
140
- z-index: 0;
141
- top: anchor(top);
142
- bottom: anchor(bottom);
143
- left: anchor(left);
144
- right: anchor(right);
145
- position-anchor: var(--btng-id);
146
- transition:
147
- left 0.175s ease-out,
148
- right 0.175s ease-out;
149
- // border-radius: var(--btng-s-a);
150
- }
151
-
152
- // &:not(.type-b):has(button:first-child.active) {
153
- // &:after {
154
- // --btng-s-a: var(--btng-s) 0 0 var(--btng-s);
155
- // }
156
- // }
157
-
158
- // &:not(.type-b):has(button:last-child.active) {
159
- // &:after {
160
- // --btng-s-a: 0 var(--btng-s) var(--btng-s) 0;
161
- // }
162
- // }
163
- }
164
- }
165
- }
@@ -1,141 +0,0 @@
1
- @use '../helpers.scss' as *;
2
- $shipButton: true !default;
3
- $shipButtonShadow: false !default;
4
-
5
- @if $shipButton == true {
6
- [shButton] {
7
- --btn-h: #{p2r(40)};
8
- --btn-mw: #{p2r(40)};
9
- --btn-f: var(--paragraph-20);
10
- --btn-a-opacity: 0.05;
11
-
12
- @if $shipButtonShadow != false {
13
- --btn-bs: var(--box-shadow-10);
14
- } @else {
15
- --btn-bs: none;
16
- }
17
-
18
- display: inline-flex;
19
- align-items: center;
20
- justify-content: center;
21
- gap: p2r(11);
22
- position: relative;
23
- padding: p2r(0 12);
24
- transition: color 80ms linear;
25
- min-width: var(--btn-mw);
26
- cursor: pointer;
27
- outline: none;
28
- line-height: inherit;
29
- user-select: none;
30
- appearance: none;
31
- overflow: visible;
32
- vertical-align: middle;
33
- text-decoration: none;
34
- height: var(--btn-h);
35
- box-shadow: var(--btn-bs);
36
- font: var(--btn-f);
37
-
38
- transition: transform 250ms ease-in;
39
- transform: scale(1);
40
-
41
- &:before {
42
- content: '';
43
- position: absolute;
44
- inset: 0;
45
- background: radial-gradient(#000 30%, rgba(0, 0, 0, 0));
46
- opacity: 0;
47
- transition: opacity 175ms linear;
48
- }
49
-
50
- &:active {
51
- transform: scale(0.98);
52
-
53
- &:before {
54
- opacity: var(--btn-a-opacity);
55
- }
56
- }
57
-
58
- &.raised,
59
- &.flat {
60
- --btn-a-opacity: 0.1;
61
- }
62
-
63
- sh-icon {
64
- rotate: var(--btn-ir);
65
- transition: rotate 125ms ease-in-out;
66
- }
67
-
68
- sh-icon:first-child {
69
- margin-left: p2r(-3);
70
- }
71
-
72
- sh-icon:last-child {
73
- margin-right: p2r(-3);
74
- }
75
-
76
- &.rotated-icon sh-icon {
77
- --btn-ir: 180deg;
78
- }
79
-
80
- &.small {
81
- --btn-h: #{p2r(32)};
82
- --btn-mw: #{p2r(32)};
83
- --btn-f: var(--paragraph-30);
84
-
85
- padding: p2r(0 8);
86
- gap: p2r(5);
87
-
88
- sh-icon {
89
- font-size: p2r(16);
90
- }
91
-
92
- sh-icon:first-child {
93
- margin-left: p2r(-1);
94
- }
95
-
96
- sh-icon:last-child {
97
- margin-right: p2r(-1);
98
- }
99
- }
100
-
101
- &.xsmall {
102
- --btn-h: #{p2r(24)};
103
- --btn-mw: #{p2r(24)};
104
- --btn-f: var(--paragraph-40);
105
-
106
- padding: p2r(0 8);
107
- gap: p2r(4);
108
-
109
- sh-icon {
110
- font-size: p2r(12);
111
- }
112
-
113
- sh-icon:first-child {
114
- margin-left: p2r(-3);
115
- }
116
-
117
- sh-icon:last-child {
118
- margin-right: p2r(-3);
119
- }
120
- }
121
-
122
- &[disabled] {
123
- opacity: 0.5;
124
- pointer-events: none;
125
- user-select: none;
126
- }
127
-
128
- &[readonly],
129
- &.readonly {
130
- pointer-events: none;
131
- user-select: none;
132
- }
133
-
134
- &[disabled],
135
- &[readonly] {
136
- &:active {
137
- transform: scale(1);
138
- }
139
- }
140
- }
141
- }
@@ -1,56 +0,0 @@
1
- @use '../helpers.scss' as *;
2
-
3
- $shipCard: true !default;
4
-
5
- @if $shipCard == true {
6
- sh-card {
7
- --card-bg: var(--base-1);
8
- --card-ibg: var(--base-2);
9
- --card-bc: var(--base-4);
10
- --card-sh: var(--box-shadow-10);
11
- --card-p: #{p2r(24)};
12
- --card-shp: #{p2r(8)};
13
-
14
- display: block;
15
- padding: var(--card-p);
16
- position: relative;
17
- z-index: 0;
18
- border: var(--border-10);
19
- border-color: var(--card-bc);
20
- box-shadow: var(--card-sh);
21
- border-radius: var(--shape-3);
22
- overflow: hidden;
23
-
24
- &:before,
25
- &:after {
26
- content: '';
27
- position: absolute;
28
- }
29
-
30
- &:before {
31
- background-color: var(--card-bg);
32
- inset: 0;
33
- z-index: -2;
34
- }
35
-
36
- &:after {
37
- background-color: var(--card-ibg);
38
- border-radius: var(--shape-2);
39
- inset: var(--card-shp);
40
- z-index: -1;
41
- }
42
-
43
- &.type-b {
44
- --card-bg: var(--base-2);
45
- --card-ibg: var(--base-1);
46
- --card-sh: none;
47
- --card-shp: #{p2r(4)};
48
- }
49
-
50
- &.type-c {
51
- --card-bg: transparent;
52
- --card-ibg: var(--card-bg);
53
- --card-p: 0;
54
- }
55
- }
56
- }
@@ -1,116 +0,0 @@
1
- @use '../helpers.scss' as *;
2
-
3
- $shipCheckbox: true !default;
4
-
5
- @if $shipCheckbox == true {
6
- sh-checkbox {
7
- .sh-sheet {
8
- --box-bw: #{p2r(1)};
9
- --box-bc: var(--sheet-bc);
10
- --sheet-s: var(--shape-1);
11
- }
12
-
13
- display: flex;
14
- align-items: center;
15
- gap: p2r(8);
16
- cursor: pointer;
17
- user-select: none;
18
- position: relative;
19
- border: 0;
20
-
21
- &:focus-visible > .box,
22
- &:has(input:focus-visible) > .box {
23
- outline: 2px solid var(--primary-8);
24
- outline-offset: 2px;
25
- }
26
-
27
- > input.internal-input,
28
- .label > input {
29
- appearance: none;
30
- position: absolute;
31
- inset: 0;
32
- cursor: pointer;
33
- z-index: 0;
34
- margin: 0;
35
-
36
- &:focus,
37
- &:focus-visible {
38
- outline: none;
39
- }
40
- }
41
-
42
- &:has(.label > input) > input.internal-input {
43
- display: none;
44
- }
45
-
46
- .label {
47
- &:empty {
48
- display: none;
49
- }
50
- }
51
-
52
- &:has(input[disabled]),
53
- &[disabled]:not([disabled='false']) {
54
- opacity: 0.5;
55
- pointer-events: none;
56
- user-select: none;
57
- cursor: initial;
58
- }
59
-
60
- .box {
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
- width: p2r(20);
65
- height: p2r(20);
66
- cursor: pointer;
67
- position: relative;
68
- border: var(--box-bw) solid var(--box-bc);
69
-
70
- sh-icon {
71
- opacity: 0;
72
- font-weight: bold;
73
- transition: opacity 75ms linear;
74
-
75
- &.indeterminate-indicator {
76
- display: none;
77
- }
78
- }
79
- }
80
-
81
- &.raised,
82
- &.flat {
83
- &:not(:has(input:checked)):not(.active) .box {
84
- background: transparent;
85
- border: var(--border-10);
86
- border-color: var(--box-bc);
87
- }
88
- }
89
-
90
- &.indeterminate {
91
- .box sh-icon {
92
- &.indeterminate-indicator {
93
- display: block;
94
- }
95
-
96
- &.default-indicator {
97
- display: none;
98
- }
99
- }
100
- }
101
-
102
- &:has(input:checked),
103
- &.indeterminate,
104
- &.active {
105
- .box sh-icon {
106
- opacity: 1;
107
- }
108
- }
109
-
110
- &:hover {
111
- .box sh-icon {
112
- opacity: 0.5;
113
- }
114
- }
115
- }
116
- }
@@ -1,104 +0,0 @@
1
- @use '../helpers.scss' as *;
2
-
3
- $shipChip: true !default;
4
- $shipChipShadow: false !default;
5
-
6
- @if $shipChip == true {
7
- sh-chip {
8
- --chip-h: #{p2r(32)};
9
- --chip-s: calc(var(--chip-h) / 2);
10
-
11
- &.sh-sheet {
12
- --sheet-c: var(--chip-c);
13
- --sheet-s: var(--chip-s);
14
- }
15
-
16
- @if $shipChipShadow != false {
17
- --chip-bs: var(--box-shadow-10);
18
- } @else {
19
- --chip-bs: none;
20
- }
21
-
22
- display: inline-flex;
23
- align-items: center;
24
- justify-content: center;
25
- padding: p2r(0 12);
26
-
27
- font: var(--paragraph-30B);
28
- height: var(--chip-h);
29
- box-shadow: var(--chip-bs);
30
- white-space: nowrap;
31
-
32
- div {
33
- display: flex;
34
- align-items: center;
35
- gap: p2r(8);
36
- color: var(--chip-c);
37
- }
38
-
39
- &.sharp {
40
- --chip-s: calc(var(--chip-h) / 4);
41
- padding: p2r(0 8);
42
-
43
- &.small {
44
- padding: p2r(0 6);
45
- }
46
-
47
- &.xsmall {
48
- padding: p2r(0 4);
49
- }
50
- }
51
-
52
- sh-icon {
53
- color: var(--chip-ic);
54
- font-size: p2r(16);
55
- font-weight: inherit;
56
- }
57
-
58
- [avatar] {
59
- height: calc(var(--chip-h) - #{p2r(12)});
60
- width: calc(var(--chip-h) - #{p2r(12)});
61
- border-radius: 50%;
62
- }
63
-
64
- &.small {
65
- --chip-h: #{p2r(24)};
66
-
67
- font: var(--paragraph-40B);
68
- padding: p2r(0 8);
69
-
70
- div {
71
- gap: p2r(4);
72
- }
73
-
74
- sh-icon {
75
- font-size: p2r(12);
76
- }
77
- }
78
-
79
- &.xsmall {
80
- --chip-h: #{p2r(20)};
81
-
82
- font: var(--paragraph-40B);
83
- padding: p2r(0 6);
84
-
85
- div {
86
- gap: p2r(2);
87
- }
88
-
89
- sh-icon {
90
- font-size: p2r(10);
91
- }
92
- }
93
-
94
- &[disabled] {
95
- opacity: 0.5;
96
- }
97
-
98
- &[readonly],
99
- &.readonly {
100
- pointer-events: none;
101
- user-select: none;
102
- }
103
- }
104
- }
@@ -1,150 +0,0 @@
1
- @use '../helpers.scss' as *;
2
-
3
- $shipColorPicker: true !default;
4
-
5
- @if $shipColorPicker == true {
6
- sh-color-picker {
7
- position: relative;
8
- display: block;
9
- width: p2r(300);
10
- aspect-ratio: 1 / 1;
11
-
12
- canvas {
13
- background-image:
14
- linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%),
15
- linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);
16
- background-size: 20px 20px;
17
- background-position:
18
- 0 0,
19
- 0 10px,
20
- 10px -10px,
21
- -10px 0px;
22
- }
23
-
24
- &.hsl canvas {
25
- border-radius: 100%;
26
- overflow: hidden;
27
- }
28
-
29
- &.rgb {
30
- border-radius: p2r(2);
31
-
32
- // canvas {
33
- // border-radius: p2r(2);
34
- // }
35
- }
36
-
37
- &.saturation:not(.vertical),
38
- &.hue:not(.vertical),
39
- &.alpha:not(.vertical) {
40
- height: p2r(20);
41
- aspect-ratio: auto;
42
- border-radius: p2r(2);
43
-
44
- canvas {
45
- border-radius: p2r(2);
46
- }
47
-
48
- .marker {
49
- top: 50% !important;
50
- }
51
- }
52
-
53
- &.saturation.vertical,
54
- &.hue.vertical,
55
- &.alpha.vertical {
56
- width: p2r(20);
57
- height: p2r(300);
58
- aspect-ratio: auto;
59
- border-radius: p2r(2);
60
-
61
- canvas {
62
- border-radius: p2r(2);
63
- }
64
-
65
- .marker {
66
- left: 50% !important;
67
- }
68
- }
69
-
70
- canvas {
71
- width: 100%;
72
- height: 100%;
73
-
74
- border: 2px solid var(--base-1);
75
- outline: var(--border-10);
76
- }
77
-
78
- .marker {
79
- position: absolute;
80
- inset: 0;
81
- width: p2r(20);
82
- height: p2r(20);
83
- border-radius: 50%;
84
- border: 1px solid #fff;
85
- pointer-events: none;
86
- transform: translate(-50%, -50%);
87
- box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
88
- }
89
- }
90
-
91
- sh-color-picker-input {
92
- display: flex;
93
-
94
- sh-popover {
95
- width: 100%;
96
- }
97
-
98
- [popoverContent] {
99
- padding: p2r(12);
100
- width: p2r(280);
101
- display: flex;
102
- flex-direction: column;
103
- gap: p2r(8);
104
- }
105
-
106
- .input-container {
107
- flex: 1 0;
108
- display: flex;
109
- align-items: center;
110
- gap: p2r(4);
111
- padding-right: p2r(8);
112
-
113
- input {
114
- margin-right: 0;
115
- min-width: p2r(175);
116
- }
117
- }
118
-
119
- .color-indicator {
120
- position: relative;
121
- width: p2r(24);
122
- height: p2r(24);
123
- border-radius: var(--shape-2);
124
- border: var(--border-10);
125
- overflow: hidden;
126
-
127
- background-color: #fff;
128
- background-image:
129
- linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%),
130
- linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
131
- background-size: 8px 8px;
132
- background-position:
133
- 0 0,
134
- 0 4px,
135
- 4px -4px,
136
- -4px 0px;
137
-
138
- &::after {
139
- content: '';
140
- position: absolute;
141
- inset: 0;
142
- background: var(--indicator-color);
143
- }
144
- }
145
-
146
- sh-color-picker {
147
- width: 100%;
148
- }
149
- }
150
- }