@luminescent/ui 0.15.0 → 0.16.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.
@@ -293,22 +293,26 @@ const buttonColorClasses = {
293
293
  };
294
294
  const sizeClasses = {
295
295
  sm: {
296
- base: "text-base rounded-md gap-2",
296
+ base: "text-base gap-2",
297
+ round: "rounded-md",
297
298
  pad: "px-2.5 py-1.5",
298
299
  equal: "p-1.5"
299
300
  },
300
301
  md: {
301
- base: "text-base rounded-md gap-3",
302
+ base: "text-base gap-3",
303
+ round: "rounded-md",
302
304
  pad: "px-4 py-2",
303
305
  equal: "p-2"
304
306
  },
305
307
  lg: {
306
- base: "text-lg rounded-lg gap-3",
308
+ base: "text-lg gap-3",
309
+ round: "rounded-lg",
307
310
  pad: "px-6 py-3",
308
311
  equal: "p-3"
309
312
  },
310
313
  xl: {
311
- base: "text-lg rounded-xl gap-4",
314
+ base: "text-lg gap-4",
315
+ round: "rounded-xl",
312
316
  pad: "px-8 py-4",
313
317
  equal: "p-4"
314
318
  }
@@ -319,6 +323,7 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
319
323
  "color",
320
324
  "transparent",
321
325
  "size",
326
+ "round",
322
327
  "square"
323
328
  ]);
324
329
  props1.class = {
@@ -327,6 +332,8 @@ const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
327
332
  "border-transparent": props.transparent,
328
333
  [buttonColorClasses[props.color ?? "darkgray"].hover]: true,
329
334
  [sizeClasses[props.size ?? "md"].base]: true,
335
+ [sizeClasses[props.size ?? "md"].round]: !props.round,
336
+ "rounded-full": props.round,
330
337
  [sizeClasses[props.size ?? "md"].pad]: !props.square,
331
338
  [sizeClasses[props.size ?? "md"].equal]: props.square,
332
339
  ...props1.class
@@ -341,6 +348,7 @@ const ButtonAnchor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
341
348
  "color",
342
349
  "transparent",
343
350
  "size",
351
+ "round",
344
352
  "square"
345
353
  ]);
346
354
  props1.class = {
@@ -349,6 +357,8 @@ const ButtonAnchor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
349
357
  "border-transparent": props.transparent,
350
358
  [buttonColorClasses[props.color ?? "darkgray"].hover]: true,
351
359
  [sizeClasses[props.size ?? "md"].base]: true,
360
+ [sizeClasses[props.size ?? "md"].round]: !props.round,
361
+ "rounded-full": props.round,
352
362
  [sizeClasses[props.size ?? "md"].pad]: !props.square,
353
363
  [sizeClasses[props.size ?? "md"].equal]: props.square,
354
364
  ...props1.class
@@ -713,12 +723,47 @@ function rgbToHsv(color) {
713
723
  v
714
724
  };
715
725
  }
726
+ const Shuffle = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
727
+ return /* @__PURE__ */ qwik._jsxS("svg", {
728
+ xmlns: "http://www.w3.org/2000/svg",
729
+ viewBox: "0 0 512 512",
730
+ ...props,
731
+ get height() {
732
+ return props.width;
733
+ },
734
+ children: [
735
+ /* @__PURE__ */ qwik._jsxQ("path", null, {
736
+ fill: "none",
737
+ stroke: "currentColor",
738
+ "stroke-linecap": "round",
739
+ "stroke-linejoin": "round",
740
+ "stroke-width": "32",
741
+ d: "M400 304l48 48-48 48M400 112l48 48-48 48M64 352h85.19a80 80 0 0066.56-35.62L256 256"
742
+ }, null, 3, null),
743
+ /* @__PURE__ */ qwik._jsxQ("path", null, {
744
+ d: "M64 160h85.19a80 80 0 0166.56 35.62l80.5 120.76A80 80 0 00362.81 352H416M416 160h-53.19a80 80 0 00-66.56 35.62L288 208",
745
+ fill: "none",
746
+ stroke: "currentColor",
747
+ "stroke-linecap": "round",
748
+ "stroke-linejoin": "round",
749
+ "stroke-width": "32"
750
+ }, null, 3, null)
751
+ ]
752
+ }, {
753
+ xmlns: qwik._IMMUTABLE,
754
+ viewBox: qwik._IMMUTABLE,
755
+ height: qwik._fnSignal((p0) => p0.width, [
756
+ props
757
+ ], "p0.width")
758
+ }, 0, "zt_0");
759
+ }, "Shuffle_component_DnmmsuyAgDE"));
716
760
  const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
