@donotdev/components 0.0.18 → 0.0.19

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 (42) hide show
  1. package/dist/advanced/ImageGallery/ImageGallery.d.ts.map +1 -1
  2. package/dist/advanced/ImageGallery/ImageGallery.js +13 -7
  3. package/dist/advanced/JsonViewer/JsonViewer.d.ts.map +1 -1
  4. package/dist/advanced/JsonViewer/JsonViewer.js +1 -9
  5. package/dist/atomic/Alert/index.d.ts +1 -1
  6. package/dist/atomic/Badge/index.d.ts +1 -1
  7. package/dist/atomic/Button/index.d.ts +1 -1
  8. package/dist/atomic/Combobox/index.d.ts +5 -1
  9. package/dist/atomic/Combobox/index.d.ts.map +1 -1
  10. package/dist/atomic/Combobox/index.js +30 -10
  11. package/dist/atomic/HeroSection/index.d.ts +1 -1
  12. package/dist/atomic/Input/index.d.ts +1 -1
  13. package/dist/atomic/Input/index.d.ts.map +1 -1
  14. package/dist/atomic/Input/index.js +3 -2
  15. package/dist/atomic/Rating/index.d.ts +1 -1
  16. package/dist/atomic/Select/index.d.ts +8 -0
  17. package/dist/atomic/Select/index.d.ts.map +1 -1
  18. package/dist/atomic/Select/index.js +6 -2
  19. package/dist/atomic/Stepper/index.d.ts +1 -1
  20. package/dist/atomic/Tabs/index.d.ts +1 -1
  21. package/dist/atomic/Tag/index.d.ts +1 -1
  22. package/dist/atomic/Toaster/ToastPrimitive.d.ts +1 -1
  23. package/dist/atomic/Toaster/index.d.ts.map +1 -1
  24. package/dist/atomic/Toaster/index.js +1 -1
  25. package/dist/atomic/Toggle/index.d.ts +1 -1
  26. package/dist/atomic/ToggleGroup/index.d.ts +1 -1
  27. package/dist/atomic/index.d.ts +5 -2
  28. package/dist/atomic/index.d.ts.map +1 -1
  29. package/dist/atomic/index.js +1 -2
  30. package/dist/hooks/useToast.d.ts.map +1 -1
  31. package/dist/hooks/useToast.js +3 -2
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +6 -6
  35. package/dist/styles/index.css +4 -0
  36. package/dist/styles/index.d.ts +1 -2
  37. package/dist/styles/index.d.ts.map +1 -1
  38. package/dist/styles/index.js +1 -2
  39. package/dist/utils/measurement.d.ts.map +1 -1
  40. package/dist/utils/measurement.js +16 -14
  41. package/dist/utils/variants.d.ts +1 -1
  42. package/package.json +2 -2
@@ -3572,6 +3572,10 @@ em {
3572
3572
  flex-shrink: 0;
3573
3573
  }
3574
3574
 
3575
+ .dndev-combobox-create-btn:hover {
3576
+ opacity: 0.8;
3577
+ }
3578
+
3575
3579
  .dndev-combobox-open .dndev-input-with-trailing-icon .dndev-input-icon svg,
