@skygraph/styles 0.0.0-placeholder.0 → 0.2.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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +92 -6
  3. package/components/autocomplete.css +33 -0
  4. package/components/avatar.css +37 -0
  5. package/components/badge.css +102 -0
  6. package/components/breadcrumb.css +29 -0
  7. package/components/button.css +181 -0
  8. package/components/calendar.css +408 -0
  9. package/components/carousel.css +102 -0
  10. package/components/cascader.css +354 -0
  11. package/components/charts.css +408 -0
  12. package/components/checkbox.css +114 -0
  13. package/components/collapse.css +166 -0
  14. package/components/colorpicker.css +252 -0
  15. package/components/context-menu.css +95 -0
  16. package/components/dashboard.css +299 -0
  17. package/components/datagrid.css +86 -0
  18. package/components/datepicker.css +601 -0
  19. package/components/descriptions.css +82 -0
  20. package/components/diagram.css +435 -0
  21. package/components/drawer.css +103 -0
  22. package/components/dropdown.css +93 -0
  23. package/components/empty.css +25 -0
  24. package/components/event-timeline.css +100 -0
  25. package/components/field.css +35 -0
  26. package/components/form.css +115 -0
  27. package/components/gantt.css +166 -0
  28. package/components/inline-edit.css +113 -0
  29. package/components/input-group.css +79 -0
  30. package/components/input-number.css +76 -0
  31. package/components/input-password.css +104 -0
  32. package/components/input.css +185 -0
  33. package/components/list.css +357 -0
  34. package/components/mentions.css +54 -0
  35. package/components/menu.css +309 -0
  36. package/components/modal.css +77 -0
  37. package/components/notification.css +128 -0
  38. package/components/pagination.css +162 -0
  39. package/components/pin-input.css +71 -0
  40. package/components/popconfirm.css +95 -0
  41. package/components/progress.css +116 -0
  42. package/components/radio.css +95 -0
  43. package/components/rate.css +34 -0
  44. package/components/resource-calendar.css +224 -0
  45. package/components/result.css +45 -0
  46. package/components/schema-form-editor.css +433 -0
  47. package/components/search-input.css +112 -0
  48. package/components/segmented.css +76 -0
  49. package/components/select.css +172 -0
  50. package/components/skeleton.css +68 -0
  51. package/components/slider.css +51 -0
  52. package/components/spin.css +86 -0
  53. package/components/steps.css +185 -0
  54. package/components/switch.css +75 -0
  55. package/components/table.css +1023 -0
  56. package/components/tabs.css +117 -0
  57. package/components/tag-input.css +94 -0
  58. package/components/tag.css +61 -0
  59. package/components/textarea.css +22 -0
  60. package/components/timeline.css +169 -0
  61. package/components/timepicker.css +213 -0
  62. package/components/tooltip.css +91 -0
  63. package/components/transfer.css +140 -0
  64. package/components/tree.css +574 -0
  65. package/components/treeselect.css +219 -0
  66. package/components/upload.css +124 -0
  67. package/index.css +69 -3
  68. package/index.d.ts +9 -0
  69. package/package.json +102 -18
  70. package/print.css +88 -0
  71. package/reset.css +17 -0
  72. package/themes/dark.css +17 -0
  73. package/themes/default.css +14 -0
  74. package/tokens.css +312 -0
  75. package/transitions.css +158 -0