717
761
  const props1 = qwik._restProps(props, [
718
762
  "onInput$",
719
763
  "value",
720
764
  "presetColors",
721
- "preview"
765
+ "preview",
766
+ "class"
722
767
  ]);
723
768
  const store = qwik.useStore({
724
769
  opened: false
@@ -732,6 +777,12 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
732
777
  class: "text-gray-300 pb-1 flex select-none"
733
778
  }, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0s_0"), 1, null),
734
779
  /* @__PURE__ */ qwik._jsxC(TextInputRaw, {
780
+ get class() {
781
+ return {
782
+ "w-full": true,
783
+ ...props.class
784
+ };
785
+ },
735
786
  ...props1,
736
787
  get value() {
737
788
  return props.value ?? "#000000";
@@ -771,6 +822,12 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
771
822
  borderBottom: `10px solid ${props.value ?? "#000000"}`
772
823
  } : {},
773
824
  [qwik._IMMUTABLE]: {
825
+ class: qwik._fnSignal((p0) => ({
826
+ "w-full": true,
827
+ ...p0.class
828
+ }), [
829
+ props
830
+ ], '{"w-full":true,...p0.class}'),
774
831
  value: qwik._fnSignal((p0) => p0.value ?? "#000000", [
775
832
  props
776
833
  ], 'p0.value??"#000000"'),
@@ -785,21 +842,23 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
785
842
  get color() {
786
843
  return props.value ?? "#000000";
787
844
  },
788
- get colors() {
789
- return [
790
- "#FAEDCB",
791
- "#C9E4DE",
792
- "#C6DEF1",
793
- "#DBCDF0",
794
- "#F2C6DE",
795
- "#FCD05C",
796
- "#5FE2C5",
797
- "#4498DB",
798
- "#9863E7",
799
- "#E43A96",
800
- ...props.presetColors ?? []
801
- ];
802
- },
845
+ colors: [
846
+ "#FAEDCB",
847
+ "#C9E4DE",
848
+ "#C6DEF1",
849
+ "#DBCDF0",
850
+ "#F2C6DE",
851
+ "#FCD05C",
852
+ "#5FE2C5",
853
+ "#4498DB",
854
+ "#9863E7",
855
+ "#E43A96",
856
+ "#000000",
857
+ "#555555",
858
+ "#AAAAAA",
859
+ "#FFFFFF",
860
+ ...props.presetColors ?? []
861
+ ],
803
862
  get class() {
804
863
  return {
805
864
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
@@ -838,21 +897,6 @@ const ColorInput = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inline
838
897
  color: qwik._fnSignal((p0) => p0.value ?? "#000000", [
839
898
  props
840
899
  ], 'p0.value??"#000000"'),
841
- colors: qwik._fnSignal((p0) => [
842
- "#FAEDCB",
843
- "#C9E4DE",
844
- "#C6DEF1",
845
- "#DBCDF0",
846
- "#F2C6DE",
847
- "#FCD05C",
848
- "#5FE2C5",
849
- "#4498DB",
850
- "#9863E7",
851
- "#E43A96",
852
- ...p0.presetColors ?? []
853
- ], [
854
- props
855
- ], '["#FAEDCB","#C9E4DE","#C6DEF1","#DBCDF0","#F2C6DE","#FCD05C","#5FE2C5","#4498DB","#9863E7","#E43A96",...p0.presetColors??[]]'),
856
900
  class: qwik._fnSignal((p0) => ({
857
901
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
858
902
  "opacity-0 scale-95 pointer-events-none": !p0.opened
@@ -1052,30 +1096,56 @@ const ColorPickerRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.in
1052
1096
  ], 3, null),
1053
1097
  /* @__PURE__ */ qwik._jsxQ("div", null, {
1054
1098
  class: "w-[150px] flex flex-wrap gap-1 justify-evenly"
1055
- }, props.colors.map((color, i) => {
1056
- return /* @__PURE__ */ qwik._jsxQ("button", {
1057
- style: `background: ${color}`,
1099
+ }, [
1100
+ props.colors.map((color, i) => {
1101
+ return /* @__PURE__ */ qwik._jsxQ("button", {
1102
+ style: `background: ${color}`,
1103
+ onMouseDown$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1104
+ const [color2, setColor2] = qwik.useLexicalScope();
1105
+ setColor2(color2);
1106
+ }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1107
+ color,
1108
+ setColor
1109
+ ]),
1110
+ onTouchStart$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1111
+ const [color2, setColor2] = qwik.useLexicalScope();
1112
+ setColor2(color2);
1113
+ }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1114
+ color,
1115
+ setColor
1116
+ ])
1117
+ }, {
1118
+ class: "w-[1.6rem] h-[1.6rem] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1119
+ "preventdefault:mousedown": true,
1120
+ "preventdefault:touchstart": true
1121
+ }, null, 2, i);
1122
+ }),
1123
+ /* @__PURE__ */ qwik._jsxQ("button", null, {
1124
+ class: "w-[1.6rem] h-[1.6rem] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1125
+ "preventdefault:mousedown": true,
1126
+ "preventdefault:touchstart": true,
1058
1127
  onMouseDown$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1059
- const [color2, setColor2] = qwik.useLexicalScope();
1060
- setColor2(color2);
1061
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1062
- color,
1128
+ const [setColor2] = qwik.useLexicalScope();
1129
+ const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1130
+ setColor2(color);
1131
+ }, "ColorPickerRaw_component_div_div_button_onMouseDown_1_30vaDl3iDKc", [
1063
1132
  setColor
1064
1133
  ]),
1065
1134
  onTouchStart$: /* @__PURE__ */ qwik.inlinedQrl(() => {
1066
- const [color2, setColor2] = qwik.useLexicalScope();
1067
- setColor2(color2);
1068
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1069
- color,
1135
+ const [setColor2] = qwik.useLexicalScope();
1136
+ const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1137
+ setColor2(color);
1138
+ }, "ColorPickerRaw_component_div_div_button_onTouchStart_1_w30s4j6SxyE", [
1070
1139
  setColor
1071
1140
  ])
1072
- }, {
1073
- class: "w-[25px] h-[25px] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1074
- "preventdefault:mousedown": true,
1075
- "preventdefault:touchstart": true
1076
- }, null, 2, i);
1077
- }), 1, null)
1078
- ], 1, "0s_4");
1141
+ }, /* @__PURE__ */ qwik._jsxC(Shuffle, {
1142
+ class: "fill-current text-gray-300 pl-0.5 p-0.5",
1143
+ [qwik._IMMUTABLE]: {
1144
+ class: qwik._IMMUTABLE
1145
+ }
1146
+ }, 3, "0s_4"), 1, null)
1147
+ ], 1, null)
1148
+ ], 1, "0s_5");
1079
1149
  }, "ColorPickerRaw_component_CWQPPcezhyA"));
