@designa8/vibedesign-v6 1.12.5 → 1.12.7

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @plasma/vibedesign-v6
2
2
 
3
- Generated design system, version **1.12.5**.
3
+ Generated design system, version **1.12.7**.
4
4
 
5
5
  ## Local install (npm link)
6
6
 
package/dist/index.cjs CHANGED
@@ -4638,6 +4638,10 @@ var ChevronIcon3 = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4638
4638
  children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M9 6l6 6-6 6" })
4639
4639
  }
4640
4640
  );
4641
+ var SpinnerIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
4642
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
4643
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
4644
+ ] });
4641
4645
  function bumpMinor(version) {
4642
4646
  const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
4643
4647
  const [major = 0, minor = 0] = parts;
@@ -4651,7 +4655,8 @@ var PublishModal = import_react21.default.forwardRef(
4651
4655
  packageName = "@plasma/vibedesign",
4652
4656
  currentVersion = "1.10.9",
4653
4657
  defaultNextVersion,
4654
- defaultTarget = "production"
4658
+ defaultTarget = "production",
4659
+ loading = false
4655
4660
  }, ref) => {
4656
4661
  const [target, setTarget] = (0, import_react21.useState)(defaultTarget);
4657
4662
  const [nextVersion, setNextVersion] = (0, import_react21.useState)(
@@ -4680,8 +4685,20 @@ var PublishModal = import_react21.default.forwardRef(
4680
4685
  title: "Publish package",
4681
4686
  size: "lg",
4682
4687
  footer: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex w-full items-center justify-end gap-sm", children: [
4683
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
4684
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "primary", onClick: handlePublish, children: isProduction ? "Publish to npm registry" : "Publish locally (npm link)" })
4688
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "secondary", onClick: onClose, disabled: loading, children: "Cancel" }),
4689
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4690
+ Button,
4691
+ {
4692
+ variant: "primary",
4693
+ onClick: handlePublish,
4694
+ disabled: loading,
4695
+ "aria-busy": loading,
4696
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
4697
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SpinnerIcon3, {}),
4698
+ isProduction ? "Publishing\u2026" : "Linking\u2026"
4699
+ ] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
4700
+ }
4701
+ )
4685
4702
  ] }),
4686
4703
  children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "w-full space-y-lg", children: [
4687
4704
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-body-md text-muted", children: "Publish your package to npm so others can install and use it. Choose between a production release to the npm registry or a local publish for testing and internal use." }),
@@ -4701,6 +4718,7 @@ var PublishModal = import_react21.default.forwardRef(
4701
4718
  variant: "ghost",
4702
4719
  size: "sm",
4703
4720
  onClick: () => setTarget("production"),
4721
+ disabled: loading,
4704
4722
  className: [
4705
4723
  "!rounded-none border-b-2 -mb-px",
4706
4724
  isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
@@ -4720,6 +4738,7 @@ var PublishModal = import_react21.default.forwardRef(
4720
4738
  variant: "ghost",
4721
4739
  size: "sm",
4722
4740
  onClick: () => setTarget("local"),
4741
+ disabled: loading,
4723
4742
  className: [
4724
4743
  "!rounded-none border-b-2 -mb-px",
4725
4744
  !isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
@@ -4756,7 +4775,8 @@ var PublishModal = import_react21.default.forwardRef(
4756
4775
  "aria-label": "Next version",
4757
4776
  value: nextVersion,
4758
4777
  onChange: (e) => setNextVersion(e.target.value),
4759
- fullWidth: true
4778
+ fullWidth: true,
4779
+ disabled: loading
4760
4780
  }
4761
4781
  ),
4762
4782
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
@@ -4766,6 +4786,7 @@ var PublishModal = import_react21.default.forwardRef(
4766
4786
  size: "md",
4767
4787
  "aria-label": "Reset to suggested version",
4768
4788
  onClick: () => setNextVersion(bumpMinor(currentVersion)),
4789
+ disabled: loading,
4769
4790
  className: "!px-sm",
4770
4791
  children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RefreshIcon, {})
4771
4792
  }
@@ -4787,6 +4808,7 @@ var PublishModal = import_react21.default.forwardRef(
4787
4808
  size: "sm",
4788
4809
  onClick: () => setNotesOpen((v) => !v),
4789
4810
  "aria-expanded": notesOpen,
4811
+ disabled: loading,
4790
4812
  className: "w-full !justify-start !rounded-none gap-xs text-body",
4791
4813
  children: [
4792
4814
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronIcon3, { open: notesOpen }),
@@ -4801,7 +4823,8 @@ var PublishModal = import_react21.default.forwardRef(
4801
4823
  onChange: (e) => setNotes(e.target.value),
4802
4824
  placeholder: "What changed in this release?",
4803
4825
  rows: 3,
4804
- className: "w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus"
4826
+ disabled: loading,
4827
+ className: "w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus disabled:opacity-disabled"
4805
4828
  }
4806
4829
  ) })
4807
4830
  ] })