@@ -0,0 +1,25 @@
1
+ .sg-empty {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ padding: var(--sg-padding-xl) 0;
7
+ text-align: center;
8
+ font-size: var(--sg-font-size);
9
+ }
10
+
11
+ .sg-empty-image {
12
+ margin-bottom: var(--sg-margin-sm);
13
+ color: var(--sg-color-text-disabled);
14
+ }
15
+
16
+ .sg-empty-description {
17
+ margin: 0 0 var(--sg-margin-sm);
18
+ color: var(--sg-color-text-tertiary);
19
+ font-size: var(--sg-font-size);
20
+ line-height: var(--sg-line-height);
21
+ }
22
+
23
+ .sg-empty-footer {
24
+ margin-top: var(--sg-margin-md);
25
+ }
@@ -0,0 +1,100 @@
1
+ /* EventTimeline — chronological event stream with optional grouping. */
2
+
3
+ .sg-event-timeline {
4
+ font-size: var(--sg-font-size);
5
+ color: var(--sg-color-text);
6
+ font-family: inherit;
7
+ gap: var(--sg-margin-md);
8
+ }
9
+
10
+ .sg-event-timeline-vertical {
11
+ align-items: stretch;
12
+ }
13
+
14
+ .sg-event-timeline-horizontal {
15
+ align-items: flex-start;
16
+ overflow-x: auto;
17
+ padding-bottom: var(--sg-padding-md);
18
+ }
19
+
20
+ .sg-event-timeline-group {
21
+ font-size: var(--sg-font-size-sm);
22
+ color: var(--sg-color-text-tertiary);
23
+ font-weight: 600;
24
+ letter-spacing: 0.04em;
25
+ text-transform: uppercase;
26
+ padding: var(--sg-padding-xs) 0;
27
+ border-bottom: 1px solid var(--sg-color-border-secondary);
28
+ }
29
+
30
+ .sg-event-timeline-horizontal .sg-event-timeline-group {
31
+ border-bottom: none;
32
+ border-right: 1px solid var(--sg-color-border-secondary);
33
+ padding: 0 var(--sg-padding-md);
34
+ align-self: stretch;
35
+ display: flex;
36
+ align-items: center;
37
+ }
38
+
39
+ .sg-event-timeline-item {
40
+ display: flex;
41
+ gap: var(--sg-margin-sm);
42
+ padding: var(--sg-padding-sm) 0;
43
+ /* Smooth color/transform transitions for hover; we only animate
44
+ * properties that touch the dot/title. */
45
+ transition: background-color var(--sg-transition-fast);
46
+ }
47
+
48
+ .sg-event-timeline-item:hover .sg-event-timeline-dot {
49
+ /* Slightly larger dot + brighter halo when the parent item is hovered.
50
+ * Both are driven by the new `--sg-event-timeline-dot-shadow-hover`
51
+ * token so the affordance remains theme-correct. */
52
+ transform: scale(1.20);
53
+ box-shadow: var(--sg-event-timeline-dot-shadow-hover);
54
+ }
55
+
56
+ .sg-event-timeline-horizontal .sg-event-timeline-item {
57
+ flex-direction: column;
58
+ min-width: 160px;
59
+ padding: 0 var(--sg-padding-md);
60
+ }
61
+
62
+ .sg-event-timeline-marker {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ flex-shrink: 0;
67
+ width: 16px;
68
+ }
69
+
70
+ .sg-event-timeline-dot {
71
+ width: 10px;
72
+ height: 10px;
73
+ border-radius: 50%;
74
+ background: var(--sg-color-primary);
75
+ display: inline-block;
76
+ /* Halo via the semantic token: outer ring of `--sg-color-bg` punches
77
+ * the dot out from the rail, inner glow uses primary-tint for depth. */
78
+ box-shadow: var(--sg-event-timeline-dot-shadow);
79
+ transition:
80
+ box-shadow var(--sg-transition-medium),
81
+ transform var(--sg-transition-medium);
82
+ }
83
+
84
+ .sg-event-timeline-content {
85
+ flex: 1;
86
+ min-width: 0;
87
+ }
88
+
89
+ .sg-event-timeline-title {
90
+ font-weight: 600;
91
+ color: var(--sg-color-text);
92
+ line-height: var(--sg-line-height);
93
+ }
94
+
95
+ .sg-event-timeline-description {
96
+ margin-top: var(--sg-margin-xs);
97
+ color: var(--sg-color-text-secondary);
98
+ font-size: var(--sg-font-size-sm);
99
+ line-height: var(--sg-line-height);
100
+ }
@@ -0,0 +1,35 @@
1
+ .sg-field {
2
+ font-size: inherit;
3
+ }
4
+
5
+ .sg-field-label {
6
+ display: block;
7
+ margin-bottom: var(--sg-margin-xs);
8
+ color: var(--sg-color-text);
9
+ font-size: var(--sg-font-size);
10
+ line-height: var(--sg-line-height);
11
+ }
12
+
13
+ .sg-field-required {
14
+ color: var(--sg-color-error);
15
+ margin-left: 2px;
16
+ }
17
+
18
+ .sg-field-control {
19
+ position: relative;
20
+ }
21
+
22
+ .sg-field-error {
23
+ color: var(--sg-color-error);
24
+ font-size: var(--sg-font-size-sm);
25
+ margin-top: var(--sg-margin-xs);
26
+ line-height: var(--sg-line-height);
27
+ }
28
+
29
+ .sg-field-has-error .sg-input {
30
+ --sg-input-border: var(--sg-color-error);
31
+ }
32
+
33
+ .sg-field-has-error .sg-input:focus {
34
+ box-shadow: 0 0 0 2px var(--sg-color-error-bg);
35
+ }
@@ -0,0 +1,115 @@
1
+ .sg-form {
2
+ font-size: var(--sg-font-size);
3
+ color: var(--sg-color-text);
4
+ }
5
+
6
+ /* Layouts */
7
+ .sg-form-vertical .sg-field {
8
+ margin-bottom: var(--sg-margin-md);
9
+ }
10
+
11
+ .sg-form-horizontal .sg-field {
12
+ display: flex;
13
+ align-items: flex-start;
14
+ margin-bottom: var(--sg-margin-md);
15
+ }
16
+
17
+ .sg-form-horizontal .sg-field-label {
18
+ flex-shrink: 0;
19
+ min-width: 80px;
20
+ padding-top: 5px;
21
+ padding-right: var(--sg-padding-md);
22
+ text-align: right;
23
+ }
24
+
25
+ .sg-form-inline {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ gap: var(--sg-margin-md);
29
+ }
30
+
31
+ .sg-form-inline .sg-field {
32
+ display: flex;
33
+ align-items: center;
34
+ gap: var(--sg-padding-sm);
35
+ }
36
+
37
+ /* Sizes */
38
+ .sg-form-small {
39
+ font-size: var(--sg-font-size-sm);
40
+ }
41
+
42
+ .sg-form-large {
43
+ font-size: var(--sg-font-size-lg);
44
+ }
45
+
46
+ /* Disabled */
47
+ .sg-form-disabled {
48
+ opacity: 0.65;
49
+ pointer-events: none;
50
+ }
51
+
52
+ /* Field label */
53
+ .sg-field-label {
54
+ display: block;
55
+ margin-bottom: 4px;
56
+ font-weight: 500;
57
+ color: var(--sg-color-text);
58
+ font-size: var(--sg-font-size);
59
+ line-height: 1.5;
60
+ }
61
+
62
+ .sg-field-required {
63
+ color: var(--sg-color-error);
64
+ margin-left: 2px;
65
+ }
66
+
67
+ .sg-field-optional {
68
+ color: var(--sg-color-text-tertiary);
69
+ font-weight: 400;
70
+ font-size: 0.85em;
71
+ margin-left: 4px;
72
+ }
73
+
74
+ /* Field error */
75
+ .sg-field-error {
76
+ color: var(--sg-color-error);
77
+ font-size: var(--sg-font-size-sm);
78
+ margin-top: 4px;
79
+ line-height: 1.4;
80
+ }
81
+
82
+ .sg-field-has-error .sg-input,
83
+ .sg-field-has-error .sg-textarea,
84
+ .sg-field-has-error .sg-select-trigger,
85
+ .sg-field-has-error .sg-input-number-input {
86
+ border-color: var(--sg-color-error);
87
+ }
88
+
89
+ .sg-field-has-error .sg-input:focus,
90
+ .sg-field-has-error .sg-textarea:focus {
91
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--sg-color-error) 10%, transparent);
92
+ }
93
+
94
+ /* Field help */
95
+ .sg-field-help {
96
+ color: var(--sg-color-text-tertiary);
97
+ font-size: var(--sg-font-size-sm, 12px);
98
+ margin-top: 4px;
99
+ line-height: 1.4;
100
+ }
101
+
102
+ /* Field extra */
103
+ .sg-field-extra {
104
+ color: var(--sg-color-text-secondary);
105
+ font-size: var(--sg-font-size-sm, 12px);
106
+ margin-top: 4px;
107
+ line-height: 1.4;
108
+ }
109
+
110
+ /* Horizontal layout label/control wrappers — width and text-align come
111
+ * from the React component as inline overrides (computed from `labelCol`
112
+ * / `wrapperCol` props), so this rule only locks down the static parts. */
113
+ .sg-field-label-wrap {
114
+ flex-shrink: 0;
115
+ }
@@ -0,0 +1,166 @@
1
+ /* Gantt — task bars over a discrete time axis. */
2
+
3
+ .sg-gantt {
4
+ background: var(--sg-color-bg);
5
+ border: 1px solid var(--sg-color-border);
6
+ border-radius: var(--sg-border-radius);
7
+ font-size: var(--sg-font-size);
8
+ color: var(--sg-color-text);
9
+ font-family: inherit;
10
+ }
11
+
12
+ .sg-gantt-sidebar {
13
+ background: var(--sg-color-bg-container);
14
+ border-right: 1px solid var(--sg-color-border);
15
+ overflow: hidden;
16
+ }
17
+
18
+ .sg-gantt-sidebar-header {
19
+ border-bottom: 1px solid var(--sg-color-border);
20
+ background: var(--sg-color-bg-elevated);
21
+ }
22
+
23
+ .sg-gantt-sidebar-row {
24
+ display: flex;
25
+ align-items: center;
26
+ padding: 0 var(--sg-padding-md);
27
+ border-bottom: 1px solid var(--sg-color-border-secondary);
28
+ color: var(--sg-color-text);
29
+ font-size: var(--sg-font-size-sm);
30
+ white-space: nowrap;
31
+ overflow: hidden;
32
+ text-overflow: ellipsis;
33
+ }
34
+
35
+ .sg-gantt-main {
36
+ background: var(--sg-color-bg);
37
+ position: relative;
38
+ }
39
+
40
+ .sg-gantt-header {
41
+ background: var(--sg-color-bg-elevated);
42
+ border-bottom: 1px solid var(--sg-color-border);
43
+ }
44
+
45
+ .sg-gantt-tick {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: flex-start;
49
+ padding: 0 var(--sg-padding-xs);
50
+ font-size: var(--sg-font-size-sm);
51
+ color: var(--sg-color-text-secondary);
52
+ border-right: 1px solid var(--sg-color-border-secondary);
53
+ box-sizing: border-box;
54
+ /* Clip the label when the tick is narrower than the rendered text
55
+ * (e.g. day scale with columnWidth=24) — without this, adjacent
56
+ * labels visually pile up on each other. */
57
+ overflow: hidden;
58
+ white-space: nowrap;
59
+ }
60
+
61
+ .sg-gantt-grid {
62
+ /* Background grid of vertical column dividers — repeated linear-gradient
63
+ * over `--sg-gantt-column-width` (set via inline style by the component). */
64
+ }
65
+
66
+ .sg-gantt-row {
67
+ border-bottom: 1px solid var(--sg-color-border-secondary);
68
+ }
69
+
70
+ .sg-gantt-row:nth-child(even) {
71
+ background: var(--sg-color-bg-secondary);
72
+ }
73
+
74
+ .sg-gantt-bar {
75
+ background: var(--sg-color-primary);
76
+ color: var(--sg-color-white);
77
+ border-radius: var(--sg-border-radius-sm);
78
+ display: flex;
79
+ align-items: center;
80
+ padding: 0 var(--sg-padding-xs);
81
+ font-size: var(--sg-font-size-sm);
82
+ white-space: nowrap;
83
+ overflow: hidden;
84
+ /* The shadow token includes both an outer drop and an inner highlight,
85
+ * giving each bar a tiny 3D feel without any borders. Keeps a dense
86
+ * gantt looking organised even when bars overlap rows. */
87
+ box-shadow: var(--sg-gantt-bar-shadow);
88
+ box-sizing: border-box;
89
+ transition:
90
+ box-shadow var(--sg-transition-medium),
91
+ transform var(--sg-transition-medium),
92
+ filter var(--sg-transition-fast);
93
+ }
94
+
95
+ .sg-gantt-bar:hover {
96
+ box-shadow: var(--sg-gantt-bar-shadow-hover);
97
+ /* `filter: brightness(1.05)` lifts saturated bars without needing a
98
+ * dedicated "primary-hover" colour for every status. Negligible cost
99
+ * on modern compositors. */
100
+ filter: brightness(1.05);
101
+ transform: translateY(-1px);
102
+ }
103
+
104
+ .sg-gantt-bar-draggable {
105
+ cursor: grab;
106
+ }
107
+
108
+ .sg-gantt-bar-draggable:active {
109
+ cursor: grabbing;
110
+ transform: translateY(0);
111
+ filter: brightness(1.08);
112
+ }
113
+
114
+ .sg-gantt-bar-resizable {
115
+ /* hover state expands the resize handle visibility */
116
+ }
117
+
118
+ .sg-gantt-bar-progress {
119
+ background: var(--sg-color-primary-active);
120
+ border-radius: inherit;
121
+ opacity: 0.55;
122
+ pointer-events: none;
123
+ }
124
+
125
+ .sg-gantt-bar-label {
126
+ text-overflow: ellipsis;
127
+ overflow: hidden;
128
+ /* Drop-shadow on the text increases legibility on saturated bar
129
+ * fills (esp. the bright primary blue). Cheap, single-line filter
130
+ * that doesn't disturb the bar background. */
131
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
132
+ }
133
+
134
+ .sg-gantt-bar-resize {
135
+ background: transparent;
136
+ border-left: 1px solid var(--sg-color-border-secondary);
137
+ opacity: 0;
138
+ transition: opacity var(--sg-transition-fast);
139
+ }
140
+
141
+ .sg-gantt-bar:hover .sg-gantt-bar-resize {
142
+ opacity: 0.6;
143
+ }
144
+
145
+ .sg-gantt-bar-resize:hover,
146
+ .sg-gantt-bar-resize:focus-visible {
147
+ opacity: 1;
148
+ }
149
+
150
+ .sg-gantt-deps {
151
+ color: var(--sg-gantt-dep-color);
152
+ }
153
+
154
+ .sg-gantt-dep {
155
+ /* stroke + marker colour come from `currentColor` set on .sg-gantt-deps.
156
+ * `stroke-linecap: round` + a slightly thicker stroke give dependency
157
+ * lines a hand-drawn feel that distinguishes them from grid lines. */
158
+ stroke-linecap: round;
159
+ stroke-linejoin: round;
160
+ stroke-width: 1.25;
161
+ transition: stroke var(--sg-transition-fast);
162
+ }
163
+
164
+ .sg-gantt-dep:hover {
165
+ stroke: var(--sg-color-primary);
166
+ }
@@ -0,0 +1,113 @@
1
+ /* InlineEdit */
2
+ .sg-inline-edit-view {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: var(--sg-padding-xs);
6
+ padding: var(--sg-padding-xs) var(--sg-padding-sm);
7
+ min-height: var(--sg-height-md);
8
+ border-radius: var(--sg-border-radius);
9
+ border: 1px dashed transparent;
10
+ cursor: pointer;
11
+ color: var(--sg-color-text);
12
+ font-size: var(--sg-font-size);
13
+ line-height: var(--sg-line-height);
14
+ transition: all var(--sg-transition-duration) var(--sg-transition-timing);
15
+ }
16
+
17
+ .sg-inline-edit-view:hover {
18
+ background: var(--sg-color-bg-hover);
19
+ border-color: var(--sg-color-border);
20
+ }
21
+
22
+ .sg-inline-edit-view:focus-visible {
23
+ border-color: var(--sg-color-primary);
24
+ box-shadow: 0 0 0 2px var(--sg-color-primary-bg);
25
+ outline: none;
26
+ }
27
+
28
+ .sg-inline-edit-view-placeholder {
29
+ color: var(--sg-color-text-placeholder);
30
+ }
31
+
32
+ .sg-inline-edit-view-disabled {
33
+ cursor: default;
34
+ opacity: 0.65;
35
+ }
36
+
37
+ .sg-inline-edit-view-disabled:hover {
38
+ background: transparent;
39
+ border-color: transparent;
40
+ }
41
+
42
+ .sg-inline-edit-pencil {
43
+ color: var(--sg-color-text-tertiary);
44
+ font-size: var(--sg-font-size-sm);
45
+ opacity: 0;
46
+ transition: opacity var(--sg-transition-duration) var(--sg-transition-timing);
47
+ }
48
+
49
+ .sg-inline-edit-view:hover .sg-inline-edit-pencil {
50
+ opacity: 1;
51
+ }
52
+
53
+ /* Editing state */
54
+ .sg-inline-edit {
55
+ display: inline-flex;
56
+ align-items: center;
57
+ gap: var(--sg-padding-xs);
58
+ }
59
+
60
+ .sg-inline-edit-input {
61
+ flex: 1;
62
+ }
63
+
64
+ .sg-inline-edit-actions {
65
+ display: flex;
66
+ gap: 2px;
67
+ }
68
+
69
+ .sg-inline-edit-btn {
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: center;
73
+ width: 24px;
74
+ height: 24px;
75
+ padding: 0;
76
+ border: 1px solid var(--sg-color-border);
77
+ border-radius: var(--sg-border-radius-sm);
78
+ cursor: pointer;
79
+ font-size: var(--sg-font-size-sm);
80
+ transition: all var(--sg-transition-duration) var(--sg-transition-timing);
81
+ }
82
+
83
+ .sg-inline-edit-btn-save {
84
+ background: var(--sg-color-primary);
85
+ border-color: var(--sg-color-primary);
86
+ color: var(--sg-color-white);
87
+ }
88
+
89
+ .sg-inline-edit-btn-save:hover {
90
+ background: var(--sg-color-primary-hover);
91
+ }
92
+
93
+ .sg-inline-edit-btn-cancel {
94
+ background: var(--sg-color-bg-container);
95
+ color: var(--sg-color-text-secondary);
96
+ }
97
+
98
+ .sg-inline-edit-btn-cancel:hover {
99
+ border-color: var(--sg-color-text-secondary);
100
+ }
101
+
102
+ /* Sizes */
103
+ .sg-inline-edit-view-small {
104
+ min-height: var(--sg-height-sm);
105
+ font-size: var(--sg-font-size-sm);
106
+ padding: 2px var(--sg-padding-xs);
107
+ }
108
+
109
+ .sg-inline-edit-view-large {
110
+ min-height: var(--sg-height-lg);
111
+ font-size: var(--sg-font-size-lg);
112
+ padding: var(--sg-padding-sm) var(--sg-padding-md);
113
+ }
@@ -0,0 +1,79 @@
1
+ /* InputGroup */
2
+ .sg-input-group {
3
+ display: inline-flex;
4
+ align-items: stretch;
5
+ width: 100%;
6
+ }
7
+
8
+ .sg-input-group-addon {
9
+ display: flex;
10
+ align-items: center;
11
+ padding: 0 var(--sg-padding-md);
12
+ background: var(--sg-color-bg-secondary);
13
+ border: 1px solid var(--sg-color-border);
14
+ color: var(--sg-color-text-secondary);
15
+ font-size: var(--sg-font-size);
16
+ white-space: nowrap;
17
+ }
18
+
19
+ .sg-input-group-addon:first-child {
20
+ border-right: none;
21
+ border-radius: var(--sg-border-radius) 0 0 var(--sg-border-radius);
22
+ }
23
+
24
+ .sg-input-group-addon:last-child {
25
+ border-left: none;
26
+ border-radius: 0 var(--sg-border-radius) var(--sg-border-radius) 0;
27
+ }
28
+
29
+ /* Compact: nested inputs lose middle radii */
30
+ .sg-input-group-compact > .sg-input-wrapper:not(:first-child):not(:last-child) .sg-input,
31
+ .sg-input-group-compact > .sg-select:not(:first-child):not(:last-child) .sg-select-selector,
32
+ .sg-input-group-compact > .sg-input:not(:first-child):not(:last-child) {
33
+ border-radius: 0;
34
+ }
35
+
36
+ .sg-input-group-compact > .sg-input-wrapper:first-child .sg-input,
37
+ .sg-input-group-compact > .sg-select:first-child .sg-select-selector,
38
+ .sg-input-group-compact > .sg-input:first-child {
39
+ border-top-right-radius: 0;
40
+ border-bottom-right-radius: 0;
41
+ }
42
+
43
+ .sg-input-group-compact > .sg-input-wrapper:last-child .sg-input,
44
+ .sg-input-group-compact > .sg-select:last-child .sg-select-selector,
45
+ .sg-input-group-compact > .sg-input:last-child {
46
+ border-top-left-radius: 0;
47
+ border-bottom-left-radius: 0;
48
+ }
49
+
50
+ .sg-input-group-compact > .sg-input-group-addon + .sg-input-wrapper .sg-input,
51
+ .sg-input-group-compact > .sg-input-group-addon + .sg-input {
52
+ border-top-left-radius: 0;
53
+ border-bottom-left-radius: 0;
54
+ }
55
+
56
+ /* When addon is before, the input after should not have left radius */
57
+ .sg-input-group > .sg-input-group-addon + * .sg-input,
58
+ .sg-input-group > .sg-input-group-addon + .sg-input {
59
+ border-top-left-radius: 0;
60
+ border-bottom-left-radius: 0;
61
+ }
62
+
63
+ /* When there's an addon after, the element before should not have right radius */
64
+ .sg-input-group > *:has(+ .sg-input-group-addon) .sg-input,
65
+ .sg-input-group > .sg-input:has(+ .sg-input-group-addon) {
66
+ border-top-right-radius: 0;
67
+ border-bottom-right-radius: 0;
68
+ }
69
+
70
+ /* Sizes */
71
+ .sg-input-group-small .sg-input-group-addon {
72
+ padding: 0 var(--sg-padding-sm);
73
+ font-size: var(--sg-font-size-sm);
74
+ }
75
+
76
+ .sg-input-group-large .sg-input-group-addon {
77
+ padding: 0 var(--sg-padding-lg);
78
+ font-size: var(--sg-font-size-lg);
79
+ }
@@ -0,0 +1,76 @@
1
+ .sg-input-number {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ border: 1px solid var(--sg-color-border);
5
+ border-radius: var(--sg-border-radius);
6
+ overflow: hidden;
7
+ --sg-spin-color: var(--sg-color-text-tertiary);
8
+ }
9
+
10
+ .sg-input-number-loading {
11
+ opacity: 0.65;
12
+ }
13
+
14
+ .sg-input-number .sg-spin {
15
+ margin-right: var(--sg-padding-xs);
16
+ }
17
+
18
+ .sg-input-number-btn {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ width: var(--sg-height-md);
23
+ height: var(--sg-height-md);
24
+ border: none;
25
+ background: var(--sg-color-bg-secondary);
26
+ color: var(--sg-color-text);
27
+ cursor: pointer;
28
+ font-size: var(--sg-font-size);
29
+ user-select: none;
30
+ transition: background var(--sg-transition-duration);
31
+ }
32
+
33
+ .sg-input-number-btn:hover:not(:disabled) {
34
+ background: var(--sg-color-bg-hover);
35
+ }
36
+
37
+ .sg-input-number-btn:disabled {
38
+ color: var(--sg-color-text-disabled);
39
+ cursor: not-allowed;
40
+ }
41
+
42
+ .sg-input-number-input {
43
+ /* `flex: 1 1 60px` keeps the natural 60px default width when the wrapper
44
+ is sized intrinsically (inline-flex) and lets the field fill the space
45
+ when consumers stretch the wrapper via `style={{ width: '100%' }}` etc.
46
+ `min-width: 0` lets the input shrink inside narrow containers. */
47
+ flex: 1 1 60px;
48
+ min-width: 0;
49
+ height: var(--sg-height-md);
50
+ border: none;
51
+ text-align: center;
52
+ font-size: var(--sg-font-size);
53
+ color: var(--sg-color-text);
54
+ background: var(--sg-color-bg-container);
55
+ outline: none;
56
+ font-family: inherit;
57
+ }
58
+
59
+ .sg-input-number-small .sg-input-number-btn {
60
+ width: var(--sg-height-sm);
61
+ height: var(--sg-height-sm);
62
+ }
63
+ .sg-input-number-small .sg-input-number-input {
64
+ height: var(--sg-height-sm);
65
+ flex-basis: 48px;
66
+ font-size: var(--sg-font-size-sm);
67
+ }
68
+ .sg-input-number-large .sg-input-number-btn {
69
+ width: var(--sg-height-lg);
70
+ height: var(--sg-height-lg);
71
+ }
72
+ .sg-input-number-large .sg-input-number-input {
73
+ height: var(--sg-height-lg);
74
+ flex-basis: 72px;
75
+ font-size: var(--sg-font-size-lg);
76
+ }