3576
3580
  .dndev-combobox-open .dndev-input-with-trailing-icon .dndev-input-icon > * {
3577
3581
  transform: rotate(180deg);
@@ -6,6 +6,5 @@
6
6
  * @since 0.0.1
7
7
  * @author AMBROISE PARK Consulting
8
8
  */
9
- export * from './componentConstants';
10
- export { DISPLAY, GAP_VARIANT } from './componentConstants';
9
+ export { componentClasses, essentialUtilities, animationClasses, debugClasses, cssVariables, DISPLAY, allClasses, } from './componentConstants';
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,UAAU,GACX,MAAM,sBAAsB,CAAC"}
@@ -7,5 +7,4 @@
7
7
  * @since 0.0.1
8
8
  * @author AMBROISE PARK Consulting
9
9
  */
10
- export * from './componentConstants';
11
- export { DISPLAY, GAP_VARIANT } from './componentConstants';
10
+ export { componentClasses, essentialUtilities, animationClasses, debugClasses, cssVariables, DISPLAY, allClasses, } from './componentConstants';
@@ -1 +1 @@
1
- {"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/utils/measurement.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,GAAG,IAAI,CAoD1B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,EACjD,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAuBZ;AAED;;;;;;;GAOG;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wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,EACjD,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAuBZ;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,OAAO,GAAG,IAAI,EACzB,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,EAClE,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAmCZ;AAaD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAmB9D"}
@@ -15,23 +15,25 @@ export function measureElement(element, options = {}) {
15
15
  const computedStyle = window.getComputedStyle(element);
16
16
  // Cast to HTMLElement for offset properties
17
17
  const htmlElement = element;
18
- let width = rect.width;
19
- let height = rect.height;
18
+ // getBoundingClientRect includes padding + borders by default.
19
+ // Start from content-box by subtracting both, then add back per options.
20
+ const paddingH = (parseFloat(computedStyle.paddingLeft) || 0)
21
+ + (parseFloat(computedStyle.paddingRight) || 0);
22
+ const paddingV = (parseFloat(computedStyle.paddingTop) || 0)
23
+ + (parseFloat(computedStyle.paddingBottom) || 0);
24
+ const borderH = (parseFloat(computedStyle.borderLeftWidth) || 0)
25
+ + (parseFloat(computedStyle.borderRightWidth) || 0);
26
+ const borderV = (parseFloat(computedStyle.borderTopWidth) || 0)
27
+ + (parseFloat(computedStyle.borderBottomWidth) || 0);
28
+ let width = rect.width - paddingH - borderH;
29
+ let height = rect.height - paddingV - borderV;
20
30
  if (includePadding) {
21
- const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
22
- const paddingRight = parseFloat(computedStyle.paddingRight) || 0;
23
- const paddingTop = parseFloat(computedStyle.paddingTop) || 0;
24
- const paddingBottom = parseFloat(computedStyle.paddingBottom) || 0;
25
- width += paddingLeft + paddingRight;
26
- height += paddingTop + paddingBottom;
31
+ width += paddingH;
32
+ height += paddingV;
27
33
  }
28
34
  if (includeBorders) {
29
- const borderLeft = parseFloat(computedStyle.borderLeftWidth) || 0;
30
- const borderRight = parseFloat(computedStyle.borderRightWidth) || 0;
31
- const borderTop = parseFloat(computedStyle.borderTopWidth) || 0;
32
- const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 0;
33
- width += borderLeft + borderRight;
34
- height += borderTop + borderBottom;
35
+ width += borderH;
36
+ height += borderV;
35
37
  }
36
38
  return {
37
39
  width,
@@ -9,7 +9,7 @@ import { type VariantProps } from 'class-variance-authority';
9
9
  * Used by: Card, DualCard, StackedCards, Dialog, Sheet, Alert
10
10
  */
11
11
  export declare const surfaceVariants: (props?: ({
12
- variant?: "default" | "outline" | "primary" | "destructive" | "warning" | "success" | "muted" | "secondary" | "accent" | "glass" | null | undefined;
12
+ variant?: "muted" | "accent" | "primary" | "destructive" | "outline" | "default" | "secondary" | "success" | "warning" | "glass" | null | undefined;
13
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
14
  export type SurfaceVariantProps = VariantProps<typeof surfaceVariants>;
15
15
  //# sourceMappingURL=variants.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/components",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Styled UI components for DoNotDev",
@@ -45,7 +45,7 @@
45
45
  "scripts": {
46
46
  "dev": "tsc --noEmit --watch --listFiles false --listEmittedFiles false",
47
47
  "clean": "rimraf dist tsconfig.tsbuildinfo",
48
- "type-check": "tsc --noEmit"
48
+ "type-check": "bunx tsc --noEmit"
49
49
  },
50
50
  "dependencies": {
51
51
  "@radix-ui/react-accordion": "^1.2.2",