@cerberus-design/react 0.16.0-next-feeb186 → 0.16.0-next-22894bb
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/build/legacy/_tsup-dts-rollup.d.cts +166 -2
- package/build/legacy/components/checkbox/checkbox.cjs.map +1 -1
- package/build/legacy/components/checkbox/index.cjs.map +1 -1
- package/build/legacy/components/rating/index.cjs +167 -0
- package/build/legacy/components/rating/index.cjs.map +1 -0
- package/build/legacy/components/rating/parts.cjs +98 -0
- package/build/legacy/components/rating/parts.cjs.map +1 -0
- package/build/legacy/components/rating/primitives.cjs +97 -0
- package/build/legacy/components/rating/primitives.cjs.map +1 -0
- package/build/legacy/components/rating/rating.cjs +151 -0
- package/build/legacy/components/rating/rating.cjs.map +1 -0
- package/build/legacy/index.cjs +325 -217
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +166 -2
- package/build/modern/{chunk-Z4342DRO.js → chunk-H5WNUPGH.js} +4 -4
- package/build/modern/chunk-OS73F4SR.js +25 -0
- package/build/modern/chunk-OS73F4SR.js.map +1 -0
- package/build/modern/chunk-QQCB6JXW.js +36 -0
- package/build/modern/chunk-QQCB6JXW.js.map +1 -0
- package/build/modern/{chunk-Y4ZEJ2EF.js → chunk-UNRQAXLJ.js} +1 -1
- package/build/modern/chunk-UNRQAXLJ.js.map +1 -0
- package/build/modern/chunk-W47QEZD5.js +71 -0
- package/build/modern/chunk-W47QEZD5.js.map +1 -0
- package/build/modern/chunk-ZOSGUATV.js +1 -0
- package/build/modern/chunk-ZOSGUATV.js.map +1 -0
- package/build/modern/components/checkbox/checkbox.js +1 -1
- package/build/modern/components/checkbox/index.js +1 -1
- package/build/modern/components/rating/index.js +31 -0
- package/build/modern/components/rating/index.js.map +1 -0
- package/build/modern/components/rating/parts.js +8 -0
- package/build/modern/components/rating/parts.js.map +1 -0
- package/build/modern/components/rating/primitives.js +19 -0
- package/build/modern/components/rating/primitives.js.map +1 -0
- package/build/modern/components/rating/rating.js +12 -0
- package/build/modern/components/rating/rating.js.map +1 -0
- package/build/modern/context/notification-center.js +2 -2
- package/build/modern/index.js +47 -22
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/checkbox/checkbox.tsx +2 -2
- package/src/components/rating/index.ts +8 -0
- package/src/components/rating/parts.tsx +65 -0
- package/src/components/rating/primitives.tsx +99 -0
- package/src/components/rating/rating.tsx +78 -0
- package/src/index.ts +1 -0
- package/build/modern/chunk-Y4ZEJ2EF.js.map +0 -1
- /package/build/modern/{chunk-Z4342DRO.js.map → chunk-H5WNUPGH.js.map} +0 -0
|
@@ -145,6 +145,14 @@ import { RadioGroupItemTextProps } from '@ark-ui/react/radio-group';
|
|
|
145
145
|
import { RadioGroupLabelProps } from '@ark-ui/react/radio-group';
|
|
146
146
|
import { RadioGroupRootProps } from '@ark-ui/react/radio-group';
|
|
147
147
|
import { RadioGroupVariantProps } from '@cerberus/styled-system/recipes';
|
|
148
|
+
import { RatingGroupContextProps } from '@ark-ui/react/rating-group';
|
|
149
|
+
import { RatingGroupControlProps } from '@ark-ui/react/rating-group';
|
|
150
|
+
import { RatingGroupHiddenInputProps } from '@ark-ui/react/rating-group';
|
|
151
|
+
import { RatingGroupItemContextProps } from '@ark-ui/react/rating-group';
|
|
152
|
+
import { RatingGroupItemProps } from '@ark-ui/react/rating-group';
|
|
153
|
+
import { RatingGroupLabelProps } from '@ark-ui/react/rating-group';
|
|
154
|
+
import { RatingGroupRootProps } from '@ark-ui/react/rating-group';
|
|
155
|
+
import { RatingGroupVariantProps } from '@cerberus/styled-system/recipes';
|
|
148
156
|
import { ReactNode } from 'react';
|
|
149
157
|
import { rectIntersection } from '@dnd-kit/core';
|
|
150
158
|
import { RefAttributes } from 'react';
|
|
@@ -204,6 +212,8 @@ import { useDraggable } from '@dnd-kit/core';
|
|
|
204
212
|
import { UseDraggableArguments } from '@dnd-kit/core';
|
|
205
213
|
import { useDroppable } from '@dnd-kit/core';
|
|
206
214
|
import { UseDroppableArguments } from '@dnd-kit/core';
|
|
215
|
+
import { UseRatingGroupContext } from '@ark-ui/react/rating-group';
|
|
216
|
+
import { UseRatingGroupItemContext } from '@ark-ui/react/rating-group';
|
|
207
217
|
import { useSensor } from '@dnd-kit/core';
|
|
208
218
|
import { useSensors } from '@dnd-kit/core';
|
|
209
219
|
|
|
@@ -645,8 +655,8 @@ declare interface CerberusProviderProps {
|
|
|
645
655
|
/**
|
|
646
656
|
* Checkbox component is an abstraction of the primitives that displays a
|
|
647
657
|
* controlled checkbox with a label.
|
|
648
|
-
* @description [Cerberus Docs]
|
|
649
|
-
* @description [Ark Docs]
|
|
658
|
+
* @description [Cerberus Docs](https://cerberus.digitalu.design/react/checkbox)
|
|
659
|
+
* @description [Ark Docs](https://ark-ui.com/docs/components/checkbox)
|
|
650
660
|
*/
|
|
651
661
|
declare function Checkbox(props: CheckboxProps): JSX_2.Element;
|
|
652
662
|
export { Checkbox }
|
|
@@ -3488,6 +3498,154 @@ declare interface RangePickerInputProps extends Omit<DatePickerInputProps, 'defa
|
|
|
3488
3498
|
export { RangePickerInputProps }
|
|
3489
3499
|
export { RangePickerInputProps as RangePickerInputProps_alias_1 }
|
|
3490
3500
|
|
|
3501
|
+
/**
|
|
3502
|
+
* The Rating component is an abstraction of the primitives which provides a
|
|
3503
|
+
* visual rating system for a user to select a value.
|
|
3504
|
+
* @description [Cerberus Docs](https://cerberus.digitalu.design/react/rating)
|
|
3505
|
+
* @description [Ark Docs](https://ark-ui.com/react/docs/components/rating-group#api-reference)
|
|
3506
|
+
* @example
|
|
3507
|
+
* ```tsx
|
|
3508
|
+
* <Rating count={5} defaultValue={3} allowHalf>
|
|
3509
|
+
* {({ half, highlighted }) => {
|
|
3510
|
+
* if (half) return <StarHalfIcon fill="current" />
|
|
3511
|
+
* if (highlighted) return <StarIcon fill="current" />
|
|
3512
|
+
* return <StarIcon />
|
|
3513
|
+
* }}
|
|
3514
|
+
* </Rating>
|
|
3515
|
+
* ```
|
|
3516
|
+
*/
|
|
3517
|
+
declare function Rating(props: RatingProps): JSX_2.Element;
|
|
3518
|
+
export { Rating }
|
|
3519
|
+
export { Rating as Rating_alias_1 }
|
|
3520
|
+
export { Rating as Rating_alias_2 }
|
|
3521
|
+
|
|
3522
|
+
/**
|
|
3523
|
+
* The context primitive of the Rating component.
|
|
3524
|
+
*/
|
|
3525
|
+
declare function RatingContext(props: RatingGroupContextProps): JSX_2.Element;
|
|
3526
|
+
export { RatingContext }
|
|
3527
|
+
export { RatingContext as RatingContext_alias_1 }
|
|
3528
|
+
export { RatingContext as RatingContext_alias_2 }
|
|
3529
|
+
|
|
3530
|
+
/**
|
|
3531
|
+
* The control primitive of the Rating component.
|
|
3532
|
+
*/
|
|
3533
|
+
declare function RatingControl(props: RatingGroupControlProps): JSX_2.Element;
|
|
3534
|
+
export { RatingControl }
|
|
3535
|
+
export { RatingControl as RatingControl_alias_1 }
|
|
3536
|
+
export { RatingControl as RatingControl_alias_2 }
|
|
3537
|
+
|
|
3538
|
+
/**
|
|
3539
|
+
* The hidden input primitive of the Rating component.
|
|
3540
|
+
*/
|
|
3541
|
+
declare function RatingHiddenInput(props: RatingGroupHiddenInputProps): JSX_2.Element;
|
|
3542
|
+
export { RatingHiddenInput }
|
|
3543
|
+
export { RatingHiddenInput as RatingHiddenInput_alias_1 }
|
|
3544
|
+
export { RatingHiddenInput as RatingHiddenInput_alias_2 }
|
|
3545
|
+
|
|
3546
|
+
/**
|
|
3547
|
+
* The item primitive of the Rating component.
|
|
3548
|
+
*/
|
|
3549
|
+
declare function RatingItem(props: RatingGroupItemProps & RatingGroupVariantProps): JSX_2.Element;
|
|
3550
|
+
export { RatingItem }
|
|
3551
|
+
export { RatingItem as RatingItem_alias_1 }
|
|
3552
|
+
export { RatingItem as RatingItem_alias_2 }
|
|
3553
|
+
|
|
3554
|
+
/**
|
|
3555
|
+
* The item context primitive of the Rating component.
|
|
3556
|
+
*/
|
|
3557
|
+
declare function RatingItemContext(props: RatingGroupItemContextProps): JSX_2.Element;
|
|
3558
|
+
export { RatingItemContext }
|
|
3559
|
+
export { RatingItemContext as RatingItemContext_alias_1 }
|
|
3560
|
+
export { RatingItemContext as RatingItemContext_alias_2 }
|
|
3561
|
+
|
|
3562
|
+
/**
|
|
3563
|
+
* The label primitive of the Rating component.
|
|
3564
|
+
*/
|
|
3565
|
+
declare function RatingLabel(props: RatingGroupLabelProps): JSX_2.Element;
|
|
3566
|
+
export { RatingLabel }
|
|
3567
|
+
export { RatingLabel as RatingLabel_alias_1 }
|
|
3568
|
+
export { RatingLabel as RatingLabel_alias_2 }
|
|
3569
|
+
|
|
3570
|
+
/**
|
|
3571
|
+
* An Object containing the parts of the Rating component. For users that
|
|
3572
|
+
* prefer Object component syntax.
|
|
3573
|
+
*
|
|
3574
|
+
* @remarks
|
|
3575
|
+
*
|
|
3576
|
+
* When using object component syntax, you import the RatingParts object and
|
|
3577
|
+
* the entire family of components vs. only what you use.
|
|
3578
|
+
*/
|
|
3579
|
+
declare const RatingParts: RatingPartsValue;
|
|
3580
|
+
export { RatingParts }
|
|
3581
|
+
export { RatingParts as RatingParts_alias_1 }
|
|
3582
|
+
export { RatingParts as RatingParts_alias_2 }
|
|
3583
|
+
|
|
3584
|
+
/**
|
|
3585
|
+
* This module contains the parts of the Rating component.
|
|
3586
|
+
* @module 'rating/parts'
|
|
3587
|
+
*/
|
|
3588
|
+
declare interface RatingPartsValue {
|
|
3589
|
+
/**
|
|
3590
|
+
* The container of the rating.
|
|
3591
|
+
*/
|
|
3592
|
+
Root: ElementType;
|
|
3593
|
+
/**
|
|
3594
|
+
* The label of the rating.
|
|
3595
|
+
*/
|
|
3596
|
+
Label: ElementType;
|
|
3597
|
+
/**
|
|
3598
|
+
* The visual representation of the rating.
|
|
3599
|
+
*/
|
|
3600
|
+
Control: ElementType;
|
|
3601
|
+
/**
|
|
3602
|
+
* The context of the rating.
|
|
3603
|
+
*/
|
|
3604
|
+
Context: ElementType;
|
|
3605
|
+
/**
|
|
3606
|
+
* The item to display for the rating.
|
|
3607
|
+
*/
|
|
3608
|
+
Item: ElementType;
|
|
3609
|
+
/**
|
|
3610
|
+
* The context provider for the rating items.
|
|
3611
|
+
*/
|
|
3612
|
+
ItemContext: ElementType;
|
|
3613
|
+
/**
|
|
3614
|
+
* The native input of the rating.
|
|
3615
|
+
*/
|
|
3616
|
+
HiddenInput: ElementType;
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
/**
|
|
3620
|
+
* This module contains the abstracted Rating component.
|
|
3621
|
+
* @module 'react/rating'
|
|
3622
|
+
*/
|
|
3623
|
+
declare interface RatingProps extends Omit<RatingGroupRootProps, 'children'>, RatingGroupVariantProps {
|
|
3624
|
+
/**
|
|
3625
|
+
* The label of the rating component.
|
|
3626
|
+
*/
|
|
3627
|
+
label?: string;
|
|
3628
|
+
/**
|
|
3629
|
+
* The children of the rating component.
|
|
3630
|
+
*/
|
|
3631
|
+
children: (context: UseRatingGroupItemContext) => ReactNode;
|
|
3632
|
+
}
|
|
3633
|
+
export { RatingProps }
|
|
3634
|
+
export { RatingProps as RatingProps_alias_1 }
|
|
3635
|
+
export { RatingProps as RatingProps_alias_2 }
|
|
3636
|
+
|
|
3637
|
+
/**
|
|
3638
|
+
* This module contains the primitives of the Rating component.
|
|
3639
|
+
* @module 'rating/primitives'
|
|
3640
|
+
*/
|
|
3641
|
+
/**
|
|
3642
|
+
* The root primitive of the Rating component.
|
|
3643
|
+
*/
|
|
3644
|
+
declare function RatingRoot(props: RatingGroupRootProps & RatingGroupVariantProps): JSX_2.Element;
|
|
3645
|
+
export { RatingRoot }
|
|
3646
|
+
export { RatingRoot as RatingRoot_alias_1 }
|
|
3647
|
+
export { RatingRoot as RatingRoot_alias_2 }
|
|
3648
|
+
|
|
3491
3649
|
export { rectIntersection }
|
|
3492
3650
|
|
|
3493
3651
|
/**
|
|
@@ -4824,6 +4982,12 @@ declare function usePromptModal(): PromptModalValue;
|
|
|
4824
4982
|
export { usePromptModal }
|
|
4825
4983
|
export { usePromptModal as usePromptModal_alias_1 }
|
|
4826
4984
|
|
|
4985
|
+
export { UseRatingGroupContext }
|
|
4986
|
+
export { UseRatingGroupContext as UseRatingGroupContext_alias_1 }
|
|
4987
|
+
|
|
4988
|
+
export { UseRatingGroupItemContext }
|
|
4989
|
+
export { UseRatingGroupItemContext as UseRatingGroupItemContext_alias_1 }
|
|
4990
|
+
|
|
4827
4991
|
/**
|
|
4828
4992
|
* This hook returns a record of Cerberus colors from the document root.
|
|
4829
4993
|
* This is useful when you are working with a component that uses the `<canvas>`
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NotificationHeading
|
|
3
|
+
} from "./chunk-SLHYBPJ5.js";
|
|
1
4
|
import {
|
|
2
5
|
Notification
|
|
3
6
|
} from "./chunk-RDRD6ACD.js";
|
|
4
7
|
import {
|
|
5
8
|
NotificationDescription
|
|
6
9
|
} from "./chunk-UXY3KCC3.js";
|
|
7
|
-
import {
|
|
8
|
-
NotificationHeading
|
|
9
|
-
} from "./chunk-SLHYBPJ5.js";
|
|
10
10
|
import {
|
|
11
11
|
addNotification,
|
|
12
12
|
clearNotificationState,
|
|
@@ -177,4 +177,4 @@ export {
|
|
|
177
177
|
NotificationCenter,
|
|
178
178
|
useNotificationCenter
|
|
179
179
|
};
|
|
180
|
-
//# sourceMappingURL=chunk-
|
|
180
|
+
//# sourceMappingURL=chunk-H5WNUPGH.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RatingContext,
|
|
3
|
+
RatingControl,
|
|
4
|
+
RatingHiddenInput,
|
|
5
|
+
RatingItem,
|
|
6
|
+
RatingItemContext,
|
|
7
|
+
RatingLabel,
|
|
8
|
+
RatingRoot
|
|
9
|
+
} from "./chunk-W47QEZD5.js";
|
|
10
|
+
|
|
11
|
+
// src/components/rating/parts.tsx
|
|
12
|
+
var RatingParts = {
|
|
13
|
+
Root: RatingRoot,
|
|
14
|
+
Label: RatingLabel,
|
|
15
|
+
Control: RatingControl,
|
|
16
|
+
Context: RatingContext,
|
|
17
|
+
Item: RatingItem,
|
|
18
|
+
ItemContext: RatingItemContext,
|
|
19
|
+
HiddenInput: RatingHiddenInput
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
RatingParts
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-OS73F4SR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/rating/parts.tsx"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n RatingContext,\n RatingControl,\n RatingHiddenInput,\n RatingItem,\n RatingItemContext,\n RatingLabel,\n RatingRoot,\n} from './primitives'\n\n/**\n * This module contains the parts of the Rating component.\n * @module 'rating/parts'\n */\n\ninterface RatingPartsValue {\n /**\n * The container of the rating.\n */\n Root: ElementType\n /**\n * The label of the rating.\n */\n Label: ElementType\n /**\n * The visual representation of the rating.\n */\n Control: ElementType\n /**\n * The context of the rating.\n */\n Context: ElementType\n /**\n * The item to display for the rating.\n */\n Item: ElementType\n /**\n * The context provider for the rating items.\n */\n ItemContext: ElementType\n /**\n * The native input of the rating.\n */\n HiddenInput: ElementType\n}\n\n/**\n * An Object containing the parts of the Rating component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the RatingParts object and\n * the entire family of components vs. only what you use.\n */\nexport const RatingParts: RatingPartsValue = {\n Root: RatingRoot,\n Label: RatingLabel,\n Control: RatingControl,\n Context: RatingContext,\n Item: RatingItem,\n ItemContext: RatingItemContext,\n HiddenInput: RatingHiddenInput,\n}\n"],"mappings":";;;;;;;;;;;AAwDO,IAAM,cAAgC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb,aAAa;AACf;","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RatingParts
|
|
3
|
+
} from "./chunk-OS73F4SR.js";
|
|
4
|
+
import {
|
|
5
|
+
splitProps
|
|
6
|
+
} from "./chunk-BL7G3577.js";
|
|
7
|
+
import {
|
|
8
|
+
Show
|
|
9
|
+
} from "./chunk-BUVVRQLZ.js";
|
|
10
|
+
|
|
11
|
+
// src/components/rating/rating.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
function Rating(props) {
|
|
14
|
+
const [{ label }, styleProps, rootProps] = splitProps(
|
|
15
|
+
props,
|
|
16
|
+
["label"],
|
|
17
|
+
["orientation", "palette", "size"]
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ jsxs(RatingParts.Root, { ...styleProps, ...rootProps, children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Show, { when: Boolean(label), children: /* @__PURE__ */ jsx(RatingParts.Label, { children: label }) }),
|
|
21
|
+
/* @__PURE__ */ jsx(RatingParts.Control, { children: /* @__PURE__ */ jsx(RatingParts.Context, { children: (context) => context.items.map((item) => /* @__PURE__ */ jsx(
|
|
22
|
+
RatingParts.Item,
|
|
23
|
+
{
|
|
24
|
+
index: item,
|
|
25
|
+
palette: styleProps.palette,
|
|
26
|
+
children: /* @__PURE__ */ jsx(RatingParts.ItemContext, { children: rootProps.children })
|
|
27
|
+
},
|
|
28
|
+
item
|
|
29
|
+
)) }) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
Rating
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=chunk-QQCB6JXW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/rating/rating.tsx"],"sourcesContent":["import type {\n RatingGroupRootProps,\n UseRatingGroupContext,\n UseRatingGroupItemContext,\n} from '@ark-ui/react/rating-group'\nimport type { RatingGroupVariantProps } from '@cerberus/styled-system/recipes'\nimport type { ReactNode } from 'react'\nimport { splitProps } from '../../utils/index'\nimport { Show } from '../Show'\nimport { RatingParts } from './parts'\n\n/**\n * This module contains the abstracted Rating component.\n * @module 'react/rating'\n */\n\nexport interface RatingProps\n extends Omit<RatingGroupRootProps, 'children'>,\n RatingGroupVariantProps {\n /**\n * The label of the rating component.\n */\n label?: string\n /**\n * The children of the rating component.\n */\n children: (context: UseRatingGroupItemContext) => ReactNode\n}\n\n/**\n * The Rating component is an abstraction of the primitives which provides a\n * visual rating system for a user to select a value.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/rating)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/rating-group#api-reference)\n * @example\n * ```tsx\n * <Rating count={5} defaultValue={3} allowHalf>\n * {({ half, highlighted }) => {\n * if (half) return <StarHalfIcon fill=\"current\" />\n * if (highlighted) return <StarIcon fill=\"current\" />\n * return <StarIcon />\n * }}\n * </Rating>\n * ```\n */\nexport function Rating(props: RatingProps) {\n const [{ label }, styleProps, rootProps] = splitProps(\n props,\n ['label'],\n ['orientation', 'palette', 'size'],\n )\n\n return (\n <RatingParts.Root {...styleProps} {...rootProps}>\n <Show when={Boolean(label)}>\n <RatingParts.Label>{label}</RatingParts.Label>\n </Show>\n\n <RatingParts.Control>\n <RatingParts.Context>\n {(context: UseRatingGroupContext) =>\n context.items.map((item) => (\n <RatingParts.Item\n key={item}\n index={item}\n palette={styleProps.palette}\n >\n <RatingParts.ItemContext>\n {rootProps.children}\n </RatingParts.ItemContext>\n </RatingParts.Item>\n ))\n }\n </RatingParts.Context>\n </RatingParts.Control>\n </RatingParts.Root>\n )\n}\n"],"mappings":";;;;;;;;;;;AAqDI,SAEI,KAFJ;AARG,SAAS,OAAO,OAAoB;AACzC,QAAM,CAAC,EAAE,MAAM,GAAG,YAAY,SAAS,IAAI;AAAA,IACzC;AAAA,IACA,CAAC,OAAO;AAAA,IACR,CAAC,eAAe,WAAW,MAAM;AAAA,EACnC;AAEA,SACE,qBAAC,YAAY,MAAZ,EAAkB,GAAG,YAAa,GAAG,WACpC;AAAA,wBAAC,QAAK,MAAM,QAAQ,KAAK,GACvB,8BAAC,YAAY,OAAZ,EAAmB,iBAAM,GAC5B;AAAA,IAEA,oBAAC,YAAY,SAAZ,EACC,8BAAC,YAAY,SAAZ,EACE,WAAC,YACA,QAAQ,MAAM,IAAI,CAAC,SACjB;AAAA,MAAC,YAAY;AAAA,MAAZ;AAAA,QAEC,OAAO;AAAA,QACP,SAAS,WAAW;AAAA,QAEpB,8BAAC,YAAY,aAAZ,EACE,oBAAU,UACb;AAAA;AAAA,MANK;AAAA,IAOP,CACD,GAEL,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import type { CheckboxRootProps } from '@ark-ui/react'\nimport { type CheckboxVariantProps } from '@cerberus/styled-system/recipes'\nimport { Show } from '../Show'\nimport { Text } from '../Text'\nimport { CheckboxParts } from './parts'\nimport { CheckboxIcon } from './checkbox-icon'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps & CheckboxRootProps\n\n/**\n * Checkbox component is an abstraction of the primitives that displays a\n * controlled checkbox with a label.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/checkbox)\n * @description [Ark Docs](https://ark-ui.com/docs/components/checkbox)\n */\nexport function Checkbox(props: CheckboxProps) {\n const { size, children, ...rootProps } = props\n\n return (\n <CheckboxParts.Root {...rootProps}>\n <CheckboxParts.Control size={size}>\n <CheckboxIcon indeterminate={rootProps.checked === 'indeterminate'} />\n </CheckboxParts.Control>\n\n <CheckboxParts.Label size={size}>\n {children}\n <Show when={props.required}>\n <Text as=\"span\" data-part=\"required-indicator\">\n (required)\n </Text>\n </Show>\n </CheckboxParts.Label>\n\n <CheckboxParts.HiddenInput />\n </CheckboxParts.Root>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BQ,cAGF,YAHE;AAND,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,MAAM,UAAU,GAAG,UAAU,IAAI;AAEzC,SACE,qBAAC,cAAc,MAAd,EAAoB,GAAG,WACtB;AAAA,wBAAC,cAAc,SAAd,EAAsB,MACrB,8BAAC,gBAAa,eAAe,UAAU,YAAY,iBAAiB,GACtE;AAAA,IAEA,qBAAC,cAAc,OAAd,EAAoB,MAClB;AAAA;AAAA,MACD,oBAAC,QAAK,MAAM,MAAM,UAChB,8BAAC,QAAK,IAAG,QAAO,aAAU,sBAAqB,wBAE/C,GACF;AAAA,OACF;AAAA,IAEA,oBAAC,cAAc,aAAd,EAA0B;AAAA,KAC7B;AAEJ;","names":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/components/rating/primitives.tsx
|
|
2
|
+
import {
|
|
3
|
+
RatingGroup
|
|
4
|
+
} from "@ark-ui/react/rating-group";
|
|
5
|
+
import { cx } from "@cerberus/styled-system/css";
|
|
6
|
+
import {
|
|
7
|
+
ratingGroup
|
|
8
|
+
} from "@cerberus/styled-system/recipes";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function RatingRoot(props) {
|
|
11
|
+
const { orientation, size, ...rootProps } = props;
|
|
12
|
+
const styles = ratingGroup({ orientation, size });
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
RatingGroup.Root,
|
|
15
|
+
{
|
|
16
|
+
...rootProps,
|
|
17
|
+
className: cx(styles.root, rootProps.className)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function RatingLabel(props) {
|
|
22
|
+
const styles = ratingGroup();
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
RatingGroup.Label,
|
|
25
|
+
{
|
|
26
|
+
...props,
|
|
27
|
+
className: cx(styles.label, props.className)
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function RatingControl(props) {
|
|
32
|
+
const styles = ratingGroup();
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
RatingGroup.Control,
|
|
35
|
+
{
|
|
36
|
+
...props,
|
|
37
|
+
className: cx(styles.control, props.className)
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function RatingContext(props) {
|
|
42
|
+
return /* @__PURE__ */ jsx(RatingGroup.Context, { ...props });
|
|
43
|
+
}
|
|
44
|
+
function RatingItem(props) {
|
|
45
|
+
const { palette, ...itemProps } = props;
|
|
46
|
+
const styles = ratingGroup({ palette });
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
RatingGroup.Item,
|
|
49
|
+
{
|
|
50
|
+
...itemProps,
|
|
51
|
+
className: cx(styles.item, itemProps.className)
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function RatingItemContext(props) {
|
|
56
|
+
return /* @__PURE__ */ jsx(RatingGroup.ItemContext, { ...props });
|
|
57
|
+
}
|
|
58
|
+
function RatingHiddenInput(props) {
|
|
59
|
+
return /* @__PURE__ */ jsx(RatingGroup.HiddenInput, { ...props });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
RatingRoot,
|
|
64
|
+
RatingLabel,
|
|
65
|
+
RatingControl,
|
|
66
|
+
RatingContext,
|
|
67
|
+
RatingItem,
|
|
68
|
+
RatingItemContext,
|
|
69
|
+
RatingHiddenInput
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=chunk-W47QEZD5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/rating/primitives.tsx"],"sourcesContent":["import {\n RatingGroup,\n type RatingGroupContextProps,\n type RatingGroupControlProps,\n type RatingGroupHiddenInputProps,\n type RatingGroupItemContextProps,\n type RatingGroupItemProps,\n type RatingGroupLabelProps,\n type RatingGroupRootProps,\n} from '@ark-ui/react/rating-group'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n ratingGroup,\n type RatingGroupVariantProps,\n} from '@cerberus/styled-system/recipes'\n\n/**\n * This module contains the primitives of the Rating component.\n * @module 'rating/primitives'\n */\n\n/**\n * The root primitive of the Rating component.\n */\nexport function RatingRoot(\n props: RatingGroupRootProps & RatingGroupVariantProps,\n) {\n const { orientation, size, ...rootProps } = props\n const styles = ratingGroup({ orientation, size })\n return (\n <RatingGroup.Root\n {...rootProps}\n className={cx(styles.root, rootProps.className)}\n />\n )\n}\n\n/**\n * The label primitive of the Rating component.\n */\nexport function RatingLabel(props: RatingGroupLabelProps) {\n const styles = ratingGroup()\n return (\n <RatingGroup.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control primitive of the Rating component.\n */\nexport function RatingControl(props: RatingGroupControlProps) {\n const styles = ratingGroup()\n return (\n <RatingGroup.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The context primitive of the Rating component.\n */\nexport function RatingContext(props: RatingGroupContextProps) {\n return <RatingGroup.Context {...props} />\n}\n\n/**\n * The item primitive of the Rating component.\n */\nexport function RatingItem(\n props: RatingGroupItemProps & RatingGroupVariantProps,\n) {\n const { palette, ...itemProps } = props\n const styles = ratingGroup({ palette })\n return (\n <RatingGroup.Item\n {...itemProps}\n className={cx(styles.item, itemProps.className)}\n />\n )\n}\n\n/**\n * The item context primitive of the Rating component.\n */\nexport function RatingItemContext(props: RatingGroupItemContextProps) {\n return <RatingGroup.ItemContext {...props} />\n}\n\n/**\n * The hidden input primitive of the Rating component.\n */\nexport function RatingHiddenInput(props: RatingGroupHiddenInputProps) {\n return <RatingGroup.HiddenInput {...props} />\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,OAQK;AACP,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AAgBH;AANG,SAAS,WACd,OACA;AACA,QAAM,EAAE,aAAa,MAAM,GAAG,UAAU,IAAI;AAC5C,QAAM,SAAS,YAAY,EAAE,aAAa,KAAK,CAAC;AAChD,SACE;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,MAAM,UAAU,SAAS;AAAA;AAAA,EAChD;AAEJ;AAKO,SAAS,YAAY,OAA8B;AACxD,QAAM,SAAS,YAAY;AAC3B,SACE;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,OAAO,MAAM,SAAS;AAAA;AAAA,EAC7C;AAEJ;AAKO,SAAS,cAAc,OAAgC;AAC5D,QAAM,SAAS,YAAY;AAC3B,SACE;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,SAAS,MAAM,SAAS;AAAA;AAAA,EAC/C;AAEJ;AAKO,SAAS,cAAc,OAAgC;AAC5D,SAAO,oBAAC,YAAY,SAAZ,EAAqB,GAAG,OAAO;AACzC;AAKO,SAAS,WACd,OACA;AACA,QAAM,EAAE,SAAS,GAAG,UAAU,IAAI;AAClC,QAAM,SAAS,YAAY,EAAE,QAAQ,CAAC;AACtC,SACE;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,MAAM,UAAU,SAAS;AAAA;AAAA,EAChD;AAEJ;AAKO,SAAS,kBAAkB,OAAoC;AACpE,SAAO,oBAAC,YAAY,aAAZ,EAAyB,GAAG,OAAO;AAC7C;AAKO,SAAS,kBAAkB,OAAoC;AACpE,SAAO,oBAAC,YAAY,aAAZ,EAAyB,GAAG,OAAO;AAC7C;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-ZOSGUATV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "../../chunk-ZOSGUATV.js";
|
|
2
|
+
import {
|
|
3
|
+
Rating
|
|
4
|
+
} from "../../chunk-QQCB6JXW.js";
|
|
5
|
+
import {
|
|
6
|
+
RatingParts
|
|
7
|
+
} from "../../chunk-OS73F4SR.js";
|
|
8
|
+
import {
|
|
9
|
+
RatingContext,
|
|
10
|
+
RatingControl,
|
|
11
|
+
RatingHiddenInput,
|
|
12
|
+
RatingItem,
|
|
13
|
+
RatingItemContext,
|
|
14
|
+
RatingLabel,
|
|
15
|
+
RatingRoot
|
|
16
|
+
} from "../../chunk-W47QEZD5.js";
|
|
17
|
+
import "../../chunk-BL7G3577.js";
|
|
18
|
+
import "../../chunk-FQLMPEYX.js";
|
|
19
|
+
import "../../chunk-BUVVRQLZ.js";
|
|
20
|
+
export {
|
|
21
|
+
Rating,
|
|
22
|
+
RatingContext,
|
|
23
|
+
RatingControl,
|
|
24
|
+
RatingHiddenInput,
|
|
25
|
+
RatingItem,
|
|
26
|
+
RatingItemContext,
|
|
27
|
+
RatingLabel,
|
|
28
|
+
RatingParts,
|
|
29
|
+
RatingRoot
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RatingContext,
|
|
3
|
+
RatingControl,
|
|
4
|
+
RatingHiddenInput,
|
|
5
|
+
RatingItem,
|
|
6
|
+
RatingItemContext,
|
|
7
|
+
RatingLabel,
|
|
8
|
+
RatingRoot
|
|
9
|
+
} from "../../chunk-W47QEZD5.js";
|
|
10
|
+
export {
|
|
11
|
+
RatingContext,
|
|
12
|
+
RatingControl,
|
|
13
|
+
RatingHiddenInput,
|
|
14
|
+
RatingItem,
|
|
15
|
+
RatingItemContext,
|
|
16
|
+
RatingLabel,
|
|
17
|
+
RatingRoot
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Rating
|
|
3
|
+
} from "../../chunk-QQCB6JXW.js";
|
|
4
|
+
import "../../chunk-OS73F4SR.js";
|
|
5
|
+
import "../../chunk-W47QEZD5.js";
|
|
6
|
+
import "../../chunk-BL7G3577.js";
|
|
7
|
+
import "../../chunk-FQLMPEYX.js";
|
|
8
|
+
import "../../chunk-BUVVRQLZ.js";
|
|
9
|
+
export {
|
|
10
|
+
Rating
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=rating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
NotificationCenter,
|
|
4
4
|
useNotificationCenter
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-H5WNUPGH.js";
|
|
6
|
+
import "../chunk-SLHYBPJ5.js";
|
|
6
7
|
import "../chunk-RDRD6ACD.js";
|
|
7
8
|
import "../chunk-UXY3KCC3.js";
|
|
8
|
-
import "../chunk-SLHYBPJ5.js";
|
|
9
9
|
import "../chunk-V3M3ZOQI.js";
|
|
10
10
|
import "../chunk-IQJDVFPP.js";
|
|
11
11
|
import "../chunk-GITT5645.js";
|
package/build/modern/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavMenuTrigger
|
|
3
|
+
} from "./chunk-245SMQ45.js";
|
|
4
|
+
import {
|
|
5
|
+
FieldsetLabel
|
|
6
|
+
} from "./chunk-DRDNNRU3.js";
|
|
1
7
|
import {
|
|
2
8
|
Label
|
|
3
9
|
} from "./chunk-LT62577B.js";
|
|
@@ -20,15 +26,13 @@ import {
|
|
|
20
26
|
NavMenuList,
|
|
21
27
|
getPosition
|
|
22
28
|
} from "./chunk-AIJ75ENY.js";
|
|
23
|
-
import {
|
|
24
|
-
NavMenuTrigger
|
|
25
|
-
} from "./chunk-245SMQ45.js";
|
|
26
29
|
import {
|
|
27
30
|
FieldMessage
|
|
28
31
|
} from "./chunk-L7N24B6B.js";
|
|
29
32
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
ConfirmModal,
|
|
34
|
+
useConfirmModal
|
|
35
|
+
} from "./chunk-H54FR7IP.js";
|
|
32
36
|
import {
|
|
33
37
|
NavMenu,
|
|
34
38
|
useNavMenuContext
|
|
@@ -36,7 +40,7 @@ import {
|
|
|
36
40
|
import {
|
|
37
41
|
NotificationCenter,
|
|
38
42
|
useNotificationCenter
|
|
39
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-H5WNUPGH.js";
|
|
40
44
|
import {
|
|
41
45
|
PromptModal,
|
|
42
46
|
usePromptModal
|
|
@@ -45,6 +49,9 @@ import {
|
|
|
45
49
|
ThemeProvider,
|
|
46
50
|
useThemeContext
|
|
47
51
|
} from "./chunk-EB37HRCN.js";
|
|
52
|
+
import {
|
|
53
|
+
Tbody
|
|
54
|
+
} from "./chunk-ZR37P4NZ.js";
|
|
48
55
|
import {
|
|
49
56
|
Td
|
|
50
57
|
} from "./chunk-3R4TIF2X.js";
|
|
@@ -58,9 +65,8 @@ import {
|
|
|
58
65
|
Tooltip
|
|
59
66
|
} from "./chunk-LPALHB6R.js";
|
|
60
67
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
} from "./chunk-H54FR7IP.js";
|
|
68
|
+
NotificationHeading
|
|
69
|
+
} from "./chunk-SLHYBPJ5.js";
|
|
64
70
|
import {
|
|
65
71
|
Table,
|
|
66
72
|
Tr
|
|
@@ -81,8 +87,12 @@ import {
|
|
|
81
87
|
Tag
|
|
82
88
|
} from "./chunk-MISIUX63.js";
|
|
83
89
|
import {
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
90
|
+
FeatureFlag
|
|
91
|
+
} from "./chunk-BIDE4IJG.js";
|
|
92
|
+
import {
|
|
93
|
+
FeatureFlags,
|
|
94
|
+
useFeatureFlags
|
|
95
|
+
} from "./chunk-CJFW36DZ.js";
|
|
86
96
|
import {
|
|
87
97
|
FileStatus,
|
|
88
98
|
processStatus
|
|
@@ -111,9 +121,6 @@ import {
|
|
|
111
121
|
import {
|
|
112
122
|
NotificationDescription
|
|
113
123
|
} from "./chunk-UXY3KCC3.js";
|
|
114
|
-
import {
|
|
115
|
-
NotificationHeading
|
|
116
|
-
} from "./chunk-SLHYBPJ5.js";
|
|
117
124
|
import {
|
|
118
125
|
CircularProgress
|
|
119
126
|
} from "./chunk-6QHOKCV3.js";
|
|
@@ -142,13 +149,6 @@ import {
|
|
|
142
149
|
import {
|
|
143
150
|
Droppable
|
|
144
151
|
} from "./chunk-TKI2CKHH.js";
|
|
145
|
-
import {
|
|
146
|
-
FeatureFlag
|
|
147
|
-
} from "./chunk-BIDE4IJG.js";
|
|
148
|
-
import {
|
|
149
|
-
FeatureFlags,
|
|
150
|
-
useFeatureFlags
|
|
151
|
-
} from "./chunk-CJFW36DZ.js";
|
|
152
152
|
import "./chunk-V3M3ZOQI.js";
|
|
153
153
|
import {
|
|
154
154
|
AccordionItemGroup
|
|
@@ -185,6 +185,22 @@ import {
|
|
|
185
185
|
RadioGroupLabel,
|
|
186
186
|
RadioGroupRoot
|
|
187
187
|
} from "./chunk-5RTNSVYU.js";
|
|
188
|
+
import "./chunk-ZOSGUATV.js";
|
|
189
|
+
import {
|
|
190
|
+
Rating
|
|
191
|
+
} from "./chunk-QQCB6JXW.js";
|
|
192
|
+
import {
|
|
193
|
+
RatingParts
|
|
194
|
+
} from "./chunk-OS73F4SR.js";
|
|
195
|
+
import {
|
|
196
|
+
RatingContext,
|
|
197
|
+
RatingControl,
|
|
198
|
+
RatingHiddenInput,
|
|
199
|
+
RatingItem,
|
|
200
|
+
RatingItemContext,
|
|
201
|
+
RatingLabel,
|
|
202
|
+
RatingRoot
|
|
203
|
+
} from "./chunk-W47QEZD5.js";
|
|
188
204
|
import "./chunk-2LF3HPNA.js";
|
|
189
205
|
import {
|
|
190
206
|
OptionGroup,
|
|
@@ -241,7 +257,7 @@ import {
|
|
|
241
257
|
import "./chunk-TIJAFPHQ.js";
|
|
242
258
|
import {
|
|
243
259
|
Checkbox
|
|
244
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-UNRQAXLJ.js";
|
|
245
261
|
import "./chunk-EL4MX2PG.js";
|
|
246
262
|
import {
|
|
247
263
|
Text
|
|
@@ -516,6 +532,15 @@ export {
|
|
|
516
532
|
RadioGroupRoot,
|
|
517
533
|
RadioParts,
|
|
518
534
|
RangePickerInput,
|
|
535
|
+
Rating,
|
|
536
|
+
RatingContext,
|
|
537
|
+
RatingControl,
|
|
538
|
+
RatingHiddenInput,
|
|
539
|
+
RatingItem,
|
|
540
|
+
RatingItemContext,
|
|
541
|
+
RatingLabel,
|
|
542
|
+
RatingParts,
|
|
543
|
+
RatingRoot,
|
|
519
544
|
Select,
|
|
520
545
|
SelectClearTrigger,
|
|
521
546
|
SelectContent,
|