package/dist/index.js CHANGED
@@ -4538,7 +4538,7 @@ PreviewToolbar.displayName = "PreviewToolbar";
4538
4538
 
4539
4539
  // virtual-pkg:src/atoms/PublishModal/PublishModal.tsx
4540
4540
  import React21, { useState as useState4 } from "react";
4541
- import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
4541
+ import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
4542
4542
  var GlobeIcon = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4543
4543
  /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "9" }),
4544
4544
  /* @__PURE__ */ jsx21("path", { d: "M3 12h18" }),
@@ -4585,6 +4585,10 @@ var ChevronIcon3 = ({ open }) => /* @__PURE__ */ jsx21(
4585
4585
  children: /* @__PURE__ */ jsx21("path", { d: "M9 6l6 6-6 6" })
4586
4586
  }
4587
4587
  );
4588
+ var SpinnerIcon3 = () => /* @__PURE__ */ jsxs20("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", "aria-hidden": "true", className: "animate-spin", children: [
4589
+ /* @__PURE__ */ jsx21("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "2", opacity: "0.25" }),
4590
+ /* @__PURE__ */ jsx21("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
4591
+ ] });
4588
4592
  function bumpMinor(version) {
4589
4593
  const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
4590
4594
  const [major = 0, minor = 0] = parts;
@@ -4598,7 +4602,8 @@ var PublishModal = React21.forwardRef(
4598
4602
  packageName = "@plasma/vibedesign",
4599
4603
  currentVersion = "1.10.9",
4600
4604
  defaultNextVersion,
4601
- defaultTarget = "production"
4605
+ defaultTarget = "production",
4606
+ loading = false
4602
4607
  }, ref) => {
4603
4608
  const [target, setTarget] = useState4(defaultTarget);
4604
4609
  const [nextVersion, setNextVersion] = useState4(
@@ -4627,8 +4632,20 @@ var PublishModal = React21.forwardRef(
4627
4632
  title: "Publish package",
4628
4633
  size: "lg",
4629
4634
  footer: /* @__PURE__ */ jsxs20("div", { className: "flex w-full items-center justify-end gap-sm", children: [
4630
- /* @__PURE__ */ jsx21(Button, { variant: "secondary", onClick: onClose, children: "Cancel" }),
4631
- /* @__PURE__ */ jsx21(Button, { variant: "primary", onClick: handlePublish, children: isProduction ? "Publish to npm registry" : "Publish locally (npm link)" })
4635
+ /* @__PURE__ */ jsx21(Button, { variant: "secondary", onClick: onClose, disabled: loading, children: "Cancel" }),
4636
+ /* @__PURE__ */ jsx21(
4637
+ Button,
4638
+ {
4639
+ variant: "primary",
4640
+ onClick: handlePublish,
4641
+ disabled: loading,
4642
+ "aria-busy": loading,
4643
+ children: loading ? /* @__PURE__ */ jsxs20(Fragment4, { children: [
4644
+ /* @__PURE__ */ jsx21(SpinnerIcon3, {}),
4645
+ isProduction ? "Publishing\u2026" : "Linking\u2026"
4646
+ ] }) : isProduction ? "Publish to npm registry" : "Publish locally (npm link)"
4647
+ }
4648
+ )
4632
4649
  ] }),
4633
4650
  children: /* @__PURE__ */ jsxs20("div", { className: "w-full space-y-lg", children: [
4634
4651
  /* @__PURE__ */ jsx21("p", { className: "text-body-md text-muted", children: "Publish your package to npm so others can install and use it. Choose between a production release to the npm registry or a local publish for testing and internal use." }),
@@ -4648,6 +4665,7 @@ var PublishModal = React21.forwardRef(
4648
4665
  variant: "ghost",
4649
4666
  size: "sm",
4650
4667
  onClick: () => setTarget("production"),
4668
+ disabled: loading,
4651
4669
  className: [
4652
4670
  "!rounded-none border-b-2 -mb-px",
4653
4671
  isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
@@ -4667,6 +4685,7 @@ var PublishModal = React21.forwardRef(
4667
4685
  variant: "ghost",
4668
4686
  size: "sm",
4669
4687
  onClick: () => setTarget("local"),
4688
+ disabled: loading,
4670
4689
  className: [
4671
4690
  "!rounded-none border-b-2 -mb-px",
4672
4691
  !isProduction ? "text-primary border-primary" : "text-muted border-transparent hover:text-ink"
@@ -4703,7 +4722,8 @@ var PublishModal = React21.forwardRef(
4703
4722
  "aria-label": "Next version",
4704
4723
  value: nextVersion,
4705
4724
  onChange: (e) => setNextVersion(e.target.value),
4706
- fullWidth: true
4725
+ fullWidth: true,
4726
+ disabled: loading
4707
4727
  }
4708
4728
  ),
4709
4729
  /* @__PURE__ */ jsx21(
@@ -4713,6 +4733,7 @@ var PublishModal = React21.forwardRef(
4713
4733
  size: "md",
4714
4734
  "aria-label": "Reset to suggested version",
4715
4735
  onClick: () => setNextVersion(bumpMinor(currentVersion)),
4736
+ disabled: loading,
4716
4737
  className: "!px-sm",
4717
4738
  children: /* @__PURE__ */ jsx21(RefreshIcon, {})
4718
4739
  }
@@ -4734,6 +4755,7 @@ var PublishModal = React21.forwardRef(
4734
4755
  size: "sm",
4735
4756
  onClick: () => setNotesOpen((v) => !v),
4736
4757
  "aria-expanded": notesOpen,
4758
+ disabled: loading,
4737
4759
  className: "w-full !justify-start !rounded-none gap-xs text-body",
4738
4760
  children: [
4739
4761
  /* @__PURE__ */ jsx21(ChevronIcon3, { open: notesOpen }),
@@ -4748,7 +4770,8 @@ var PublishModal = React21.forwardRef(
4748
4770
  onChange: (e) => setNotes(e.target.value),
4749
4771
  placeholder: "What changed in this release?",
4750
4772
  rows: 3,
4751
- className: "w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus"
4773
+ disabled: loading,
4774
+ className: "w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus disabled:opacity-disabled"
4752
4775
  }
4753
4776
  ) })
4754
4777
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designa8/vibedesign-v6",
3
- "version": "1.12.5",
3
+ "version": "1.12.7",
4
4
  "description": "Design system \"Plasma Design System\" generated by atom-server.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -21,6 +21,8 @@ export interface PublishModalProps {
21
21
  defaultNextVersion?: string;
22
22
  /** Which tab is selected by default */
23
23
  defaultTarget?: PublishTarget;
24
+ /** When true, the publish action is in-flight: disables the tabs, Cancel, and shows a spinner on the submit button */
25
+ loading?: boolean;
24
26
  }
25
27
 
26
28
  const GlobeIcon = () => (
@@ -88,6 +90,13 @@ const ChevronIcon = ({ open }: { open: boolean }) => (
88
90
  </svg>
89
91
  );
90
92
 
93
+ const SpinnerIcon = () => (
94
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden="true" className="animate-spin">
95
+ <circle cx="12" cy="12" r="9" stroke="currentColor" strokeWidth="2" opacity="0.25" />
96
+ <path d="M21 12a9 9 0 0 0-9-9" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
97
+ </svg>
98
+ );
99
+
91
100
  function bumpMinor(version: string): string {
92
101
  const parts = version.split(".").map((n) => parseInt(n, 10) || 0);
93
102
  const [major = 0, minor = 0] = parts;
@@ -104,6 +113,7 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
104
113
  currentVersion = "1.10.9",
105
114
  defaultNextVersion,
106
115
  defaultTarget = "production",
116
+ loading = false,
107
117
  },
108
118
  ref
109
119
  ) => {
@@ -143,11 +153,25 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
143
153
  size="lg"
144
154
  footer={
145
155
  <div className="flex w-full items-center justify-end gap-sm">
146
- <Button variant="secondary" onClick={onClose}>
156
+ <Button variant="secondary" onClick={onClose} disabled={loading}>
147
157
  Cancel
148
158
  </Button>
149
- <Button variant="primary" onClick={handlePublish}>
150
- {isProduction ? "Publish to npm registry" : "Publish locally (npm link)"}
159
+ <Button
160
+ variant="primary"
161
+ onClick={handlePublish}
162
+ disabled={loading}
163
+ aria-busy={loading}
164
+ >
165
+ {loading ? (
166
+ <>
167
+ <SpinnerIcon />
168
+ {isProduction ? "Publishing…" : "Linking…"}
169
+ </>
170
+ ) : isProduction ? (
171
+ "Publish to npm registry"
172
+ ) : (
173
+ "Publish locally (npm link)"
174
+ )}
151
175
  </Button>
152
176
  </div>
153
177
  }
@@ -172,6 +196,7 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
172
196
  variant="ghost"
173
197
  size="sm"
174
198
  onClick={() => setTarget("production")}
199
+ disabled={loading}
175
200
  className={[
176
201
  "!rounded-none border-b-2 -mb-px",
177
202
  isProduction
@@ -189,6 +214,7 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
189
214
  variant="ghost"
190
215
  size="sm"
191
216
  onClick={() => setTarget("local")}
217
+ disabled={loading}
192
218
  className={[
193
219
  "!rounded-none border-b-2 -mb-px",
194
220
  !isProduction
@@ -237,12 +263,14 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
237
263
  value={nextVersion}
238
264
  onChange={(e) => setNextVersion(e.target.value)}
239
265
  fullWidth
266
+ disabled={loading}
240
267
  />
241
268
  <Button
242
269
  variant="secondary"
243
270
  size="md"
244
271
  aria-label="Reset to suggested version"
245
272
  onClick={() => setNextVersion(bumpMinor(currentVersion))}
273
+ disabled={loading}
246
274
  className="!px-sm"
247
275
  >
248
276
  <RefreshIcon />
@@ -267,6 +295,7 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
267
295
  size="sm"
268
296
  onClick={() => setNotesOpen((v) => !v)}
269
297
  aria-expanded={notesOpen}
298
+ disabled={loading}
270
299
  className="w-full !justify-start !rounded-none gap-xs text-body"
271
300
  >
272
301
  <ChevronIcon open={notesOpen} />
@@ -279,7 +308,8 @@ export const PublishModal = React.forwardRef<HTMLDivElement, PublishModalProps>(
279
308
  onChange={(e) => setNotes(e.target.value)}
280
309
  placeholder="What changed in this release?"
281
310
  rows={3}
282
- className="w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus"
311
+ disabled={loading}
312
+ className="w-full resize-none rounded-sm border border-hairline bg-surface px-sm py-xs text-body-sm text-ink placeholder:text-muted-soft outline-none focus:ring-2 focus:ring-primary-focus/20 focus:border-primary-focus disabled:opacity-disabled"
283
313
  />
284
314
  </div>
285
315
  )}