@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.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/assets/fonts/InterTight-VariableFont_wght.woff2 +0 -0
- package/bin/ship-fg-node +40 -0
- package/bin/ship-fg.ts +40 -0
- package/bin/src/ship-fg-node.js +344 -0
- package/bin/src/ship-fg.ts +368 -0
- package/bin/src/utilities.js +53 -0
- package/bin/src/utilities.ts +98 -0
- package/bin/tsconfig.app.json +15 -0
- package/fesm2022/ship-ui-core.mjs +5373 -0
- package/fesm2022/ship-ui-core.mjs.map +1 -0
- package/index.d.ts +758 -0
- package/package.json +52 -0
- package/styles/components/ship-alert-container.component.scss +49 -0
- package/styles/components/ship-alert.component.scss +273 -0
- package/styles/components/ship-button-group.component.scss +63 -0
- package/styles/components/ship-button.component.scss +330 -0
- package/styles/components/ship-card.component.scss +54 -0
- package/styles/components/ship-checkbox.component.scss +245 -0
- package/styles/components/ship-chip.component.scss +290 -0
- package/styles/components/ship-color-picker.component.scss +78 -0
- package/styles/components/ship-datepicker.component.scss +274 -0
- package/styles/components/ship-dialog.component.scss +119 -0
- package/styles/components/ship-divider.component.scss +27 -0
- package/styles/components/ship-file-upload.component.scss +47 -0
- package/styles/components/ship-form-field.component.scss +334 -0
- package/styles/components/ship-icon.component.scss +54 -0
- package/styles/components/ship-list.component.scss +148 -0
- package/styles/components/ship-menu.component.scss +217 -0
- package/styles/components/ship-popover.component.scss +66 -0
- package/styles/components/ship-progress-bar.component.scss +173 -0
- package/styles/components/ship-radio.component.scss +182 -0
- package/styles/components/ship-range-slider.component.scss +412 -0
- package/styles/components/ship-select.component.scss +139 -0
- package/styles/components/ship-sidenav.component.scss +192 -0
- package/styles/components/ship-sortable.component.scss +54 -0
- package/styles/components/ship-spinner.component.scss +53 -0
- package/styles/components/ship-stepper.component.scss +138 -0
- package/styles/components/ship-table.component.scss +402 -0
- package/styles/components/ship-tabs.component.scss +86 -0
- package/styles/components/ship-toggle-card.component.scss +71 -0
- package/styles/components/ship-toggle.component.scss +238 -0
- package/styles/components/ship-tooltip.component.scss +175 -0
- package/styles/components/ship-virtual-scroll.component.scss +12 -0
- package/styles/components/sparkle-checkbox.component.scss +245 -0
- package/styles/components/sparkle-select.component.scss +139 -0
- package/styles/core/apexcharts/apexcharts.scss +58 -0
- package/styles/core/core/layout.scss +74 -0
- package/styles/core/core/loader.scss +63 -0
- package/styles/core/core/palette-variables.scss +352 -0
- package/styles/core/core/typography.scss +103 -0
- package/styles/core/core/variables.scss +188 -0
- package/styles/core/core.scss +4 -0
- package/styles/core/fonts/_inter-tight.scss +11 -0
- package/styles/core/helpers/fn/color-mix.scss +7 -0
- package/styles/core/helpers/fn/dp.scss +14 -0
- package/styles/core/helpers/fn/p2r.scss +23 -0
- package/styles/core/helpers/mixins/border-gradient.scss +61 -0
- package/styles/core/helpers/mixins/breakpoint.scss +217 -0
- package/styles/core/helpers/mixins/ellipsis.scss +7 -0
- package/styles/core/helpers/mixins/overflow-scrolling.scss +18 -0
- package/styles/core/helpers/mixins/wrapper.scss +16 -0
- package/styles/core/polyfill/light-dark.scss +3 -0
- package/styles/helpers.scss +13 -0
- package/styles/index.scss +146 -0
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ship-ui/core",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "0.13.2",
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": ">=19",
|
|
7
|
+
"@angular/core": ">=19"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"subset-font": "^2.3.0",
|
|
11
|
+
"@phosphor-icons/web": "^2.1.1",
|
|
12
|
+
"glob": "11.0.3",
|
|
13
|
+
"tslib": "^2.3.0"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"ship-fg": "./bin/ship-fg-node"
|
|
17
|
+
},
|
|
18
|
+
"libraryIcons": [
|
|
19
|
+
"upload-simple",
|
|
20
|
+
"magnifying-glass",
|
|
21
|
+
"x-bold",
|
|
22
|
+
"caret-left",
|
|
23
|
+
"caret-right",
|
|
24
|
+
"caret-down",
|
|
25
|
+
"caret-up",
|
|
26
|
+
"calendar",
|
|
27
|
+
"minus-bold",
|
|
28
|
+
"info",
|
|
29
|
+
"check-bold",
|
|
30
|
+
"check-circle",
|
|
31
|
+
"warning-octagon",
|
|
32
|
+
"warning",
|
|
33
|
+
"question",
|
|
34
|
+
"plus"
|
|
35
|
+
],
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"sass": "./styles/*",
|
|
39
|
+
"assets": [
|
|
40
|
+
"./assets/**/*"
|
|
41
|
+
],
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"default": "./fesm2022/ship-ui-core.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./package.json": {
|
|
46
|
+
"default": "./package.json"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"sideEffects": false,
|
|
50
|
+
"module": "fesm2022/ship-ui-core.mjs",
|
|
51
|
+
"typings": "index.d.ts"
|
|
52
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use '../helpers.scss' as *;
|
|
2
|
+
$shipAlert: true !default;
|
|
3
|
+
|
|
4
|
+
@if $shipAlert == true {
|
|
5
|
+
sh-alert-container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
sh-alert {
|
|
10
|
+
margin-bottom: p2r(8);
|
|
11
|
+
|
|
12
|
+
&:first-of-type {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.alert-is-hidden {
|
|
17
|
+
margin-bottom: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.scroller {
|
|
22
|
+
width: 100%;
|
|
23
|
+
max-height: 50vh;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
overflow-x: hidden;
|
|
26
|
+
padding: p2r(8 16 16 8);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.container {
|
|
30
|
+
flex-direction: column-reverse;
|
|
31
|
+
display: flex;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tray {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
width: p2r(24);
|
|
39
|
+
height: p2r(24);
|
|
40
|
+
background-color: var(--grey-500);
|
|
41
|
+
color: var(--grey-contrast-500);
|
|
42
|
+
position: absolute;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
z-index: 1000;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
@use '../helpers.scss' as *;
|
|
2
|
+
$shipAlert: true !default;
|
|
3
|
+
|
|
4
|
+
@if $shipAlert == true {
|
|
5
|
+
sh-alert {
|
|
6
|
+
--alert-ad: 400ms;
|
|
7
|
+
--alert-bg: var(--base-2);
|
|
8
|
+
|
|
9
|
+
--alert-bc: var(--base-4);
|
|
10
|
+
--alert-state-ic: var(--base-12);
|
|
11
|
+
--alert-close-ic: var(--base-8);
|
|
12
|
+
--alert-title-c: var(--base-12);
|
|
13
|
+
--alert-content-c: var(--base-8);
|
|
14
|
+
--alert-bs: var(--box-shadow-10);
|
|
15
|
+
--alert-p: #{p2r(8 12)};
|
|
16
|
+
|
|
17
|
+
max-height: #{p2r(300)};
|
|
18
|
+
padding-top: 0;
|
|
19
|
+
padding-bottom: 0;
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
opacity: 1;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
transition:
|
|
24
|
+
max-height var(--alert-ad) ease-in-out,
|
|
25
|
+
transform var(--alert-ad) ease-in-out,
|
|
26
|
+
opacity var(--alert-ad) ease-in-out,
|
|
27
|
+
margin-bottom var(--alert-ad) ease-in-out,
|
|
28
|
+
padding-top var(--alert-ad) ease-in-out,
|
|
29
|
+
padding-bottom var(--alert-ad) ease-in-out;
|
|
30
|
+
transform: translateY(0);
|
|
31
|
+
box-shadow: var(--alert-bs);
|
|
32
|
+
|
|
33
|
+
.alert {
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: auto 1fr auto;
|
|
36
|
+
grid-template-rows: auto auto;
|
|
37
|
+
grid-template-areas:
|
|
38
|
+
'stateIcon title closeIcon'
|
|
39
|
+
'. content .';
|
|
40
|
+
padding: var(--alert-p);
|
|
41
|
+
align-items: flex-start;
|
|
42
|
+
gap: p2r(4 8);
|
|
43
|
+
border: 1px solid var(--alert-bc);
|
|
44
|
+
border-radius: var(--shape-2);
|
|
45
|
+
background: var(--alert-bg);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.icon {
|
|
49
|
+
grid-area: stateIcon;
|
|
50
|
+
height: p2r(20);
|
|
51
|
+
width: p2r(20);
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
|
|
56
|
+
&:first-of-type:not(:empty) + .icon {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[icon],
|
|
62
|
+
.state-icon {
|
|
63
|
+
color: var(--alert-state-ic);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.close-icon {
|
|
67
|
+
grid-area: closeIcon;
|
|
68
|
+
color: var(--alert-close-ic);
|
|
69
|
+
transform: rotate(45deg);
|
|
70
|
+
transform-origin: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.title {
|
|
74
|
+
grid-area: title;
|
|
75
|
+
color: var(--alert-title-c);
|
|
76
|
+
padding-top: p2r(2);
|
|
77
|
+
font-weight: 500;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.content {
|
|
81
|
+
grid-area: content;
|
|
82
|
+
color: var(--alert-content-c);
|
|
83
|
+
|
|
84
|
+
&:empty {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.is-hidden {
|
|
90
|
+
max-height: 0;
|
|
91
|
+
padding-top: 0;
|
|
92
|
+
padding-bottom: 0;
|
|
93
|
+
opacity: 0;
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
transform: translateY(-40px);
|
|
97
|
+
|
|
98
|
+
&::before {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.animate-in {
|
|
104
|
+
transition: none;
|
|
105
|
+
max-height: 0;
|
|
106
|
+
margin-bottom: 0;
|
|
107
|
+
padding-top: 0;
|
|
108
|
+
padding-bottom: 0;
|
|
109
|
+
opacity: 0;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
transform: translateY(0px);
|
|
112
|
+
|
|
113
|
+
&::before {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.animate-out {
|
|
119
|
+
max-height: 0;
|
|
120
|
+
padding: 0;
|
|
121
|
+
opacity: 0;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
transform: translateY(-40px);
|
|
124
|
+
|
|
125
|
+
&::before {
|
|
126
|
+
opacity: 0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.primary {
|
|
131
|
+
--alert-state-ic: var(--primary-8);
|
|
132
|
+
--alert-close-ic: var(--primary-8);
|
|
133
|
+
--alert-title-c: var(--primary-8);
|
|
134
|
+
--alert-content-c: var(--primary-8);
|
|
135
|
+
--alert-bg: var(--primary-1);
|
|
136
|
+
--alert-bc: var(--primary-4);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.accent {
|
|
140
|
+
--alert-state-ic: var(--accent-8);
|
|
141
|
+
--alert-close-ic: var(--accent-8);
|
|
142
|
+
--alert-title-c: var(--accent-8);
|
|
143
|
+
--alert-content-c: var(--accent-8);
|
|
144
|
+
--alert-bg: var(--accent-1);
|
|
145
|
+
--alert-bc: var(--accent-4);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.warn {
|
|
149
|
+
--alert-state-ic: var(--warn-8);
|
|
150
|
+
--alert-close-ic: var(--warn-8);
|
|
151
|
+
--alert-title-c: var(--warn-8);
|
|
152
|
+
--alert-content-c: var(--warn-8);
|
|
153
|
+
--alert-bg: var(--warn-1);
|
|
154
|
+
--alert-bc: var(--warn-4);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.error {
|
|
158
|
+
--alert-state-ic: var(--error-8);
|
|
159
|
+
--alert-close-ic: var(--error-8);
|
|
160
|
+
--alert-title-c: var(--error-8);
|
|
161
|
+
--alert-content-c: var(--error-8);
|
|
162
|
+
--alert-bg: var(--error-1);
|
|
163
|
+
--alert-bc: var(--error-4);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.success {
|
|
167
|
+
--alert-state-ic: var(--success-8);
|
|
168
|
+
--alert-close-ic: var(--success-8);
|
|
169
|
+
--alert-title-c: var(--success-8);
|
|
170
|
+
--alert-content-c: var(--success-8);
|
|
171
|
+
--alert-bg: var(--success-1);
|
|
172
|
+
--alert-bc: var(--success-4);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.simple {
|
|
176
|
+
--alert-bc: var(--alert-bg);
|
|
177
|
+
|
|
178
|
+
&.primary {
|
|
179
|
+
--alert-content-c: var(--primary-6);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&.accent {
|
|
183
|
+
--alert-content-c: var(--accent-6);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&.warn {
|
|
187
|
+
--alert-content-c: var(--warn-6);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.error {
|
|
191
|
+
--alert-content-c: var(--error-6);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&.success {
|
|
195
|
+
--alert-content-c: var(--success-7);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.raised,
|
|
200
|
+
&.flat {
|
|
201
|
+
--alert-title-c: #fff;
|
|
202
|
+
--alert-content-c: #fff;
|
|
203
|
+
--alert-bg: var(--base-8);
|
|
204
|
+
--alert-bc: var(--alert-bg);
|
|
205
|
+
--alert-state-ic: #fff;
|
|
206
|
+
--alert-close-ic: #fff;
|
|
207
|
+
--alert-bs: none;
|
|
208
|
+
|
|
209
|
+
&.primary {
|
|
210
|
+
--alert-bg: var(--primary-8);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.accent {
|
|
214
|
+
--alert-bg: var(--accent-8);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&.warn {
|
|
218
|
+
--alert-bg: var(--warn-8);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&.error {
|
|
222
|
+
--alert-bg: var(--error-8);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&.success {
|
|
226
|
+
--alert-bg: var(--success-8);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.raised {
|
|
231
|
+
--alert-bg: var(--base-g6);
|
|
232
|
+
--alert-p: #{p2r(9 12)};
|
|
233
|
+
|
|
234
|
+
&.primary {
|
|
235
|
+
--alert-bg: var(--primary-g2);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&.accent {
|
|
239
|
+
--alert-bg: var(--accent-g2);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&.warn {
|
|
243
|
+
--alert-bg: var(--warn-g2);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&.error {
|
|
247
|
+
--alert-bg: var(--error-g2);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&.success {
|
|
251
|
+
--alert-bg: var(--success-g2);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:has(.content:empty) .alert {
|
|
256
|
+
grid-template-rows: auto;
|
|
257
|
+
grid-template-areas: 'stateIcon title closeIcon';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&:has([content]) .alert {
|
|
261
|
+
--alert-p: #{p2r(12)};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&.outlined {
|
|
265
|
+
--alert-bg: var(--base-1);
|
|
266
|
+
--alert-bc: var(--base-4);
|
|
267
|
+
--alert-title-c: var(--base-12);
|
|
268
|
+
--alert-content-c: var(--base-8);
|
|
269
|
+
--alert-close-ic: var(--base-8);
|
|
270
|
+
--alert-bs: var(--box-shadow-20);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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-c: var(--base-12);
|
|
8
|
+
--btng-ic: var(--base-12);
|
|
9
|
+
--btng-bc: var(--base-4);
|
|
10
|
+
--btng-h: #{p2r(40)};
|
|
11
|
+
--btng-p: #{p2r(0 12)};
|
|
12
|
+
--btng-s: var(--shape-2);
|
|
13
|
+
--btng-f: var(--paragraph-30);
|
|
14
|
+
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
border: 1px solid var(--btng-bc);
|
|
17
|
+
border-radius: var(--btng-s);
|
|
18
|
+
height: var(--btng-h);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
|
|
21
|
+
&.small {
|
|
22
|
+
--btng-h: #{p2r(32)};
|
|
23
|
+
--btng-p: #{p2r(0 8)};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
button {
|
|
27
|
+
border: 0;
|
|
28
|
+
flex: 1 0;
|
|
29
|
+
appearance: none;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
gap: p2r(8);
|
|
34
|
+
position: relative;
|
|
35
|
+
padding: var(--btng-p);
|
|
36
|
+
transition: color 80ms linear;
|
|
37
|
+
min-width: auto;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
outline: none;
|
|
40
|
+
line-height: inherit;
|
|
41
|
+
user-select: none;
|
|
42
|
+
appearance: none;
|
|
43
|
+
overflow: visible;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
background: var(--btng-bg);
|
|
47
|
+
color: var(--btng-c);
|
|
48
|
+
font: var(--btng-f);
|
|
49
|
+
border-left: 1px solid var(--btng-bc);
|
|
50
|
+
|
|
51
|
+
&:first-child {
|
|
52
|
+
border-left: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover,
|
|
56
|
+
&.active {
|
|
57
|
+
--btng-c: var(--base-12);
|
|
58
|
+
--btng-ic: var(--base-12);
|
|
59
|
+
--btng-bg: var(--base-3);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|