@konstructio/ui 0.1.0-alpha.7 → 0.1.0-alpha.8

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.
@@ -0,0 +1,11 @@
1
+ import { c as o } from "./createLucideIcon-ByJ0JZvK.js";
2
+ /**
3
+ * @license lucide-react v0.513.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], e = o("chevron-down", n);
9
+ export {
10
+ e as C
11
+ };
@@ -2,9 +2,9 @@ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
2
  import { useRef as v, useState as w, useCallback as x, useEffect as y } from "react";
3
3
  import { cn as u } from "../../utils/index.js";
4
4
  import { buttonDismissVariants as M, badgeVariants as Z } from "./Badge.variants.js";
5
- import { c as N } from "../../createLucideIcon-vyksFS6P.js";
5
+ import { c as N } from "../../createLucideIcon-ByJ0JZvK.js";
6
6
  /**
7
- * @license lucide-react v0.511.0 - ISC
7
+ * @license lucide-react v0.513.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
@@ -218,7 +218,7 @@ const o = r(
218
218
  "colony:text-zinc-400",
219
219
  "civo:bg-white",
220
220
  "civo:border-white",
221
- "civo:text-zinc-400"
221
+ "civo:text-civo-primary/45"
222
222
  ]
223
223
  },
224
224
  {
@@ -12,35 +12,35 @@ import { useToggle as oe } from "../../hooks/useToggle.js";
12
12
  import { P as y } from "../../index-h-Ul0anl.js";
13
13
  function R() {
14
14
  return R = Object.assign || function(e) {
15
- for (var c = 1; c < arguments.length; c++) {
16
- var o = arguments[c];
15
+ for (var a = 1; a < arguments.length; a++) {
16
+ var o = arguments[a];
17
17
  for (var n in o)
18
18
  Object.prototype.hasOwnProperty.call(o, n) && (e[n] = o[n]);
19
19
  }
20
20
  return e;
21
21
  }, R.apply(this, arguments);
22
22
  }
23
- function ne(e, c) {
23
+ function ne(e, a) {
24
24
  if (e == null) return {};
25
- var o = ce(e, c), n, r;
25
+ var o = ae(e, a), n, r;
26
26
  if (Object.getOwnPropertySymbols) {
27
27
  var t = Object.getOwnPropertySymbols(e);
28
28
  for (r = 0; r < t.length; r++)
29
- n = t[r], !(c.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
29
+ n = t[r], !(a.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
30
30
  }
31
31
  return o;
32
32
  }
33
- function ce(e, c) {
33
+ function ae(e, a) {
34
34
  if (e == null) return {};
35
35
  var o = {}, n = Object.keys(e), r, t;
36
36
  for (t = 0; t < n.length; t++)
37
- r = n[t], !(c.indexOf(r) >= 0) && (o[r] = e[r]);
37
+ r = n[t], !(a.indexOf(r) >= 0) && (o[r] = e[r]);
38
38
  return o;
39
39
  }
40
- var I = z(function(e, c) {
41
- var o = e.color, n = o === void 0 ? "currentColor" : o, r = e.size, t = r === void 0 ? 24 : r, i = ne(e, ["color", "size"]);
40
+ var I = z(function(e, a) {
41
+ var o = e.color, n = o === void 0 ? "currentColor" : o, r = e.size, t = r === void 0 ? 24 : r, l = ne(e, ["color", "size"]);
42
42
  return /* @__PURE__ */ S.createElement("svg", R({
43
- ref: c,
43
+ ref: a,
44
44
  xmlns: "http://www.w3.org/2000/svg",
45
45
  width: t,
46
46
  height: t,
@@ -50,7 +50,7 @@ var I = z(function(e, c) {
50
50
  strokeWidth: "2",
51
51
  strokeLinecap: "round",
52
52
  strokeLinejoin: "round"
53
- }, i), /* @__PURE__ */ S.createElement("polyline", {
53
+ }, l), /* @__PURE__ */ S.createElement("polyline", {
54
54
  points: "20 6 9 17 4 12"
55
55
  }));
56
56
  });
@@ -59,41 +59,41 @@ I.propTypes = {
59
59
  size: y.oneOfType([y.string, y.number])
60
60
  };
61
61
  I.displayName = "Check";
