@donotdev/components 0.0.24 → 0.0.25
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/CarouselContent-HEXWLSR2.css +1 -0
- package/dist/CarouselContent-WGDMI6BH.js +1 -0
- package/dist/CodeContent-EYAMBIQ2.css +1 -0
- package/dist/CodeContent-RW7AXCX3.js +2 -0
- package/dist/CrawlContent-5CUKBDIN.js +1 -0
- package/dist/MarqueeContent-25D2GMPK.css +1 -0
- package/dist/MarqueeContent-DOKPFDYK.js +1 -0
- package/dist/advanced/Carousel/CarouselContent.js +2 -2
- package/dist/advanced/Carousel/CarouselSkeleton.js +1 -1
- package/dist/advanced/Code/CodeContent.js +1 -1
- package/dist/advanced/Code/CodeSkeleton.js +1 -1
- package/dist/advanced/Crawl/Crawl.d.ts.map +1 -1
- package/dist/advanced/Crawl/Crawl.js +1 -1
- package/dist/advanced/JsonViewer/JsonViewer.js +1 -1
- package/dist/advanced/Marquee/Marquee.d.ts.map +1 -1
- package/dist/advanced/Marquee/Marquee.js +1 -1
- package/dist/advanced/Marquee/MarqueeContent.js +3 -3
- package/dist/advanced/Marquee/MarqueeSkeleton.js +2 -2
- package/dist/advanced/Reveal/Reveal.js +1 -1
- package/dist/advanced/Roadmap/RoadmapContent.d.ts.map +1 -1
- package/dist/advanced/Roadmap/RoadmapContent.js +3 -3
- package/dist/advanced/SplitReveal/SplitReveal.d.ts.map +1 -1
- package/dist/advanced/SplitReveal/SplitReveal.js +2 -2
- package/dist/advanced/StackedCards/StackedCardsContent.d.ts.map +1 -1
- package/dist/advanced/StackedCards/StackedCardsContent.js +2 -2
- 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/Button/index.d.ts.map +1 -1
- package/dist/atomic/Button/index.js +1 -1
- package/dist/atomic/Calendar/index.d.ts.map +1 -1
- package/dist/atomic/Calendar/index.js +5 -4
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts +7 -0
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts.map +1 -1
- package/dist/atomic/Collapsible/CollapsiblePrimitive.js +1 -1
- package/dist/atomic/Combobox/index.js +1 -2
- package/dist/atomic/CommandDialog/index.d.ts.map +1 -1
- package/dist/atomic/CommandDialog/index.js +5 -5
- package/dist/atomic/Dialog/index.d.ts +1 -1
- package/dist/atomic/Dialog/index.d.ts.map +1 -1
- package/dist/atomic/Dialog/index.js +1 -1
- package/dist/atomic/HeroSection/index.d.ts +1 -1
- package/dist/atomic/HoverCard/index.d.ts.map +1 -1
- package/dist/atomic/HoverCard/index.js +1 -1
- package/dist/atomic/Icons/Partner/providerIcons.js +11 -11
- 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 +1 -1
- package/dist/atomic/Pagination/index.d.ts.map +1 -1
- package/dist/atomic/Pagination/index.js +2 -2
- package/dist/atomic/RadioGroup/index.d.ts +10 -5
- package/dist/atomic/RadioGroup/index.d.ts.map +1 -1
- package/dist/atomic/RadioGroup/index.js +9 -4
- package/dist/atomic/RangeInput/index.js +1 -1
- package/dist/atomic/Rating/index.d.ts +10 -1
- package/dist/atomic/Rating/index.d.ts.map +1 -1
- package/dist/atomic/Rating/index.js +2 -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/TreeView/index.d.ts +1 -1
- package/dist/atomic/TreeView/index.d.ts.map +1 -1
- package/dist/atomic/VideoPlayer/index.d.ts.map +1 -1
- package/dist/chunk-E54ZWOWD.js +1 -0
- package/dist/chunk-FA4BDD6N.js +1 -0
- package/dist/chunk-IFHHPSKN.js +1 -0
- package/dist/chunk-O2XFH626.js +1 -0
- package/dist/chunk-Q3J75GL4.js +1 -0
- package/dist/chunk-U37VKGRT.js +3 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useClickOutside.d.ts +0 -1
- package/dist/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/hooks/useClickOutside.js +0 -1
- package/dist/hooks/useToast.d.ts +2 -3
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/hooks/useToast.js +1 -2
- package/dist/index.js +4 -7
- package/dist/styles/index.css +2 -48
- package/dist/utils/variants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,23 +9,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import { Mail, MailCheck } from 'lucide-react';
|
|
12
|
-
import GoogleIcon from './GoogleIcon';
|
|
13
|
-
import GitHubIcon from './GitHubIcon';
|
|
14
|
-
import MicrosoftIcon from './MicrosoftIcon';
|
|
15
12
|
import AppleIcon from './AppleIcon';
|
|
16
13
|
import DiscordIcon from './DiscordIcon';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
14
|
+
import FacebookIcon from './FacebookIcon';
|
|
15
|
+
import GitHubIcon from './GitHubIcon';
|
|
16
|
+
import GoogleIcon from './GoogleIcon';
|
|
20
17
|
import LinkedInIcon from './LinkedinIcon';
|
|
21
|
-
import
|
|
22
|
-
import NotionIcon from './NotionIcon';
|
|
18
|
+
import MastodonIcon from './MastodonIcon';
|
|
23
19
|
import MediumIcon from './MediumIcon';
|
|
20
|
+
import MicrosoftIcon from './MicrosoftIcon';
|
|
21
|
+
import NotionIcon from './NotionIcon';
|
|
22
|
+
import RedditIcon from './RedditIcon';
|
|
23
|
+
import SlackIcon from './SlackIcon';
|
|
24
|
+
import SpotifyIcon from './SpotifyIcon';
|
|
25
|
+
import TwitchIcon from './TwitchIcon';
|
|
24
26
|
import XIcon from './XIcon';
|
|
25
|
-
import MastodonIcon from './MastodonIcon';
|
|
26
|
-
import YouTubeIcon from './YouTubeIcon';
|
|
27
27
|
import YahooIcon from './YahooIcon';
|
|
28
|
-
import
|
|
28
|
+
import YouTubeIcon from './YouTubeIcon';
|
|
29
29
|
// Import all the existing icon components
|
|
30
30
|
// Default Icon (fallback) - Handshake icon
|
|
31
31
|
function DefaultProviderIcon({ className = '', ...props }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IconType } from '../../types';
|
|
2
1
|
import './Input.css';
|
|
2
|
+
import type { IconType } from '../../types';
|
|
3
3
|
import type { InputHTMLAttributes, Ref } from 'react';
|
|
4
4
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
5
|
/** Optional icon to display inside the input */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Input/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Input/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACvE,gDAAgD;IAChD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,KAAK,GAAI,yGAaZ,UAAU,4CA6EZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -44,7 +44,7 @@ const Input = ({ className, type, icon, iconEnd = false, label, bare, value, onF
|
|
|
44
44
|
// Explicitly exclude children to prevent void element error (input is a void element)
|
|
45
45
|
// If we have a label, extract style to pass to FloatingLabel wrapper instead of input
|
|
46
46
|
const { children: _children, style, ...inputProps } = props;
|
|
47
|
-
const inputElement = (_jsx("input", { id: id, type: type, value: value, required: required, className: inputClasses, "data-bare": isBare || undefined, ...inputProps,
|
|
47
|
+
const inputElement = (_jsx("input", { id: id, type: type, value: value, required: required, autoComplete: "one-time-code", className: inputClasses, "data-bare": isBare || undefined, ...inputProps,
|
|
48
48
|
// Only apply style to input if there's no label (label wrapper gets it)
|
|
49
49
|
style: hasLabel ? undefined : style }));
|
|
50
50
|
const needsWrapper = hasIcon || hasLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Pagination/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Pagination/index.tsx"],"names":[],"mappings":"AAKA,OAAO,kBAAkB,CAAC;AAM1B,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,GAAI,gNAcjB,eAAe,4CA0LjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// packages/components/src/atomic/Pagination/index.tsx
|
|
3
|
-
import { useMemo, useState } from 'react';
|
|
4
3
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
4
|
+
import { useMemo, useState } from 'react';
|
|
5
5
|
import './Pagination.css';
|
|
6
|
+
import { cn } from '../../utils/helpers';
|
|
6
7
|
import Button from '../Button';
|
|
7
8
|
import Select from '../Select';
|
|
8
9
|
import Text from '../Text';
|
|
9
|
-
import { cn } from '../../utils/helpers';
|
|
10
10
|
const Pagination = ({ currentPage, totalPages, onPageChange, pageSize: pageSizeProp, total: totalProp, onPageSizeChange, maxVisible = 5, // Default to 5 to fit safe on mobile (48px * 7 items ~= 336px)
|
|
11
11
|
showNavigation = true, previousLabel = 'Previous', nextLabel = 'Next', itemsPerPagePlaceholder = 'Items per page', showingLabel, className, }) => {
|
|
12
12
|
const [internalPageSize, setInternalPageSize] = useState(12);
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CONTROL_VARIANT, type ControlVariant } from '../../utils/constants';
|
|
1
|
+
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
3
2
|
import type { ReactNode } from 'react';
|
|
3
|
+
import type { RadioOption, RadioGroupRootProps } from './RadioGroupPrimitive';
|
|
4
|
+
import type { ControlVariant } from '../../utils/constants';
|
|
5
|
+
import type { GridCols } from '../Grid';
|
|
4
6
|
import './RadioGroup.css';
|
|
5
7
|
export interface RadioGroupProps extends Omit<RadioGroupRootProps, 'children'> {
|
|
6
8
|
/** Semantic color variant */
|
|
7
9
|
variant?: ControlVariant;
|
|
8
10
|
/** List of radio options (alternative to children) */
|
|
9
11
|
items?: RadioOption[];
|
|
10
|
-
/** Grid columns
|
|
11
|
-
gridCols?:
|
|
12
|
+
/** Grid columns — same as Grid cols prop: number, responsive array, or template string */
|
|
13
|
+
gridCols?: GridCols;
|
|
12
14
|
/** Custom content to render (for power users) */
|
|
13
15
|
children?: ReactNode;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Accessible radio group component with semantic color variants.
|
|
17
19
|
* Supports props-based API with items prop for 90% use cases.
|
|
20
|
+
* When gridCols is provided, items are laid out using the Grid component.
|
|
18
21
|
*
|
|
19
22
|
* @component
|
|
20
23
|
* @example
|
|
@@ -22,9 +25,11 @@ export interface RadioGroupProps extends Omit<RadioGroupRootProps, 'children'> {
|
|
|
22
25
|
* <RadioGroup
|
|
23
26
|
* value={value}
|
|
24
27
|
* onValueChange={handleChange}
|
|
28
|
+
* gridCols={[1, 1, 3, 3]}
|
|
25
29
|
* items={[
|
|
26
30
|
* { value: 'option1', label: 'Option 1' },
|
|
27
|
-
* { value: 'option2', label: 'Option 2' }
|
|
31
|
+
* { value: 'option2', label: 'Option 2' },
|
|
32
|
+
* { value: 'option3', label: 'Option 3' }
|
|
28
33
|
* ]}
|
|
29
34
|
* />
|
|
30
35
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/RadioGroup/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/RadioGroup/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,kBAAkB,CAAC;AAoB1B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC;IAC5E,6BAA6B;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,sDAAsD;IACtD,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,UAAU,GAAI,6DAOjB,eAAe,4CAoCjB,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,cAAc,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
// packages/components/src/atomic/RadioGroup/index.tsx
|
|
3
3
|
/**
|
|
4
4
|
* @fileoverview RadioGroup Component - Props-based API
|
|
5
5
|
* @description Accessible radio group component built on Radix UI primitives with semantic color variants.
|
|
6
6
|
* Provides props-based API for 90% use cases with items prop.
|
|
7
7
|
*
|
|
8
|
-
* @version 0.0.
|
|
8
|
+
* @version 0.0.4
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
@@ -13,6 +13,7 @@ import { cva } from 'class-variance-authority';
|
|
|
13
13
|
import { RadioGroupPrimitive, RadioGroupRootPrimitive, RadioGroupItemPrimitive, RadioGroupIndicatorPrimitive, } from './RadioGroupPrimitive';
|
|
14
14
|
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
15
15
|
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
16
|
+
import Grid from '../Grid';
|
|
16
17
|
import './RadioGroup.css';
|
|
17
18
|
const radioGroupVariants = cva('dndev-radio-group dndev-control-group', {
|
|
18
19
|
variants: {
|
|
@@ -34,6 +35,7 @@ const radioGroupVariants = cva('dndev-radio-group dndev-control-group', {
|
|
|
34
35
|
/**
|
|
35
36
|
* Accessible radio group component with semantic color variants.
|
|
36
37
|
* Supports props-based API with items prop for 90% use cases.
|
|
38
|
+
* When gridCols is provided, items are laid out using the Grid component.
|
|
37
39
|
*
|
|
38
40
|
* @component
|
|
39
41
|
* @example
|
|
@@ -41,9 +43,11 @@ const radioGroupVariants = cva('dndev-radio-group dndev-control-group', {
|
|
|
41
43
|
* <RadioGroup
|
|
42
44
|
* value={value}
|
|
43
45
|
* onValueChange={handleChange}
|
|
46
|
+
* gridCols={[1, 1, 3, 3]}
|
|
44
47
|
* items={[
|
|
45
48
|
* { value: 'option1', label: 'Option 1' },
|
|
46
|
-
* { value: 'option2', label: 'Option 2' }
|
|
49
|
+
* { value: 'option2', label: 'Option 2' },
|
|
50
|
+
* { value: 'option3', label: 'Option 3' }
|
|
47
51
|
* ]}
|
|
48
52
|
* />
|
|
49
53
|
* ```
|
|
@@ -52,7 +56,8 @@ const radioGroupVariants = cva('dndev-radio-group dndev-control-group', {
|
|
|
52
56
|
*/
|
|
53
57
|
const RadioGroup = ({ variant, className, items = [], gridCols, children, ...props }) => {
|
|
54
58
|
const variantAttrs = getVariantDataAttrs({ variant });
|
|
55
|
-
|
|
59
|
+
const radioItems = (_jsxs(_Fragment, { children: [children, items.map((option) => (_jsxs("label", { children: [_jsx(RadioGroupItemPrimitive, { value: option.value, className: "dndev-control dndev-size-md", ...variantAttrs, children: _jsx(RadioGroupIndicatorPrimitive, {}) }), _jsx("span", { children: option.label })] }, option.value)))] }));
|
|
60
|
+
return (_jsx(RadioGroupRootPrimitive, { className: cn(radioGroupVariants({ variant }), className), ...variantAttrs, ...props, children: gridCols ? (_jsx(Grid, { cols: gridCols, gap: "medium", children: radioItems })) : (radioItems) }));
|
|
56
61
|
};
|
|
57
62
|
export default RadioGroup;
|
|
58
63
|
export { CONTROL_VARIANT as RADIOGROUP_VARIANT };
|
|
@@ -56,7 +56,7 @@ export function RangeInput({ type = 'number', label, minPlaceholder = 'Min', max
|
|
|
56
56
|
const hasValue = !!(minValue || maxValue);
|
|
57
57
|
const inputs = (_jsxs(_Fragment, { children: [_jsx(Input, { type: type, placeholder: minPlaceholder, value: minValue, min: min, max: max, bare: true, onFocus: handleMinFocus, onChange: (e) => onChange(e.target.value, maxValue), ...props }), _jsx(Text, { level: "small", variant: "muted", className: "dndev-range-input-separator", children: "\u2013" }), _jsx(Input, { type: type, placeholder: maxPlaceholder, value: maxValue, min: min, max: max, bare: true, onFocus: handleMaxFocus, onChange: (e) => onChange(minValue, e.target.value), ...props }), _jsx(Button, { icon: X, variant: "ghost", display: "compact", onClick: onClear, disabled: !hasValue, "aria-label": "Clear", className: "dndev-range-input-clear" })] }));
|
|
58
58
|
if (label) {
|
|
59
|
-
return (_jsx(FloatingLabel, { label: label, className: "dndev-range-input", children: inputs }));
|
|
59
|
+
return (_jsx(FloatingLabel, { label: label, children: _jsx("div", { className: "dndev-range-input", children: inputs }) }));
|
|
60
60
|
}
|
|
61
61
|
return _jsx("div", { className: "dndev-range-input", children: inputs });
|
|
62
62
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Rating Component
|
|
3
|
+
* @description Interactive star rating component for forms and display.
|
|
4
|
+
* Input mode accepts whole numbers (1-5), display mode renders fractional values.
|
|
5
|
+
*
|
|
6
|
+
* @version 0.0.1
|
|
7
|
+
* @since 0.0.1
|
|
8
|
+
* @author AMBROISE PARK Consulting
|
|
9
|
+
*/
|
|
1
10
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
11
|
import { CONTROL_VARIANT, type ControlVariant } from '../../utils/constants';
|
|
3
12
|
import './Rating.css';
|
|
4
13
|
import type { HTMLAttributes } from 'react';
|
|
5
14
|
declare const ratingVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
15
|
+
variant?: "warning" | "success" | "default" | "muted" | "primary" | "secondary" | "accent" | "destructive" | null | undefined;
|
|
7
16
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
17
|
export interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof ratingVariants> {
|
|
9
18
|
/** Current rating value (1-5, supports decimals for display) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Rating/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Rating/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG7E,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,OAAO,CAAC;AAE3D,QAAA,MAAM,cAAc;;8EAgBlB,CAAC;AAEH,MAAM,WAAW,WACf,SACE,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EAChD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,2BAA2B;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAiBD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,MAAM,GAAI,gHAWb,WAAW,4CAoHb,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC;AAC7D,YAAY,EAAE,cAAc,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -9,9 +9,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* @since 0.0.1
|
|
10
10
|
* @author AMBROISE PARK Consulting
|
|
11
11
|
*/
|
|
12
|
-
import { useState, useCallback, useId } from 'react';
|
|
13
|
-
import { Star } from 'lucide-react';
|
|
14
12
|
import { cva } from 'class-variance-authority';
|
|
13
|
+
import { Star } from 'lucide-react';
|
|
14
|
+
import { useState, useCallback, useId } from 'react';
|
|
15
15
|
import { CONTROL_VARIANT } from '../../utils/constants';
|
|
16
16
|
import { cn, getVariantDataAttrs } from '../../utils/helpers';
|
|
17
17
|
import './Rating.css';
|
|
@@ -20,7 +20,7 @@ export interface StepperStep {
|
|
|
20
20
|
content: ReactNode;
|
|
21
21
|
}
|
|
22
22
|
declare const stepperVariants: (props?: ({
|
|
23
|
-
variant?: "
|
|
23
|
+
variant?: "warning" | "success" | "default" | "muted" | "primary" | "secondary" | "accent" | "destructive" | null | undefined;
|
|
24
24
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
25
|
export type StepperVariant = VariantProps<typeof stepperVariants>['variant'];
|
|
26
26
|
export interface StepperProps extends VariantProps<typeof stepperVariants> {
|
|
@@ -25,7 +25,7 @@ export interface TabItem {
|
|
|
25
25
|
forceMount?: boolean;
|
|
26
26
|
}
|
|
27
27
|
declare const tabsVariants: (props?: ({
|
|
28
|
-
variant?: "
|
|
28
|
+
variant?: "warning" | "success" | "default" | "muted" | "primary" | "secondary" | "accent" | "destructive" | null | undefined;
|
|
29
29
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
30
30
|
export type TabsVariant = VariantProps<typeof tabsVariants>['variant'];
|
|
31
31
|
export interface TabsProps extends Omit<ComponentProps<typeof TabsPrimitive>, 'children'>, VariantProps<typeof tabsVariants> {
|
|
@@ -15,7 +15,7 @@ export declare const TAG_VARIANT: {
|
|
|
15
15
|
readonly ACCENT: "accent";
|
|
16
16
|
};
|
|
17
17
|
declare const tagVariants: (props?: ({
|
|
18
|
-
variant?: "default" | "
|
|
18
|
+
variant?: "default" | "accent" | "outline" | null | undefined;
|
|
19
19
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
21
|
export interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick'>, VariantProps<typeof tagVariants> {
|
|
@@ -13,7 +13,7 @@ import type { ComponentProps, ReactElement } from 'react';
|
|
|
13
13
|
declare const ToastProvider: import("react").FC<ToastPrimitives.ToastProviderProps>;
|
|
14
14
|
declare function ToastViewport({ className, ...props }: ComponentProps<typeof ToastPrimitives.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare const toastVariants: (props?: ({
|
|
16
|
-
variant?: "
|
|
16
|
+
variant?: "error" | "warning" | "info" | "success" | "default" | null | undefined;
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
18
|
interface ToastProps extends ComponentProps<typeof ToastPrimitives.Root>, VariantProps<typeof toastVariants> {
|
|
19
19
|
toastType?: ToastType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Toaster/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EAMb,WAAW,IAAI,oBAAoB,EACpC,MAAM,kBAAkB,CAAC;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/Toaster/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EAMb,WAAW,IAAI,oBAAoB,EACpC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAuB5C;;GAEG;AACH,QAAA,MAAM,WAAW,GAAI,OAAO,cAAc,CAAC,OAAO,oBAAoB,CAAC,4CAEtE,CAAC;AAEF,iBAAS,OAAO,4CAwCf;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC;AACtC,YAAY,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
11
11
|
import { ToastProvider, ToastViewport, ToastPrimitive as Toast, ToastTitle as ToastTitlePrimitive, ToastDescription as ToastDescriptionPrimitive, ToastClose as ToastClosePrimitive, ToastAction as ToastActionPrimitive, } from './ToastPrimitive';
|
|
12
|
-
import useToast
|
|
12
|
+
import { useToast } from '../../hooks/useToast';
|
|
13
13
|
import Stack from '../Stack';
|
|
14
14
|
/**
|
|
15
15
|
* Toast title component with pattern classes
|
|
@@ -10,7 +10,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
10
10
|
import { TogglePrimitive } from './TogglePrimitive';
|
|
11
11
|
import type { ComponentPropsWithoutRef } from 'react';
|
|
12
12
|
declare const toggleVariants: (props?: ({
|
|
13
|
-
variant?: "
|
|
13
|
+
variant?: "warning" | "success" | "default" | "muted" | "primary" | "secondary" | "accent" | "destructive" | "outline" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
export interface ToggleProps extends ComponentPropsWithoutRef<typeof TogglePrimitive>, VariantProps<typeof toggleVariants> {
|
|
16
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentType, HTMLAttributes, ReactNode } from 'react';
|
|
2
1
|
import type { LucideProps } from 'lucide-react';
|
|
2
|
+
import type { ComponentType, HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import './TreeView.css';
|
|
4
4
|
/** Recursive tree node data structure */
|
|
5
5
|
export interface TreeNode {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/TreeView/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/TreeView/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAEd,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,gBAAgB,CAAC;AAExB,yCAAyC;AACzC,MAAM,WAAW,QAAQ;IACvB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,uEAAuE;IACvE,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,cAAc,CAAC,gBAAgB,CAAC,EAChC,MAAM,GAAG,UAAU,CACpB;IACC,4CAA4C;IAC5C,KAAK,EAAE,QAAQ,EAAE,CAAC;IAElB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAE5C,mCAAmC;IACnC,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;IAClC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAE3D,mCAAmC;IACnC,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;IAClC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;IAE7D;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;IAE3D,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,QAAA,MAAM,QAAQ,4GA8QZ,CAAC;AAIH,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/VideoPlayer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atomic/VideoPlayer/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,eAAe;IACf,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,qFAAqF;IACrF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4JD,QAAA,MAAM,WAAW,GAAI,qIAalB,gBAAgB,4CA+JlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createElement as l}from"react";function w(o,t={}){let{allowedTags:c=["p","br","u","i","em","strong","b"],preserveLineBreaks:m=!0,className:e}=t;if(!o||typeof o!="string")return[];let g=o;m&&(g=g.replace(/\n/g,"<br/>"));let s=g.split(/(<[^>]+>)/),p=[],H=0;for(let i=0;i<s.length;i++){let r=s[i];if(!r)continue;let f=r.match(/^<(\w+)(?:\s[^>]*)?\s*\/>$/);if(f&&f[1]){let n=f[1].toLowerCase();if(c.includes(n)){let u=N(n,"",e,H++);u&&p.push(u);continue}}let d=r.match(/^<(\w+)(?:\s[^>]*)?>$/);if(d&&d[1]){let n=d[1].toLowerCase();if(c.includes(n)){let u=`</${n}>`,b="",a=i+1;for(;a<s.length&&s[a]&&s[a]!==u;)b+=s[a],a++;let h=N(n,b,e,H++);h&&p.push(h),i=a;continue}}r&&!r.startsWith("<")&&p.push(r)}return p}function N(o,t,c,m){let e={key:m};switch(c&&(e.className=c),o){case"p":return l("p",e,t);case"br":return l("br",e);case"u":return l("u",e,t);case"i":case"em":return l("em",e,t);case"strong":case"b":return l("strong",e,t);default:return t}}export{w as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-O2XFH626.js";function b(){typeof window>"u"||"IntersectionObserver"in window||(globalThis.IntersectionObserver=class{constructor(n,r={}){a(this,"callback");a(this,"elements");a(this,"options");this.callback=n,this.elements=new Set,this.options=r}observe(n){this.elements.add(n);let r=n.getBoundingClientRect(),i=r.top<window.innerHeight&&r.bottom>0,t={target:n,isIntersecting:i,intersectionRatio:i?1:0,boundingClientRect:r,intersectionRect:i?r:new DOMRect,rootBounds:null,time:Date.now()};setTimeout(()=>this.callback([t],this),0)}unobserve(n){this.elements.delete(n)}disconnect(){this.elements.clear()}})}var l=new Map,o=new Map;function O(e={}){let{threshold:n=0,root:r=null,rootMargin:i="0px"}=e,t=`${n}-${i}-${r?.toString()||"null"}`;if(l.has(t))return l.get(t);typeof window<"u"&&b();let s=new IntersectionObserver(c=>{c.forEach(v=>{let d=o.get(v.target);d&&d.forEach(u=>u(v))})},{threshold:n,root:r,rootMargin:i});return l.set(t,s),s}function p(e,n,r={}){if(typeof window>"u")return()=>{};if(b(),!window.IntersectionObserver){let t=e.getBoundingClientRect(),s=t.top<window.innerHeight&&t.bottom>0,c={target:e,isIntersecting:s,intersectionRatio:s?1:0,boundingClientRect:t,intersectionRect:s?t:new DOMRect,rootBounds:null,time:Date.now()};return setTimeout(()=>n(c),0),()=>{}}let i=O(r);return o.has(e)||o.set(e,new Set),o.get(e).add(n),i.observe(e),()=>{let t=o.get(e);t&&(t.delete(n),t.size===0&&(o.delete(e),i.unobserve(e)))}}function f(e,n,r={}){return e?p(e,i=>n(i.isIntersecting),r):()=>{}}function g(){l.forEach(e=>e.disconnect()),l.clear(),o.clear()}function I(e,n,r,i){if(!e)return()=>{};let t=r;return e.addEventListener(n,t,i),()=>{e.removeEventListener(n,t,i)}}function y(e,n,r){if(!e)return()=>{};let i=[];return n.forEach(({type:t,handler:s,options:c})=>{let v={...r,...c},d=s;e.addEventListener(t,d,v),i.push(()=>{e.removeEventListener(t,d,v)})}),()=>{i.forEach(t=>t())}}export{b as a,O as b,p as c,f as d,g as e,I as f,y as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=["ar","he","fa","ur","ps","sd","yi","ku","dv"],u=e=>{if(e)return t.includes(e);if(typeof window>"u")return!1;let n=document.documentElement.dir;if(n==="rtl")return!0;if(n==="ltr")return!1;let r=document.documentElement.lang||navigator.language.split("-")[0];return t.includes(r)};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var e=(b,a,c)=>a in b?d(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var f=(b,a,c)=>e(b,typeof a!="symbol"?a+"":a,c);export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{clsx as T}from"clsx";function a(...e){return T(e)}function H(e){let t={};return e.variant!=null&&(t["data-variant"]=e.variant),e.size!=null&&(t["data-size"]=e.size),e.shadow!=null&&(t["data-shadow"]=e.shadow),e.radius!=null&&(t["data-radius"]=e.radius),e.hover!=null&&(t["data-hover"]=e.hover),e.glow!=null&&(t["data-glow"]=e.glow),e.side!=null&&(t["data-side"]=e.side),t}var k={srOnly:"dndev-sr-only",interactive:"dndev-interactive",control:"dndev-control",notification:"dndev-notification",input:"dndev-input",surface:"dndev-surface",overlay:"dndev-overlay",spinner:"dndev-spinner"},A={flex1:"dndev-flex-1",flexShrink0:"dndev-flex-shrink-0",hidden:"dndev-hidden",hScreen:"dndev-h-screen",minHScreen:"dndev-min-h-screen",maxHScreen:"dndev-max-h-screen",h90:"dndev-h-90",minH90:"dndev-min-h-90",maxH90:"dndev-max-h-90",h80:"dndev-h-80",minH80:"dndev-min-h-80",maxH80:"dndev-max-h-80",h60:"dndev-h-60",minH60:"dndev-min-h-60",maxH60:"dndev-max-h-60",sizeMd:"dndev-size-md",sizeTouch:"dndev-size-touch",zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zFooter:"dndev-z-footer",zOverlay:"dndev-z-overlay",zBreadcrumbs:"dndev-z-breadcrumbs",zDropdown:"dndev-z-dropdown",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},N={spin:"dndev-animate-spin",pulse:"dndev-animate-pulse",bounce:"dndev-animate-bounce",fadeIn:"dndev-animate-fade-in",slideIn:"dndev-animate-slide-in",scaleIn:"dndev-animate-scale-in"},R={layout:"debug-layout",flex:"debug-flex",component:"debug-component"},I={touchTarget:"--touch-target",iconMd:"--icon-md",iconTouch:"--icon-touch",radius:"--radius",radiusNone:"--radius-none",radiusMd:"--radius-md",radiusFull:"--radius-full",radiusInteractive:"--radius-interactive",radiusSurface:"--radius-surface",radiusFloating:"--radius-floating",fontSizeXs:"--font-size-xs",fontSizeSm:"--font-size-sm",fontSizeBase:"--font-size-base",fontSizeLg:"--font-size-lg",fontSizeXl:"--font-size-xl",fontSize2xl:"--font-size-2xl",fontSize3xl:"--font-size-3xl",lineHeight:"--line-height",textMaxWidth:"--content-text",shadowSm:"--shadow-sm",shadowMd:"--shadow-md",shadowXl:"--shadow-xl",shadowNone:"--shadow-none",contentText:"--content-text",contentTable:"--content-table",contentDashboard:"--content-dashboard",gapNone:"--gap-none",gapSm:"--gap-sm",gapMd:"--gap-md",gapLg:"--gap-lg"},o={NONE:"none",TIGHT:"tight",MEDIUM:"medium",LARGE:"large"},O={COMPACT:"compact",FULL:"full",AUTO:"auto"},D={...k,...A,...N,...R};import{createElement as C,forwardRef as P}from"react";var d=P(({as:e="div",direction:t="column",align:r="stretch",justify:i="start",gap:s=o.MEDIUM,wrap:l="nowrap",overflow:c,flex:n,rigid:p=!1,nowrap:f=!1,force:u=!1,width:w="full",centered:m=!1,className:v,style:g,children:h,...x},y)=>{let z=e,b={...g,...n!==void 0?{flex:typeof n=="number"?String(n):n}:{}},S={...p&&{"data-rigid":"true"},...f&&{"data-nowrap":"true"},...u&&{"data-force":"true"}};return C(z,{ref:y,className:a("dndev-stack",v),"data-direction":t,"data-align":r,"data-justify":i,"data-gap":s,"data-wrap":l,"data-overflow":c,"data-width":w,"data-centered":m?"true":void 0,...S,style:b,...x},h)});d.displayName="Stack";var j=d;var X=j;export{a,H as b,k as c,A as d,N as e,R as f,I as g,o as h,O as i,D as j,X as k};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as i,b as g,i as E}from"./chunk-Q3J75GL4.js";var n={DEFAULT:"default",MUTED:"muted",PRIMARY:"primary",SECONDARY:"secondary",ACCENT:"accent",SUCCESS:"success",WARNING:"warning",DESTRUCTIVE:"destructive"},ze={...n,OUTLINE:"outline",GLASS:"glass"},G=n,Ye=n,Ge={GHOST:"ghost",BASE:"base",MUTED:"muted",CONTRAST:"contrast",ACCENT:"accent"};import{isValidElement as ue,useMemo as W}from"react";import{jsx as x}from"react/jsx-runtime";var fe=({icon:o,fallback:e,className:r,ariaHidden:a=!1})=>{let t=W(()=>o||e,[o,e]),s=W(()=>typeof t!="string"?!1:!/^[a-zA-Z0-9_-]+$/.test(t),[t]);if(!t)return null;let d="dndev-size-md";return typeof t=="function"||typeof t=="object"&&t!==null&&"render"in t?x(t,{className:i(d,"dndev-flex-shrink-0",r),"aria-hidden":a||void 0}):typeof t=="string"?s?x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",d,r),"aria-hidden":a,children:t}):null:ue(t)?x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",r),"aria-hidden":a,children:t}):x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",r),"aria-hidden":a,children:t})},O=fe;import{jsx as B}from"react/jsx-runtime";function ve({overlay:o=!1,variant:e=n.PRIMARY,className:r,"aria-label":a="Loading"}){let t=g({variant:e}),s=B("div",{className:i("dndev-spinner",r),role:"status","aria-busy":"true","aria-label":a,...t,children:B("span",{className:"dndev-sr-only",children:a})});return o?B("div",{className:"dndev-spinner-overlay",children:s}):s}var X=ve;import*as A from"@radix-ui/react-tooltip";import{jsx as Te}from"react/jsx-runtime";var $=A.Provider,K=A.Root,q=A.Trigger;function Z({className:o,sideOffset:e=4,...r}){return Te(A.Content,{sideOffset:e,className:i("dndev-notification dndev-tooltip","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...r})}import{useCallback as J,useRef as ye,useState as D}from"react";import{jsx as M,jsxs as Ae}from"react/jsx-runtime";function be(o){if(!o)return!1;let e=o.querySelector(".dndev-interactive-label");return e instanceof HTMLElement&&e.offsetWidth>0}function ge({content:o,children:e,side:r,align:a="center",delayDuration:t=300,variant:s}){let[d,p]=D(!1),[h,P]=D(null),[c,f]=D(!1),m=ye(null),v=J(T=>{if(m.current=T,T){p(!0);let l=getComputedStyle(T).getPropertyValue("--tooltip-side").trim();l&&P(l)}},[]),b=J(T=>{T&&be(m.current)||f(T)},[]),C=r??h??"bottom",N=g({variant:s!==G.DEFAULT?s:void 0});return M($,{children:Ae(K,{delayDuration:t,open:d?c:!1,onOpenChange:b,children:[M(q,{asChild:!0,ref:v,children:e}),d&&M(Z,{side:C,align:a,...N,children:o})]})})}var _=ge;import{cva as he}from"class-variance-authority";import{forwardRef as Pe}from"react";import{Fragment as Q,jsx as u,jsxs as H}from"react/jsx-runtime";var U={...n,GHOST:"ghost",OUTLINE:"outline",LINK:"link"},Ce=he("dndev-interactive",{variants:{variant:{[n.DEFAULT]:"",[n.MUTED]:"",[n.PRIMARY]:"",[n.SECONDARY]:"",[n.ACCENT]:"",[n.SUCCESS]:"",[n.WARNING]:"",[n.DESTRUCTIVE]:"",[U.GHOST]:"",[U.OUTLINE]:"",[U.LINK]:""}},defaultVariants:{variant:n.DEFAULT}}),j=Pe(({className:o,variant:e,render:r,display:a=E.AUTO,icon:t,iconEnd:s=!1,children:d,tooltip:p,floating:h=!1,fullWidth:P=!1,loading:c=!1,loadingText:f,progress:m,disabled:v,"aria-label":b,"aria-describedby":C,...N},T)=>{let l=d,I=!!t,L=!!l,S=a,k=v||c,se=c&&m!==void 0&&m<100,le=c?f??l:l,F=c?H(Q,{children:[se?u("span",{className:"dndev-button-progress","aria-hidden":"true",children:H("svg",{viewBox:"0 0 20 20",className:"dndev-progress-ring",children:[u("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.2"}),u("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:`${m/100*50.27} 50.27`,strokeLinecap:"round",transform:"rotate(-90 10 10)"})]})}):u(X,{className:"dndev-button-spinner","aria-hidden":"true"}),L&&u("span",{className:"dndev-interactive-label","data-display":S,children:le})]}):H(Q,{children:[t&&!s&&u(O,{icon:t}),L&&u("span",{className:"dndev-interactive-label","data-display":S,children:l}),t&&s&&u(O,{icon:t})]}),z=()=>b||(typeof l=="string"?l:typeof l=="number"?String(l):I&&!L?"Button":void 0),de=e===n.DEFAULT?n.PRIMARY:e,pe=g({variant:de}),ce=N.type||"button",{type:Fe,...me}=N,Y={children:F,className:i(Ce({variant:e,className:o}),"touch-manipulation"),"aria-label":z(),"aria-describedby":C,...pe,...h&&{"data-floating":"true"},...P&&{"data-full-width":"true"},...S&&{"data-display":S},...c&&{"data-loading":"true","aria-busy":"true"},...me},w=r?r(Y):u("button",{ref:T,type:ce,role:"button",tabIndex:k?-1:0,disabled:k,"aria-disabled":k||void 0,...Y,children:F});return S===E.COMPACT||S===E.AUTO?u(_,{content:p||z()||"Button",children:w}):p?u(_,{content:p,children:w}):w});j.displayName="Button";var ee=j;import{createElement as Ne,forwardRef as Se}from"react";import{jsx as xe,jsxs as Re}from"react/jsx-runtime";var Ee={...n,CODE:"code"},te=Se(function({as:e="div",children:r,variant:a=Ee.DEFAULT,level:t,align:s,weight:d,italic:p,className:h,...P},c){let f=e,m=g({variant:a}),b=t??(["h1","h2","h3","h4","h5","h6"].includes(e)?e:"body"),C=b!=="body"?{"data-level":b}:{},N=typeof r=="string"&&r.includes(`
|
|
2
|
+
`)?r.split(`
|
|
3
|
+
`).map((T,l,I)=>Re("span",{children:[T,l<I.length-1&&xe("br",{})]},l)):r;return Ne(f,{ref:c,className:i("dndev-text-base",h),"data-text-align":s||void 0,"data-font-weight":d||void 0,"data-italic":p||void 0,...m,...C,...P},N)});te.displayName="Text";var Rt=te;import*as y from"@radix-ui/react-scroll-area";import{jsx as oe}from"react/jsx-runtime";var re=y.Root,ne=y.Viewport,ie=y.Corner,R=({className:o,orientation:e="vertical",...r})=>oe(y.ScrollAreaScrollbar,{orientation:e,className:i("dndev-scroll-bar",o),"data-orientation":e,...r,children:oe(y.ScrollAreaThumb,{className:"dndev-scroll-bar-thumb","data-orientation":e})});import{jsx as V,jsxs as Ie}from"react/jsx-runtime";var Ve=({className:o,children:e,showHorizontal:r=!1,showVertical:a=!0,end:t=!1,...s})=>Ie(re,{className:i("dndev-scroll-area",t&&"dndev-scroll-area-end",o),...s,children:[V(ne,{className:"dndev-scroll-area-viewport",children:e}),a&&V(R,{orientation:"vertical"}),r&&V(R,{orientation:"horizontal"}),V(ie,{})]}),Dt=Ve;import{Copy as Le,Check as ke}from"lucide-react";import{useState as we,useCallback as Oe,useEffect as Be,useRef as De}from"react";import{jsx as _e}from"react/jsx-runtime";var Me=({text:o,children:e,variant:r="ghost",className:a,onCopy:t,onClick:s,tooltipText:d="Copy to clipboard",copiedTooltipText:p="Copied!",showTooltip:h=!0,ariaLabel:P,...c})=>{let[f,m]=we(!1),v=De(null);Be(()=>()=>{v.current!==null&&clearTimeout(v.current)},[]);let b=Oe(async C=>{try{if(typeof window>"u"||!navigator?.clipboard)return;await navigator.clipboard.writeText(o),m(!0),t?.(o),v.current!==null&&clearTimeout(v.current),v.current=setTimeout(()=>m(!1),2e3),s?.(C)}catch{}},[o,t,s]);return _e(ee,{type:"button",variant:r,display:E.COMPACT,icon:f?ke:Le,onClick:b,tooltip:h?f?p:d:void 0,className:i("dndev-copy-button-transition",f&&"dndev-copy-button-scaled",a),"aria-label":P||(f?"Copied to clipboard":"Copy to clipboard"),...c,children:e})},Kt=Me;import{useEffect as Ue,useState as He}from"react";function ae(){if(typeof window>"u")return!1;try{let o=document.documentElement,e=getComputedStyle(o).getPropertyValue("--theme-is-dark").trim();return e==="1"?!0:e==="0"?!1:o.classList.contains("dark")}catch{return document.documentElement.classList.contains("dark")}}function Qt(){let[o,e]=He(!1);return Ue(()=>{e(ae());let r=new MutationObserver(()=>{e(ae())});return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),o}export{n as a,ze as b,G as c,Ye as d,Ge as e,O as f,X as g,$ as h,K as i,q as j,Z as k,_ as l,U as m,Ce as n,ee as o,Ee as p,Rt as q,re as r,ne as s,ie as t,R as u,Dt as v,Kt as w,ae as x,Qt as y};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
9
|
-
export {
|
|
9
|
+
export { useToast, toast, TOAST_DURATIONS, type ToastFunction, } from './useToast';
|
|
10
10
|
export type { ToastType } from '../atomic/Toaster/Toast.types';
|
|
11
11
|
export * from './useClickOutside';
|
|
12
12
|
export * from './useIntersectionObserver';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,OAAO,EACL,QAAQ,EACR,KAAK,EACL,eAAe,EACf,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @since 0.0.1
|
|
8
8
|
* @author AMBROISE PARK Consulting
|
|
9
9
|
*/
|
|
10
|
-
export {
|
|
10
|
+
export { useToast, toast, TOAST_DURATIONS, } from './useToast';
|
|
11
11
|
export * from './useClickOutside';
|
|
12
12
|
export * from './useIntersectionObserver';
|
|
13
13
|
export * from './useViewportVisibility';
|
|
@@ -73,5 +73,4 @@
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
export declare function useClickOutside<T extends HTMLElement>(ref: React.RefObject<T | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean): void;
|
|
76
|
-
export default useClickOutside;
|
|
77
76
|
//# sourceMappingURL=useClickOutside.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickOutside.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,EACjD,OAAO,GAAE,OAAc,GACtB,IAAI,CAoCN
|
|
1
|
+
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickOutside.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,EACjD,OAAO,GAAE,OAAc,GACtB,IAAI,CAoCN"}
|
package/dist/hooks/useToast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ToastActionElement, ToastProps as ToastPrimitiveProps } from '../atomic/Toaster/ToastPrimitive';
|
|
2
1
|
import type { ToastType } from '../atomic/Toaster/Toast.types';
|
|
2
|
+
import type { ToastActionElement, ToastProps as ToastPrimitiveProps } from '../atomic/Toaster/ToastPrimitive';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* Toast duration configuration
|
|
@@ -155,7 +155,7 @@ declare const toast: ToastFunction;
|
|
|
155
155
|
* - Uses module-level state for singleton behavior
|
|
156
156
|
* - CSR/SSR safe with proper initialization
|
|
157
157
|
*/
|
|
158
|
-
declare function useToast(): {
|
|
158
|
+
export declare function useToast(): {
|
|
159
159
|
toast: ToastFunction;
|
|
160
160
|
dismiss: (toastId?: string) => void;
|
|
161
161
|
pause: (toastId: string) => void;
|
|
@@ -169,7 +169,6 @@ declare function useToast(): {
|
|
|
169
169
|
* @since 0.0.1
|
|
170
170
|
* @author AMBROISE PARK Consulting
|
|
171
171
|
*/
|
|
172
|
-
export default useToast;
|
|
173
172
|
/**
|
|
174
173
|
* Exported toast function and duration constants
|
|
175
174
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../src/hooks/useToast.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,IAAI,mBAAmB,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../src/hooks/useToast.tsx"],"names":[],"mappings":"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"}
|
package/dist/hooks/useToast.js
CHANGED
|
@@ -381,7 +381,7 @@ const toast = (input, message) => {
|
|
|
381
381
|
* - Uses module-level state for singleton behavior
|
|
382
382
|
* - CSR/SSR safe with proper initialization
|
|
383
383
|
*/
|
|
384
|
-
function useToast() {
|
|
384
|
+
export function useToast() {
|
|
385
385
|
// Use React 19.1 useSyncExternalStore for optimal performance
|
|
386
386
|
const state = useSyncExternalStore(useMemo(() => (callback) => {
|
|
387
387
|
const listeners = getListeners();
|
|
@@ -409,7 +409,6 @@ function useToast() {
|
|
|
409
409
|
* @since 0.0.1
|
|
410
410
|
* @author AMBROISE PARK Consulting
|
|
411
411
|
*/
|
|
412
|
-
export default useToast;
|
|
413
412
|
/**
|
|
414
413
|
* Exported toast function and duration constants
|
|
415
414
|
*
|