@trops/dash-core 0.1.578 → 0.1.579

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.
package/dist/index.esm.js CHANGED
@@ -37583,16 +37583,17 @@ var PresetGallery = function PresetGallery(_ref3) {
37583
37583
  /**
37584
37584
  * Render a swatch for a generated palette channel. Hex values render
37585
37585
  * inline; named Tailwind families fall back to `bg-{name}-500` which
37586
- * is in the safelist.
37586
+ * is in the safelist. Height is set by the parent flex/grid so the
37587
+ * generated-palette row can grow to fill available space.
37587
37588
  */
37588
37589
  var PaletteSwatch = function PaletteSwatch(_ref4) {
37589
37590
  var value = _ref4.value,
37590
37591
  label = _ref4.label;
37591
37592
  var isHex = isHexColor$1(value);
37592
37593
  return /*#__PURE__*/jsxs("div", {
37593
- className: "flex flex-col items-center gap-1 flex-1",
37594
+ className: "flex flex-col items-center gap-1 flex-1 min-h-0",
37594
37595
  children: [/*#__PURE__*/jsx("div", {
37595
- className: "h-10 w-full rounded ".concat(isHex ? "" : "bg-".concat(value, "-500")),
37596
+ className: "flex-1 min-h-0 w-full rounded ".concat(isHex ? "" : "bg-".concat(value, "-500")),
37596
37597
  style: isHex ? {
37597
37598
  backgroundColor: value
37598
37599
  } : undefined
@@ -37619,9 +37620,9 @@ var InlineHexPicker = function InlineHexPicker(_ref5) {
37619
37620
  setActiveFamily = _useState2[1];
37620
37621
  var swatches = getCuratedColorGrid(activeFamily);
37621
37622
  return /*#__PURE__*/jsxs("div", {
37622
- className: "flex flex-col gap-2",
37623
+ className: "flex flex-col gap-2 flex-1 min-h-0",
37623
37624
  children: [/*#__PURE__*/jsx("div", {
37624
- className: "flex flex-row gap-2 flex-wrap",
37625
+ className: "flex flex-row gap-2 flex-wrap shrink-0",
37625
37626
  children: families.map(function (family) {
37626
37627
  var isActive = activeFamily === family;
37627
37628
  return /*#__PURE__*/jsx("button", {
@@ -37634,7 +37635,10 @@ var InlineHexPicker = function InlineHexPicker(_ref5) {
37634
37635
  }, family);
37635
37636
  })
37636
37637
  }), /*#__PURE__*/jsx("div", {
37637
- className: "grid grid-cols-12 gap-1",
37638
+ className: "grid grid-cols-12 gap-1 flex-1 min-h-0",
37639
+ style: {
37640
+ gridAutoRows: "1fr"
37641
+ },
37638
37642
  children: swatches.map(function (hex) {
37639
37643
  var isSelected = selectedHex && hex.toLowerCase() === selectedHex.toLowerCase();
37640
37644
  return /*#__PURE__*/jsx("button", {
@@ -37645,14 +37649,17 @@ var InlineHexPicker = function InlineHexPicker(_ref5) {
37645
37649
  style: {
37646
37650
  backgroundColor: hex
37647
37651
  },
37648
- className: "h-6 rounded transition-transform hover:scale-110 ".concat(isSelected ? "border-2 border-yellow-400 scale-110" : ""),
37652
+ className: "w-full h-full rounded transition-transform hover:scale-110 ".concat(isSelected ? "border-2 border-yellow-400 scale-110" : ""),
37649
37653
  "aria-label": "Pick ".concat(hex),
37650
37654
  title: hex
37651
37655
  }, hex);
37652
37656
  })
37653
- }), /*#__PURE__*/jsx(CustomHexColorPane, {
37654
- onApply: onPick,
37655
- label: "Or paste a hex value"
37657
+ }), /*#__PURE__*/jsx("div", {
37658
+ className: "shrink-0",
37659
+ children: /*#__PURE__*/jsx(CustomHexColorPane, {
37660
+ onApply: onPick,
37661
+ label: "Or paste a hex value"
37662
+ })
37656
37663
  })]
37657
37664
  });
37658
37665
  };
@@ -37816,12 +37823,9 @@ var ColorHarmonyPicker = function ColorHarmonyPicker(_ref8) {
37816
37823
  }
37817
37824
  var previewTheme = buildTheme();
37818
37825
  return /*#__PURE__*/jsxs("div", {
37819
- className: inline ? "flex flex-col gap-4" : "flex flex-col gap-4 p-6 overflow-y-auto flex-1 min-h-0",
37820
- children: [/*#__PURE__*/jsx("span", {
37821
- className: "text-sm font-semibold opacity-50",
37822
- children: "Generate from Color"
37823
- }), /*#__PURE__*/jsxs("div", {
37824
- className: "flex flex-col gap-2",
37826
+ className: inline ? "flex flex-col gap-4 flex-1 min-h-0" : "flex flex-col gap-4 p-6 flex-1 min-h-0",
37827
+ children: [/*#__PURE__*/jsxs("div", {
37828
+ className: "flex flex-col gap-2 shrink-0",
37825
37829
  children: [/*#__PURE__*/jsx("span", {
37826
37830
  className: "text-xs opacity-50",
37827
37831
  children: "Harmony"
@@ -37841,11 +37845,11 @@ var ColorHarmonyPicker = function ColorHarmonyPicker(_ref8) {
37841
37845
  })
37842
37846
  })]
37843
37847
  }), /*#__PURE__*/jsxs("div", {
37844
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
37848
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6 flex-1 min-h-0",
37845
37849
  children: [/*#__PURE__*/jsxs("div", {
37846
- className: "flex flex-col gap-2",
37850
+ className: "flex flex-col gap-2 min-h-0",
37847
37851
  children: [/*#__PURE__*/jsx("span", {
37848
- className: "text-xs opacity-50",
37852
+ className: "text-xs opacity-50 shrink-0",
37849
37853
  children: "Base Color"
37850
37854
  }), /*#__PURE__*/jsx(InlineHexPicker, {
37851
37855
  selectedHex: isHexColor$1(selectedColor) ? selectedColor : null,
@@ -37853,41 +37857,38 @@ var ColorHarmonyPicker = function ColorHarmonyPicker(_ref8) {
37853
37857
  return setSelectedColor(hex);
37854
37858
  }
37855
37859
  })]
37860
+ }), /*#__PURE__*/jsx(HslNudgePanel, {
37861
+ dH: dH,
37862
+ dS: dS,
37863
+ dL: dL,
37864
+ onChange: function onChange(_ref9) {
37865
+ var h = _ref9.dH,
37866
+ s = _ref9.dS,
37867
+ l = _ref9.dL;
37868
+ setDH(h);
37869
+ setDS(s);
37870
+ setDL(l);
37871
+ }
37872
+ })]
37873
+ }), /*#__PURE__*/jsxs("div", {
37874
+ className: "flex flex-col gap-2 shrink-0",
37875
+ children: [/*#__PURE__*/jsx("span", {
37876
+ className: "text-xs opacity-50",
37877
+ children: "Generated Palette"
37856
37878
  }), /*#__PURE__*/jsxs("div", {
37857
- className: "flex flex-col gap-4",
37858
- children: [/*#__PURE__*/jsx(HslNudgePanel, {
37859
- dH: dH,
37860
- dS: dS,
37861
- dL: dL,
37862
- onChange: function onChange(_ref9) {
37863
- var h = _ref9.dH,
37864
- s = _ref9.dS,
37865
- l = _ref9.dL;
37866
- setDH(h);
37867
- setDS(s);
37868
- setDL(l);
37869
- }
37870
- }), /*#__PURE__*/jsxs("div", {
37871
- className: "flex flex-col gap-2",
37872
- children: [/*#__PURE__*/jsx("span", {
37873
- className: "text-xs opacity-50",
37874
- children: "Generated Palette"
37875
- }), /*#__PURE__*/jsxs("div", {
37876
- className: "flex flex-row gap-2",
37877
- children: [/*#__PURE__*/jsx(PaletteSwatch, {
37878
- value: previewTheme.primary,
37879
- label: "Primary"
37880
- }), /*#__PURE__*/jsx(PaletteSwatch, {
37881
- value: previewTheme.secondary,
37882
- label: "Secondary"
37883
- }), /*#__PURE__*/jsx(PaletteSwatch, {
37884
- value: previewTheme.tertiary,
37885
- label: "Tertiary"
37886
- }), /*#__PURE__*/jsx(PaletteSwatch, {
37887
- value: previewTheme.neutral,
37888
- label: "Neutral"
37889
- })]
37890
- })]
37879
+ className: "flex flex-row gap-2 h-20",
37880
+ children: [/*#__PURE__*/jsx(PaletteSwatch, {
37881
+ value: previewTheme.primary,
37882
+ label: "Primary"
37883
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
37884
+ value: previewTheme.secondary,
37885
+ label: "Secondary"
37886
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
37887
+ value: previewTheme.tertiary,
37888
+ label: "Tertiary"
37889
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
37890
+ value: previewTheme.neutral,
37891
+ label: "Neutral"
37891
37892
  })]
37892
37893
  })]
37893
37894
  }), !inline && /*#__PURE__*/jsx(Button, {
@@ -38058,13 +38059,10 @@ var RandomPreview = function RandomPreview(_ref1) {
38058
38059
  setSeed(generateRandomHexTheme());
38059
38060
  }
38060
38061
  return /*#__PURE__*/jsxs("div", {
38061
- className: "flex flex-col gap-4",
38062
- children: [/*#__PURE__*/jsx("span", {
38063
- className: "text-sm font-semibold opacity-50",
38064
- children: "Random Theme"
38065
- }), /*#__PURE__*/jsxs("div", {
38066
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
38067
- children: [/*#__PURE__*/jsx(HslNudgePanel, {
38062
+ className: "flex flex-col gap-4 flex-1 min-h-0",
38063
+ children: [/*#__PURE__*/jsx("div", {
38064
+ className: "flex-1 min-h-0",
38065
+ children: /*#__PURE__*/jsx(HslNudgePanel, {
38068
38066
  dH: dH,
38069
38067
  dS: dS,
38070
38068
  dL: dL,
@@ -38076,26 +38074,26 @@ var RandomPreview = function RandomPreview(_ref1) {
38076
38074
  setDS(s);
38077
38075
  setDL(l);
38078
38076
  }
38079
- }), /*#__PURE__*/jsxs("div", {
38080
- className: "flex flex-col gap-2",
38081
- children: [/*#__PURE__*/jsx("span", {
38082
- className: "text-xs opacity-50",
38083
- children: "Generated Palette"
38084
- }), previewTheme && /*#__PURE__*/jsxs("div", {
38085
- className: "flex flex-row gap-2",
38086
- children: [/*#__PURE__*/jsx(PaletteSwatch, {
38087
- value: previewTheme.primary,
38088
- label: "Primary"
38089
- }), /*#__PURE__*/jsx(PaletteSwatch, {
38090
- value: previewTheme.secondary,
38091
- label: "Secondary"
38092
- }), /*#__PURE__*/jsx(PaletteSwatch, {
38093
- value: previewTheme.tertiary,
38094
- label: "Tertiary"
38095
- }), /*#__PURE__*/jsx(PaletteSwatch, {
38096
- value: previewTheme.neutral,
38097
- label: "Neutral"
38098
- })]
38077
+ })
38078
+ }), /*#__PURE__*/jsxs("div", {
38079
+ className: "flex flex-col gap-2 shrink-0",
38080
+ children: [/*#__PURE__*/jsx("span", {
38081
+ className: "text-xs opacity-50",
38082
+ children: "Generated Palette"
38083
+ }), previewTheme && /*#__PURE__*/jsxs("div", {
38084
+ className: "flex flex-row gap-2 h-20",
38085
+ children: [/*#__PURE__*/jsx(PaletteSwatch, {
38086
+ value: previewTheme.primary,
38087
+ label: "Primary"
38088
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
38089
+ value: previewTheme.secondary,
38090
+ label: "Secondary"
38091
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
38092
+ value: previewTheme.tertiary,
38093
+ label: "Tertiary"
38094
+ }), /*#__PURE__*/jsx(PaletteSwatch, {
38095
+ value: previewTheme.neutral,
38096
+ label: "Neutral"
38099
38097
  })]
38100
38098
  })]
38101
38099
  }), /*#__PURE__*/jsx(Button, {
@@ -38135,19 +38133,13 @@ var ThemeQuickCreate = function ThemeQuickCreate(_ref11) {
38135
38133
  setWizardTheme(null);
38136
38134
  }
38137
38135
  return /*#__PURE__*/jsxs("div", {
38138
- className: "flex flex-col gap-6 p-6 overflow-y-auto flex-1 min-h-0",
38139
- children: [/*#__PURE__*/jsxs("div", {
38140
- className: "flex flex-col gap-2",
38141
- children: [/*#__PURE__*/jsx("span", {
38142
- className: "text-sm font-semibold opacity-50",
38143
- children: "Name Your Theme"
38144
- }), /*#__PURE__*/jsx(InputText, {
38145
- value: wizardName,
38146
- onChange: function onChange(val) {
38147
- return setWizardName(val);
38148
- },
38149
- placeholder: "Theme name..."
38150
- })]
38136
+ className: "flex flex-col gap-4 p-6 flex-1 min-h-0 overflow-hidden",
38137
+ children: [/*#__PURE__*/jsx(InputText, {
38138
+ value: wizardName,
38139
+ onChange: function onChange(val) {
38140
+ return setWizardName(val);
38141
+ },
38142
+ placeholder: "Theme name..."
38151
38143
  }), showMethodPicker && /*#__PURE__*/jsxs("div", {
38152
38144
  className: "flex flex-col gap-2",
38153
38145
  children: [/*#__PURE__*/jsx("span", {