@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,192 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipSidenav: true !default;
4
+
5
+ @if $shipSidenav == true {
6
+ sh-sidenav {
7
+ --sidenav-width: #{p2r(280)};
8
+ --sidenav-wrap-w: 100vw;
9
+ --sidenav-wrap-h: 100vh;
10
+
11
+ display: flex;
12
+ width: var(--sidenav-wrap-w);
13
+ height: var(--sidenav-wrap-h);
14
+
15
+ .sidenav {
16
+ width: var(--sidenav-width);
17
+ transition: width 200ms linear;
18
+ height: 100%;
19
+ overflow-x: hidden;
20
+ overflow-y: auto;
21
+ -webkit-overflow-scrolling: auto;
22
+ }
23
+
24
+ .main-wrap {
25
+ position: relative;
26
+ z-index: 1;
27
+ flex: 1 0;
28
+ display: block;
29
+ height: 100%;
30
+ overflow: auto;
31
+ padding: p2r(16 16 16 0);
32
+ }
33
+
34
+ main {
35
+ overflow-x: hidden;
36
+ overflow-y: auto;
37
+ -webkit-overflow-scrolling: auto;
38
+ background-color: var(--base-1);
39
+ border: 1px solid var(--base-4);
40
+ border-radius: var(--shape-3);
41
+ height: calc(100vh - 2rem);
42
+ box-shadow: var(--box-shadow-35);
43
+ }
44
+
45
+ .closed-topbar {
46
+ display: none;
47
+ min-height: p2r(60);
48
+ background-color: var(--base-1);
49
+ align-items: center;
50
+ justify-content: space-between;
51
+ padding: p2r(0 16);
52
+ border-bottom: 1px solid var(--base-4);
53
+ z-index: 10000;
54
+ position: relative;
55
+ }
56
+
57
+ .dragable {
58
+ display: none;
59
+ }
60
+
61
+ .drag-image {
62
+ display: none;
63
+ }
64
+
65
+ &.simple {
66
+ border-radius: 0;
67
+
68
+ .main-wrap {
69
+ padding: 0;
70
+
71
+ main {
72
+ height: 100vh;
73
+ border-radius: 0;
74
+ border-width: 0 0 0 1px;
75
+ }
76
+ }
77
+
78
+ &.closed {
79
+ --sidenav-width: #{p2r(100)};
80
+ }
81
+ }
82
+
83
+ &.overlay {
84
+ overflow: hidden;
85
+
86
+ .drag-image {
87
+ display: block;
88
+ width: p2r(4);
89
+ height: 40%;
90
+ background-color: var(--base-2);
91
+ border-radius: p2r(2);
92
+ box-shadow: none;
93
+ position: fixed;
94
+ top: 0;
95
+ left: -9999px;
96
+ }
97
+
98
+ .sidenav {
99
+ position: fixed;
100
+ z-index: 0;
101
+ }
102
+
103
+ .dragable {
104
+ position: absolute;
105
+ top: 0;
106
+ left: 0;
107
+ bottom: 0;
108
+ z-index: 9999;
109
+ width: 50px;
110
+ padding-right: 30px;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ cursor: grab;
115
+
116
+ &:active {
117
+ cursor: grabbing;
118
+ }
119
+
120
+ &:after {
121
+ content: '';
122
+ display: block;
123
+ width: p2r(4);
124
+ height: 40%;
125
+ background-color: var(--base-2);
126
+ border-radius: p2r(2);
127
+ }
128
+
129
+ &:hover {
130
+ &:after {
131
+ background-color: var(--base-4);
132
+ }
133
+ }
134
+ }
135
+
136
+ .dropping-surface {
137
+ position: fixed;
138
+ top: 0;
139
+ left: 0;
140
+ bottom: 0;
141
+ right: 0;
142
+ z-index: 100000;
143
+ }
144
+
145
+ .main-wrap {
146
+ z-index: 1;
147
+ padding: 0;
148
+ display: flex;
149
+ height: 100vh;
150
+ position: relative;
151
+ flex-direction: column;
152
+ transform: translateX(0);
153
+ transition: transform 200ms linear;
154
+ }
155
+
156
+ &.is-dragging {
157
+ user-select: none;
158
+ cursor: grabbing;
159
+
160
+ .main-wrap {
161
+ transition: none;
162
+ }
163
+
164
+ > * {
165
+ cursor: grabbing;
166
+ }
167
+
168
+ .dragable {
169
+ cursor: grabbing;
170
+ }
171
+ }
172
+
173
+ &.open .main-wrap {
174
+ transform: translateX(var(--sidenav-width));
175
+ }
176
+
177
+ .closed-topbar {
178
+ display: flex;
179
+
180
+ &:empty {
181
+ display: none;
182
+ }
183
+ }
184
+
185
+ main {
186
+ border: 0;
187
+ box-shadow: none;
188
+ flex: 1 0;
189
+ }
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,54 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipSortable: true !default;
4
+
5
+ @if $shipSortable == true {
6
+ [shSortable] {
7
+ position: relative;
8
+
9
+ &.dragging {
10
+ [draggable] {
11
+ transition: transform 40ms linear;
12
+ }
13
+ }
14
+
15
+ [draggable] {
16
+ height: auto;
17
+ transform: translate(0);
18
+ transition: none;
19
+ z-index: 2;
20
+ background: var(--base-1);
21
+
22
+ &:has(:not([sort-handle])) {
23
+ cursor: grab;
24
+ }
25
+ }
26
+
27
+ .sortable-placeholder {
28
+ position: absolute;
29
+ top: 0;
30
+ z-index: 1;
31
+
32
+ &.active {
33
+ z-index: 1;
34
+ background-color: var(--base-6);
35
+ border: 1px solid var(--base-8);
36
+ opacity: 0.5;
37
+ }
38
+ }
39
+
40
+ .sortable-ghost,
41
+ .sortable-ghost.active {
42
+ opacity: 1;
43
+ }
44
+
45
+ .sortable-dragged-el.active,
46
+ .sortable-dragged-el {
47
+ opacity: 0;
48
+ }
49
+
50
+ [sort-handle] {
51
+ cursor: grab;
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,53 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipSpinner: true !default;
4
+
5
+ @if $shipSpinner == true {
6
+ sh-spinner {
7
+ --spinner-c: var(--base-8);
8
+ --spinner-size: #{p2r(40)};
9
+ --spinner-thickness: #{p2r(5)};
10
+
11
+ width: var(--spinner-size);
12
+ height: var(--spinner-size);
13
+ display: grid;
14
+ place-content: center;
15
+ color: var(--spinner-c);
16
+ position: relative;
17
+
18
+ &:before {
19
+ content: '';
20
+ width: var(--spinner-size);
21
+ height: var(--spinner-size);
22
+ border: var(--spinner-thickness) solid currentColor;
23
+ border-bottom-color: transparent;
24
+ border-radius: 50%;
25
+ display: flex;
26
+ box-sizing: border-box;
27
+ animation: rotation 1s linear infinite;
28
+ margin: auto;
29
+ inset: 0;
30
+ position: absolute;
31
+ }
32
+
33
+ &.primary {
34
+ --spinner-c: var(--primary-8);
35
+ }
36
+
37
+ &.accent {
38
+ --spinner-c: var(--accent-8);
39
+ }
40
+
41
+ &.warn {
42
+ --spinner-c: var(--warn-8);
43
+ }
44
+
45
+ &.error {
46
+ --spinner-c: var(--error-8);
47
+ }
48
+
49
+ &.success {
50
+ --spinner-c: var(--success-8);
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,138 @@
1
+ @use '../helpers.scss' as *;
2
+
3
+ $shipStepper: true !default;
4
+
5
+ @if $shipStepper == true {
6
+ sh-stepper {
7
+ --step-track-bg: var(--base-3);
8
+ --step-c: var(--base-6);
9
+ --step-radio-cbg: var(--base-1);
10
+ --step-radio-c: var(--base-g2);
11
+ --step-active-c: var(--base-8);
12
+
13
+ display: flex;
14
+ flex-wrap: nowrap;
15
+ width: 100%;
16
+ position: relative;
17
+ overflow: hidden;
18
+
19
+ &.primary {
20
+ --step-c: var(--primary-6);
21
+ --step-radio-cbg: var(--primary-1);
22
+ --step-radio-c: var(--primary-g2);
23
+ --step-active-c: var(--primary-8);
24
+ }
25
+
26
+ &.accent {
27
+ --step-c: var(--accent-6);
28
+ --step-radio-cbg: var(--accent-1);
29
+ --step-radio-c: var(--accent-g2);
30
+ --step-active-c: var(--accent-8);
31
+ }
32
+
33
+ &.warn {
34
+ --step-c: var(--warn-6);
35
+ --step-radio-cbg: var(--warn-1);
36
+ --step-radio-c: var(--warn-g2);
37
+ --step-active-c: var(--warn-8);
38
+ }
39
+
40
+ &.error {
41
+ --step-c: var(--error-6);
42
+ --step-radio-cbg: var(--error-1);
43
+ --step-radio-c: var(--error-g2);
44
+ --step-active-c: var(--error-8);
45
+ }
46
+
47
+ &.success {
48
+ --step-c: var(--success-6);
49
+ --step-radio-cbg: var(--success-1);
50
+ --step-radio-c: var(--success-g2);
51
+ --step-active-c: var(--success-8);
52
+ }
53
+
54
+ [step] {
55
+ flex: 2 0;
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ justify-content: center;
60
+ gap: p2r(8);
61
+ position: relative;
62
+ color: var(--base-8);
63
+ cursor: pointer;
64
+ user-select: none;
65
+
66
+ &:first-child {
67
+ align-items: flex-start;
68
+ flex: 1 0;
69
+ }
70
+
71
+ &:last-child {
72
+ align-items: flex-end;
73
+ flex: 1 0;
74
+ }
75
+
76
+ &:not(.active) sh-radio {
77
+ z-index: 10;
78
+ }
79
+
80
+ &:has(~ [step].active) {
81
+ sh-radio {
82
+ --radiod-o: 1;
83
+
84
+ .radio {
85
+ border-width: 0;
86
+ background: var(--step-radio-c);
87
+ }
88
+ }
89
+ }
90
+
91
+ sh-radio {
92
+ .radio {
93
+ --radiod-c: var(--step-radio-cbg);
94
+
95
+ width: p2r(16);
96
+ height: p2r(16);
97
+ }
98
+ }
99
+
100
+ &.active {
101
+ color: var(--step-active-c);
102
+ outline: none;
103
+
104
+ sh-radio {
105
+ z-index: 0;
106
+ --radiod-o: 1;
107
+
108
+ .radio {
109
+ border-width: 0;
110
+ background: var(--step-radio-c);
111
+ }
112
+
113
+ &:before {
114
+ content: '';
115
+ position: absolute;
116
+ top: p2r(6);
117
+ left: -9999px;
118
+ z-index: -1;
119
+ right: 0;
120
+ height: p2r(4);
121
+ background-color: var(--step-active-c);
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ &:before {
128
+ content: '';
129
+ position: absolute;
130
+ top: p2r(6);
131
+ left: 0;
132
+ z-index: 0;
133
+ right: 0;
134
+ height: p2r(4);
135
+ background-color: var(--step-track-bg);
136
+ }
137
+ }
138
+ }