@ship-ui/core 0.13.2

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/assets/fonts/InterTight-VariableFont_wght.woff2 +0 -0
  4. package/bin/ship-fg-node +40 -0
  5. package/bin/ship-fg.ts +40 -0
  6. package/bin/src/ship-fg-node.js +344 -0
  7. package/bin/src/ship-fg.ts +368 -0
  8. package/bin/src/utilities.js +53 -0
  9. package/bin/src/utilities.ts +98 -0
  10. package/bin/tsconfig.app.json +15 -0
  11. package/fesm2022/ship-ui-core.mjs +5373 -0
  12. package/fesm2022/ship-ui-core.mjs.map +1 -0
  13. package/index.d.ts +758 -0
  14. package/package.json +52 -0
  15. package/styles/components/ship-alert-container.component.scss +49 -0
  16. package/styles/components/ship-alert.component.scss +273 -0
  17. package/styles/components/ship-button-group.component.scss +63 -0
  18. package/styles/components/ship-button.component.scss +330 -0
  19. package/styles/components/ship-card.component.scss +54 -0
  20. package/styles/components/ship-checkbox.component.scss +245 -0
  21. package/styles/components/ship-chip.component.scss +290 -0
  22. package/styles/components/ship-color-picker.component.scss +78 -0
  23. package/styles/components/ship-datepicker.component.scss +274 -0
  24. package/styles/components/ship-dialog.component.scss +119 -0
  25. package/styles/components/ship-divider.component.scss +27 -0
  26. package/styles/components/ship-file-upload.component.scss +47 -0
  27. package/styles/components/ship-form-field.component.scss +334 -0
  28. package/styles/components/ship-icon.component.scss +54 -0
  29. package/styles/components/ship-list.component.scss +148 -0
  30. package/styles/components/ship-menu.component.scss +217 -0
  31. package/styles/components/ship-popover.component.scss +66 -0
  32. package/styles/components/ship-progress-bar.component.scss +173 -0
  33. package/styles/components/ship-radio.component.scss +182 -0
  34. package/styles/components/ship-range-slider.component.scss +412 -0
  35. package/styles/components/ship-select.component.scss +139 -0
  36. package/styles/components/ship-sidenav.component.scss +192 -0
  37. package/styles/components/ship-sortable.component.scss +54 -0
  38. package/styles/components/ship-spinner.component.scss +53 -0
  39. package/styles/components/ship-stepper.component.scss +138 -0
  40. package/styles/components/ship-table.component.scss +402 -0
  41. package/styles/components/ship-tabs.component.scss +86 -0
  42. package/styles/components/ship-toggle-card.component.scss +71 -0
  43. package/styles/components/ship-toggle.component.scss +238 -0
  44. package/styles/components/ship-tooltip.component.scss +175 -0
  45. package/styles/components/ship-virtual-scroll.component.scss +12 -0
  46. package/styles/components/sparkle-checkbox.component.scss +245 -0
  47. package/styles/components/sparkle-select.component.scss +139 -0
  48. package/styles/core/apexcharts/apexcharts.scss +58 -0
  49. package/styles/core/core/layout.scss +74 -0
  50. package/styles/core/core/loader.scss +63 -0
  51. package/styles/core/core/palette-variables.scss +352 -0
  52. package/styles/core/core/typography.scss +103 -0
  53. package/styles/core/core/variables.scss +188 -0
  54. package/styles/core/core.scss +4 -0
  55. package/styles/core/fonts/_inter-tight.scss +11 -0
  56. package/styles/core/helpers/fn/color-mix.scss +7 -0
  57. package/styles/core/helpers/fn/dp.scss +14 -0
  58. package/styles/core/helpers/fn/p2r.scss +23 -0
  59. package/styles/core/helpers/mixins/border-gradient.scss +61 -0
  60. package/styles/core/helpers/mixins/breakpoint.scss +217 -0
  61. package/styles/core/helpers/mixins/ellipsis.scss +7 -0
  62. package/styles/core/helpers/mixins/overflow-scrolling.scss +18 -0
  63. package/styles/core/helpers/mixins/wrapper.scss +16 -0
  64. package/styles/core/polyfill/light-dark.scss +3 -0
  65. package/styles/helpers.scss +13 -0
  66. package/styles/index.scss +146 -0
