@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.
- package/dist/advanced/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/dist/advanced/ImageGallery/ImageGallery.js +13 -7
- package/dist/advanced/JsonViewer/JsonViewer.d.ts.map +1 -1
- package/dist/advanced/JsonViewer/JsonViewer.js +1 -9
- package/dist/atomic/Alert/index.d.ts +1 -1
- package/dist/atomic/Badge/index.d.ts +1 -1
- package/dist/atomic/Button/index.d.ts +1 -1
- package/dist/atomic/Combobox/index.d.ts +5 -1
- package/dist/atomic/Combobox/index.d.ts.map +1 -1
- package/dist/atomic/Combobox/index.js +30 -10
- package/dist/atomic/HeroSection/index.d.ts +1 -1
- package/dist/atomic/Input/index.d.ts +1 -1
- package/dist/atomic/Input/index.d.ts.map +1 -1
- package/dist/atomic/Input/index.js +3 -2
- package/dist/atomic/Rating/index.d.ts +1 -1
- package/dist/atomic/Select/index.d.ts +8 -0
- package/dist/atomic/Select/index.d.ts.map +1 -1
- package/dist/atomic/Select/index.js +6 -2
- package/dist/atomic/Stepper/index.d.ts +1 -1
- package/dist/atomic/Tabs/index.d.ts +1 -1
- package/dist/atomic/Tag/index.d.ts +1 -1
- package/dist/atomic/Toaster/ToastPrimitive.d.ts +1 -1
- package/dist/atomic/Toaster/index.d.ts.map +1 -1
- package/dist/atomic/Toaster/index.js +1 -1
- package/dist/atomic/Toggle/index.d.ts +1 -1
- package/dist/atomic/ToggleGroup/index.d.ts +1 -1
- package/dist/atomic/index.d.ts +5 -2
- package/dist/atomic/index.d.ts.map +1 -1
- package/dist/atomic/index.js +1 -2
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/hooks/useToast.js +3 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/styles/index.css +4 -0
- package/dist/styles/index.d.ts +1 -2
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -2
- package/dist/utils/measurement.d.ts.map +1 -1
- package/dist/utils/measurement.js +16 -14
- package/dist/utils/variants.d.ts +1 -1
- package/package.json +2 -2
package/dist/styles/index.css
CHANGED
|
@@ -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);
|
package/dist/styles/index.d.ts
CHANGED
|
@@ -6,6 +6,5 @@
|
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
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,
|
|
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"}
|
package/dist/styles/index.js
CHANGED
|
@@ -7,5 +7,4 @@
|
|
|
7
7
|
* @since 0.0.1
|
|
8
8
|
* @author AMBROISE PARK Consulting
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
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,
|
|
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,CAqD1B;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;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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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,
|
package/dist/utils/variants.d.ts
CHANGED
|
@@ -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?: "
|
|
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.
|
|
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",
|