1080
1150
  const ChevronDown = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
1081
1151
  return /* @__PURE__ */ qwik._jsxS("svg", {
@@ -1123,6 +1193,7 @@ const DropdownRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
1123
1193
  "class",
1124
1194
  "display",
1125
1195
  "color",
1196
+ "round",
1126
1197
  "transparent",
1127
1198
  "size",
1128
1199
  "hover"
@@ -1181,6 +1252,9 @@ const DropdownRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
1181
1252
  class: qwik._IMMUTABLE
1182
1253
  }, 0, "Zz_3"),
1183
1254
  /* @__PURE__ */ qwik._jsxC(Button, {
1255
+ get round() {
1256
+ return props.round;
1257
+ },
1184
1258
  get color() {
1185
1259
  return props.color;
1186
1260
  },
@@ -1235,6 +1309,9 @@ const DropdownRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
1235
1309
  }, 3, "Zz_5")
1236
1310
  ],
1237
1311
  [qwik._IMMUTABLE]: {
1312
+ round: qwik._fnSignal((p0) => p0.round, [
1313
+ props
1314
+ ], "p0.round"),
1238
1315
  color: qwik._fnSignal((p0) => p0.color, [
1239
1316
  props
1240
1317
  ], "p0.color"),
@@ -1259,16 +1336,22 @@ const DropdownRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
1259
1336
  "opacity-0 scale-95 pointer-events-none": !store.opened,
1260
1337
  "group-hover:pointer-events-auto group-hover:opacity-100 group-hover:scale-100": props.hover
1261
1338
  }
