@vertz/theme-shadcn 0.2.16 → 0.2.18

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.d.ts CHANGED
@@ -32,7 +32,7 @@ interface ResolvedThemeBase {
32
32
  globals: GlobalCSSOutput;
33
33
  }
34
34
  import { VariantFunction as VariantFunction5 } from "@vertz/ui";
35
- import { CheckboxElements, CheckboxOptions, CheckboxState, ProgressElements, ProgressOptions, ProgressState, RadioOptions as RadioOptions2, SliderElements, SliderOptions, SliderState, ToastOptions as ToastOptions2 } from "@vertz/ui-primitives";
35
+ import { CheckboxOptions, ProgressElements, ProgressOptions, ProgressState, RadioOptions as RadioOptions2, SliderElements, SliderOptions, SliderState, ToastOptions as ToastOptions2 } from "@vertz/ui-primitives";
36
36
  import { ChildValue } from "@vertz/ui";
37
37
  interface AlertProps {
38
38
  variant?: "default" | "destructive";
@@ -978,9 +978,7 @@ interface ThemedPrimitives {
978
978
  /** Themed Tabs — composable JSX component with Tabs.List, Tabs.Trigger, Tabs.Content. */
979
979
  Tabs: ThemedTabsComponent;
980
980
  /** Themed Checkbox — wraps @vertz/ui-primitives Checkbox with shadcn styles. */
981
- checkbox: (options?: CheckboxOptions) => CheckboxElements & {
982
- state: CheckboxState;
983
- };
981
+ checkbox: (options?: CheckboxOptions) => HTMLButtonElement;
984
982
  /** Themed Switch — wraps @vertz/ui-primitives Switch with shadcn styles. */
985
983
  switch: (options?: ThemedSwitchOptions) => HTMLElement;
986
984
  /** Themed Popover — composable JSX component with Popover.Trigger, Popover.Content. */
package/dist/index.js CHANGED
@@ -751,24 +751,24 @@ function createCheckIcon() {
751
751
  }
752
752
  function createThemedCheckbox(styles) {
753
753
  return function themedCheckbox(options) {
754
- const result = Checkbox.Root(options);
755
- result.root.classList.add(styles.root);
754
+ const root = Checkbox.Root(options);
755
+ root.classList.add(styles.root);
756
756
  const indicator = document.createElement("span");
757
757
  indicator.classList.add(styles.indicator);
758
- const dataState = result.root.getAttribute("data-state") ?? "unchecked";
758
+ const dataState = root.getAttribute("data-state") ?? "unchecked";
759
759
  indicator.setAttribute("data-state", dataState);
760
760
  indicator.appendChild(createCheckIcon());
761
- result.root.appendChild(indicator);
761
+ root.appendChild(indicator);
762
762
  const observer = new MutationObserver((mutations) => {
763
763
  for (const mutation of mutations) {
764
764
  if (mutation.attributeName === "data-state") {
765
- const newState = result.root.getAttribute("data-state") ?? "unchecked";
765
+ const newState = root.getAttribute("data-state") ?? "unchecked";
766
766
  indicator.setAttribute("data-state", newState);
767
767
  }
768
768
  }
769
769
  });
770
- observer.observe(result.root, { attributes: true, attributeFilter: ["data-state"] });
771
- return result;
770
+ observer.observe(root, { attributes: true, attributeFilter: ["data-state"] });
771
+ return root;
772
772
  };
773
773
  }
774
774
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/theme-shadcn",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Shadcn-inspired theme for Vertz — pre-built style definitions using variants() and css()",
@@ -39,8 +39,8 @@
39
39
  "typecheck": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "@vertz/ui": "^0.2.15",
43
- "@vertz/ui-primitives": "^0.2.15"
42
+ "@vertz/ui": "^0.2.17",
43
+ "@vertz/ui-primitives": "^0.2.17"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@happy-dom/global-registrator": "^20.7.0",