@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,103 @@
1
+ @use '../../helpers.scss' as *;
2
+
3
+ body {
4
+ h1,
5
+ h2,
6
+ h3,
7
+ h4,
8
+ h5,
9
+ h6,
10
+ p,
11
+ .title-10,
12
+ .title-20B,
13
+ .title-20,
14
+ .title-30B,
15
+ .title-30B,
16
+ .title-30B,
17
+ .paragraph-10,
18
+ .paragraph-20 {
19
+ margin: 0;
20
+ }
21
+ }
22
+
23
+ body {
24
+ h1,
25
+ h2,
26
+ h3,
27
+ h4,
28
+ h5,
29
+ h6,
30
+ .title-10,
31
+ .title-20B,
32
+ .title-20,
33
+ .title-30B,
34
+ .title-30B,
35
+ .title-30B {
36
+ color: var(--base-12);
37
+ }
38
+ }
39
+
40
+ p,
41
+ .paragraph-10,
42
+ .paragraph-20,
43
+ .paragraph-30,
44
+ .paragraph-40,
45
+ .paragraph-10B,
46
+ .paragraph-20B,
47
+ .paragraph-30B,
48
+ .paragraph-40B {
49
+ color: var(--base-8);
50
+ }
51
+
52
+ p {
53
+ margin: 0;
54
+ }
55
+
56
+ strong {
57
+ font-weight: 600;
58
+ }
59
+
60
+ a {
61
+ color: var(--primary-8);
62
+ }
63
+
64
+ sup {
65
+ color: var(--error-8);
66
+ margin-left: -0.33em;
67
+ vertical-align: p2r(3);
68
+ }
69
+
70
+ body {
71
+ h3 {
72
+ font: var(--title-30);
73
+ }
74
+
75
+ $displaySizes: (10, 20, 30, 40, 50);
76
+ $titleSizes: (10, 20, 30, 10B, 20B, 30B);
77
+ $paragraphSizes: (10, 20, 30, 40, 10B, 20B, 30B, 40B);
78
+ $codeSizes: (10, 20, 30);
79
+
80
+ @each $displaySize in $displaySizes {
81
+ .display-#{$displaySize} {
82
+ font: var(--display-#{$displaySize});
83
+ }
84
+ }
85
+
86
+ @each $titleSize in $titleSizes {
87
+ .title-#{$titleSize} {
88
+ font: var(--title-#{$titleSize});
89
+ }
90
+ }
91
+
92
+ @each $paragraphSize in $paragraphSizes {
93
+ .paragraph-#{$paragraphSize} {
94
+ font: var(--paragraph-#{$paragraphSize});
95
+ }
96
+ }
97
+
98
+ @each $codeSize in $codeSizes {
99
+ .code-#{$codeSize} {
100
+ font: var(--code-#{$codeSize});
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,188 @@
1
+ @use 'sass:list';
2
+ @use '../../helpers.scss' as *;
3
+ @use './palette-variables.scss' as palettes;
4
+
5
+ @mixin palette($palette, $name) {
6
+ @each $key, $value in $palette {
7
+ --#{"" + $name}-#{$key}: #{list.nth($value, 1)};
8
+
9
+ @if ($key == 500) {
10
+ --#{"" + $name}-contrast-#{$key}: var(--#{list.nth($value, 3)}-primary-text);
11
+ }
12
+ }
13
+ }
14
+
15
+ :root {
16
+ --font-size: 16px;
17
+ font-size: var(--font-size);
18
+ }
19
+
20
+ html body {
21
+ --ship-light: initial;
22
+ --ship-dark: ;
23
+ color-scheme: light dark;
24
+
25
+ --primary-1: #{light-dark(hsl(217, 91%, 95%), hsl(217, 91%, 9.5%))};
26
+ --primary-2: #{light-dark(hsl(217, 91%, 90%), hsl(217, 91%, 15%))};
27
+ --primary-3: #{light-dark(hsl(217, 91%, 85%), hsl(217, 91%, 22.5%))};
28
+ --primary-4: #{light-dark(hsl(217, 91%, 80%), hsl(217, 91%, 30%))};
29
+ --primary-5: #{light-dark(hsl(217, 91%, 75%), hsl(217, 91%, 37.5%))};
30
+ --primary-6: #{light-dark(hsl(217, 91%, 70%), hsl(217, 91%, 45%))};
31
+ --primary-7: #{light-dark(hsl(217, 91%, 65%), hsl(217, 91%, 52.5%))};
32
+ --primary-8: #{light-dark(hsl(217, 91%, 60%), hsl(217, 91%, 60%))};
33
+ --primary-9: #{light-dark(hsl(217, 91%, 46.5%), hsl(217, 91%, 70%))};
34
+ --primary-10: #{light-dark(hsl(217, 91%, 33%), hsl(217, 91%, 80%))};
35
+ --primary-11: #{light-dark(hsl(217, 91%, 19.5%), hsl(217, 91%, 90%))};
36
+ --primary-12: #{light-dark(hsl(217, 91%, 6%), hsl(217, 91%, 100%))};
37
+ --primary-g2: linear-gradient(180deg, hsl(217, 91%, 70%) 0%, hsl(217, 91%, 60%) 50%);
38
+ --primary-g3: linear-gradient(180deg, hsl(217, 91%, 80%) 0%, hsl(217, 91%, 60%) 50%);
39
+
40
+ --accent-1: #{light-dark(hsl(258, 90%, 95.75%), hsl(258, 90%, 9.25%))};
41
+ --accent-2: #{light-dark(hsl(258, 90%, 91.5%), hsl(258, 90%, 16.5%))};
42
+ --accent-3: #{light-dark(hsl(258, 90%, 87.25%), hsl(258, 90%, 24.75%))};
43
+ --accent-4: #{light-dark(hsl(258, 90%, 83%), hsl(258, 90%, 33%))};
44
+ --accent-5: #{light-dark(hsl(258, 90%, 78.75%), hsl(258, 90%, 41.25%))};
45
+ --accent-6: #{light-dark(hsl(258, 90%, 74.5%), hsl(258, 90%, 49.5%))};
46
+ --accent-7: #{light-dark(hsl(258, 90%, 70.25%), hsl(258, 90%, 57.75%))};
47
+ --accent-8: #{light-dark(hsl(258, 90%, 66%), hsl(258, 90%, 66%))};
48
+ --accent-9: #{light-dark(hsl(258, 90%, 51.15%), hsl(258, 90%, 74.5%))};
49
+ --accent-10: #{light-dark(hsl(258, 90%, 36.3%), hsl(258, 90%, 83%))};
50
+ --accent-11: #{light-dark(hsl(258, 90%, 21.45%), hsl(258, 90%, 91.5%))};
51
+ --accent-12: #{light-dark(hsl(258, 90%, 6.6%), hsl(258, 90%, 100%))};
52
+ --accent-g2: linear-gradient(180deg, hsl(258, 90%, 74.5%) 0%, hsl(258, 90%, 66%) 50%);
53
+ --accent-g3: linear-gradient(180deg, hsl(258, 90%, 83%) 0%, hsl(258, 90%, 66%) 50%);
54
+
55
+ --warn-1: #{light-dark(hsl(37, 92%, 93.75%), hsl(37, 92%, 9.25%))};
56
+ --warn-2: #{light-dark(hsl(37, 92%, 87.5%), hsl(37, 92%, 12.5%))};
57
+ --warn-3: #{light-dark(hsl(37, 92%, 81.25%), hsl(37, 92%, 18.75%))};
58
+ --warn-4: #{light-dark(hsl(37, 92%, 75%), hsl(37, 92%, 25%))};
59
+ --warn-5: #{light-dark(hsl(37, 92%, 68.75%), hsl(37, 92%, 31.25%))};
60
+ --warn-6: #{light-dark(hsl(37, 92%, 62.5%), hsl(37, 92%, 37.5%))};
61
+ --warn-7: #{light-dark(hsl(37, 92%, 56.25%), hsl(37, 92%, 43.75%))};
62
+ --warn-8: #{light-dark(hsl(37, 92%, 50%), hsl(37, 92%, 50%))};
63
+ --warn-9: #{light-dark(hsl(37, 92%, 38.75%), hsl(37, 92%, 62.5%))};
64
+ --warn-10: #{light-dark(hsl(37, 92%, 27.5%), hsl(37, 92%, 75%))};
65
+ --warn-11: #{light-dark(hsl(37, 92%, 16.25%), hsl(37, 92%, 87.5%))};
66
+ --warn-12: #{light-dark(hsl(37, 92%, 5%), hsl(37, 92%, 100%))};
67
+ --warn-g2: linear-gradient(180deg, hsl(37, 92%, 62.5%) 0%, hsl(37, 92%, 50%) 50%);
68
+ --warn-g3: linear-gradient(180deg, hsl(37, 92%, 75%) 0%, hsl(37, 92%, 50%) 50%);
69
+
70
+ --error-1: #{light-dark(hsl(0, 84%, 95%), hsl(0, 84%, 7.5%))};
71
+ --error-2: #{light-dark(hsl(0, 84%, 90%), hsl(0, 84%, 15%))};
72
+ --error-3: #{light-dark(hsl(0, 84%, 85%), hsl(0, 84%, 22.5%))};
73
+ --error-4: #{light-dark(hsl(0, 84%, 80%), hsl(0, 84%, 30%))};
74
+ --error-5: #{light-dark(hsl(0, 84%, 75%), hsl(0, 27%, 10%))};
75
+ --error-6: #{light-dark(hsl(0, 84%, 70%), hsl(0, 84%, 45%))};
76
+ --error-7: #{light-dark(hsl(0, 84%, 65%), hsl(0, 84%, 52.5%))};
77
+ --error-8: #{light-dark(hsl(0, 84%, 60%), hsl(0, 84%, 60%))};
78
+ --error-9: #{light-dark(hsl(0, 84%, 46.5%), hsl(0, 84%, 70%))};
79
+ --error-10: #{light-dark(hsl(0, 84%, 33%), hsl(0, 84%, 80%))};
80
+ --error-11: #{light-dark(hsl(0, 84%, 19.5%), hsl(0, 84%, 90%))};
81
+ --error-12: #{light-dark(hsl(0, 84%, 6%), hsl(0, 84%, 100%))};
82
+ --error-g2: linear-gradient(180deg, hsl(0, 84%, 70%) 0%, hsl(0, 84%, 60%) 50%);
83
+ --error-g3: linear-gradient(180deg, hsl(0, 84%, 80%) 0%, hsl(0, 84%, 60%) 50%);
84
+
85
+ --success-1: #{light-dark(hsl(160, 84%, 92.38%), hsl(160, 84%, 7.88%))};
86
+ --success-2: #{light-dark(hsl(160, 84%, 84.75%), hsl(160, 3%, 17%))};
87
+ --success-3: #{light-dark(hsl(160, 84%, 77.13%), hsl(160, 84%, 14.63%))};
88
+ --success-4: #{light-dark(hsl(160, 84%, 69.5%), hsl(160, 84%, 19.5%))};
89
+ --success-5: #{light-dark(hsl(160, 84%, 61.88%), hsl(160, 84%, 24.38%))};
90
+ --success-6: #{light-dark(hsl(160, 84%, 54.25%), hsl(160, 84%, 29.25%))};
91
+ --success-7: #{light-dark(hsl(160, 84%, 46.63%), hsl(160, 84%, 34.13%))};
92
+ --success-8: #{light-dark(hsl(160, 84%, 39%), hsl(160, 84%, 39%))};
93
+ --success-9: #{light-dark(hsl(160, 84%, 30.23%), hsl(160, 84%, 54.25%))};
94
+ --success-10: #{light-dark(hsl(160, 84%, 21.45%), hsl(160, 84%, 69.5%))};
95
+ --success-11: #{light-dark(hsl(160, 84%, 12.67%), hsl(160, 84%, 84.75%))};
96
+ --success-12: #{light-dark(hsl(160, 84%, 3.9%), hsl(160, 84%, 100%))};
97
+ --success-g2: linear-gradient(180deg, hsl(160, 84%, 54.25%) 0%, hsl(160, 84%, 39%) 50%);
98
+ --success-g3: linear-gradient(180deg, hsl(160, 84%, 69.5%) 0%, hsl(160, 84%, 39%) 50%);
99
+
100
+ --base-1: #{light-dark(#fff, hsl(0, 0%, 5.75%))};
101
+ --base-2: #{light-dark(hsl(0, 0%, 98.05%), hsl(0, 0%, 8.75%))};
102
+ --base-3: #{light-dark(hsl(0, 0%, 94.5%), hsl(0, 0%, 11.5%))};
103
+ --base-4: #{light-dark(hsl(0, 0%, 84.75%), hsl(0, 0%, 17.25%))};
104
+ --base-5: #{light-dark(hsl(0, 0%, 79.75%), hsl(0, 0%, 17.25%))};
105
+ --base-6: #{light-dark(hsl(0, 0%, 66.25%), hsl(0, 0%, 28.75%))};
106
+ --base-7: #{light-dark(hsl(0, 0%, 54.5%), hsl(0, 0%, 34.5%))};
107
+ --base-8: #{light-dark(hsl(0, 0%, 46%), hsl(0, 0%, 46%))};
108
+ --base-9: #{light-dark(hsl(0, 0%, 35.65%), hsl(0, 0%, 59.5%))};
109
+ --base-10: #{light-dark(hsl(0, 0%, 25.3%), hsl(0, 0%, 73%))};
110
+ --base-11: #{light-dark(hsl(0, 0%, 14.95%), hsl(0, 0%, 86.5%))};
111
+ --base-12: #{light-dark(hsl(0, 0%, 4.6%), hsl(0, 0%, 100%))};
112
+
113
+ --base-g2: linear-gradient(180deg, hsl(0, 0%, 66.25%) 0%, hsl(0, 0%, 46%) 50%);
114
+ --base-g3: linear-gradient(180deg, hsl(0, 0%, 73%) 0%, hsl(0, 0%, 46%) 50%);
115
+ --base-g6: linear-gradient(180deg, hsl(0, 0%, 25.3%) 0%, hsl(0, 0%, 14.95%) 50%);
116
+ --base-g7: linear-gradient(180deg, hsl(0, 0%, 35.65%) 0%, hsl(0, 0%, 14.95%) 50%);
117
+
118
+ --primary-c8: var(--light-text);
119
+ --accent-c8: var(--light-text);
120
+ --warn-c8: var(--light-text);
121
+ --error-c8: var(--light-text);
122
+ --success-c8: var(--light-text);
123
+
124
+ --display-10: 600 #{p2r(80)} / normal Inter Tight, sans-serif;
125
+ --display-20: 600 #{p2r(72)} / normal Inter Tight, sans-serif;
126
+ --display-30: 600 #{p2r(64)} / normal Inter Tight, sans-serif;
127
+ --display-40: 600 #{p2r(56)} / normal Inter Tight, sans-serif;
128
+ --display-50: 600 #{p2r(48)} / normal Inter Tight, sans-serif;
129
+
130
+ --title-10: 500 #{p2r(40)} / normal Inter Tight, sans-serif;
131
+ --title-20: 500 #{p2r(32)} / normal Inter Tight, sans-serif;
132
+ --title-30: 500 #{p2r(24)} / normal Inter Tight, sans-serif;
133
+
134
+ --title-10B: 600 #{p2r(40)} / normal Inter Tight, sans-serif;
135
+ --title-20B: 600 #{p2r(32)} / normal Inter Tight, sans-serif;
136
+ --title-30B: 600 #{p2r(24)} / normal Inter Tight, sans-serif;
137
+
138
+ --paragraph-10: 500 #{p2r(18)} / normal Inter Tight, sans-serif;
139
+ --paragraph-20: 500 #{p2r(16)} / normal Inter Tight, sans-serif;
140
+ --paragraph-30: 500 #{p2r(14)} / normal Inter Tight, sans-serif;
141
+ --paragraph-40: 500 #{p2r(12)} / normal Inter Tight, sans-serif;
142
+
143
+ --paragraph-10B: 600 #{p2r(18)} / normal Inter Tight, sans-serif;
144
+ --paragraph-20B: 600 #{p2r(16)} / normal Inter Tight, sans-serif;
145
+ --paragraph-30B: 600 #{p2r(14)} / #{p2r(18)} Inter Tight, sans-serif;
146
+ --paragraph-40B: 600 #{p2r(12)} / normal Inter Tight, sans-serif;
147
+
148
+ --code-10: 500 #{p2r(16)} / normal monospace;
149
+ --code-20: 500 #{p2r(14)} / normal monospace;
150
+ --code-30: 500 #{p2r(12)} / normal monospace;
151
+
152
+ --shape-1: #{p2r(4)};
153
+ --shape-2: #{p2r(8)};
154
+ --shape-3: #{p2r(12)};
155
+ --shape-4: #{p2r(16)};
156
+ --shape-5: #{p2r(20)};
157
+
158
+ --box-shadow-10: 0 1px 2px 0 rgba(18, 18, 23, 0.07);
159
+ --box-shadow-20: 0 1px 3px 0 rgba(18, 18, 23, 0.1);
160
+ --box-shadow-30: 0 1px 4px -1px rgba(18, 18, 23, 0.08);
161
+ --box-shadow-35: 0 4px 6px -1px rgba(18, 18, 23, 0.08);
162
+ --box-shadow-40: 0 10px 15px -3px rgba(18, 18, 23, 0.08);
163
+ --box-shadow-50: 0 20px 25px -5px rgba(18, 18, 23, 0.1);
164
+ --box-shadow-60: 0 25px 50px -12px rgba(18, 18, 23, 0.25);
165
+
166
+ --dark-text: #000;
167
+ --light-text: #fff;
168
+
169
+ &.dark {
170
+ --ship-light: ;
171
+ --ship-dark: initial;
172
+ color-scheme: dark;
173
+ }
174
+
175
+ // TODO add a good way to toggle between light and dark mode served from the ui lib
176
+ //
177
+ // @media (prefers-color-scheme: dark) {
178
+ // --ship-light: ;
179
+ // --ship-dark: initial;
180
+ // color-scheme: dark;
181
+
182
+ // &.light {
183
+ // --ship-light: initial;
184
+ // --ship-dark: ;
185
+ // color-scheme: light;
186
+ // }
187
+ // }
188
+ }
@@ -0,0 +1,4 @@
1
+ @forward './core/variables';
2
+ @forward './core/layout';
3
+ @forward './core/loader';
4
+ @forward './core/typography';
@@ -0,0 +1,11 @@
1
+ $useInterTight: true !default;
2
+
3
+ @if ($useInterTight == true) {
4
+ @font-face {
5
+ font-family: 'Inter Tight';
6
+ src: url('/ship-ui-assets/fonts/InterTight-VariableFont_wght.woff2') format('woff2-variations');
7
+ font-weight: 100 900;
8
+ font-stretch: 75% 125%;
9
+ font-style: normal;
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ @function lighten($color, $percentage) {
2
+ @return color-mix(in srgb, $color, #fff $percentage);
3
+ }
4
+
5
+ @function darken($color, $percentage) {
6
+ @return color-mix(in srgb, $color, #000 $percentage);
7
+ }
@@ -0,0 +1,14 @@
1
+ @use 'sass:list';
2
+
3
+ // Gutter
4
+ $base-dp: 4px;
5
+
6
+ @function dp($listTimes) {
7
+ $new-dp-list: ();
8
+
9
+ @each $times in $listTimes {
10
+ $new-dp-list: list.append($new-dp-list, $times * $base-dp, 'space');
11
+ }
12
+
13
+ @return $new-dp-list;
14
+ }
@@ -0,0 +1,23 @@
1
+ @use 'sass:list' as list;
2
+ @use 'sass:meta' as meta;
3
+ @use 'sass:math' as math; // Include math module for division
4
+
5
+ $base-font-size-in-px: 16 !default;
6
+
7
+ @function p2r($pxValues) {
8
+ $remValues: ();
9
+
10
+ @each $pxValue in $pxValues {
11
+ @if $pxValue == auto {
12
+ $remValues: list.append($remValues, auto);
13
+ } @else if meta.type-of($pxValue) != number {
14
+ $pxValue: math.div($pxValue, 1px);
15
+ } @else if $pxValue == 0 {
16
+ $remValues: list.append($remValues, 0);
17
+ } @else {
18
+ $remValues: list.append($remValues, (math.div($pxValue, $base-font-size-in-px) * 1rem));
19
+ }
20
+ }
21
+
22
+ @return $remValues;
23
+ }
@@ -0,0 +1,61 @@
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+
4
+ $palettes: 'primary', 'accent', 'grey', 'warn', 'success';
5
+ $colors: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950;
6
+
7
+ @mixin borderGradient($mode: light, $width: 1px, $direction: right) {
8
+ $opacity: 0.48;
9
+ $bgColor: #fff;
10
+
11
+ @if $mode == dark {
12
+ $opacity: 0.06;
13
+ $bgColor: #000;
14
+ }
15
+
16
+ @if $mode == flipLight {
17
+ $opacity: 0.15;
18
+ $bgColor: #fff;
19
+ }
20
+
21
+ position: relative;
22
+
23
+ &::before {
24
+ content: '';
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ width: calc(100% - #{$width * 2});
29
+ height: calc(100% - #{$width * 2});
30
+ border-width: $width;
31
+ border-style: solid;
32
+
33
+ @if $direction == right {
34
+ border-image: linear-gradient(
35
+ to $direction,
36
+ rgba($bgColor, 0),
37
+ rgba($bgColor, $opacity),
38
+ rgba($bgColor, 0)
39
+ )
40
+ 100%
41
+ 1;
42
+ }
43
+
44
+ @if $direction == bottom {
45
+ border-image: linear-gradient(
46
+ to $direction,
47
+ rgba($bgColor, 0),
48
+ rgba($bgColor, $opacity),
49
+ rgba($bgColor, 0)
50
+ )
51
+ 1
52
+ 100%;
53
+ }
54
+ }
55
+ }
56
+
57
+ @mixin noBorderGradient() {
58
+ &:before {
59
+ content: none;
60
+ }
61
+ }
@@ -0,0 +1,217 @@
1
+ @use 'sass:list' as list;
2
+ @use 'sass:math' as math;
3
+ @use 'sass:meta' as meta;
4
+ @use 'sass:map' as map;
5
+ @use 'sass:string' as string;
6
+
7
+ /**
8
+ * $bp-giga: 2500px;
9
+ * $bp-mega: 1900px;
10
+ * $bp-kilo: 1360px;
11
+ * $bp-centi: 1024px;
12
+ * $bp-milli: 768px;
13
+ * $bp-nano: 480px;
14
+ * $bp-pico: 320px;
15
+ */
16
+
17
+ $bp-giga: 2500px;
18
+ $bp-mega: 1900px;
19
+ $bp-kilo: 1360px;
20
+ $bp-centi: 1024px;
21
+ $bp-milli: 768px;
22
+ $bp-nano: 480px;
23
+ $bp-pico: 320px;
24
+
25
+ $breakpoint-map: (
26
+ giga: (
27
+ $bp-giga,
28
+ ),
29
+ mega: (
30
+ $bp-mega,
31
+ ),
32
+ kilo: (
33
+ $bp-kilo,
34
+ ),
35
+ centi: (
36
+ $bp-centi,
37
+ ),
38
+ milli: (
39
+ $bp-milli,
40
+ ),
41
+ nano: (
42
+ $bp-nano,
43
+ ),
44
+ pico: (
45
+ $bp-pico,
46
+ ),
47
+ );
48
+
49
+ @function to-string($value) {
50
+ @return meta.inspect($value);
51
+ }
52
+
53
+ /**
54
+ * First section controls media quries that contains from-to values
55
+ * if numbers are parsed math.is-unitless it will default to px's, if you need to use em's just parse the unit in the end
56
+ *
57
+ * Example:
58
+ @include breakpoint (0 nano) {
59
+ // @media only screen and (min-width: 0px) and (max-width: 480px) {}
60
+ }
61
+ @include breakpoint (nano milli) {
62
+ // @media only screen and (min-width: 480px) and (max-width: 768px) {}
63
+ }
64
+ @include breakpoint (1024 1360) {
65
+ // @media only screen and (min-width: 1024px) and (max-width: 1360px) {}
66
+ }
67
+ @include breakpoint (milli 1024) {
68
+ // @media only screen and (min-width: 768px) and (max-width: 1024px) {}
69
+ }
70
+ * You can use this very simple and you can turn from min to max width
71
+ * only by adding dash infront of your breakpoint keyword
72
+ *
73
+ * Example:
74
+ @include breakpoint (milli) {
75
+ // @media only screen and (min-width: 768px) {}
76
+ }
77
+ @include breakpoint (-nano) {
78
+ // @media only screen and (max-width: 480px) {}
79
+ }
80
+ * There is also support for writing strings, and printable breakpoint
81
+ *
82
+ * Example:
83
+ @include breakpoint ('max-width: 700px') {
84
+ // @media only screen and (max-width: 700px) {}
85
+ }
86
+ @include breakpoint (print) {
87
+ // @media print {}
88
+ }
89
+ */
90
+ @mixin breakpoint($point) {
91
+ @if list.length($point) > 1 {
92
+ $point1: list.nth($point, 1);
93
+ $point2: list.nth($point, 2);
94
+
95
+ @if meta.type-of($point1) == 'number' and math.is-unitless($point1) {
96
+ $point1: list.nth($point, 1) + 0px;
97
+ }
98
+
99
+ @if meta.type-of($point2) == 'number' and math.is-unitless($point2) {
100
+ $point2: list.nth($point, 2) + 0px;
101
+ }
102
+
103
+ @if meta.type-of($point1) == 'number' and meta.type-of($point2) == 'number' {
104
+ @media only screen and (min-width: $point1) and (max-width: $point2) {
105
+ @content;
106
+ }
107
+ } @else if meta.type-of($point1) == 'number' {
108
+ @media only screen and (min-width: $point1) and (max-width: map.map-get($breakpoint-map, $point2)) {
109
+ @content;
110
+ }
111
+ } @else if meta.type-of($point2) == 'number' {
112
+ @media only screen and (min-width: map.map-get($breakpoint-map, $point1)) and (max-width: $point2) {
113
+ @content;
114
+ }
115
+ } @else {
116
+ @media only screen and (min-width: map.map-get($breakpoint-map, $point1)) and (max-width: map.map-get($breakpoint-map, $point2)) {
117
+ @content;
118
+ }
119
+ }
120
+ } @else {
121
+ @if $point == giga or $point == -giga {
122
+ @if string.index(to-string($point), '-') == 1 {
123
+ @media only screen and (max-width: $bp-giga) {
124
+ @content;
125
+ }
126
+ } @else {
127
+ @media only screen and (min-width: $bp-giga) {
128
+ @content;
129
+ }
130
+ }
131
+ } @else if $point == mega or $point == -mega {
132
+ @if string.index(to-string($point), '-') == 1 {
133
+ @media only screen and (max-width: $bp-mega) {
134
+ @content;
135
+ }
136
+ } @else {
137
+ @media only screen and (min-width: $bp-mega) {
138
+ @content;
139
+ }
140
+ }
141
+ } @else if $point == kilo or $point == -kilo {
142
+ @if string.index(to-string($point), '-') == 1 {
143
+ @media only screen and (max-width: $bp-kilo) {
144
+ @content;
145
+ }
146
+ } @else {
147
+ @media only screen and (min-width: $bp-kilo) {
148
+ @content;
149
+ }
150
+ }
151
+ } @else if $point == centi or $point == -centi {
152
+ @if string.index(to-string($point), '-') == 1 {
153
+ @media only screen and (max-width: $bp-centi) {
154
+ @content;
155
+ }
156
+ } @else {
157
+ @media only screen and (min-width: $bp-centi) {
158
+ @content;
159
+ }
160
+ }
161
+ } @else if $point == milli or $point == -milli {
162
+ @if string.index(to-string($point), '-') == 1 {
163
+ @media only screen and (max-width: $bp-milli) {
164
+ @content;
165
+ }
166
+ } @else {
167
+ @media only screen and (min-width: $bp-milli) {
168
+ @content;
169
+ }
170
+ }
171
+ } @else if $point == nano or $point == -nano {
172
+ @if string.index(to-string($point), '-') == 1 {
173
+ @media only screen and (max-width: $bp-nano) {
174
+ @content;
175
+ }
176
+ } @else {
177
+ @media only screen and (min-width: $bp-nano) {
178
+ @content;
179
+ }
180
+ }
181
+ } @else if $point == pico or $point == -pico {
182
+ @if string.index(to-string($point), '-') == 1 {
183
+ @media only screen and (max-width: $bp-pico) {
184
+ @content;
185
+ }
186
+ } @else {
187
+ @media only screen and (min-width: $bp-pico) {
188
+ @content;
189
+ }
190
+ }
191
+ } @else if $point == iphoneX {
192
+ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
193
+ @content;
194
+ }
195
+ } @else if $point == iphoneX-portrait {
196
+ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait) {
197
+ @content;
198
+ }
199
+ } @else if $point == iphoneX-landscape {
200
+ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape) {
201
+ @content;
202
+ }
203
+ } @else if $point == print {
204
+ @media print {
205
+ @content;
206
+ }
207
+ } @else if meta.type-of($point) == 'number' {
208
+ @media only screen and (min-width: $point) {
209
+ @content;
210
+ }
211
+ } @else if string.index($point, max) == 1 or string.index($point, min) == 1 {
212
+ @media only screen and (#{$point}) {
213
+ @content;
214
+ }
215
+ }
216
+ }
217
+ }
@@ -0,0 +1,7 @@
1
+ @mixin ellipsis() {
2
+ overflow: hidden;
3
+ white-space: nowrap;
4
+ text-overflow: ellipsis;
5
+ word-break: break-all;
6
+ word-wrap: break-word;
7
+ }
@@ -0,0 +1,18 @@
1
+ @mixin overflowScrolling($dir: y) {
2
+ @if $dir == y {
3
+ overflow-x: hidden;
4
+ overflow-y: auto;
5
+ -webkit-overflow-scrolling: auto;
6
+ }
7
+
8
+ @if $dir == x {
9
+ overflow-x: auto;
10
+ overflow-y: hidden;
11
+ -webkit-overflow-scrolling: auto;
12
+ }
13
+
14
+ @if $dir == xy or $dir == yx {
15
+ overflow: auto;
16
+ -webkit-overflow-scrolling: auto;
17
+ }
18
+ }
@@ -0,0 +1,16 @@
1
+ @use '../mixins/breakpoint.scss' as *;
2
+ @use '../fn/p2r.scss' as *;
3
+ @use 'sass:math' as mat;
4
+
5
+ @mixin wrapper($gap: p2r(32), $padding: p2r(32)) {
6
+ display: flex;
7
+ flex-direction: column;
8
+ width: 100%;
9
+ gap: $gap;
10
+ padding: $padding;
11
+
12
+ @include breakpoint(-milli) {
13
+ gap: calc(#{$gap} / 2);
14
+ padding: calc(#{$padding} / 2);
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ @function light-dark($light, $dark) {
2
+ @return var(--ship-light, $light) var(--ship-dark, $dark);
3
+ }
@@ -0,0 +1,13 @@
1
+ // Functions
2
+ @forward './core/helpers/fn/p2r';
3
+ @forward './core/helpers/fn/color-mix';
4
+
5
+ // light-dark polyfill
6
+ @forward './core/polyfill/light-dark.scss';
7
+
8
+ // Mixins
9
+ @forward './core/helpers/mixins/breakpoint';
10
+ @forward './core/helpers/mixins/wrapper';
11
+ @forward './core/helpers/mixins/ellipsis';
12
+ @forward './core/helpers/mixins/overflow-scrolling';
13
+ // @forward './core/helpers/mixins/border-gradient';