1262
- }, null, /* @__PURE__ */ qwik._jsxQ("div", null, {
1263
- id: qwik._fnSignal((p0) => `lui-${p0.id}-opts`, [
1264
- props
1265
- ], "`lui-${p0.id}-opts`"),
1339
+ }, null, /* @__PURE__ */ qwik._jsxQ("div", {
1266
1340
  class: {
1267
- "motion-safe:transition-all p-1.5 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col rounded-lg border border-gray-700 max-h-72 lui-scroll overflow-auto select-none": true
1341
+ "motion-safe:transition-all p-1 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col border border-gray-700 max-h-72 lui-scroll overflow-auto select-none": true,
1342
+ "rounded-lg": !props.round,
1343
+ "rounded-3xl": props.round
1268
1344
  }
1345
+ }, {
1346
+ id: qwik._fnSignal((p0) => `lui-${p0.id}-opts`, [
1347
+ props
1348
+ ], "`lui-${p0.id}-opts`")
1269
1349
  }, [
1270
1350
  props.values?.map(({ name, value, color: valueColor }, i) => {
1271
1351
  return /* @__PURE__ */ qwik._jsxC(Button, {
1352
+ get round() {
1353
+ return props.round;
1354
+ },
1272
1355
  color: valueColor ?? props.color,
1273
1356
  transparent: true,
1274
1357
  get size() {
@@ -1290,6 +1373,9 @@ const DropdownRaw = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
1290
1373
  ]),
1291
1374
  children: name,
1292
1375
  [qwik._IMMUTABLE]: {
1376
+ round: qwik._fnSignal((p0) => p0.round, [
1377
+ props
1378
+ ], "p0.round"),
1293
1379
  transparent: qwik._IMMUTABLE,
1294
1380
  size: qwik._fnSignal((p0) => p0.size ?? "sm", [
1295
1381
  props
@@ -1999,6 +2085,8 @@ const toggleOffColorClasses = {
1999
2085
  };
2000
2086
  const Toggle = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
2001
2087
  const props1 = qwik._restProps(props, [
2088
+ "checkbox",
2089
+ "round",
2002
2090
  "center",
2003
2091
  "label",
2004
2092
  "onColor",
@@ -2027,9 +2115,12 @@ const Toggle = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
2027
2115
  }, 0, null),
2028
2116
  /* @__PURE__ */ qwik._jsxQ("div", {
2029
2117
  class: {
2030
- "motion-safe:transition ease-in-out w-12 h-7 rounded-md peer border hover:shadow-lg": true,
2031
- "after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:rounded-[0.2rem] after:h-5 after:w-5 after:motion-safe:transition-all after:ease-in-out": true,
2032
- "peer-checked:after:translate-x-full": true,
2118
+ "motion-safe:transition ease-in-out h-7 peer border hover:shadow-lg": true,
2119
+ "after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:h-5 after:w-5 after:motion-safe:transition-all after:ease-in-out": true,
2120
+ "rounded-md after:rounded-[0.2rem]": !props.round,
2121
+ "rounded-full after:rounded-full": props.round,
2122
+ "w-12 peer-checked:after:translate-x-full": !props.checkbox,
2123
+ "w-7 after:opacity-0 peer-checked:after:opacity-100": props.checkbox,
2033
2124
  [toggleOnColorClasses[props.onColor ?? "blue"].checked]: true,
2034
2125
  [toggleOnColorClasses[props.onColor ?? "blue"].checkedAfter]: true,
2035
2126
  [toggleOffColorClasses[props.offColor ?? "darkgray"].unchecked]: true,
@@ -291,22 +291,26 @@ const buttonColorClasses = {
291
291
  };
292
292
  const sizeClasses = {
293
293
  sm: {
294
- base: "text-base rounded-md gap-2",
294
+ base: "text-base gap-2",
295
+ round: "rounded-md",
295
296
  pad: "px-2.5 py-1.5",
296
297
  equal: "p-1.5"
297
298
  },
298
299
  md: {
299
- base: "text-base rounded-md gap-3",
300
+ base: "text-base gap-3",
301
+ round: "rounded-md",
300
302
  pad: "px-4 py-2",
301
303
  equal: "p-2"
302
304
  },
303
305
  lg: {
304
- base: "text-lg rounded-lg gap-3",
306
+ base: "text-lg gap-3",
307
+ round: "rounded-lg",
305
308
  pad: "px-6 py-3",
306
309
  equal: "p-3"
307
310
  },
308
311
  xl: {
309
- base: "text-lg rounded-xl gap-4",
312
+ base: "text-lg gap-4",
313
+ round: "rounded-xl",
310
314
  pad: "px-8 py-4",
311
315
  equal: "p-4"
312
316
  }
@@ -317,6 +321,7 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
317
321
  "color",
318
322
  "transparent",
319
323
  "size",
324
+ "round",
320
325
  "square"
321
326
  ]);
322
327
  props1.class = {
@@ -325,6 +330,8 @@ const Button = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
325
330
  "border-transparent": props.transparent,
326
331
  [buttonColorClasses[props.color ?? "darkgray"].hover]: true,
327
332
  [sizeClasses[props.size ?? "md"].base]: true,
333
+ [sizeClasses[props.size ?? "md"].round]: !props.round,
334
+ "rounded-full": props.round,
328
335
  [sizeClasses[props.size ?? "md"].pad]: !props.square,
329
336
  [sizeClasses[props.size ?? "md"].equal]: props.square,
330
337
  ...props1.class
@@ -339,6 +346,7 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
339
346
  "color",
340
347
  "transparent",
341
348
  "size",
349
+ "round",
342
350
  "square"
343
351
  ]);
344
352
  props1.class = {
@@ -347,6 +355,8 @@ const ButtonAnchor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
347
355
  "border-transparent": props.transparent,
348
356
  [buttonColorClasses[props.color ?? "darkgray"].hover]: true,
349
357
  [sizeClasses[props.size ?? "md"].base]: true,
358
+ [sizeClasses[props.size ?? "md"].round]: !props.round,
359
+ "rounded-full": props.round,
350
360
  [sizeClasses[props.size ?? "md"].pad]: !props.square,
351
361
  [sizeClasses[props.size ?? "md"].equal]: props.square,
352
362
  ...props1.class
@@ -711,12 +721,47 @@ function rgbToHsv(color) {
711
721
  v
712
722
  };
713
723
  }
724
+ const Shuffle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
725
+ return /* @__PURE__ */ _jsxS("svg", {
726
+ xmlns: "http://www.w3.org/2000/svg",
727
+ viewBox: "0 0 512 512",
728
+ ...props,
729
+ get height() {
730
+ return props.width;
731
+ },
732
+ children: [
733
+ /* @__PURE__ */ _jsxQ("path", null, {
734
+ fill: "none",
735
+ stroke: "currentColor",
736
+ "stroke-linecap": "round",
737
+ "stroke-linejoin": "round",
738
+ "stroke-width": "32",
739
+ d: "M400 304l48 48-48 48M400 112l48 48-48 48M64 352h85.19a80 80 0 0066.56-35.62L256 256"
740
+ }, null, 3, null),
741
+ /* @__PURE__ */ _jsxQ("path", null, {
742
+ d: "M64 160h85.19a80 80 0 0166.56 35.62l80.5 120.76A80 80 0 00362.81 352H416M416 160h-53.19a80 80 0 00-66.56 35.62L288 208",
743
+ fill: "none",
744
+ stroke: "currentColor",
745
+ "stroke-linecap": "round",
746
+ "stroke-linejoin": "round",
747
+ "stroke-width": "32"
748
+ }, null, 3, null)
749
+ ]
750
+ }, {
751
+ xmlns: _IMMUTABLE,
752
+ viewBox: _IMMUTABLE,
753
+ height: _fnSignal((p0) => p0.width, [
754
+ props
755
+ ], "p0.width")
756
+ }, 0, "zt_0");
757
+ }, "Shuffle_component_DnmmsuyAgDE"));
714
758
  const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
715
759
  const props1 = _restProps(props, [
716
760
  "onInput$",
717
761
  "value",
718
762
  "presetColors",
719
- "preview"
763
+ "preview",
764
+ "class"
720
765
  ]);
721
766
  const store = useStore({
722
767
  opened: false
@@ -730,6 +775,12 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
730
775
  class: "text-gray-300 pb-1 flex select-none"
731
776
  }, /* @__PURE__ */ _jsxC(Slot, null, 3, "0s_0"), 1, null),
732
777
  /* @__PURE__ */ _jsxC(TextInputRaw, {
778
+ get class() {
779
+ return {
780
+ "w-full": true,
781
+ ...props.class
782
+ };
783
+ },
733
784
  ...props1,
734
785
  get value() {
735
786
  return props.value ?? "#000000";
@@ -769,6 +820,12 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
769
820
  borderBottom: `10px solid ${props.value ?? "#000000"}`
770
821
  } : {},
771
822
  [_IMMUTABLE]: {
823
+ class: _fnSignal((p0) => ({
824
+ "w-full": true,
825
+ ...p0.class
826
+ }), [
827
+ props
828
+ ], '{"w-full":true,...p0.class}'),
772
829
  value: _fnSignal((p0) => p0.value ?? "#000000", [
773
830
  props
774
831
  ], 'p0.value??"#000000"'),
@@ -783,21 +840,23 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
783
840
  get color() {
784
841
  return props.value ?? "#000000";
785
842
  },
786
- get colors() {
787
- return [
788
- "#FAEDCB",
789
- "#C9E4DE",
790
- "#C6DEF1",
791
- "#DBCDF0",
792
- "#F2C6DE",
793
- "#FCD05C",
794
- "#5FE2C5",
795
- "#4498DB",
796
- "#9863E7",
797
- "#E43A96",
798
- ...props.presetColors ?? []
799
- ];
800
- },
843
+ colors: [
844
+ "#FAEDCB",
845
+ "#C9E4DE",
846
+ "#C6DEF1",
847
+ "#DBCDF0",
848
+ "#F2C6DE",
849
+ "#FCD05C",
850
+ "#5FE2C5",
851
+ "#4498DB",
852
+ "#9863E7",
853
+ "#E43A96",
854
+ "#000000",
855
+ "#555555",
856
+ "#AAAAAA",
857
+ "#FFFFFF",
858
+ ...props.presetColors ?? []
859
+ ],
801
860
  get class() {
802
861
  return {
803
862
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
@@ -836,21 +895,6 @@ const ColorInput = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((prop
836
895
  color: _fnSignal((p0) => p0.value ?? "#000000", [
837
896
  props
838
897
  ], 'p0.value??"#000000"'),
839
- colors: _fnSignal((p0) => [
840
- "#FAEDCB",
841
- "#C9E4DE",
842
- "#C6DEF1",
843
- "#DBCDF0",
844
- "#F2C6DE",
845
- "#FCD05C",
846
- "#5FE2C5",
847
- "#4498DB",
848
- "#9863E7",
849
- "#E43A96",
850
- ...p0.presetColors ?? []
851
- ], [
852
- props
853
- ], '["#FAEDCB","#C9E4DE","#C6DEF1","#DBCDF0","#F2C6DE","#FCD05C","#5FE2C5","#4498DB","#9863E7","#E43A96",...p0.presetColors??[]]'),
854
898
  class: _fnSignal((p0) => ({
855
899
  "motion-safe:transition-all absolute top-full mt-2 left-0 gap-1 z-[1000]": true,
856
900
  "opacity-0 scale-95 pointer-events-none": !p0.opened
@@ -1050,30 +1094,56 @@ const ColorPickerRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((
1050
1094
  ], 3, null),
1051
1095
  /* @__PURE__ */ _jsxQ("div", null, {
1052
1096
  class: "w-[150px] flex flex-wrap gap-1 justify-evenly"
1053
- }, props.colors.map((color, i) => {
1054
- return /* @__PURE__ */ _jsxQ("button", {
1055
- style: `background: ${color}`,
1097
+ }, [
1098
+ props.colors.map((color, i) => {
1099
+ return /* @__PURE__ */ _jsxQ("button", {
1100
+ style: `background: ${color}`,
1101
+ onMouseDown$: /* @__PURE__ */ inlinedQrl(() => {
1102
+ const [color2, setColor2] = useLexicalScope();
1103
+ setColor2(color2);
1104
+ }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1105
+ color,
1106
+ setColor
1107
+ ]),
1108
+ onTouchStart$: /* @__PURE__ */ inlinedQrl(() => {
1109
+ const [color2, setColor2] = useLexicalScope();
1110
+ setColor2(color2);
1111
+ }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1112
+ color,
1113
+ setColor
1114
+ ])
1115
+ }, {
1116
+ class: "w-[1.6rem] h-[1.6rem] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1117
+ "preventdefault:mousedown": true,
1118
+ "preventdefault:touchstart": true
1119
+ }, null, 2, i);
1120
+ }),
1121
+ /* @__PURE__ */ _jsxQ("button", null, {
1122
+ class: "w-[1.6rem] h-[1.6rem] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1123
+ "preventdefault:mousedown": true,
1124
+ "preventdefault:touchstart": true,
1056
1125
  onMouseDown$: /* @__PURE__ */ inlinedQrl(() => {
1057
- const [color2, setColor2] = useLexicalScope();
1058
- setColor2(color2);
1059
- }, "ColorPickerRaw_component_div_div_button_onMouseDown_C5tqQYvx7wA", [
1060
- color,
1126
+ const [setColor2] = useLexicalScope();
1127
+ const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1128
+ setColor2(color);
1129
+ }, "ColorPickerRaw_component_div_div_button_onMouseDown_1_30vaDl3iDKc", [
1061
1130
  setColor
1062
1131
  ]),
1063
1132
  onTouchStart$: /* @__PURE__ */ inlinedQrl(() => {
1064
- const [color2, setColor2] = useLexicalScope();
1065
- setColor2(color2);
1066
- }, "ColorPickerRaw_component_div_div_button_onTouchStart_qgiiO8Blb88", [
1067
- color,
1133
+ const [setColor2] = useLexicalScope();
1134
+ const color = `#${Math.floor(Math.random() * 16777215).toString(16)}`;
1135
+ setColor2(color);
1136
+ }, "ColorPickerRaw_component_div_div_button_onTouchStart_1_w30s4j6SxyE", [
1068
1137
  setColor
1069
1138
  ])
1070
- }, {
1071
- class: "w-[25px] h-[25px] border border-gray-700 rounded-md hover:scale-110 motion-safe:transition-all",
1072
- "preventdefault:mousedown": true,
1073
- "preventdefault:touchstart": true
1074
- }, null, 2, i);
1075
- }), 1, null)
1076
- ], 1, "0s_4");
1139
+ }, /* @__PURE__ */ _jsxC(Shuffle, {
1140
+ class: "fill-current text-gray-300 pl-0.5 p-0.5",
1141
+ [_IMMUTABLE]: {
1142
+ class: _IMMUTABLE
1143
+ }
1144
+ }, 3, "0s_4"), 1, null)
1145
+ ], 1, null)
1146
+ ], 1, "0s_5");
1077
1147
  }, "ColorPickerRaw_component_CWQPPcezhyA"));
1078
1148
  const ChevronDown = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
1079
1149
  return /* @__PURE__ */ _jsxS("svg", {
@@ -1121,6 +1191,7 @@ const DropdownRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
1121
1191
  "class",
1122
1192
  "display",
1123
1193
  "color",
1194
+ "round",
1124
1195
  "transparent",
1125
1196
  "size",
1126
1197
  "hover"
@@ -1179,6 +1250,9 @@ const DropdownRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
1179
1250
  class: _IMMUTABLE
1180
1251
  }, 0, "Zz_3"),
1181
1252
  /* @__PURE__ */ _jsxC(Button, {
1253
+ get round() {
1254
+ return props.round;
1255
+ },
1182
1256
  get color() {
1183
1257
  return props.color;
1184
1258
  },
@@ -1233,6 +1307,9 @@ const DropdownRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
1233
1307
  }, 3, "Zz_5")
1234
1308
  ],
1235
1309
  [_IMMUTABLE]: {
1310
+ round: _fnSignal((p0) => p0.round, [
1311
+ props
1312
+ ], "p0.round"),
1236
1313
  color: _fnSignal((p0) => p0.color, [
1237
1314
  props
1238
1315
  ], "p0.color"),
@@ -1257,16 +1334,22 @@ const DropdownRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
1257
1334
  "opacity-0 scale-95 pointer-events-none": !store.opened,
1258
1335
  "group-hover:pointer-events-auto group-hover:opacity-100 group-hover:scale-100": props.hover
1259
1336
  }
1260
- }, null, /* @__PURE__ */ _jsxQ("div", null, {
1261
- id: _fnSignal((p0) => `lui-${p0.id}-opts`, [
1262
- props
1263
- ], "`lui-${p0.id}-opts`"),
1337
+ }, null, /* @__PURE__ */ _jsxQ("div", {
1264
1338
  class: {
1265
- "motion-safe:transition-all p-1.5 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col rounded-lg border border-gray-700 max-h-72 lui-scroll overflow-auto select-none": true
1339
+ "motion-safe:transition-all p-1 gap-1 bg-gray-800/50 backdrop-blur-xl flex flex-col border border-gray-700 max-h-72 lui-scroll overflow-auto select-none": true,
1340
+ "rounded-lg": !props.round,
1341
+ "rounded-3xl": props.round
1266
1342
  }
1343
+ }, {
1344
+ id: _fnSignal((p0) => `lui-${p0.id}-opts`, [
1345
+ props
1346
+ ], "`lui-${p0.id}-opts`")
1267
1347
  }, [
1268
1348
  props.values?.map(({ name, value, color: valueColor }, i) => {
1269
1349
  return /* @__PURE__ */ _jsxC(Button, {
1350
+ get round() {
1351
+ return props.round;
1352
+ },
1270
1353
  color: valueColor ?? props.color,
1271
1354
  transparent: true,
1272
1355
  get size() {
@@ -1288,6 +1371,9 @@ const DropdownRaw = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
1288
1371
  ]),
1289
1372
  children: name,
1290
1373
  [_IMMUTABLE]: {
1374
+ round: _fnSignal((p0) => p0.round, [
1375
+ props
1376
+ ], "p0.round"),
1291
1377
  transparent: _IMMUTABLE,
1292
1378
  size: _fnSignal((p0) => p0.size ?? "sm", [
1293
1379
  props
@@ -1997,6 +2083,8 @@ const toggleOffColorClasses = {
1997
2083
  };
1998
2084
  const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
1999
2085
  const props1 = _restProps(props, [
2086
+ "checkbox",
2087
+ "round",
2000
2088
  "center",
2001
2089
  "label",
2002
2090
  "onColor",
@@ -2025,9 +2113,12 @@ const Toggle = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =
2025
2113
  }, 0, null),
2026
2114
  /* @__PURE__ */ _jsxQ("div", {
2027
2115
  class: {
2028
- "motion-safe:transition ease-in-out w-12 h-7 rounded-md peer border hover:shadow-lg": true,
2029
- "after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:rounded-[0.2rem] after:h-5 after:w-5 after:motion-safe:transition-all after:ease-in-out": true,
2030
- "peer-checked:after:translate-x-full": true,
2116
+ "motion-safe:transition ease-in-out h-7 peer border hover:shadow-lg": true,
2117
+ "after:content-[''] after:absolute after:top-[4px] after:left-[4px] after:border after:h-5 after:w-5 after:motion-safe:transition-all after:ease-in-out": true,
2118
+ "rounded-md after:rounded-[0.2rem]": !props.round,
2119
+ "rounded-full after:rounded-full": props.round,
2120
+ "w-12 peer-checked:after:translate-x-full": !props.checkbox,
2121
+ "w-7 after:opacity-0 peer-checked:after:opacity-100": props.checkbox,
2031
2122
  [toggleOnColorClasses[props.onColor ?? "blue"].checked]: true,
2032
2123
  [toggleOnColorClasses[props.onColor ?? "blue"].checkedAfter]: true,
2033
2124
  [toggleOffColorClasses[props.offColor ?? "darkgray"].unchecked]: true,
@@ -100,21 +100,25 @@ export declare const buttonColorClasses: {
100
100
  export declare const sizeClasses: {
101
101
  sm: {
102
102
  base: string;
103
+ round: string;
103
104
  pad: string;
104
105
  equal: string;
105
106
  };
106
107
  md: {
107
108
  base: string;
109
+ round: string;
108
110
  pad: string;
109
111
  equal: string;
110
112
  };
111
113
  lg: {
112
114
  base: string;
115
+ round: string;
113
116
  pad: string;
114
117
  equal: string;
115
118
  };
116
119
  xl: {
117
120
  base: string;
121
+ round: string;
118
122
  pad: string;
119
123
  equal: string;
120
124
  };
@@ -123,6 +127,7 @@ interface GenericButtonProps {
123
127
  color?: keyof typeof buttonColorClasses;
124
128
  transparent?: boolean;
125
129
  size?: keyof typeof sizeClasses;
130
+ round?: boolean;
126
131
  square?: boolean;
127
132
  class?: {
128
133
  [key: string]: boolean | undefined;
@@ -6,6 +6,7 @@ interface DropdownProps extends Omit<PropsOf<'select'>, 'class' | 'size'> {
6
6
  };
7
7
  display?: JSXChildren;
8
8
  color?: keyof typeof buttonColorClasses;
9
+ round?: boolean;
9
10
  transparent?: boolean;
10
11
  size?: keyof typeof sizeClasses;
11
12
  hover?: boolean;
@@ -5,6 +5,8 @@ interface ToggleProps extends Omit<(PropsOf<'input'> & {
5
5
  class?: {
6
6
  [key: string]: boolean;
7
7
  };
8
+ checkbox?: boolean;
9
+ round?: boolean;
8
10
  onColor?: keyof typeof toggleOnColorClasses;
9
11
  offColor?: keyof typeof toggleOffColorClasses;
10
12
  center?: boolean;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from '../components/logos/IconProps';
2
+ export declare const Shuffle: import("@builder.io/qwik").Component<IconProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminescent/ui",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Luminescent UI library",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",