@@ -0,0 +1,139 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipSelect: false !default;
4
+
5
+ @if $shipSelect == true {
6
+ sh-select {
7
+ --miw: #{p2r(210)};
8
+
9
+ display: flex;
10
+
11
+ sh-form-field {
12
+ display: flex;
13
+ --ff-mw: var(--miw);
14
+ }
15
+
16
+ sh-popover {
17
+ flex: 1 0;
18
+
19
+ &:has(.ship-options:empty) .popover {
20
+ opacity: 0;
21
+ }
22
+ }
23
+
24
+ .selected-value {
25
+ width: 100%;
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ align-items: center;
29
+ gap: p2r(4);
30
+ color: var(--base-8);
31
+
32
+ input {
33
+ margin: 0;
34
+ }
35
+
36
+ &.is-selected {
37
+ color: var(--base-12);
38
+ }
39
+ }
40
+
41
+ sh-form-field .input-wrap .input {
42
+ position: relative;
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+
46
+ --ff-space: #{p2r(7 10)};
47
+
48
+ textarea,
49
+ input {
50
+ opacity: 0;
51
+ width: 0;
52
+ height: 0;
53
+ position: absolute;
54
+ }
55
+
56
+ &.show-search-text {
57
+ input {
58
+ opacity: 1;
59
+ height: initial;
60
+ min-width: min-content;
61
+ field-sizing: content;
62
+ font: var(--paragraph-30);
63
+ position: relative;
64
+ }
65
+
66
+ textarea {
67
+ opacity: 1;
68
+ height: initial;
69
+ margin: p2r(4 0 0);
70
+ }
71
+ }
72
+ }
73
+
74
+ sh-form-field.small .input-wrap .input {
75
+ --ff-space: #{p2r(5 8)};
76
+
77
+ sh-chip {
78
+ --chip-h: #{p2r(20)};
79
+ font-size: 80%;
80
+ }
81
+ }
82
+ }
83
+
84
+ .ship-options {
85
+ padding: p2r(8 0);
86
+ display: flex;
87
+ flex-direction: column;
88
+ max-height: p2r(180);
89
+ overflow-y: auto;
90
+ overflow-x: hidden;
91
+
92
+ .option {
93
+ display: flex;
94
+ justify-content: flex-start;
95
+ align-items: center;
96
+ min-height: p2r(32);
97
+ margin: p2r(0 8);
98
+ padding: p2r(0 8);
99
+ gap: p2r(8);
100
+ width: calc(100% - #{p2r(16)});
101
+ border-radius: var(--shape-2);
102
+ appearance: none;
103
+ background-color: transparent;
104
+ border: 0;
105
+ cursor: pointer;
106
+ color: var(--base-12);
107
+ user-select: none;
108
+
109
+ &[disabled] {
110
+ opacity: 0.3;
111
+ cursor: initial;
112
+
113
+ &:hover {
114
+ background-color: transparent;
115
+ }
116
+ }
117
+
118
+ sh-icon {
119
+ font-size: p2r(16);
120
+ }
121
+
122
+ &.active,
123
+ &:checked,
124
+ &:hover {
125
+ background-color: var(--base-2);
126
+ color: var(--base-12);
127
+ }
128
+
129
+ &.focused {
130
+ background-color: var(--primary-1);
131
+ color: var(--base-12);
132
+
133
+ &:hover {
134
+ background-color: var(--primary-2);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,58 @@
1
+ $useApexcharts: true !default;
2
+
3
+ @if $useApexcharts == true {
4
+ body {
5
+ .apexcharts-text {
6
+ fill: var(--base-12);
7
+
8
+ &.apexcharts-yaxis-label,
9
+ &.apexcharts-xaxis-label {
10
+ fill: var(--base-8);
11
+ }
12
+ }
13
+
14
+ .apexcharts-gridline,
15
+ .apexcharts-yaxis-tick,
16
+ .apexcharts-xaxis-tick {
17
+ stroke: var(--base-8);
18
+ }
19
+
20
+ .apexcharts-grid-borders {
21
+ line {
22
+ stroke: var(--base-8);
23
+ }
24
+ }
25
+
26
+ .apexcharts-tracks {
27
+ .apexcharts-radialbar-area {
28
+ stroke: var(--base-4);
29
+ }
30
+ }
31
+
32
+ .apexcharts-menu {
33
+ background-color: var(--base-1);
34
+ color: var(--base-12);
35
+ border: 1px solid var(--base-4);
36
+ }
37
+
38
+ .apexcharts-tooltip.apexcharts-theme-light {
39
+ background-color: var(--base-1);
40
+ border: 1px solid var(--base-4);
41
+ box-shadow: var(--base-2);
42
+ color: var(--base-8);
43
+
44
+ .apexcharts-tooltip-title {
45
+ background-color: var(--base-2);
46
+ border-bottom: 1px solid var(--base-4);
47
+ }
48
+ }
49
+
50
+ .apexcharts-xaxistooltip,
51
+ .apexcharts-yaxistooltip {
52
+ background-color: var(--base-1);
53
+ border: 1px solid var(--base-4);
54
+ box-shadow: var(--base-2);
55
+ color: var(--base-8);
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,74 @@
1
+ @use '../../helpers.scss' as *;
2
+
3
+ * {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html,
8
+ body,
9
+ app-root {
10
+ width: 100vw;
11
+ min-height: 100vh;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ background-color: var(--base-2);
15
+ }
16
+
17
+ body {
18
+ margin: 0;
19
+ font: var(--paragraph-30);
20
+ color: var(--base-12);
21
+
22
+ &.dragging {
23
+ overflow: hidden;
24
+ }
25
+ }
26
+
27
+ // *::-webkit-scrollbar {
28
+ // width: 8px;
29
+ // height: 12px;
30
+ // background: transparent;
31
+ // scrollbar-width: thin;
32
+ // }
33
+
34
+ // *::-webkit-scrollbar-track {
35
+ // background: transparent;
36
+ // }
37
+
38
+ // *::-webkit-scrollbar-thumb {
39
+ // background: #acacac;
40
+ // background: light-dark(#acacac, #4f4f4f);
41
+ // border-radius: 50px;
42
+ // border: 3px solid transparent;
43
+ // border-left-width: 1px;
44
+ // border-right-width: 2px;
45
+ // background-clip: content-box;
46
+ // }
47
+
48
+ // *::-webkit-scrollbar-thumb:hover {
49
+ // background-color: #888888;
50
+ // }
51
+
52
+ .spacer {
53
+ flex: 1 0;
54
+ }
55
+
56
+ .sh-primary {
57
+ color: var(--primary-8);
58
+ }
59
+
60
+ .sh-accent {
61
+ color: var(--accent-8);
62
+ }
63
+
64
+ .sh-warn {
65
+ color: var(--warn-8);
66
+ }
67
+
68
+ .sh-error {
69
+ color: var(--error-500);
70
+ }
71
+
72
+ .sh-success {
73
+ color: var(--success-500);
74
+ }
@@ -0,0 +1,63 @@
1
+ @use '../../helpers.scss' as *;
2
+
3
+ .loader {
4
+ width: p2r(48);
5
+ height: p2r(48);
6
+ display: grid;
7
+ place-content: center;
8
+ color: var(--base-8);
9
+ }
10
+
11
+ .loader,
12
+ .loading {
13
+ position: relative;
14
+
15
+ &:before {
16
+ content: '';
17
+ width: p2r(16);
18
+ height: p2r(16);
19
+ border: 2px solid var(--loader-c);
20
+ border-bottom-color: transparent;
21
+ border-radius: 50%;
22
+ display: flex;
23
+ box-sizing: border-box;
24
+ animation: rotation 1s linear infinite;
25
+ margin: auto;
26
+ inset: 0;
27
+ position: absolute;
28
+ }
29
+ }
30
+
31
+ // .loading {
32
+ // &.outlined:before {
33
+ // &.primary {
34
+ // border-color: var(--primary-8);
35
+ // }
36
+ // &.accent {
37
+ // border-color: var(--accent-8);
38
+ // }
39
+ // &.warn {
40
+ // border-color: var(--warn-8);
41
+ // }
42
+ // &.error {
43
+ // border-color: var(--error-8);
44
+ // }
45
+ // &.success {
46
+ // border-color: var(--success-8);
47
+ // }
48
+ // }
49
+
50
+ // .raised:before,
51
+ // .flat:before {
52
+ // border-color: #fff;
53
+ // }
54
+ // }
55
+
56
+ @keyframes rotation {
57
+ 0% {
58
+ transform: rotate(0deg);
59
+ }
60
+ 100% {
61
+ transform: rotate(360deg);
62
+ }
63
+ }
@@ -0,0 +1,352 @@
1
+ $violet-palette: (
2
+ 50: (
3
+ #f5f3ff,
4
+ '245,243,255',
5
+ dark,
6
+ ),
7
+ 100: (
8
+ #ede9fe,
9
+ '237,233,254',
10
+ dark,
11
+ ),
12
+ 200: (
13
+ #ddd6fe,
14
+ '221,214,254',
15
+ dark,
16
+ ),
17
+ 300: (
18
+ #c4b5fd,
19
+ '196,181,253',
20
+ dark,
21
+ ),
22
+ 400: (
23
+ #a78bfa,
24
+ '167,139,250',
25
+ dark,
26
+ ),
27
+ 500: (
28
+ #8b5cf6,
29
+ '139,92,246',
30
+ light,
31
+ ),
32
+ 600: (
33
+ #7c3aed,
34
+ '124,58,237',
35
+ light,
36
+ ),
37
+ 700: (
38
+ #6d28d9,
39
+ '109,40,217',
40
+ light,
41
+ ),
42
+ 800: (
43
+ #5b21b6,
44
+ '91,33,182',
45
+ light,
46
+ ),
47
+ 900: (
48
+ #4c1d95,
49
+ '76,29,149',
50
+ light,
51
+ ),
52
+ 950: (
53
+ #2e1065,
54
+ '46,16,101',
55
+ light,
56
+ ),
57
+ );
58
+
59
+ $topaz-palette: (
60
+ 50: (
61
+ #eff6ff,
62
+ '239,246,255',
63
+ dark,
64
+ ),
65
+ 100: (
66
+ #dbeafe,
67
+ '219,234,254',
68
+ dark,
69
+ ),
70
+ 200: (
71
+ #bfdbfe,
72
+ '191,219,254',
73
+ dark,
74
+ ),
75
+ 300: (
76
+ #93c5fd,
77
+ '147,197,253',
78
+ dark,
79
+ ),
80
+ 400: (
81
+ #60a5fa,
82
+ '96,165,250',
83
+ dark,
84
+ ),
85
+ 500: (
86
+ #3b82f6,
87
+ '59,130,246',
88
+ light,
89
+ ),
90
+ 600: (
91
+ #2563eb,
92
+ '37,99,235',
93
+ light,
94
+ ),
95
+ 700: (
96
+ #1d4ed8,
97
+ '29,78,216',
98
+ light,
99
+ ),
100
+ 800: (
101
+ #1e40af,
102
+ '30,64,175',
103
+ light,
104
+ ),
105
+ 900: (
106
+ #1e3a8a,
107
+ '30,58,138',
108
+ light,
109
+ ),
110
+ 950: (
111
+ #172554,
112
+ '23,37,84',
113
+ light,
114
+ ),
115
+ );
116
+
117
+ $ruby-palette: (
118
+ 50: (
119
+ #fef2f2,
120
+ '254,242,242',
121
+ dark,
122
+ ),
123
+ 100: (
124
+ #fee2e2,
125
+ '254,226,226',
126
+ dark,
127
+ ),
128
+ 200: (
129
+ #fecaca,
130
+ '254,202,202',
131
+ dark,
132
+ ),
133
+ 300: (
134
+ #fca5a5,
135
+ '252,165,165',
136
+ dark,
137
+ ),
138
+ 400: (
139
+ #f87171,
140
+ '248,113,113',
141
+ light,
142
+ ),
143
+ 500: (
144
+ #ef4444,
145
+ '239,68,68',
146
+ light,
147
+ ),
148
+ 600: (
149
+ #dc2626,
150
+ '220,38,38',
151
+ light,
152
+ ),
153
+ 700: (
154
+ #b91c1c,
155
+ '185,28,28',
156
+ light,
157
+ ),
158
+ 800: (
159
+ #991b1b,
160
+ '153,27,27',
161
+ light,
162
+ ),
163
+ 900: (
164
+ #7f1d1d,
165
+ '127,29,29',
166
+ light,
167
+ ),
168
+ 950: (
169
+ #450a0a,
170
+ '69,10,10',
171
+ light,
172
+ ),
173
+ );
174
+
175
+ $mono-palette: (
176
+ 50: (
177
+ #fafafa,
178
+ '250,250,250',
179
+ dark,
180
+ ),
181
+ 100: (
182
+ #f4f4f5,
183
+ '244,244,245',
184
+ dark,
185
+ ),
186
+ 200: (
187
+ #e4e4e7,
188
+ '228,228,231',
189
+ dark,
190
+ ),
191
+ 300: (
192
+ #d4d4d8,
193
+ '212,212,216',
194
+ dark,
195
+ ),
196
+ 400: (
197
+ #a1a1aa,
198
+ '161,161,170',
199
+ dark,
200
+ ),
201
+ 500: (
202
+ #71717a,
203
+ '113,113,122',
204
+ light,
205
+ ),
206
+ 600: (
207
+ #52525b,
208
+ '82,82,91',
209
+ light,
210
+ ),
211
+ 700: (
212
+ #3f3f46,
213
+ '63,63,70',
214
+ light,
215
+ ),
216
+ 750: (
217
+ #2f2f31,
218
+ '47,47,49',
219
+ light,
220
+ ),
221
+ 800: (
222
+ #27272a,
223
+ '39,39,42',
224
+ light,
225
+ ),
226
+ 900: (
227
+ #18181b,
228
+ '24,24,27',
229
+ light,
230
+ ),
231
+ 950: (
232
+ #09090b,
233
+ '9,9,11',
234
+ light,
235
+ ),
236
+ );
237
+
238
+ $emerald-palette: (
239
+ 50: (
240
+ #ecfdf5,
241
+ '236,253,245',
242
+ dark,
243
+ ),
244
+ 100: (
245
+ #d1fae5,
246
+ '209,250,229',
247
+ dark,
248
+ ),
249
+ 200: (
250
+ #a7f3d0,
251
+ '167,243,208',
252
+ dark,
253
+ ),
254
+ 300: (
255
+ #6ee7b7,
256
+ '110,231,183',
257
+ dark,
258
+ ),
259
+ 400: (
260
+ #34d399,
261
+ '52,211,153',
262
+ light,
263
+ ),
264
+ 500: (
265
+ #10b981,
266
+ '16,185,129',
267
+ light,
268
+ ),
269
+ 600: (
270
+ #059669,
271
+ '5,150,105',
272
+ light,
273
+ ),
274
+ 700: (
275
+ #047857,
276
+ '4,120,87',
277
+ light,
278
+ ),
279
+ 800: (
280
+ #065f46,
281
+ '6,95,70',
282
+ light,
283
+ ),
284
+ 900: (
285
+ #064e3b,
286
+ '6,78,59',
287
+ light,
288
+ ),
289
+ 950: (
290
+ #022c22,
291
+ '2,44,34',
292
+ light,
293
+ ),
294
+ );
295
+
296
+ $amber-palette: (
297
+ 50: (
298
+ #fffbeb,
299
+ '255,251,235',
300
+ dark,
301
+ ),
302
+ 100: (
303
+ #fef3c7,
304
+ '254,243,199',
305
+ dark,
306
+ ),
307
+ 200: (
308
+ #fde68a,
309
+ '253,230,138',
310
+ dark,
311
+ ),
312
+ 300: (
313
+ #fcd34d,
314
+ '252,211,77',
315
+ dark,
316
+ ),
317
+ 400: (
318
+ #fbbf24,
319
+ '251,191,36',
320
+ light,
321
+ ),
322
+ 500: (
323
+ #f59e0b,
324
+ '245,158,11',
325
+ light,
326
+ ),
327
+ 600: (
328
+ #d97706,
329
+ '217,119,6',
330
+ light,
331
+ ),
332
+ 700: (
333
+ #b45309,
334
+ '180,83,9',
335
+ light,
336
+ ),
337
+ 800: (
338
+ #92400e,
339
+ '146,64,14',
340
+ light,
341
+ ),
342
+ 900: (
343
+ #78350f,
344
+ '120,53,15',
345
+ light,
346
+ ),
347
+ 950: (
348
+ #451a03,
349
+ '69,26,3',
350
+ light,
351
+ ),
352
+ );