myoperator-ui 0.0.204 → 0.0.205

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -248,12 +248,13 @@ function looksLikeTailwindClasses(str) {
248
248
  return true;
249
249
  }
250
250
  }
251
+ const singleWordUtilities = /^(flex|grid|block|inline|contents|flow-root|hidden|invisible|visible|static|fixed|absolute|relative|sticky|isolate|isolation-auto|overflow-auto|overflow-hidden|overflow-clip|overflow-visible|overflow-scroll|overflow-x-auto|overflow-y-auto|overscroll-auto|overscroll-contain|overscroll-none|truncate|antialiased|subpixel-antialiased|italic|not-italic|underline|overline|line-through|no-underline|uppercase|lowercase|capitalize|normal-case|ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|sr-only|not-sr-only|resize|resize-none|resize-x|resize-y|snap-start|snap-end|snap-center|snap-align-none|snap-normal|snap-always|touch-auto|touch-none|touch-pan-x|touch-pan-left|touch-pan-right|touch-pan-y|touch-pan-up|touch-pan-down|touch-pinch-zoom|touch-manipulation|select-none|select-text|select-all|select-auto|will-change-auto|will-change-scroll|will-change-contents|will-change-transform|grow|grow-0|shrink|shrink-0|transform|transform-cpu|transform-gpu|transform-none|transition|transition-none|transition-all|transition-colors|transition-opacity|transition-shadow|transition-transform|animate-none|animate-spin|animate-ping|animate-pulse|animate-bounce)$/;
252
+ if (!str.includes(" ") && singleWordUtilities.test(str)) return true;
251
253
  if (/^(@[a-z0-9-]+\/)?[a-z][a-z0-9-]*$/.test(str) && !str.includes(" ")) return false;
252
254
  const words = str.split(/\s+/);
253
255
  return words.some((cls) => {
254
256
  if (!cls) return false;
255
257
  if ((cls.startsWith("aria-") || cls.startsWith("data-")) && !cls.includes("[") && !cls.includes(":")) return false;
256
- const singleWordUtilities = /^(flex|grid|block|inline|contents|flow-root|hidden|invisible|visible|static|fixed|absolute|relative|sticky|isolate|isolation-auto|overflow-auto|overflow-hidden|overflow-clip|overflow-visible|overflow-scroll|overflow-x-auto|overflow-y-auto|overscroll-auto|overscroll-contain|overscroll-none|truncate|antialiased|subpixel-antialiased|italic|not-italic|underline|overline|line-through|no-underline|uppercase|lowercase|capitalize|normal-case|ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|sr-only|not-sr-only|resize|resize-none|resize-x|resize-y|snap-start|snap-end|snap-center|snap-align-none|snap-normal|snap-always|touch-auto|touch-none|touch-pan-x|touch-pan-left|touch-pan-right|touch-pan-y|touch-pan-up|touch-pan-down|touch-pinch-zoom|touch-manipulation|select-none|select-text|select-all|select-auto|will-change-auto|will-change-scroll|will-change-contents|will-change-transform|grow|grow-0|shrink|shrink-0|transform|transform-cpu|transform-gpu|transform-none|transition|transition-none|transition-all|transition-colors|transition-opacity|transition-shadow|transition-transform|animate-none|animate-spin|animate-ping|animate-pulse|animate-bounce)$/;
257
258
  if (singleWordUtilities.test(cls)) return true;
258
259
  if (cls.includes("-")) return true;
259
260
  if (cls.includes("[") && cls.includes("]")) return true;
@@ -10633,6 +10634,7 @@ const PlanUpgradeModal = React.forwardRef<HTMLDivElement, PlanUpgradeModalProps>
10633
10634
  onOptionChange,
10634
10635
  nextLabel = "Next",
10635
10636
  onNext,
10637
+ loading = false,
10636
10638
  onClose,
10637
10639
  className,
10638
10640
  ...props
@@ -10723,6 +10725,7 @@ const PlanUpgradeModal = React.forwardRef<HTMLDivElement, PlanUpgradeModalProps>
10723
10725
  variant="default"
10724
10726
  onClick={handleNext}
10725
10727
  disabled={!activeOptionId}
10728
+ loading={loading}
10726
10729
  className="min-w-[95px]"
10727
10730
  >
10728
10731
  {nextLabel}
@@ -10780,6 +10783,8 @@ export interface PlanUpgradeModalProps
10780
10783
  nextLabel?: string;
10781
10784
  /** Called when Next is clicked */
10782
10785
  onNext?: (selectedOptionId: string) => void;
10786
+ /** Shows loading spinner on the Next button and disables it */
10787
+ loading?: boolean;
10783
10788
  /** Called when close button is clicked */
10784
10789
  onClose?: () => void;
10785
10790
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",
@@ -23,7 +23,8 @@
23
23
  "validate-types": "node scripts/validate-types.js",
24
24
  "validate:source-types": "node scripts/validate-source-types.js",
25
25
  "validate:imports": "node scripts/validate-imports.js",
26
- "build": "npm run validate:source-types && npm run validate:imports && npm run generate-registry && npm run validate:prefix && npm run validate:coverage && npm run validate:bootstrap && npm run validate:multifile && tsup src/index.ts --format esm --dts && npm run verify-build",
26
+ "validate:prefix-sync": "node scripts/sync-prefix-utils.js --check",
27
+ "build": "npm run validate:source-types && npm run validate:imports && npm run generate-registry && npm run validate:prefix && npm run validate:coverage && npm run validate:bootstrap && npm run validate:multifile && npm run validate:prefix-sync && tsup src/index.ts --format esm --dts && npm run verify-build",
27
28
  "build:safe": "npm run integrity:snapshot && npm run build",
28
29
  "dev": "tsup src/index.ts --format esm --watch",
29
30
  "typecheck": "tsc --noEmit",