@cerberus-design/react 0.10.4-next-8007762 → 0.10.4-next-4e536c0
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 +138 -0
- package/build/legacy/components/Fieldset.cjs +66 -0
- package/build/legacy/components/Fieldset.cjs.map +1 -0
- package/build/legacy/components/FieldsetLabel.cjs +49 -0
- package/build/legacy/components/FieldsetLabel.cjs.map +1 -0
- package/build/legacy/components/Label.cjs +1 -1
- package/build/legacy/components/Label.cjs.map +1 -1
- package/build/legacy/components/Legend.cjs +95 -0
- package/build/legacy/components/Legend.cjs.map +1 -0
- package/build/legacy/context/prompt-modal.cjs +1 -1
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +424 -333
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +138 -0
- package/build/modern/chunk-3ZDFQO25.js +31 -0
- package/build/modern/chunk-3ZDFQO25.js.map +1 -0
- package/build/modern/chunk-6TTN2JMY.js +54 -0
- package/build/modern/chunk-6TTN2JMY.js.map +1 -0
- package/build/modern/{chunk-LKFXUM3Z.js → chunk-77LI5SP3.js} +8 -8
- package/build/modern/{chunk-6YUB3ITX.js → chunk-BGBCJ2W2.js} +7 -7
- package/build/modern/{chunk-I35HMGJQ.js → chunk-NMF2HYWO.js} +2 -2
- package/build/modern/{chunk-I35HMGJQ.js.map → chunk-NMF2HYWO.js.map} +1 -1
- package/build/modern/chunk-PZAZKQMO.js +25 -0
- package/build/modern/chunk-PZAZKQMO.js.map +1 -0
- package/build/modern/{chunk-EZNGCXVJ.js → chunk-SP6O64KQ.js} +4 -4
- package/build/modern/components/Fieldset.js +9 -0
- package/build/modern/components/Fieldset.js.map +1 -0
- package/build/modern/components/FieldsetLabel.js +7 -0
- package/build/modern/components/FieldsetLabel.js.map +1 -0
- package/build/modern/components/Label.js +1 -1
- package/build/modern/components/Legend.js +10 -0
- package/build/modern/components/Legend.js.map +1 -0
- package/build/modern/context/confirm-modal.js +3 -3
- package/build/modern/context/notification-center.js +2 -2
- package/build/modern/context/prompt-modal.js +4 -4
- package/build/modern/index.js +45 -33
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Fieldset.tsx +65 -0
- package/src/components/FieldsetLabel.tsx +59 -0
- package/src/components/Label.tsx +1 -1
- package/src/components/Legend.tsx +87 -0
- package/src/index.ts +3 -0
- /package/build/modern/{chunk-LKFXUM3Z.js.map → chunk-77LI5SP3.js.map} +0 -0
- /package/build/modern/{chunk-6YUB3ITX.js.map → chunk-BGBCJ2W2.js.map} +0 -0
- /package/build/modern/{chunk-EZNGCXVJ.js.map → chunk-SP6O64KQ.js.map} +0 -0
|
@@ -55,6 +55,7 @@ import { DroppableContainers } from '@dnd-kit/core';
|
|
|
55
55
|
import { DroppableMeasuring } from '@dnd-kit/core';
|
|
56
56
|
import { ElementType } from 'react';
|
|
57
57
|
import { FieldMessageVariantProps } from '@cerberus/styled-system/recipes';
|
|
58
|
+
import type { FieldsetHTMLAttributes } from 'react';
|
|
58
59
|
import { FileStatusVariantProps } from '@cerberus/styled-system/recipes';
|
|
59
60
|
import { ForwardRefExoticComponent } from 'react';
|
|
60
61
|
import { getClientRect } from '@dnd-kit/core';
|
|
@@ -74,6 +75,7 @@ import { KeyboardSensor } from '@dnd-kit/core';
|
|
|
74
75
|
import { KeyboardSensorOptions } from '@dnd-kit/core';
|
|
75
76
|
import { KeyboardSensorProps } from '@dnd-kit/core';
|
|
76
77
|
import { LabelVariantProps } from '@cerberus/styled-system/recipes';
|
|
78
|
+
import { LabelVariantProps as LabelVariantProps_2 } from '@cerberus-design/styled-system/recipes';
|
|
77
79
|
import { MeasuringConfiguration } from '@dnd-kit/core';
|
|
78
80
|
import { MeasuringFrequency } from '@dnd-kit/core';
|
|
79
81
|
import { MeasuringStrategy } from '@dnd-kit/core';
|
|
@@ -687,6 +689,96 @@ declare type FieldMessageProps = FieldMessageBaseProps & FieldMessageVariantProp
|
|
|
687
689
|
export { FieldMessageProps }
|
|
688
690
|
export { FieldMessageProps as FieldMessageProps_alias_1 }
|
|
689
691
|
|
|
692
|
+
/**
|
|
693
|
+
* A component to group related elements in a form for accessibility.
|
|
694
|
+
* @memberof Field
|
|
695
|
+
* @see https://cerberus.digitalu.com/react/fieldset
|
|
696
|
+
* @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)
|
|
697
|
+
* @description [MDN Web Docs: Fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)
|
|
698
|
+
* @example
|
|
699
|
+
* ```tsx
|
|
700
|
+
* import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'
|
|
701
|
+
* import { Hstack } from '@cerberus/styled-system/jsx'
|
|
702
|
+
*
|
|
703
|
+
* function SomeForm() {
|
|
704
|
+
* return (
|
|
705
|
+
* <form>
|
|
706
|
+
* <Fieldset>
|
|
707
|
+
* <Legend>Do you like cats?</Legend>
|
|
708
|
+
* <Hstack>
|
|
709
|
+
* <Field>
|
|
710
|
+
* <Radio id="yes" name="cats" value="yes" />
|
|
711
|
+
* <Label htmlFor="yes">Yes</Label>
|
|
712
|
+
* </Field>
|
|
713
|
+
* </Hstack>
|
|
714
|
+
* <Hstack>
|
|
715
|
+
* <Field>
|
|
716
|
+
* <Radio id="no" name="cats" value="no" />
|
|
717
|
+
* <Label htmlFor="no">No</Label>
|
|
718
|
+
* </Field>
|
|
719
|
+
* </Hstack>
|
|
720
|
+
* </Fieldset>
|
|
721
|
+
* </form>
|
|
722
|
+
* )
|
|
723
|
+
* }
|
|
724
|
+
*/
|
|
725
|
+
declare function Fieldset(props: FieldsetProps): JSX_2.Element;
|
|
726
|
+
export { Fieldset }
|
|
727
|
+
export { Fieldset as Fieldset_alias_1 }
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Used for labeling inputs that are children of a Fieldset group.
|
|
731
|
+
* @memberof Fieldset
|
|
732
|
+
* @see https://cerberus.digitalu.design/react/fieldset
|
|
733
|
+
* @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)
|
|
734
|
+
* @example
|
|
735
|
+
* ```tsx
|
|
736
|
+
* import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'
|
|
737
|
+
* import { Hstack } from '@cerberus/styled-system/jsx'
|
|
738
|
+
*
|
|
739
|
+
* function SomeForm() {
|
|
740
|
+
* return (
|
|
741
|
+
* <form>
|
|
742
|
+
* <Fieldset>
|
|
743
|
+
* <Legend>Do you like cats?</Legend>
|
|
744
|
+
* <Hstack>
|
|
745
|
+
* <Field>
|
|
746
|
+
* <Radio id="yes" name="cats" value="yes" />
|
|
747
|
+
* <FieldsetLabel htmlFor="yes">Yes</FieldsetLabel>
|
|
748
|
+
* </Field>
|
|
749
|
+
* </Hstack>
|
|
750
|
+
* <Hstack>
|
|
751
|
+
* <Field>
|
|
752
|
+
* <Radio id="no" name="cats" value="no" />
|
|
753
|
+
* <FieldsetLabel htmlFor="no">No</FieldsetLabel>
|
|
754
|
+
* </Field>
|
|
755
|
+
* </Hstack>
|
|
756
|
+
* </Fieldset>
|
|
757
|
+
* </form>
|
|
758
|
+
* )
|
|
759
|
+
* }
|
|
760
|
+
* ```
|
|
761
|
+
*/
|
|
762
|
+
declare function FieldsetLabel(props: FieldsetLabelProps): JSX_2.Element;
|
|
763
|
+
export { FieldsetLabel }
|
|
764
|
+
export { FieldsetLabel as FieldsetLabel_alias_1 }
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* This module contains the FieldsetLabel component.
|
|
768
|
+
* @module FieldsetLabel
|
|
769
|
+
*/
|
|
770
|
+
declare type FieldsetLabelProps = LabelProps & LabelVariantProps;
|
|
771
|
+
export { FieldsetLabelProps }
|
|
772
|
+
export { FieldsetLabelProps as FieldsetLabelProps_alias_1 }
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* This module contains the Fieldset component.
|
|
776
|
+
* @module Fieldset
|
|
777
|
+
*/
|
|
778
|
+
declare type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>;
|
|
779
|
+
export { FieldsetProps }
|
|
780
|
+
export { FieldsetProps as FieldsetProps_alias_1 }
|
|
781
|
+
|
|
690
782
|
declare interface FileBaseStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
691
783
|
/**
|
|
692
784
|
* A unique identifier for the file status. Required for accessibility.
|
|
@@ -958,6 +1050,52 @@ declare type LabelProps = LabelBaseProps & LabelVariantProps;
|
|
|
958
1050
|
export { LabelProps }
|
|
959
1051
|
export { LabelProps as LabelProps_alias_1 }
|
|
960
1052
|
|
|
1053
|
+
/**
|
|
1054
|
+
* A component to provide a global label for a group of related elements in a form (for accessibility).
|
|
1055
|
+
* @memberof Fieldset
|
|
1056
|
+
* @see https://cerberus.digitalu.com/react/fieldset
|
|
1057
|
+
* @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)
|
|
1058
|
+
* @description [MDN Web Docs: Legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)
|
|
1059
|
+
* @example
|
|
1060
|
+
* ```tsx
|
|
1061
|
+
* import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'
|
|
1062
|
+
* import { Hstack } from '@cerberus/styled-system/jsx'
|
|
1063
|
+
*
|
|
1064
|
+
* function SomeForm() {
|
|
1065
|
+
* return (
|
|
1066
|
+
* <form>
|
|
1067
|
+
* <Fieldset>
|
|
1068
|
+
* <Legend>Do you like cats?</Legend>
|
|
1069
|
+
* <Hstack>
|
|
1070
|
+
* <Field>
|
|
1071
|
+
* <Radio id="yes" name="cats" value="yes" />
|
|
1072
|
+
* <Label htmlFor="yes">Yes</Label>
|
|
1073
|
+
* </Field>
|
|
1074
|
+
* </Hstack>
|
|
1075
|
+
* <Hstack>
|
|
1076
|
+
* <Field>
|
|
1077
|
+
* <Radio id="no" name="cats" value="no" />
|
|
1078
|
+
* <Label htmlFor="no">No</Label>
|
|
1079
|
+
* </Field>
|
|
1080
|
+
* </Hstack>
|
|
1081
|
+
* </Fieldset>
|
|
1082
|
+
* </form>
|
|
1083
|
+
* )
|
|
1084
|
+
* }
|
|
1085
|
+
* ```
|
|
1086
|
+
*/
|
|
1087
|
+
declare function Legend(props: LegendProps): JSX_2.Element;
|
|
1088
|
+
export { Legend }
|
|
1089
|
+
export { Legend as Legend_alias_1 }
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* This module contains the Fieldset component.
|
|
1093
|
+
* @module Fieldset
|
|
1094
|
+
*/
|
|
1095
|
+
declare type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps_2;
|
|
1096
|
+
export { LegendProps }
|
|
1097
|
+
export { LegendProps as LegendProps_alias_1 }
|
|
1098
|
+
|
|
961
1099
|
export { MeasuringConfiguration }
|
|
962
1100
|
|
|
963
1101
|
export { MeasuringFrequency }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./chunk-UZDVOIW5.js";
|
|
4
|
+
|
|
5
|
+
// src/components/Fieldset.tsx
|
|
6
|
+
import { css, cx } from "@cerberus/styled-system/css";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function Fieldset(props) {
|
|
9
|
+
const { invalid, ...formState } = useFieldContext();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"fieldset",
|
|
12
|
+
{
|
|
13
|
+
...props,
|
|
14
|
+
...formState,
|
|
15
|
+
...invalid && { "aria-invalid": true },
|
|
16
|
+
className: cx(
|
|
17
|
+
props.className,
|
|
18
|
+
css({
|
|
19
|
+
border: "none",
|
|
20
|
+
pt: 2,
|
|
21
|
+
margin: 0
|
|
22
|
+
})
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
Fieldset
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-3ZDFQO25.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Fieldset.tsx"],"sourcesContent":["'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport type { FieldsetHTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>\n\n/**\n * A component to group related elements in a form for accessibility.\n * @memberof Field\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n */\nexport function Fieldset(props: FieldsetProps) {\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <fieldset\n {...props}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n props.className,\n css({\n border: 'none',\n pt: 2,\n margin: 0,\n }),\n )}\n />\n )\n}\n"],"mappings":";;;;;AAEA,SAAS,KAAK,UAAU;AAgDpB;AAJG,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,SAAS,GAAG,UAAU,IAAI,gBAAgB;AAElD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,MACvC,WAAW;AAAA,QACT,MAAM;AAAA,QACN,IAAI;AAAA,UACF,QAAQ;AAAA,UACR,IAAI;AAAA,UACJ,QAAQ;AAAA,QACV,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFieldContext
|
|
3
|
+
} from "./chunk-UZDVOIW5.js";
|
|
4
|
+
import {
|
|
5
|
+
Show
|
|
6
|
+
} from "./chunk-BUVVRQLZ.js";
|
|
7
|
+
|
|
8
|
+
// src/components/Legend.tsx
|
|
9
|
+
import { css, cx } from "@cerberus/styled-system/css";
|
|
10
|
+
import {
|
|
11
|
+
label
|
|
12
|
+
} from "@cerberus-design/styled-system/recipes";
|
|
13
|
+
import { hstack } from "@cerberus-design/styled-system/patterns";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
function Legend(props) {
|
|
16
|
+
const { size, ...nativeProps } = props;
|
|
17
|
+
const { invalid, ...formState } = useFieldContext();
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
"legend",
|
|
20
|
+
{
|
|
21
|
+
...nativeProps,
|
|
22
|
+
...formState,
|
|
23
|
+
...invalid && { "aria-invalid": true },
|
|
24
|
+
className: cx(
|
|
25
|
+
nativeProps.className,
|
|
26
|
+
hstack({
|
|
27
|
+
justify: "space-between",
|
|
28
|
+
w: "full"
|
|
29
|
+
}),
|
|
30
|
+
label({
|
|
31
|
+
size
|
|
32
|
+
})
|
|
33
|
+
),
|
|
34
|
+
children: [
|
|
35
|
+
nativeProps.children,
|
|
36
|
+
/* @__PURE__ */ jsx(Show, { when: formState.required, children: /* @__PURE__ */ jsx(
|
|
37
|
+
"span",
|
|
38
|
+
{
|
|
39
|
+
className: css({
|
|
40
|
+
color: "page.text.100",
|
|
41
|
+
fontSize: "inherit"
|
|
42
|
+
}),
|
|
43
|
+
children: "(required)"
|
|
44
|
+
}
|
|
45
|
+
) })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
Legend
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-6TTN2JMY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Legend.tsx"],"sourcesContent":["'use client'\n\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { type HTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\nimport {\n label,\n type LabelVariantProps,\n} from '@cerberus-design/styled-system/recipes'\nimport { hstack } from '@cerberus-design/styled-system/patterns'\n\n/**\n * This module contains the Fieldset component.\n * @module Fieldset\n */\n\nexport type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps\n\n/**\n * A component to provide a global label for a group of related elements in a form (for accessibility).\n * @memberof Fieldset\n * @see https://cerberus.digitalu.com/react/fieldset\n * @description [A11y Form Checklist](https://www.a11yproject.com/checklist/#forms)\n * @description [MDN Web Docs: Legend](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <Label htmlFor=\"yes\">Yes</Label>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <Label htmlFor=\"no\">No</Label>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function Legend(props: LegendProps) {\n const { size, ...nativeProps } = props\n const { invalid, ...formState } = useFieldContext()\n\n return (\n <legend\n {...nativeProps}\n {...formState}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(\n nativeProps.className,\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n label({\n size,\n }),\n )}\n >\n {nativeProps.children}\n <Show when={formState.required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </legend>\n )\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,KAAK,UAAU;AAIxB;AAAA,EACE;AAAA,OAEK;AACP,SAAS,cAAc;AAgDnB,SAiBI,KAjBJ;AALG,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,QAAM,EAAE,SAAS,GAAG,UAAU,IAAI,gBAAgB;AAElD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,MACvC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL,SAAS;AAAA,UACT,GAAG;AAAA,QACL,CAAC;AAAA,QACD,MAAM;AAAA,UACJ;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MAEC;AAAA,oBAAY;AAAA,QACb,oBAAC,QAAK,MAAM,UAAU,UACpB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,OAAO;AAAA,cACP,UAAU;AAAA,YACZ,CAAC;AAAA,YACF;AAAA;AAAA,QAED,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Portal
|
|
3
3
|
} from "./chunk-GLY7GU5S.js";
|
|
4
|
+
import {
|
|
5
|
+
Modal
|
|
6
|
+
} from "./chunk-BE4EOU2P.js";
|
|
7
|
+
import {
|
|
8
|
+
ModalDescription
|
|
9
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
4
10
|
import {
|
|
5
11
|
ModalHeader
|
|
6
12
|
} from "./chunk-WLEX22KS.js";
|
|
@@ -12,13 +18,7 @@ import {
|
|
|
12
18
|
} from "./chunk-WZOYPFUU.js";
|
|
13
19
|
import {
|
|
14
20
|
Label
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
Modal
|
|
18
|
-
} from "./chunk-BE4EOU2P.js";
|
|
19
|
-
import {
|
|
20
|
-
ModalDescription
|
|
21
|
-
} from "./chunk-Q7BRMIBR.js";
|
|
21
|
+
} from "./chunk-NMF2HYWO.js";
|
|
22
22
|
import {
|
|
23
23
|
Avatar
|
|
24
24
|
} from "./chunk-477G5ZEL.js";
|
|
@@ -229,4 +229,4 @@ export {
|
|
|
229
229
|
PromptModal,
|
|
230
230
|
usePromptModal
|
|
231
231
|
};
|
|
232
|
-
//# sourceMappingURL=chunk-
|
|
232
|
+
//# sourceMappingURL=chunk-77LI5SP3.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Portal
|
|
3
3
|
} from "./chunk-GLY7GU5S.js";
|
|
4
|
-
import {
|
|
5
|
-
ModalHeader
|
|
6
|
-
} from "./chunk-WLEX22KS.js";
|
|
7
|
-
import {
|
|
8
|
-
ModalHeading
|
|
9
|
-
} from "./chunk-2UXE5PDG.js";
|
|
10
4
|
import {
|
|
11
5
|
Modal
|
|
12
6
|
} from "./chunk-BE4EOU2P.js";
|
|
13
7
|
import {
|
|
14
8
|
ModalDescription
|
|
15
9
|
} from "./chunk-Q7BRMIBR.js";
|
|
10
|
+
import {
|
|
11
|
+
ModalHeader
|
|
12
|
+
} from "./chunk-WLEX22KS.js";
|
|
13
|
+
import {
|
|
14
|
+
ModalHeading
|
|
15
|
+
} from "./chunk-2UXE5PDG.js";
|
|
16
16
|
import {
|
|
17
17
|
Avatar
|
|
18
18
|
} from "./chunk-477G5ZEL.js";
|
|
@@ -176,4 +176,4 @@ export {
|
|
|
176
176
|
ConfirmModal,
|
|
177
177
|
useConfirmModal
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=chunk-
|
|
179
|
+
//# sourceMappingURL=chunk-BGBCJ2W2.js.map
|
|
@@ -33,7 +33,7 @@ function Label(props) {
|
|
|
33
33
|
"span",
|
|
34
34
|
{
|
|
35
35
|
className: css({
|
|
36
|
-
color: "
|
|
36
|
+
color: "page.text.100",
|
|
37
37
|
fontSize: "inherit"
|
|
38
38
|
}),
|
|
39
39
|
children: "(required)"
|
|
@@ -47,4 +47,4 @@ function Label(props) {
|
|
|
47
47
|
export {
|
|
48
48
|
Label
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-NMF2HYWO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Label.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n htmlFor: string\n /**\n * Used to hide the label from the UI while keeping it accessible to screen readers. Typically used for global search inputs that have no visible label.\n */\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * A a11y compliant label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/label\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"search\" hidden>Search everything</Label>\n * <Input id=\"search\" startIcon={Search} type=\"text\" />\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n {...(disabled && { 'data-disabled': true })}\n className={cx(\n nativeProps.className,\n label({ size, usage }),\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n )}\n >\n {props.children}\n <Show when={required}>\n <span\n className={css({\n color: '
|
|
1
|
+
{"version":3,"sources":["../../src/components/Label.tsx"],"sourcesContent":["'use client'\n\nimport type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { useFieldContext } from '../context/field'\nimport { Show } from './Show'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport interface LabelBaseProps extends HTMLAttributes<HTMLLabelElement> {\n /**\n * The unique identifier for the input element. Required for accessibility.\n */\n htmlFor: string\n /**\n * Used to hide the label from the UI while keeping it accessible to screen readers. Typically used for global search inputs that have no visible label.\n */\n hidden?: boolean\n}\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * A a11y compliant label component.\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/label\n * @example\n * ```tsx\n * <Field required>\n * <Label htmlFor=\"search\" hidden>Search everything</Label>\n * <Input id=\"search\" startIcon={Search} type=\"text\" />\n * </Field>\n * ```\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { hidden, size, ...nativeProps } = props\n const { required, disabled } = useFieldContext()\n const usage = hidden ? 'hidden' : 'visible'\n\n return (\n <label\n {...nativeProps}\n {...(disabled && { 'data-disabled': true })}\n className={cx(\n nativeProps.className,\n label({ size, usage }),\n hstack({\n justify: 'space-between',\n w: 'full',\n }),\n )}\n >\n {props.children}\n <Show when={required}>\n <span\n className={css({\n color: 'page.text.100',\n fontSize: 'inherit',\n })}\n >\n (required)\n </span>\n </Show>\n </label>\n )\n}\n"],"mappings":";;;;;;;;AAGA,SAAS,aAAqC;AAC9C,SAAS,KAAK,UAAU;AACxB,SAAS,cAAc;AAsCnB,SAcI,KAdJ;AANG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,QAAQ,MAAM,GAAG,YAAY,IAAI;AACzC,QAAM,EAAE,UAAU,SAAS,IAAI,gBAAgB;AAC/C,QAAM,QAAQ,SAAS,WAAW;AAElC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,iBAAiB,KAAK;AAAA,MACzC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM,EAAE,MAAM,MAAM,CAAC;AAAA,QACrB,OAAO;AAAA,UACL,SAAS;AAAA,UACT,GAAG;AAAA,QACL,CAAC;AAAA,MACH;AAAA,MAEC;AAAA,cAAM;AAAA,QACP,oBAAC,QAAK,MAAM,UACV;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,IAAI;AAAA,cACb,OAAO;AAAA,cACP,UAAU;AAAA,YACZ,CAAC;AAAA,YACF;AAAA;AAAA,QAED,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/components/FieldsetLabel.tsx
|
|
2
|
+
import { cx } from "@cerberus/styled-system/css";
|
|
3
|
+
import { label } from "@cerberus/styled-system/recipes";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function FieldsetLabel(props) {
|
|
6
|
+
const { size, usage, ...nativeProps } = props;
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"label",
|
|
9
|
+
{
|
|
10
|
+
...nativeProps,
|
|
11
|
+
className: cx(
|
|
12
|
+
nativeProps.className,
|
|
13
|
+
label({
|
|
14
|
+
size,
|
|
15
|
+
usage
|
|
16
|
+
})
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
FieldsetLabel
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-PZAZKQMO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/FieldsetLabel.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport type { LabelProps } from './Label'\n\n/**\n * This module contains the FieldsetLabel component.\n * @module FieldsetLabel\n */\n\nexport type FieldsetLabelProps = LabelProps & LabelVariantProps\n\n/**\n * Used for labeling inputs that are children of a Fieldset group.\n * @memberof Fieldset\n * @see https://cerberus.digitalu.design/react/fieldset\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @example\n * ```tsx\n * import { Fieldset, Legend, Field, Radio, Label } from '@cerberus/react'\n * import { Hstack } from '@cerberus/styled-system/jsx'\n *\n * function SomeForm() {\n * return (\n * <form>\n * <Fieldset>\n * <Legend>Do you like cats?</Legend>\n * <Hstack>\n * <Field>\n * <Radio id=\"yes\" name=\"cats\" value=\"yes\" />\n * <FieldsetLabel htmlFor=\"yes\">Yes</FieldsetLabel>\n * </Field>\n * </Hstack>\n * <Hstack>\n * <Field>\n * <Radio id=\"no\" name=\"cats\" value=\"no\" />\n * <FieldsetLabel htmlFor=\"no\">No</FieldsetLabel>\n * </Field>\n * </Hstack>\n * </Fieldset>\n * </form>\n * )\n * }\n * ```\n */\nexport function FieldsetLabel(props: FieldsetLabelProps) {\n const { size, usage, ...nativeProps } = props\n return (\n <label\n {...nativeProps}\n className={cx(\n nativeProps.className,\n label({\n size,\n usage,\n }),\n )}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,UAAU;AACnB,SAAS,aAAqC;AA8C1C;AAHG,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,OAAO,GAAG,YAAY,IAAI;AACxC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Portal
|
|
3
|
-
} from "./chunk-GLY7GU5S.js";
|
|
4
1
|
import {
|
|
5
2
|
Notification
|
|
6
3
|
} from "./chunk-CMUFJU4S.js";
|
|
@@ -10,6 +7,9 @@ import {
|
|
|
10
7
|
import {
|
|
11
8
|
NotificationHeading
|
|
12
9
|
} from "./chunk-SXIXDXG3.js";
|
|
10
|
+
import {
|
|
11
|
+
Portal
|
|
12
|
+
} from "./chunk-GLY7GU5S.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
15
|
} from "./chunk-EXGKZGML.js";
|
|
@@ -159,4 +159,4 @@ export {
|
|
|
159
159
|
NotificationCenter,
|
|
160
160
|
useNotificationCenter
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-SP6O64KQ.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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ConfirmModal,
|
|
4
4
|
useConfirmModal
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-BGBCJ2W2.js";
|
|
6
6
|
import "../chunk-GLY7GU5S.js";
|
|
7
|
-
import "../chunk-WLEX22KS.js";
|
|
8
|
-
import "../chunk-2UXE5PDG.js";
|
|
9
7
|
import "../chunk-BE4EOU2P.js";
|
|
10
8
|
import "../chunk-Q7BRMIBR.js";
|
|
9
|
+
import "../chunk-WLEX22KS.js";
|
|
10
|
+
import "../chunk-2UXE5PDG.js";
|
|
11
11
|
import "../chunk-477G5ZEL.js";
|
|
12
12
|
import "../chunk-EXGKZGML.js";
|
|
13
13
|
import "../chunk-BUVVRQLZ.js";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
NotificationCenter,
|
|
4
4
|
useNotificationCenter
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-GLY7GU5S.js";
|
|
5
|
+
} from "../chunk-SP6O64KQ.js";
|
|
7
6
|
import "../chunk-CMUFJU4S.js";
|
|
8
7
|
import "../chunk-XEW6TJJ4.js";
|
|
9
8
|
import "../chunk-SXIXDXG3.js";
|
|
9
|
+
import "../chunk-GLY7GU5S.js";
|
|
10
10
|
import "../chunk-EXGKZGML.js";
|
|
11
11
|
import "../chunk-BUVVRQLZ.js";
|
|
12
12
|
import "../chunk-JIZQFTW6.js";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PromptModal,
|
|
4
4
|
usePromptModal
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-77LI5SP3.js";
|
|
6
6
|
import "../chunk-GLY7GU5S.js";
|
|
7
|
+
import "../chunk-BE4EOU2P.js";
|
|
8
|
+
import "../chunk-Q7BRMIBR.js";
|
|
7
9
|
import "../chunk-WLEX22KS.js";
|
|
8
10
|
import "../chunk-2UXE5PDG.js";
|
|
9
11
|
import "../chunk-WZOYPFUU.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-BE4EOU2P.js";
|
|
12
|
-
import "../chunk-Q7BRMIBR.js";
|
|
12
|
+
import "../chunk-NMF2HYWO.js";
|
|
13
13
|
import "../chunk-477G5ZEL.js";
|
|
14
14
|
import "../chunk-EXGKZGML.js";
|
|
15
15
|
import "../chunk-UZDVOIW5.js";
|
package/build/modern/index.js
CHANGED
|
@@ -1,22 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NotificationCenter,
|
|
3
|
+
useNotificationCenter
|
|
4
|
+
} from "./chunk-SP6O64KQ.js";
|
|
5
|
+
import {
|
|
6
|
+
PromptModal,
|
|
7
|
+
usePromptModal
|
|
8
|
+
} from "./chunk-77LI5SP3.js";
|
|
1
9
|
import {
|
|
2
10
|
ThemeProvider,
|
|
3
11
|
useThemeContext
|
|
4
12
|
} from "./chunk-EB37HRCN.js";
|
|
13
|
+
import {
|
|
14
|
+
Textarea
|
|
15
|
+
} from "./chunk-JIJM6JFJ.js";
|
|
16
|
+
import {
|
|
17
|
+
Th
|
|
18
|
+
} from "./chunk-7K6PZBHN.js";
|
|
19
|
+
import {
|
|
20
|
+
Thead
|
|
21
|
+
} from "./chunk-PKY46RRA.js";
|
|
5
22
|
import {
|
|
6
23
|
Toggle
|
|
7
24
|
} from "./chunk-GMG3B34U.js";
|
|
8
25
|
import {
|
|
9
26
|
ConfirmModal,
|
|
10
27
|
useConfirmModal
|
|
11
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BGBCJ2W2.js";
|
|
12
29
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-EZNGCXVJ.js";
|
|
30
|
+
Spinner
|
|
31
|
+
} from "./chunk-7SYJFI5E.js";
|
|
16
32
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
Tab
|
|
34
|
+
} from "./chunk-SLF6SIPB.js";
|
|
35
|
+
import {
|
|
36
|
+
TabList
|
|
37
|
+
} from "./chunk-UKPF7JOB.js";
|
|
20
38
|
import {
|
|
21
39
|
TabPanel
|
|
22
40
|
} from "./chunk-AYIRV5CL.js";
|
|
@@ -34,14 +52,14 @@ import {
|
|
|
34
52
|
Td
|
|
35
53
|
} from "./chunk-HPM2XRWT.js";
|
|
36
54
|
import {
|
|
37
|
-
|
|
38
|
-
} from "./chunk-
|
|
55
|
+
Notification
|
|
56
|
+
} from "./chunk-CMUFJU4S.js";
|
|
39
57
|
import {
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
58
|
+
NotificationDescription
|
|
59
|
+
} from "./chunk-XEW6TJJ4.js";
|
|
42
60
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
61
|
+
NotificationHeading
|
|
62
|
+
} from "./chunk-SXIXDXG3.js";
|
|
45
63
|
import {
|
|
46
64
|
Portal
|
|
47
65
|
} from "./chunk-GLY7GU5S.js";
|
|
@@ -53,14 +71,14 @@ import {
|
|
|
53
71
|
Select
|
|
54
72
|
} from "./chunk-O6JYYVO7.js";
|
|
55
73
|
import {
|
|
56
|
-
|
|
57
|
-
} from "./chunk-
|
|
74
|
+
Legend
|
|
75
|
+
} from "./chunk-6TTN2JMY.js";
|
|
58
76
|
import {
|
|
59
|
-
|
|
60
|
-
} from "./chunk-
|
|
77
|
+
Modal
|
|
78
|
+
} from "./chunk-BE4EOU2P.js";
|
|
61
79
|
import {
|
|
62
|
-
|
|
63
|
-
} from "./chunk-
|
|
80
|
+
ModalDescription
|
|
81
|
+
} from "./chunk-Q7BRMIBR.js";
|
|
64
82
|
import {
|
|
65
83
|
ModalHeader
|
|
66
84
|
} from "./chunk-WLEX22KS.js";
|
|
@@ -82,14 +100,11 @@ import {
|
|
|
82
100
|
useNavMenuContext
|
|
83
101
|
} from "./chunk-O75QAT4Z.js";
|
|
84
102
|
import {
|
|
85
|
-
|
|
86
|
-
} from "./chunk-
|
|
103
|
+
Fieldset
|
|
104
|
+
} from "./chunk-3ZDFQO25.js";
|
|
87
105
|
import {
|
|
88
|
-
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import {
|
|
91
|
-
NotificationHeading
|
|
92
|
-
} from "./chunk-SXIXDXG3.js";
|
|
106
|
+
FieldsetLabel
|
|
107
|
+
} from "./chunk-PZAZKQMO.js";
|
|
93
108
|
import {
|
|
94
109
|
FileStatus,
|
|
95
110
|
processStatus
|
|
@@ -111,13 +126,7 @@ import {
|
|
|
111
126
|
} from "./chunk-WZOYPFUU.js";
|
|
112
127
|
import {
|
|
113
128
|
Label
|
|
114
|
-
} from "./chunk-
|
|
115
|
-
import {
|
|
116
|
-
Modal
|
|
117
|
-
} from "./chunk-BE4EOU2P.js";
|
|
118
|
-
import {
|
|
119
|
-
ModalDescription
|
|
120
|
-
} from "./chunk-Q7BRMIBR.js";
|
|
129
|
+
} from "./chunk-NMF2HYWO.js";
|
|
121
130
|
import {
|
|
122
131
|
MODE_KEY,
|
|
123
132
|
THEME_KEY,
|
|
@@ -194,11 +203,14 @@ export {
|
|
|
194
203
|
FeatureFlags,
|
|
195
204
|
Field,
|
|
196
205
|
FieldMessage,
|
|
206
|
+
Fieldset,
|
|
207
|
+
FieldsetLabel,
|
|
197
208
|
FileStatus,
|
|
198
209
|
FileUploader,
|
|
199
210
|
IconButton,
|
|
200
211
|
Input,
|
|
201
212
|
Label,
|
|
213
|
+
Legend,
|
|
202
214
|
MODE_KEY,
|
|
203
215
|
Modal,
|
|
204
216
|
ModalDescription,
|