astrum-ui 0.1.11 → 0.1.13

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.
@@ -28,6 +28,22 @@
28
28
  transition: border-color 0.15s, box-shadow 0.15s;
29
29
  }
30
30
 
31
+ .astrum-select__separator {
32
+ display: flex;
33
+ align-items: center;
34
+ align-self: stretch;
35
+ padding: 16px 24px;
36
+ border-right: 1px solid var(--astrum-gray-20);
37
+ border-top-left-radius: 8px;
38
+ border-bottom-left-radius: 8px;
39
+ background-color: var(--astrum-gray-5);
40
+ color: #5988ff;
41
+ font-size: 16px;
42
+ font-weight: 400;
43
+ line-height: 1.5;
44
+ white-space: nowrap;
45
+ }
46
+
31
47
  .astrum-select--open .astrum-select__wrap {
32
48
  border-color: var(--astrum-primary);
33
49
  box-shadow: 0 0 0 1px var(--astrum-primary);
@@ -67,6 +83,13 @@
67
83
  text-align: left;
68
84
  }
69
85
 
86
+ .astrum-select--split .astrum-select__trigger {
87
+ border-top-left-radius: 0;
88
+ border-bottom-left-radius: 0;
89
+ padding-left: 24px;
90
+ padding-right: 16px;
91
+ }
92
+
70
93
  .astrum-select__trigger:disabled {
71
94
  cursor: not-allowed;
72
95
  color: var(--astrum-gray-40);
@@ -94,6 +117,12 @@
94
117
  transition: transform 0.2s ease;
95
118
  }
96
119
 
120
+ .astrum-select__chevron svg {
121
+ display: block;
122
+ width: 24px;
123
+ height: 24px;
124
+ }
125
+
97
126
  .astrum-select__chevron--open {
98
127
  transform: rotate(180deg);
99
128
  }
@@ -219,3 +248,40 @@
219
248
  opacity: 0.6;
220
249
  }
221
250
 
251
+ @media (max-width: 767px) {
252
+ .astrum-select__container {
253
+ display: block;
254
+ width: 100%;
255
+ max-width: 100%;
256
+ }
257
+
258
+ .astrum-select {
259
+ min-width: 0;
260
+ width: 100%;
261
+ max-width: 100%;
262
+ }
263
+
264
+ .astrum-select__separator {
265
+ padding: 14px 16px;
266
+ font-size: 12px;
267
+ font-weight: 500;
268
+ line-height: normal;
269
+ }
270
+
271
+ .astrum-select__trigger {
272
+ padding: 12px 12px 12px 16px;
273
+ gap: 4px;
274
+ font-size: 12px;
275
+ font-weight: 500;
276
+ line-height: normal;
277
+ }
278
+
279
+ .astrum-select--split .astrum-select__trigger {
280
+ padding: 12px 12px 12px 16px;
281
+ }
282
+
283
+ .astrum-select__chevron svg {
284
+ width: 20px;
285
+ height: 20px;
286
+ }
287
+ }
package/dist/index.d.mts CHANGED
@@ -100,6 +100,7 @@ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>
100
100
  options: SelectOption[];
101
101
  placeholder?: string;
102
102
  className?: string;
103
+ separator?: string;
103
104
  }
104
105
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
105
106
 
package/dist/index.d.ts CHANGED
@@ -100,6 +100,7 @@ interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>
100
100
  options: SelectOption[];
101
101
  placeholder?: string;
102
102
  className?: string;
103
+ separator?: string;
103
104
  }
104
105
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
105
106
 
package/dist/index.js CHANGED
@@ -755,6 +755,7 @@ var Select = React8.forwardRef(
755
755
  options,
756
756
  placeholder,
757
757
  className = "",
758
+ separator,
758
759
  id: idProp,
759
760
  value,
760
761
  defaultValue,
@@ -828,9 +829,10 @@ var Select = React8.forwardRef(
828
829
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
829
830
  "div",
830
831
  {
831
- className: `astrum-select ${error ? "astrum-select--error" : ""} ${isOpen ? "astrum-select--open" : ""} ${className}`.trim(),
832
+ className: `astrum-select ${error ? "astrum-select--error" : ""} ${isOpen ? "astrum-select--open" : ""} ${separator != null ? "astrum-select--split" : ""} ${className}`.trim(),
832
833
  children: [
833
834
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "astrum-select__wrap", children: [
835
+ separator != null && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "astrum-select__separator", children: separator }),
834
836
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
835
837
  "select",
836
838
  {