62
- var P = "Checkbox", [ae, ge] = J(P), [se, N] = ae(P);
62
+ var P = "Checkbox", [ce, ge] = J(P), [se, N] = ce(P);
63
63
  function ie(e) {
64
64
  const {
65
- __scopeCheckbox: c,
65
+ __scopeCheckbox: a,
66
66
  checked: o,
67
67
  children: n,
68
68
  defaultChecked: r,
69
69
  disabled: t,
70
- form: i,
70
+ form: l,
71
71
  name: f,
72
- onCheckedChange: l,
72
+ onCheckedChange: d,
73
73
  required: b,
74
74
  value: k = "on",
75
75
  // @ts-expect-error
76
- internal_do_not_use_render: a
77
- } = e, [p, C] = Q({
76
+ internal_do_not_use_render: c
77
+ } = e, [p, x] = Q({
78
78
  prop: o,
79
79
  defaultProp: r ?? !1,
80
- onChange: l,
80
+ onChange: d,
81
81
  caller: P
82
- }), [m, v] = h.useState(null), [g, s] = h.useState(null), d = h.useRef(!1), _ = m ? !!i || !!m.closest("form") : (
82
+ }), [m, C] = h.useState(null), [g, s] = h.useState(null), i = h.useRef(!1), _ = m ? !!l || !!m.closest("form") : (
83
83
  // We set this to true by default so that events bubble to forms without JS (SSR)
84
84
  !0
85
85
  ), E = {
86
86
  checked: p,
87
87
  disabled: t,
88
- setChecked: C,
88
+ setChecked: x,
89
89
  control: m,
90
- setControl: v,
90
+ setControl: C,
91
91
  name: f,
92
- form: i,
92
+ form: l,
93
93
  value: k,
94
- hasConsumerStoppedPropagationRef: d,
94
+ hasConsumerStoppedPropagationRef: i,
95
95
  required: b,
96
- defaultChecked: x(r) ? !1 : r,
96
+ defaultChecked: v(r) ? !1 : r,
97
97
  isFormControl: _,
98
98
  bubbleInput: g,
99
99
  setBubbleInput: s
@@ -101,50 +101,50 @@ function ie(e) {
101
101
  return /* @__PURE__ */ u(
102
102
  se,
103
103
  {
104
- scope: c,
104
+ scope: a,
105
105
  ...E,
106
- children: le(a) ? a(E) : n
106
+ children: le(c) ? c(E) : n
107
107
  }
108
108
  );
109
109
  }
110
110
  var M = "CheckboxTrigger", q = h.forwardRef(
111
- ({ __scopeCheckbox: e, onKeyDown: c, onClick: o, ...n }, r) => {
111
+ ({ __scopeCheckbox: e, onKeyDown: a, onClick: o, ...n }, r) => {
112
112
  const {
113
113
  control: t,
114
- value: i,
114
+ value: l,
115
115
  disabled: f,
116
- checked: l,
116
+ checked: d,
117
117
  required: b,
118
118
  setControl: k,
119
- setChecked: a,
119
+ setChecked: c,
120
120
  hasConsumerStoppedPropagationRef: p,
121
- isFormControl: C,
121
+ isFormControl: x,
122
122
  bubbleInput: m
123
- } = N(M, e), v = L(r, k), g = h.useRef(l);
123
+ } = N(M, e), C = L(r, k), g = h.useRef(d);
124
124
  return h.useEffect(() => {
125
125
  const s = t == null ? void 0 : t.form;
126
126
  if (s) {
127
- const d = () => a(g.current);
128
- return s.addEventListener("reset", d), () => s.removeEventListener("reset", d);
127
+ const i = () => c(g.current);
128
+ return s.addEventListener("reset", i), () => s.removeEventListener("reset", i);
129
129
  }
130
- }, [t, a]), /* @__PURE__ */ u(
130
+ }, [t, c]), /* @__PURE__ */ u(
131
131
  w.button,
132
132
  {
133
133
  type: "button",
134
134
  role: "checkbox",
135
- "aria-checked": x(l) ? "mixed" : l,
135
+ "aria-checked": v(d) ? "mixed" : d,
136
136
  "aria-required": b,
137
- "data-state": $(l),
137
+ "data-state": $(d),
138
138
  "data-disabled": f ? "" : void 0,
139
139
  disabled: f,
140
- value: i,
140
+ value: l,
141
141
  ...n,
142
- ref: v,
143
- onKeyDown: j(c, (s) => {
142
+ ref: C,
143
+ onKeyDown: j(a, (s) => {
144
144
  s.key === "Enter" && s.preventDefault();
145
145
  }),
146
146
  onClick: j(o, (s) => {
147
- a((d) => x(d) ? !0 : !d), m && C && (p.current = s.isPropagationStopped(), p.current || s.stopPropagation());
147
+ c((i) => v(i) ? !0 : !i), m && x && (p.current = s.isPropagationStopped(), p.current || s.stopPropagation());
148
148
  })
149
149
  }
150
150
  );
@@ -152,18 +152,18 @@ var M = "CheckboxTrigger", q = h.forwardRef(
152
152
  );
153
153
  q.displayName = M;
154
154
  var A = h.forwardRef(
155
- (e, c) => {
155
+ (e, a) => {
156
156
  const {
157
157
  __scopeCheckbox: o,
158
158
  name: n,
159
159
  checked: r,
160
160
  defaultChecked: t,
161
- required: i,
161
+ required: l,
162
162
  disabled: f,
163
- value: l,
163
+ value: d,
164
164
  onCheckedChange: b,
165
165
  form: k,
166
- ...a
166
+ ...c
167
167
  } = e;
168
168
  return /* @__PURE__ */ u(
169
169
  ie,
@@ -172,17 +172,17 @@ var A = h.forwardRef(
172
172
  checked: r,
173
173
  defaultChecked: t,
174
174
  disabled: f,
175
- required: i,
175
+ required: l,
176
176
  onCheckedChange: b,
177
177
  name: n,
178
178
  form: k,
179
- value: l,
179
+ value: d,
180
180
  internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ B(U, { children: [
181
181
  /* @__PURE__ */ u(
182
182
  q,
183
183
  {
184
- ...a,
185
- ref: c,
184
+ ...c,
185
+ ref: a,
186
186
  __scopeCheckbox: o
187
187
  }
188
188
  ),
@@ -199,19 +199,19 @@ var A = h.forwardRef(
199
199
  );
200
200
  A.displayName = P;
201
201
  var F = "CheckboxIndicator", D = h.forwardRef(
202
- (e, c) => {
202
+ (e, a) => {
203
203
  const { __scopeCheckbox: o, forceMount: n, ...r } = e, t = N(F, o);
204
204
  return /* @__PURE__ */ u(
205
205
  ee,
206
206
  {
207
- present: n || x(t.checked) || t.checked === !0,
207
+ present: n || v(t.checked) || t.checked === !0,
208
208
  children: /* @__PURE__ */ u(
209
209
  w.span,
210
210
  {
211
211
  "data-state": $(t.checked),
212
212
  "data-disabled": t.disabled ? "" : void 0,
213
213
  ...r,
214
- ref: c,
214
+ ref: a,
215
215
  style: { pointerEvents: "none", ...e.style }
216
216
  }
217
217
  )
@@ -221,49 +221,49 @@ var F = "CheckboxIndicator", D = h.forwardRef(
221
221
  );
222
222
  D.displayName = F;
223
223
  var H = "CheckboxBubbleInput", W = h.forwardRef(
224
- ({ __scopeCheckbox: e, ...c }, o) => {
224
+ ({ __scopeCheckbox: e, ...a }, o) => {
225
225
  const {
226
226
  control: n,
227
227
  hasConsumerStoppedPropagationRef: r,
228
228
  checked: t,
229
- defaultChecked: i,
229
+ defaultChecked: l,
230
230
  required: f,
231
- disabled: l,
231
+ disabled: d,
232
232
  name: b,
233
233
  value: k,
234
- form: a,
234
+ form: c,
235
235
  bubbleInput: p,
236
- setBubbleInput: C
237
- } = N(H, e), m = L(o, C), v = Y(t), g = Z(n);
236
+ setBubbleInput: x
237
+ } = N(H, e), m = L(o, x), C = Y(t), g = Z(n);
238
238
  h.useEffect(() => {
239
- const d = p;
240
- if (!d) return;
239
+ const i = p;
240
+ if (!i) return;
241
241
  const _ = window.HTMLInputElement.prototype, O = Object.getOwnPropertyDescriptor(
242
242
  _,
243
243
  "checked"
244
244
  ).set, G = !r.current;
245
- if (v !== t && O) {
245
+ if (C !== t && O) {
246
246
  const K = new Event("click", { bubbles: G });
247
- d.indeterminate = x(t), O.call(d, x(t) ? !1 : t), d.dispatchEvent(K);
247
+ i.indeterminate = v(t), O.call(i, v(t) ? !1 : t), i.dispatchEvent(K);
248
248
  }
249
- }, [p, v, t, r]);
250
- const s = h.useRef(x(t) ? !1 : t);
249
+ }, [p, C, t, r]);
250
+ const s = h.useRef(v(t) ? !1 : t);
251
251
  return /* @__PURE__ */ u(
252
252
  w.input,
253
253
  {
254
254
  type: "checkbox",
255
255
  "aria-hidden": !0,
256
- defaultChecked: i ?? s.current,
256
+ defaultChecked: l ?? s.current,
257
257
  required: f,
258
- disabled: l,
258
+ disabled: d,
259
259
  name: b,
260
260
  value: k,
261
- form: a,
262
- ...c,
261
+ form: c,
262
+ ...a,
263
263
  tabIndex: -1,
264
264
  ref: m,
265
265
  style: {
266
- ...c.style,
266
+ ...a.style,
267
267
  ...g,
268
268
  position: "absolute",
269
269
  pointerEvents: "none",
@@ -282,49 +282,54 @@ W.displayName = H;
282
282
  function le(e) {
283
283
  return typeof e == "function";
284
284
  }
285
- function x(e) {
285
+ function v(e) {
286
286
  return e === "indeterminate";
287
287
  }
288
288
  function $(e) {
289
- return x(e) ? "indeterminate" : e ? "checked" : "unchecked";
289
+ return v(e) ? "indeterminate" : e ? "checked" : "unchecked";
290
290
  }
291
291
  const ye = z(
292
292
  ({
293
293
  ariaLabelledBy: e,
294
- className: c,
294
+ className: a,
295
295
  defaultChecked: o,
296
296
  disabled: n,
297
297
  id: r,
298
298
  label: t,
299
- labelClassName: i,
299
+ labelClassName: l,
300
300
  name: f,
301
- theme: l,
301
+ theme: d,
302
302
  title: b,
303
303
  variant: k,
304
- onChange: a
305
- }, p) => {
306
- const [C, m] = oe(o), v = V(), g = X(() => {
307
- m(), a == null || a();
308
- }, [a, m]);
309
- return /* @__PURE__ */ B("div", { className: "flex items-center gap-2", "data-theme": l, children: [
304
+ onChange: c,
305
+ ...p
306
+ }, x) => {
307
+ const [m, C] = oe(o ?? !1), g = V(), s = X(
308
+ (i) => {
309
+ C(i), c == null || c(i);
310
+ },
311
+ [c, C]
312
+ );
313
+ return /* @__PURE__ */ B("div", { className: "flex items-center gap-2", "data-theme": d, children: [
310
314
  /* @__PURE__ */ u(
311
315
  A,
312
316
  {
313
- id: r ?? v,
314
- checked: C,
315
- ref: p,
317
+ id: r ?? g,
318
+ checked: m,
319
+ ref: x,
316
320
  name: f,
317
321
  disabled: n,
318
322
  "aria-labelledby": e,
319
323
  title: b,
320
324
  className: T(
321
325
  te({
322
- className: c,
326
+ className: a,
323
327
  variant: k,
324
- checked: C
328
+ checked: m
325
329
  })
326
330
  ),
327
- onCheckedChange: g,
331
+ onCheckedChange: s,
332
+ ...p,
328
333
  children: /* @__PURE__ */ u(D, { children: /* @__PURE__ */ u(I, { className: "w-4 h-4 stroke-2" }) })
329
334
  }
330
335
  ),
@@ -334,7 +339,7 @@ const ye = z(
334
339
  htmlFor: f ?? r,
335
340
  className: T(
336
341
  re({
337
- className: i
342
+ className: l
338
343
  })
339
344
  ),
340
345
  children: t
@@ -13,7 +13,7 @@ const t = r(
13
13
  "text-white",
14
14
  "border-kubefirst-primary",
15
15
  "colony:border-red-700",
16
- "civo:border-civo-primary"
16
+ "civo:border-zinc-400"
17
17
  ],
18
18
  {
19
19
  variants: {
@@ -31,7 +31,7 @@ const t = r(
31
31
  class: [
32
32
  "bg-kubefirst-primary",
33
33
  "colony:bg-red-700",
34
- "civo:bg-civo-primary"
34
+ ["civo:bg-civo-primary", "civo:border-civo-primary"]
35
35
  ]
36
36
  }
37
37
  ],