@utilitywarehouse/hearth-react 0.1.0 → 0.2.0
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/{chunk-NYIZVR6U.cjs → chunk-37CE6EWY.cjs} +2 -2
- package/dist/chunk-37CE6EWY.cjs.map +1 -0
- package/dist/chunk-5OLLJKEO.js +2 -0
- package/dist/chunk-5OLLJKEO.js.map +1 -0
- package/dist/{chunk-WTEYCV3P.cjs → chunk-62VG5C3S.cjs} +2 -2
- package/dist/{chunk-WTEYCV3P.cjs.map → chunk-62VG5C3S.cjs.map} +1 -1
- package/dist/chunk-7BCHAXO2.js +2 -0
- package/dist/chunk-7BCHAXO2.js.map +1 -0
- package/dist/chunk-CQN4SZBT.js +2 -0
- package/dist/chunk-CQN4SZBT.js.map +1 -0
- package/dist/chunk-D6CQM2ZR.cjs +2 -0
- package/dist/chunk-D6CQM2ZR.cjs.map +1 -0
- package/dist/{chunk-LNST5XBT.js → chunk-DV32RESS.js} +2 -2
- package/dist/chunk-DV32RESS.js.map +1 -0
- package/dist/{chunk-3YGPQZGB.cjs → chunk-ETLTIDOX.cjs} +2 -2
- package/dist/{chunk-3YGPQZGB.cjs.map → chunk-ETLTIDOX.cjs.map} +1 -1
- package/dist/{chunk-6BKRNOB3.js → chunk-GBMQ4HCH.js} +2 -2
- package/dist/{chunk-UNKKBMOV.cjs → chunk-GSDFAL3H.cjs} +2 -2
- package/dist/{chunk-UNKKBMOV.cjs.map → chunk-GSDFAL3H.cjs.map} +1 -1
- package/dist/{chunk-FI7OM2M2.js → chunk-H7IDH6CJ.js} +2 -2
- package/dist/chunk-H7IDH6CJ.js.map +1 -0
- package/dist/{chunk-Y7BOCUYW.js → chunk-HKCUTYXG.js} +2 -2
- package/dist/chunk-HSPOCJ5A.cjs +2 -0
- package/dist/chunk-HSPOCJ5A.cjs.map +1 -0
- package/dist/chunk-JMAJZ2BL.cjs +2 -0
- package/dist/chunk-JMAJZ2BL.cjs.map +1 -0
- package/dist/{chunk-RA7PIIC6.cjs → chunk-JSIJQQYE.cjs} +2 -2
- package/dist/{chunk-RA7PIIC6.cjs.map → chunk-JSIJQQYE.cjs.map} +1 -1
- package/dist/{chunk-B32JIOPJ.js → chunk-KTWZRVIV.js} +2 -2
- package/dist/chunk-KTWZRVIV.js.map +1 -0
- package/dist/chunk-KW4TIBGT.js +2 -0
- package/dist/chunk-KW4TIBGT.js.map +1 -0
- package/dist/chunk-PDRE4SEJ.cjs +2 -0
- package/dist/chunk-PDRE4SEJ.cjs.map +1 -0
- package/dist/{chunk-JOYUGBJ2.js → chunk-PG455XUN.js} +2 -2
- package/dist/{chunk-YOH3OE2C.js → chunk-QGXYOTLB.js} +2 -2
- package/dist/chunk-SGZVBXYO.js +2 -0
- package/dist/chunk-SGZVBXYO.js.map +1 -0
- package/dist/chunk-SH7GIFPO.js +2 -0
- package/dist/chunk-SH7GIFPO.js.map +1 -0
- package/dist/chunk-T64W7Q7K.js +2 -0
- package/dist/chunk-T64W7Q7K.js.map +1 -0
- package/dist/{chunk-QUG4RSGO.cjs → chunk-UDOWEUCM.cjs} +2 -2
- package/dist/chunk-UDOWEUCM.cjs.map +1 -0
- package/dist/{chunk-QE7SFMVD.cjs → chunk-WOCOHW6C.cjs} +2 -2
- package/dist/chunk-WOCOHW6C.cjs.map +1 -0
- package/dist/chunk-XKYU3KUY.cjs +2 -0
- package/dist/chunk-XKYU3KUY.cjs.map +1 -0
- package/dist/chunk-XL3DXWPW.cjs +2 -0
- package/dist/chunk-XL3DXWPW.cjs.map +1 -0
- package/dist/chunk-XZNPGGRR.js +2 -0
- package/dist/chunk-XZNPGGRR.js.map +1 -0
- package/dist/{chunk-N2FOD332.cjs → chunk-Z5EIP7KH.cjs} +2 -2
- package/dist/chunk-Z5EIP7KH.cjs.map +1 -0
- package/dist/{chunk-MLABIXLN.cjs → chunk-ZJM6ZMUH.cjs} +2 -2
- package/dist/chunk-ZJM6ZMUH.cjs.map +1 -0
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.props.cjs +1 -1
- package/dist/components/Button/Button.props.d.cts +9 -0
- package/dist/components/Button/Button.props.d.ts +9 -0
- package/dist/components/Button/Button.props.js +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.context.cjs +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.context.cjs.map +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.context.d.cts +13 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.context.d.ts +13 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.context.js +2 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.cts +5 -7
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +5 -7
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.props.d.cts +7 -16
- package/dist/components/CheckboxGroup/CheckboxGroup.props.d.ts +7 -16
- package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.cjs +2 -0
- package/dist/components/FormGroupBase/FormGroupBase.cjs.map +1 -0
- package/dist/components/FormGroupBase/FormGroupBase.context.cjs +2 -0
- package/dist/components/FormGroupBase/FormGroupBase.context.cjs.map +1 -0
- package/dist/components/FormGroupBase/FormGroupBase.context.d.cts +11 -0
- package/dist/components/FormGroupBase/FormGroupBase.context.d.ts +11 -0
- package/dist/components/FormGroupBase/FormGroupBase.context.js +2 -0
- package/dist/components/{Fieldset/Fieldset.d.cts → FormGroupBase/FormGroupBase.d.cts} +3 -3
- package/dist/components/{Fieldset/Fieldset.d.ts → FormGroupBase/FormGroupBase.d.ts} +3 -3
- package/dist/components/FormGroupBase/FormGroupBase.js +2 -0
- package/dist/components/FormGroupBase/FormGroupBase.props.cjs +1 -0
- package/dist/components/FormGroupBase/FormGroupBase.props.cjs.map +1 -0
- package/dist/components/{Fieldset/Fieldset.props.d.cts → FormGroupBase/FormGroupBase.props.d.cts} +2 -2
- package/dist/components/{Fieldset/Fieldset.props.d.ts → FormGroupBase/FormGroupBase.props.d.ts} +2 -2
- package/dist/components/FormGroupBase/FormGroupBase.props.js +1 -0
- package/dist/components/{FieldsetLegend/FieldsetLegend.cjs → FormGroupBase/Legend.cjs} +2 -2
- package/dist/components/FormGroupBase/Legend.cjs.map +1 -0
- package/dist/components/FormGroupBase/Legend.js +2 -0
- package/dist/components/FormGroupBase/Legend.js.map +1 -0
- package/dist/components/FormGroupBase/Legend.props.cjs.map +1 -0
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/RadioGroup/RadioGroup.cjs.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.cts +4 -5
- package/dist/components/RadioGroup/RadioGroup.d.ts +4 -5
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.props.d.cts +3 -9
- package/dist/components/RadioGroup/RadioGroup.props.d.ts +3 -9
- package/dist/components/RadioTile/RadioTile.cjs +1 -1
- package/dist/components/RadioTile/RadioTile.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/styles.css +39 -52
- package/dist/chunk-B32JIOPJ.js.map +0 -1
- package/dist/chunk-BBH2BLZX.cjs +0 -2
- package/dist/chunk-BBH2BLZX.cjs.map +0 -1
- package/dist/chunk-BC7Y6MZO.js +0 -2
- package/dist/chunk-BC7Y6MZO.js.map +0 -1
- package/dist/chunk-BJ2OK6RA.js +0 -2
- package/dist/chunk-BJ2OK6RA.js.map +0 -1
- package/dist/chunk-BYAQL5FQ.js +0 -2
- package/dist/chunk-BYAQL5FQ.js.map +0 -1
- package/dist/chunk-CEGUCKZW.js +0 -2
- package/dist/chunk-CEGUCKZW.js.map +0 -1
- package/dist/chunk-DKMO72XC.cjs +0 -2
- package/dist/chunk-DKMO72XC.cjs.map +0 -1
- package/dist/chunk-FI7OM2M2.js.map +0 -1
- package/dist/chunk-G4BATINY.js +0 -2
- package/dist/chunk-G4BATINY.js.map +0 -1
- package/dist/chunk-ICPNBPYR.cjs +0 -2
- package/dist/chunk-ICPNBPYR.cjs.map +0 -1
- package/dist/chunk-IKUFQM7T.js +0 -2
- package/dist/chunk-IKUFQM7T.js.map +0 -1
- package/dist/chunk-JEB5LCIV.cjs +0 -2
- package/dist/chunk-JEB5LCIV.cjs.map +0 -1
- package/dist/chunk-LNST5XBT.js.map +0 -1
- package/dist/chunk-MLABIXLN.cjs.map +0 -1
- package/dist/chunk-N2FOD332.cjs.map +0 -1
- package/dist/chunk-NYIZVR6U.cjs.map +0 -1
- package/dist/chunk-O63GLLKH.cjs +0 -2
- package/dist/chunk-O63GLLKH.cjs.map +0 -1
- package/dist/chunk-OFJ7WSSK.cjs +0 -2
- package/dist/chunk-OFJ7WSSK.cjs.map +0 -1
- package/dist/chunk-PFCKEVNT.cjs +0 -2
- package/dist/chunk-PFCKEVNT.cjs.map +0 -1
- package/dist/chunk-QE7SFMVD.cjs.map +0 -1
- package/dist/chunk-QEWR2ON7.js +0 -2
- package/dist/chunk-QEWR2ON7.js.map +0 -1
- package/dist/chunk-QUG4RSGO.cjs.map +0 -1
- package/dist/chunk-RSZBNTZ7.js +0 -2
- package/dist/chunk-RSZBNTZ7.js.map +0 -1
- package/dist/chunk-TKW3USYF.js +0 -2
- package/dist/chunk-TKW3USYF.js.map +0 -1
- package/dist/chunk-V63VK7GL.cjs +0 -2
- package/dist/chunk-V63VK7GL.cjs.map +0 -1
- package/dist/chunk-Z27JG5SL.js +0 -2
- package/dist/chunk-Z27JG5SL.js.map +0 -1
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.cjs +0 -2
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.cjs.map +0 -1
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.context.cjs +0 -2
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.context.cjs.map +0 -1
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.context.d.cts +0 -13
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.context.d.ts +0 -13
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.context.js +0 -2
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.d.cts +0 -11
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.d.ts +0 -11
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.js +0 -2
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.props.cjs +0 -1
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.props.cjs.map +0 -1
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.props.d.cts +0 -11
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.props.d.ts +0 -11
- package/dist/components/CheckboxGroupBase/CheckboxGroupBase.props.js +0 -1
- package/dist/components/Fieldset/Fieldset.cjs +0 -2
- package/dist/components/Fieldset/Fieldset.cjs.map +0 -1
- package/dist/components/Fieldset/Fieldset.context.cjs +0 -2
- package/dist/components/Fieldset/Fieldset.context.cjs.map +0 -1
- package/dist/components/Fieldset/Fieldset.context.d.cts +0 -11
- package/dist/components/Fieldset/Fieldset.context.d.ts +0 -11
- package/dist/components/Fieldset/Fieldset.context.js +0 -2
- package/dist/components/Fieldset/Fieldset.js +0 -2
- package/dist/components/Fieldset/Fieldset.js.map +0 -1
- package/dist/components/Fieldset/Fieldset.props.cjs +0 -1
- package/dist/components/Fieldset/Fieldset.props.cjs.map +0 -1
- package/dist/components/Fieldset/Fieldset.props.js +0 -1
- package/dist/components/Fieldset/Fieldset.props.js.map +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.cjs.map +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.d.cts +0 -8
- package/dist/components/FieldsetLegend/FieldsetLegend.d.ts +0 -8
- package/dist/components/FieldsetLegend/FieldsetLegend.js +0 -2
- package/dist/components/FieldsetLegend/FieldsetLegend.js.map +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.props.cjs +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.props.cjs.map +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.props.d.cts +0 -8
- package/dist/components/FieldsetLegend/FieldsetLegend.props.d.ts +0 -8
- package/dist/components/FieldsetLegend/FieldsetLegend.props.js +0 -1
- package/dist/components/FieldsetLegend/FieldsetLegend.props.js.map +0 -1
- package/dist/components/Legend/Legend.cjs +0 -2
- package/dist/components/Legend/Legend.cjs.map +0 -1
- package/dist/components/Legend/Legend.js +0 -2
- package/dist/components/Legend/Legend.js.map +0 -1
- package/dist/components/Legend/Legend.props.cjs.map +0 -1
- /package/dist/{chunk-6BKRNOB3.js.map → chunk-GBMQ4HCH.js.map} +0 -0
- /package/dist/{chunk-Y7BOCUYW.js.map → chunk-HKCUTYXG.js.map} +0 -0
- /package/dist/{chunk-JOYUGBJ2.js.map → chunk-PG455XUN.js.map} +0 -0
- /package/dist/{chunk-YOH3OE2C.js.map → chunk-QGXYOTLB.js.map} +0 -0
- /package/dist/components/{CheckboxGroupBase/CheckboxGroupBase.context.js.map → CheckboxGroup/CheckboxGroup.context.js.map} +0 -0
- /package/dist/components/{CheckboxGroupBase/CheckboxGroupBase.js.map → FormGroupBase/FormGroupBase.context.js.map} +0 -0
- /package/dist/components/{CheckboxGroupBase/CheckboxGroupBase.props.js.map → FormGroupBase/FormGroupBase.js.map} +0 -0
- /package/dist/components/{Fieldset/Fieldset.context.js.map → FormGroupBase/FormGroupBase.props.js.map} +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.d.cts +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.d.ts +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.props.cjs +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.props.d.cts +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.props.d.ts +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.props.js +0 -0
- /package/dist/components/{Legend → FormGroupBase}/Legend.props.js.map +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilitywarehouse/hearth-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"stylelint-config-standard": "^36.0.1",
|
|
59
59
|
"stylelint-media-use-custom-media": "^4.0.0",
|
|
60
60
|
"tsup": "^8.3.5",
|
|
61
|
-
"@utilitywarehouse/hearth-css-reset": "0.0.
|
|
62
|
-
"@utilitywarehouse/hearth-react-icons": "0.1.1",
|
|
61
|
+
"@utilitywarehouse/hearth-css-reset": "0.0.3",
|
|
63
62
|
"@utilitywarehouse/hearth-fonts": "0.0.3",
|
|
63
|
+
"@utilitywarehouse/hearth-react-icons": "0.1.1",
|
|
64
64
|
"@utilitywarehouse/hearth-tokens": "0.0.2"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
package/styles.css
CHANGED
|
@@ -565,19 +565,6 @@
|
|
|
565
565
|
--h-solid-background-color-hover: var(--h-button-solid-yellow-background-color-hover);
|
|
566
566
|
--h-solid-foreground-color: var(--h-button-solid-yellow-foreground-color);
|
|
567
567
|
--h-solid-border-color: var(--h-button-solid-border-color);
|
|
568
|
-
}
|
|
569
|
-
.hearth-ButtonBase:where([data-colorscheme='yellow']):where([data-inverted]) {
|
|
570
|
-
--h-solid-background-color: var(--h-button-solid-yellow-inverted-background-color);
|
|
571
|
-
--h-solid-background-color-active: var(
|
|
572
|
-
--h-button-solid-yellow-inverted-background-color-active
|
|
573
|
-
);
|
|
574
|
-
--h-solid-background-color-hover: var(
|
|
575
|
-
--h-button-solid-yellow-inverted-background-color-hover
|
|
576
|
-
);
|
|
577
|
-
--h-solid-foreground-color: var(--h-button-solid-yellow-inverted-foreground-color);
|
|
578
|
-
}
|
|
579
|
-
.hearth-ButtonBase:where([data-colorscheme='yellow']) {
|
|
580
|
-
|
|
581
568
|
--h-outline-border-color: transparent;
|
|
582
569
|
--h-emphasis-background-color: var(--h-button-emphasis-yellow-background-color);
|
|
583
570
|
--h-emphasis-background-color-active: var(--h-button-emphasis-yellow-background-color-active);
|
|
@@ -698,6 +685,7 @@
|
|
|
698
685
|
color: var(--h-button-base-foreground-color);
|
|
699
686
|
background-color: var(--h-button-base-background-color);
|
|
700
687
|
position: relative;
|
|
688
|
+
width: 100%;
|
|
701
689
|
|
|
702
690
|
/* we can add a transition here when required */
|
|
703
691
|
|
|
@@ -752,6 +740,9 @@
|
|
|
752
740
|
padding-inline: var(--h-button-padding-inline);
|
|
753
741
|
padding-block: var(--h-button-padding-block);
|
|
754
742
|
}
|
|
743
|
+
.hearth-Button:where(.hearth-variant-ghost.hearth-padding-none) {
|
|
744
|
+
padding-inline: 0;
|
|
745
|
+
}
|
|
755
746
|
.hearth-Button:where(.hearth-variant-emphasis) {
|
|
756
747
|
min-width: 0;
|
|
757
748
|
padding: 0;
|
|
@@ -1248,7 +1239,7 @@
|
|
|
1248
1239
|
}
|
|
1249
1240
|
}
|
|
1250
1241
|
.hearth-Card:where(.hearth-padding-none) {
|
|
1251
|
-
padding:
|
|
1242
|
+
padding: 0;
|
|
1252
1243
|
}
|
|
1253
1244
|
.hearth-Card:where(:has(:focus-visible)) {
|
|
1254
1245
|
outline: 2px solid var(--h-focus-border);
|
|
@@ -1503,30 +1494,32 @@
|
|
|
1503
1494
|
--h-badge-solid-background-color: var(--h-badge-solid-grey-background-color);
|
|
1504
1495
|
--h-badge-outline-color: var(--h-badge-outline-grey-color);
|
|
1505
1496
|
}
|
|
1506
|
-
.hearth-
|
|
1497
|
+
.hearth-FormGroupBase {
|
|
1507
1498
|
border: 0;
|
|
1508
1499
|
margin: 0;
|
|
1509
1500
|
padding: 0;
|
|
1501
|
+
width: 100%;
|
|
1510
1502
|
display: flex;
|
|
1511
1503
|
flex-direction: column;
|
|
1512
1504
|
gap: var(--h-space-250);
|
|
1513
1505
|
}
|
|
1514
|
-
.hearth-
|
|
1506
|
+
.hearth-FormGroupBase :where(legend):not(:has( + .hearth-HelperTextContainer)) {
|
|
1515
1507
|
margin-bottom: var(--h-space-75);
|
|
1516
1508
|
}
|
|
1517
|
-
.hearth-
|
|
1509
|
+
.hearth-FormGroupBase :where(.hearth-HelperTextContainer) {
|
|
1518
1510
|
margin-bottom: calc(-1 * calc(var(--h-space-250) - var(--h-space-75)));
|
|
1519
1511
|
}
|
|
1520
|
-
.hearth-Legend {
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
.hearth-Legend:where(:not(:has(*))) {
|
|
1525
|
-
font-family: var(--h-font-family-body);
|
|
1526
|
-
font-weight: var(--h-font-weight-semibold);
|
|
1527
|
-
font-size: var(--h-font-size-100);
|
|
1528
|
-
line-height: var(--h-line-height-500);
|
|
1512
|
+
.hearth-FormGroupBase .hearth-Legend {
|
|
1513
|
+
color: var(--h-text-color);
|
|
1514
|
+
|
|
1515
|
+
/* only apply text styles if the legend doesn't have another element as a child, ie. a Heading component */
|
|
1529
1516
|
}
|
|
1517
|
+
:is(.hearth-FormGroupBase .hearth-Legend):where(:not(:has(*))) {
|
|
1518
|
+
font-family: var(--h-font-family-body);
|
|
1519
|
+
font-weight: var(--h-font-weight-semibold);
|
|
1520
|
+
font-size: var(--h-font-size-100);
|
|
1521
|
+
line-height: var(--h-line-height-500);
|
|
1522
|
+
}
|
|
1530
1523
|
.hearth-Radio {
|
|
1531
1524
|
display: flex;
|
|
1532
1525
|
flex-direction: row;
|
|
@@ -1665,28 +1658,22 @@
|
|
|
1665
1658
|
flex-direction: row;
|
|
1666
1659
|
gap: var(--h-space-150);
|
|
1667
1660
|
}
|
|
1668
|
-
.hearth-
|
|
1661
|
+
.hearth-RadioGroup {
|
|
1669
1662
|
flex-wrap: wrap;
|
|
1670
|
-
|
|
1671
|
-
/* &:where(:not(:first-child)) { */
|
|
1672
|
-
|
|
1673
|
-
/* margin-top: var(--h-space-200); */
|
|
1674
|
-
|
|
1675
|
-
/* } */
|
|
1676
1663
|
}
|
|
1677
|
-
.hearth-
|
|
1664
|
+
.hearth-RadioGroup:where([data-orientation='horizontal']) {
|
|
1678
1665
|
flex-direction: row;
|
|
1679
1666
|
}
|
|
1680
|
-
.hearth-
|
|
1667
|
+
.hearth-RadioGroup:where([data-orientation='vertical']) {
|
|
1681
1668
|
flex-direction: column;
|
|
1682
1669
|
width: -moz-fit-content;
|
|
1683
1670
|
width: fit-content;
|
|
1684
1671
|
}
|
|
1685
|
-
.hearth-
|
|
1672
|
+
.hearth-RadioGroup {
|
|
1686
1673
|
|
|
1687
1674
|
gap: var(--h-radio-group-stack-gap);
|
|
1688
1675
|
}
|
|
1689
|
-
.hearth-
|
|
1676
|
+
.hearth-RadioGroup:has(.hearth-RadioTile) {
|
|
1690
1677
|
gap: var(--h-radio-tile-group-stack-gap);
|
|
1691
1678
|
}
|
|
1692
1679
|
/* we do this so that the gap between the checkbox & label is clickable */
|
|
@@ -1784,24 +1771,24 @@
|
|
|
1784
1771
|
.hearth-CheckboxTile :where(.hearth-CheckboxRoot):focus-visible {
|
|
1785
1772
|
outline: none;
|
|
1786
1773
|
}
|
|
1787
|
-
.hearth-
|
|
1788
|
-
|
|
1789
|
-
}
|
|
1790
|
-
.hearth-CheckboxGroupRoot:where([data-orientation='horizontal']) {
|
|
1791
|
-
flex-direction: row;
|
|
1792
|
-
}
|
|
1793
|
-
.hearth-CheckboxGroupRoot:where([data-orientation='vertical']) {
|
|
1794
|
-
flex-direction: column;
|
|
1795
|
-
width: -moz-fit-content;
|
|
1796
|
-
width: fit-content;
|
|
1774
|
+
.hearth-CheckboxGroup :where(.hearth-CheckboxGroupContent) {
|
|
1775
|
+
flex-wrap: wrap;
|
|
1797
1776
|
}
|
|
1798
|
-
.hearth-
|
|
1777
|
+
:is(.hearth-CheckboxGroup :where(.hearth-CheckboxGroupContent)):where([data-orientation='horizontal']) {
|
|
1778
|
+
flex-direction: row;
|
|
1779
|
+
}
|
|
1780
|
+
:is(.hearth-CheckboxGroup :where(.hearth-CheckboxGroupContent)):where([data-orientation='vertical']) {
|
|
1781
|
+
flex-direction: column;
|
|
1782
|
+
width: -moz-fit-content;
|
|
1783
|
+
width: fit-content;
|
|
1784
|
+
}
|
|
1785
|
+
.hearth-CheckboxGroup :where(.hearth-CheckboxGroupContent) {
|
|
1799
1786
|
|
|
1800
|
-
|
|
1801
|
-
}
|
|
1802
|
-
.hearth-CheckboxGroupRoot:has(.hearth-CheckboxTile) {
|
|
1803
|
-
gap: var(--h-checkbox-tile-group-stack-gap);
|
|
1787
|
+
gap: var(--h-checkbox-group-stack-gap);
|
|
1804
1788
|
}
|
|
1789
|
+
:is(.hearth-CheckboxGroup :where(.hearth-CheckboxGroupContent)):has(.hearth-CheckboxTile) {
|
|
1790
|
+
gap: var(--h-checkbox-tile-group-stack-gap);
|
|
1791
|
+
}
|
|
1805
1792
|
.hearth-TextArea :where(.hearth-TextAreaRoot) {
|
|
1806
1793
|
box-sizing: border-box;
|
|
1807
1794
|
position: relative;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport clsx from 'clsx';\nimport type { CheckboxProps } from './Checkbox.props';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useCheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase.context';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'Checkbox';\nconst componentClassName = withGlobalPrefix(componentName);\n\nexport type CheckboxElement = ElementRef<'button'>;\n\nexport const Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>((props, ref) => {\n const {\n id: providedId,\n label,\n helperText,\n className,\n disabled,\n onCheckedChange,\n value = 'on',\n 'aria-labelledby': ariaLabelledby,\n ...checkboxProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'checkbox' });\n const context = useFieldset();\n const checkboxContext = useCheckboxGroupBase();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n\n return (\n <Flex\n gap=\"100\"\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...checkboxProps}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </Flex>\n );\n});\n\nCheckbox.displayName = componentName;\n"],"mappings":"mWAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAMjB,OAAS,iBAAAC,MAAqB,uCAM9B,OAAS,YAAYC,MAAqB,WAG1C,IAAMC,EAAgB,WAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAiB,aAA2C,CAACC,EAAOC,IAAQ,CACvF,GAAM,CACJ,GAAIC,EACJ,MAAAC,EACA,WAAAC,EACA,UAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,MAAAC,EAAQ,KACR,kBAAmBC,EACnB,GAAGC,CACL,EAAIC,EAAaX,EAAOY,CAAc,EAChC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAd,EAAY,OAAQ,UAAW,CAAC,EACzEe,EAAUC,EAAY,EACtBC,EAAkBC,EAAqB,EACvCC,EAAUF,GAAiB,OAAO,SAASX,CAAK,EAChDc,EAAqBL,GAAS,mBAC9BM,EAAkBN,EAAUA,EAAQ,kBAAkB,EAAI,GAC1DO,EAAiB,CAACF,GAAsB,CAAC,CAAClB,EAC1CqB,EAAY,CAAC,CAACtB,EAEpB,OACE,gBAACuB,EAAA,CACC,IAAI,MACJ,UAAWC,EAAK9B,EAAoBQ,CAAS,EAC7C,gBAAeC,EAAW,GAAK,QAE/B,gBAACsB,EAAc,KAAd,CACC,IAAK3B,EACL,UAAU,sBACV,KAAMkB,GAAiB,KACvB,QAASE,EACT,MAAOb,EACN,GAAGE,EACJ,GAAIG,EACJ,SAAUP,EACV,mBAAkBkB,EAAiBT,EAAeQ,EAClD,kBAAiBd,GAAkBgB,EAAYX,EAAU,OACzD,gBAAkBO,GAAqB,CACjCJ,IACEI,EACFF,GAAiB,YAAYX,CAAK,EAElCW,GAAiB,cAAcX,CAAK,GAGpCD,GACFA,EAAgBc,CAAO,CAE3B,GAEA,gBAACO,EAAc,UAAd,CAAwB,QAAO,GAAC,UAAU,4BACzC,gBAACC,EAAA,IAAc,CACjB,CACF,EACCJ,EACC,gBAACC,EAAA,CAAK,UAAU,SAAS,IAAI,MAC3B,gBAACI,EAAA,CAAM,GAAIhB,EAAS,QAASD,EAAI,kBAAiB,IAC/CV,CACH,EACCqB,EACC,gBAACO,EAAA,CAAW,GAAIhB,EAAc,kBAAiB,IAC5CX,CACH,EACE,IACN,EACE,IACN,CAEJ,CAAC,EAEDL,EAAS,YAAcH","names":["React","clsx","TickSmallIcon","RadixCheckbox","componentName","componentClassName","withGlobalPrefix","Checkbox","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","checkboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","context","useFieldset","checkboxContext","useCheckboxGroupBase","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","Flex","clsx","RadixCheckbox","TickSmallIcon","Label","HelperText"]}
|
package/dist/chunk-BBH2BLZX.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkO63GLLKHcjs = require('./chunk-O63GLLKH.cjs');var _chunkVRX67OL2cjs = require('./chunk-VRX67OL2.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _radixui = require('radix-ui');var c="RadioGroupRoot",b=_chunk4H5JT5ORcjs.b.call(void 0, c),u= exports.a =o.forwardRef(({children:t,direction:r="column",width:e,className:a,...p},i)=>o.createElement(_radixui.RadioGroup.Root,{ref:i,asChild:!0,...p,orientation:r==="column"?"vertical":"horizontal",className:_clsx2.default.call(void 0, b,a)},o.createElement(_chunkVRX67OL2cjs.a,{width:e},t)));u.displayName=c;var f="RadioGroup",g=_chunk4H5JT5ORcjs.b.call(void 0, f),j= exports.b =o.forwardRef(({children:t,contentWidth:r,direction:e="column",className:a,label:p,helperText:i,validationText:G,validationStatus:x,required:R,disabled:n,loop:N,defaultValue:E,value:P,onValueChange:h,name:w,...y},C)=>{let F={...y,disabled:n,required:R,label:p,helperText:i,validationText:G,validationStatus:x},v={width:r,direction:e,name:w,required:R,disabled:n,loop:N,defaultValue:E,value:P,onValueChange:h};return o.createElement(_chunkO63GLLKHcjs.a,{ref:C,className:_clsx2.default.call(void 0, g,a),...F},o.createElement(u,{...v},t))});j.displayName=f;exports.a = u; exports.b = j;
|
|
2
|
-
//# sourceMappingURL=chunk-BBH2BLZX.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-BBH2BLZX.cjs","../src/components/RadioGroup/RadioGroup.tsx"],"names":["rootComponentName","rootComponentClassName","withGlobalPrefix","RadioGroupRoot","children","direction","width","className","props","ref","RadixRadioGroup","clsx","Flex","componentName","componentClassName","RadioGroup","contentWidth","label","helperText","validationText","validationStatus","required","disabled","loop","defaultValue","value","onValueChange","name","fieldsetProps","radioGroupRootProps","Fieldset"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,uECAnG,wEAEN,mCAE6B,IAOxCA,CAAAA,CAAoB,gBAAA,CACpBC,CAAAA,CAAyBC,iCAAAA,CAAkC,CAAA,CAIpDC,CAAAA,aAAuB,CAAA,CAAA,UAAA,CAClC,CAAC,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAY,QAAA,CAAU,KAAA,CAAAC,CAAAA,CAAO,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE7D,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKD,CAAAA,CACL,OAAA,CAAO,CAAA,CAAA,CACN,GAAGD,CAAAA,CACJ,WAAA,CAAaH,CAAAA,GAAc,QAAA,CAAW,UAAA,CAAa,YAAA,CACnD,SAAA,CAAWM,4BAAAA,CAAKV,CAAwBM,CAAS,CAAA,CAAA,CAEjD,CAAA,CAAA,aAAA,CAACK,mBAAAA,CAAA,CAAK,KAAA,CAAON,CAAAA,CAAAA,CAAQF,CAAS,CAChC,CAGN,CAAA,CAEAD,CAAAA,CAAe,WAAA,CAAcH,CAAAA,CAE7B,IAAMa,CAAAA,CAAgB,YAAA,CAChBC,CAAAA,CAAqBZ,iCAAAA,CAA8B,CAAA,CAI5Ca,CAAAA,aAAmB,CAAA,CAAA,UAAA,CAC9B,CACE,CACE,QAAA,CAAAX,CAAAA,CACA,YAAA,CAAAY,CAAAA,CACA,SAAA,CAAAX,CAAAA,CAAY,QAAA,CACZ,SAAA,CAAAE,CAAAA,CACA,KAAA,CAAAU,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGnB,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMmB,CAAAA,CAAgB,CACpB,GAAGpB,CAAAA,CACH,QAAA,CAAAc,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,KAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CACMS,CAAAA,CAAsB,CAC1B,KAAA,CAAOb,CAAAA,CACP,SAAA,CAAAX,CAAAA,CACA,IAAA,CAAAsB,CAAAA,CACA,QAAA,CAAAN,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CACF,CAAA,CAEA,OACE,CAAA,CAAA,aAAA,CAACI,mBAAAA,CAAA,CAAS,GAAA,CAAKrB,CAAAA,CAAK,SAAA,CAAWE,4BAAAA,CAAKG,CAAoBP,CAAS,CAAA,CAAI,GAAGqB,CAAAA,CAAAA,CACtE,CAAA,CAAA,aAAA,CAACzB,CAAAA,CAAA,CAAgB,GAAG0B,CAAAA,CAAAA,CAAsBzB,CAAS,CACrD,CAEJ,CACF,CAAA,CAEAW,CAAAA,CAAW,WAAA,CAAcF,CAAAA,CAAAA,6BAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-BBH2BLZX.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { RadioGroupProps, RadioGroupRootProps } from './RadioGroup.props';\nimport { Flex } from '../Flex/Flex';\nimport { Fieldset } from '../Fieldset/Fieldset';\n\nconst rootComponentName = 'RadioGroupRoot';\nconst rootComponentClassName = withGlobalPrefix(rootComponentName);\n\ntype RadioGroupRootElement = ElementRef<'div'>;\n\nexport const RadioGroupRoot = React.forwardRef<RadioGroupRootElement, RadioGroupRootProps>(\n ({ children, direction = 'column', width, className, ...props }, ref) => {\n return (\n <RadixRadioGroup.Root\n ref={ref}\n asChild\n {...props}\n orientation={direction === 'column' ? 'vertical' : 'horizontal'}\n className={clsx(rootComponentClassName, className)}\n >\n <Flex width={width}>{children}</Flex>\n </RadixRadioGroup.Root>\n );\n }\n);\n\nRadioGroupRoot.displayName = rootComponentName;\n\nconst componentName = 'RadioGroup';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioGroupElement = ElementRef<'fieldset'>;\n\nexport const RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(\n (\n {\n children,\n contentWidth,\n direction = 'column',\n className,\n label,\n helperText,\n validationText,\n validationStatus,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n name,\n ...props\n },\n ref\n ) => {\n const fieldsetProps = {\n ...props,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n };\n const radioGroupRootProps = {\n width: contentWidth,\n direction,\n name,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n };\n\n return (\n <Fieldset ref={ref} className={clsx(componentClassName, className)} {...fieldsetProps}>\n <RadioGroupRoot {...radioGroupRootProps}>{children}</RadioGroupRoot>\n </Fieldset>\n );\n }\n);\n\nRadioGroup.displayName = componentName;\n"]}
|
package/dist/chunk-BC7Y6MZO.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-XQ5A24NX.js";import{a as r}from"./chunk-RTGGS5XX.js";import{b as o}from"./chunk-4PEMW3UE.js";import*as e from"react";import f from"clsx";var m="Legend",l=o(m),c=e.forwardRef((n,p)=>{let{className:s,...a}=r(n,t);return e.createElement("legend",{ref:p,className:f(l,s),...a})});c.displayName=m;export{c as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BC7Y6MZO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Legend/Legend.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { LegendProps } from './Legend.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'Legend';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype LegendElement = ElementRef<'legend'>;\n\nexport const Legend = React.forwardRef<LegendElement, LegendProps>((props, ref) => {\n const { className, ...legendProps } = extractProps(props, marginPropDefs);\n return <legend ref={ref} className={clsx(componentClassName, className)} {...legendProps} />;\n});\n\nLegend.displayName = componentName;\n"],"mappings":"wHAAA,UAAYA,MAAW,QAGvB,OAAOC,MAAU,OAOjB,IAAMC,EAAgB,SAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAe,aAAuC,CAACC,EAAOC,IAAQ,CACjF,GAAM,CAAE,UAAAC,EAAW,GAAGC,CAAY,EAAIC,EAAaJ,EAAOK,CAAc,EACxE,OAAO,gBAAC,UAAO,IAAKJ,EAAK,UAAWK,EAAKT,EAAoBK,CAAS,EAAI,GAAGC,EAAa,CAC5F,CAAC,EAEDJ,EAAO,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","Legend","props","ref","className","legendProps","extractProps","marginPropDefs","clsx"]}
|
package/dist/chunk-BJ2OK6RA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk-BYAQL5FQ.js";import*as e from"react";import{useControllableState as C}from"@radix-ui/react-use-controllable-state";var k="CheckboxGroupBase",d=({name:c,defaultValue:p,value:s,onValueChange:n,children:l})=>{let[h=[],o]=C({prop:s,defaultProp:p,onChange:n}),i=e.useCallback(r=>o((t=[])=>[...t,r]),[o]),m=e.useCallback(r=>o((t=[])=>t.filter(u=>u!==r)),[o]);return e.createElement(a,{value:{name:c,value:h,onItemCheck:i,onItemUncheck:m}},l)};d.displayName=k;export{d as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BJ2OK6RA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxGroupBase/CheckboxGroupBase.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport { CheckboxGroupBaseProvider } from './CheckboxGroupBase.context';\nimport { CheckboxGroupBaseProps } from './CheckboxGroupBase.props';\n\nconst componentName = 'CheckboxGroupBase';\n\nexport const CheckboxGroupBase = ({\n name,\n defaultValue,\n value: valueProp,\n onValueChange,\n children,\n}: PropsWithChildren<CheckboxGroupBaseProps>) => {\n // useControllableState will handle whether controlled or uncontrolled\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter(value => value !== itemValue)),\n [setValue]\n );\n\n const providerValue = {\n name,\n value,\n onItemCheck: handleItemCheck,\n onItemUncheck: handleItemUncheck,\n };\n\n return <CheckboxGroupBaseProvider value={providerValue}>{children}</CheckboxGroupBaseProvider>;\n};\n\nCheckboxGroupBase.displayName = componentName;\n"],"mappings":"wCAAA,UAAYA,MAAW,QAGvB,OAAS,wBAAAC,MAA4B,yCAKrC,IAAMC,EAAgB,oBAETC,EAAoB,CAAC,CAChC,KAAAC,EACA,aAAAC,EACA,MAAOC,EACP,cAAAC,EACA,SAAAC,CACF,IAAiD,CAE/C,GAAM,CAACC,EAAQ,CAAC,EAAGC,CAAQ,EAAIC,EAAqB,CAClD,KAAML,EACN,YAAaD,EACb,SAAUE,CACZ,CAAC,EAEKK,EAAwB,cAC3BC,GAAsBH,EAAS,CAACI,EAAY,CAAC,IAAM,CAAC,GAAGA,EAAWD,CAAS,CAAC,EAC7E,CAACH,CAAQ,CACX,EAEMK,EAA0B,cAC7BF,GACCH,EAAS,CAACI,EAAY,CAAC,IAAMA,EAAU,OAAOL,GAASA,IAAUI,CAAS,CAAC,EAC7E,CAACH,CAAQ,CACX,EASA,OAAO,gBAACM,EAAA,CAA0B,MAPZ,CACpB,KAAAZ,EACA,MAAAK,EACA,YAAaG,EACb,cAAeG,CACjB,GAEyDP,CAAS,CACpE,EAEAL,EAAkB,YAAcD","names":["React","useControllableState","componentName","CheckboxGroupBase","name","defaultValue","valueProp","onValueChange","children","value","setValue","useControllableState","handleItemCheck","itemValue","prevValue","handleItemUncheck","CheckboxGroupBaseProvider"]}
|
package/dist/chunk-BYAQL5FQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxGroupBase/CheckboxGroupBase.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type CheckboxGroupBaseContextValue = {\n name?: string;\n value?: Array<string>;\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\nexport const CheckboxGroupBaseContext = createContext<CheckboxGroupBaseContextValue | undefined>(\n undefined\n);\nexport const CheckboxGroupBaseProvider = CheckboxGroupBaseContext.Provider;\nexport const useCheckboxGroupBase = () => useContext(CheckboxGroupBaseContext);\n"],"mappings":"AAAA,OAAS,iBAAAA,EAAe,cAAAC,MAAkB,QAQnC,IAAMC,EAA2BF,EACtC,MACF,EACaG,EAA4BD,EAAyB,SACrDE,EAAuB,IAAMH,EAAWC,CAAwB","names":["createContext","useContext","CheckboxGroupBaseContext","CheckboxGroupBaseProvider","useCheckboxGroupBase"]}
|
package/dist/chunk-CEGUCKZW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as d}from"./chunk-TKW3USYF.js";import{a as s}from"./chunk-35HZSCJP.js";import{b as m}from"./chunk-4PEMW3UE.js";import*as o from"react";import l from"clsx";import{RadioGroup as z}from"radix-ui";var c="RadioGroupRoot",b=m(c),u=o.forwardRef(({children:t,direction:r="column",width:e,className:a,...p},i)=>o.createElement(z.Root,{ref:i,asChild:!0,...p,orientation:r==="column"?"vertical":"horizontal",className:l(b,a)},o.createElement(s,{width:e},t)));u.displayName=c;var f="RadioGroup",g=m(f),j=o.forwardRef(({children:t,contentWidth:r,direction:e="column",className:a,label:p,helperText:i,validationText:G,validationStatus:x,required:R,disabled:n,loop:N,defaultValue:E,value:P,onValueChange:h,name:w,...y},C)=>{let F={...y,disabled:n,required:R,label:p,helperText:i,validationText:G,validationStatus:x},v={width:r,direction:e,name:w,required:R,disabled:n,loop:N,defaultValue:E,value:P,onValueChange:h};return o.createElement(d,{ref:C,className:l(g,a),...F},o.createElement(u,{...v},t))});j.displayName=f;export{u as a,j as b};
|
|
2
|
-
//# sourceMappingURL=chunk-CEGUCKZW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { RadioGroupProps, RadioGroupRootProps } from './RadioGroup.props';\nimport { Flex } from '../Flex/Flex';\nimport { Fieldset } from '../Fieldset/Fieldset';\n\nconst rootComponentName = 'RadioGroupRoot';\nconst rootComponentClassName = withGlobalPrefix(rootComponentName);\n\ntype RadioGroupRootElement = ElementRef<'div'>;\n\nexport const RadioGroupRoot = React.forwardRef<RadioGroupRootElement, RadioGroupRootProps>(\n ({ children, direction = 'column', width, className, ...props }, ref) => {\n return (\n <RadixRadioGroup.Root\n ref={ref}\n asChild\n {...props}\n orientation={direction === 'column' ? 'vertical' : 'horizontal'}\n className={clsx(rootComponentClassName, className)}\n >\n <Flex width={width}>{children}</Flex>\n </RadixRadioGroup.Root>\n );\n }\n);\n\nRadioGroupRoot.displayName = rootComponentName;\n\nconst componentName = 'RadioGroup';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioGroupElement = ElementRef<'fieldset'>;\n\nexport const RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(\n (\n {\n children,\n contentWidth,\n direction = 'column',\n className,\n label,\n helperText,\n validationText,\n validationStatus,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n name,\n ...props\n },\n ref\n ) => {\n const fieldsetProps = {\n ...props,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n };\n const radioGroupRootProps = {\n width: contentWidth,\n direction,\n name,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n };\n\n return (\n <Fieldset ref={ref} className={clsx(componentClassName, className)} {...fieldsetProps}>\n <RadioGroupRoot {...radioGroupRootProps}>{children}</RadioGroupRoot>\n </Fieldset>\n );\n }\n);\n\nRadioGroup.displayName = componentName;\n"],"mappings":"wHAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAEjB,OAAS,cAAcC,MAAuB,WAO9C,IAAMC,EAAoB,iBACpBC,EAAyBC,EAAiBF,CAAiB,EAIpDG,EAAuB,aAClC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAY,SAAU,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAE7D,gBAACC,EAAgB,KAAhB,CACC,IAAKD,EACL,QAAO,GACN,GAAGD,EACJ,YAAaH,IAAc,SAAW,WAAa,aACnD,UAAWM,EAAKV,EAAwBM,CAAS,GAEjD,gBAACK,EAAA,CAAK,MAAON,GAAQF,CAAS,CAChC,CAGN,EAEAD,EAAe,YAAcH,EAE7B,IAAMa,EAAgB,aAChBC,EAAqBZ,EAAiBW,CAAa,EAI5CE,EAAmB,aAC9B,CACE,CACE,SAAAX,EACA,aAAAY,EACA,UAAAX,EAAY,SACZ,UAAAE,EACA,MAAAU,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,SAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAAC,EACA,cAAAC,EACA,KAAAC,EACA,GAAGnB,CACL,EACAC,IACG,CACH,IAAMmB,EAAgB,CACpB,GAAGpB,EACH,SAAAc,EACA,SAAAD,EACA,MAAAJ,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,CACF,EACMS,EAAsB,CAC1B,MAAOb,EACP,UAAAX,EACA,KAAAsB,EACA,SAAAN,EACA,SAAAC,EACA,KAAAC,EACA,aAAAC,EACA,MAAAC,EACA,cAAAC,CACF,EAEA,OACE,gBAACI,EAAA,CAAS,IAAKrB,EAAK,UAAWE,EAAKG,EAAoBP,CAAS,EAAI,GAAGqB,GACtE,gBAACzB,EAAA,CAAgB,GAAG0B,GAAsBzB,CAAS,CACrD,CAEJ,CACF,EAEAW,EAAW,YAAcF","names":["React","clsx","RadixRadioGroup","rootComponentName","rootComponentClassName","withGlobalPrefix","RadioGroupRoot","children","direction","width","className","props","ref","RadixRadioGroup","clsx","Flex","componentName","componentClassName","RadioGroup","contentWidth","label","helperText","validationText","validationStatus","required","disabled","loop","defaultValue","value","onValueChange","name","fieldsetProps","radioGroupRootProps","Fieldset"]}
|
package/dist/chunk-DKMO72XC.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkQUG4RSGOcjs = require('./chunk-QUG4RSGO.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _reactusecontrollablestate = require('@radix-ui/react-use-controllable-state');var k="CheckboxGroupBase",d= exports.a =({name:c,defaultValue:p,value:s,onValueChange:n,children:l})=>{let[h=[],o]=_reactusecontrollablestate.useControllableState.call(void 0, {prop:s,defaultProp:p,onChange:n}),i=e.useCallback(r=>o((t=[])=>[...t,r]),[o]),m=e.useCallback(r=>o((t=[])=>t.filter(u=>u!==r)),[o]);return e.createElement(_chunkQUG4RSGOcjs.b,{value:{name:c,value:h,onItemCheck:i,onItemUncheck:m}},l)};d.displayName=k;exports.a = d;
|
|
2
|
-
//# sourceMappingURL=chunk-DKMO72XC.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-DKMO72XC.cjs","../src/components/CheckboxGroupBase/CheckboxGroupBase.tsx"],"names":["componentName","CheckboxGroupBase","name","defaultValue","valueProp","onValueChange","children","value","setValue","useControllableState","handleItemCheck","itemValue","prevValue","handleItemUncheck","CheckboxGroupBaseProvider"],"mappings":"AAAA,mZAAwC,uECAjB,mFAGc,IAK/BA,CAAAA,CAAgB,mBAAA,CAETC,CAAAA,aAAoB,CAAC,CAChC,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,KAAA,CAAOC,CAAAA,CACP,aAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CACF,CAAA,CAAA,EAAiD,CAE/C,GAAM,CAACC,CAAAA,CAAQ,CAAC,CAAA,CAAGC,CAAQ,CAAA,CAAIC,6DAAAA,CAC7B,IAAA,CAAML,CAAAA,CACN,WAAA,CAAaD,CAAAA,CACb,QAAA,CAAUE,CACZ,CAAC,CAAA,CAEKK,CAAAA,CAAwB,CAAA,CAAA,WAAA,CAC3BC,CAAAA,EAAsBH,CAAAA,CAAS,CAACI,CAAAA,CAAY,CAAC,CAAA,CAAA,EAAM,CAAC,GAAGA,CAAAA,CAAWD,CAAS,CAAC,CAAA,CAC7E,CAACH,CAAQ,CACX,CAAA,CAEMK,CAAAA,CAA0B,CAAA,CAAA,WAAA,CAC7BF,CAAAA,EACCH,CAAAA,CAAS,CAACI,CAAAA,CAAY,CAAC,CAAA,CAAA,EAAMA,CAAAA,CAAU,MAAA,CAAOL,CAAAA,EAASA,CAAAA,GAAUI,CAAS,CAAC,CAAA,CAC7E,CAACH,CAAQ,CACX,CAAA,CASA,OAAO,CAAA,CAAA,aAAA,CAACM,mBAAAA,CAAA,CAA0B,KAAA,CAPZ,CACpB,IAAA,CAAAZ,CAAAA,CACA,KAAA,CAAAK,CAAAA,CACA,WAAA,CAAaG,CAAAA,CACb,aAAA,CAAeG,CACjB,CAAA,CAAA,CAEyDP,CAAS,CACpE,CAAA,CAEAL,CAAAA,CAAkB,WAAA,CAAcD,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-DKMO72XC.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport { CheckboxGroupBaseProvider } from './CheckboxGroupBase.context';\nimport { CheckboxGroupBaseProps } from './CheckboxGroupBase.props';\n\nconst componentName = 'CheckboxGroupBase';\n\nexport const CheckboxGroupBase = ({\n name,\n defaultValue,\n value: valueProp,\n onValueChange,\n children,\n}: PropsWithChildren<CheckboxGroupBaseProps>) => {\n // useControllableState will handle whether controlled or uncontrolled\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter(value => value !== itemValue)),\n [setValue]\n );\n\n const providerValue = {\n name,\n value,\n onItemCheck: handleItemCheck,\n onItemUncheck: handleItemUncheck,\n };\n\n return <CheckboxGroupBaseProvider value={providerValue}>{children}</CheckboxGroupBaseProvider>;\n};\n\nCheckboxGroupBase.displayName = componentName;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RadioTile/RadioTile.tsx"],"sourcesContent":["import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'RadioTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioTileElement = ElementRef<'button'>;\n\nexport const RadioTile = React.forwardRef<RadioTileElement, RadioTileProps>(\n (\n { className, id: providedId, label, helperText, 'aria-labelledby': ariaLabelledby, ...props },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFieldset();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className=\"hearth-RadioContainer\">\n <div className=\"hearth-RadioItem\">\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </div>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </div>\n </RadixRadioGroup.Item>\n );\n }\n);\n\nRadioTile.displayName = componentName;\n"],"mappings":"gPAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAIjB,OAAS,cAAcC,MAAuB,WAO9C,IAAMC,EAAgB,YAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAkB,aAC7B,CACE,CAAE,UAAAC,EAAW,GAAIC,EAAY,MAAAC,EAAO,WAAAC,EAAY,kBAAmBC,EAAgB,GAAGC,CAAM,EAC5FC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAT,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAU,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAY,EAC1EC,EAAyB,CAACH,GAAsBR,IAAe,OACrE,OACE,gBAACY,EAAgB,KAAhB,CACC,IAAKT,EACL,UAAWU,EAAKnB,EAAoBG,CAAS,EAC5C,GAAGK,EACJ,GAAIE,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCF,EAAQM,EAAU,SAErE,gBAAC,OAAI,UAAU,yBACb,gBAAC,OAAI,UAAU,oBACb,gBAACO,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,EACA,gBAACE,EAAA,CAAK,UAAU,UACd,gBAACC,EAAA,CAAM,GAAIV,EAAS,QAASD,EAAI,kBAAiB,IAC/CL,CACH,EACCY,EACC,gBAACK,EAAA,CAAW,GAAIV,EAAc,kBAAiB,IAC5CN,CACH,EACE,IACN,CACF,CACF,CAEJ,CACF,EAEAJ,EAAU,YAAcH","names":["React","clsx","RadixRadioGroup","componentName","componentClassName","withGlobalPrefix","RadioTile","className","providedId","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFieldset","showHelperText","RadixRadioGroup","clsx","Flex","Label","HelperText"]}
|
package/dist/chunk-G4BATINY.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-TKW3USYF.js";import{a as C}from"./chunk-BJ2OK6RA.js";import{a as h}from"./chunk-35HZSCJP.js";import{b as x}from"./chunk-4PEMW3UE.js";import*as o from"react";import b from"clsx";var G="CheckboxGroupRoot",F=x(G),k=o.forwardRef(({name:r,disabled:e,value:t,defaultValue:p,onValueChange:c,width:m="fit-content",direction:n="column",children:s,className:a,...l},i)=>{let f={name:r,value:t,defaultValue:p,onValueChange:c,children:s};return o.createElement(h,{ref:i,...l,className:b(F,a),"data-orientation":n==="column"?"vertical":"horizontal","data-disabled":e?"":void 0,width:m},o.createElement(C,{...f}))});k.displayName=G;var R="CheckboxGroup",v=x(R),B=o.forwardRef(({contentWidth:r,disabled:e,required:t,label:p,helperText:c,validationText:m,validationStatus:n,direction:s,value:a,defaultValue:l,onValueChange:i,children:f,className:d,name:N,...P},E)=>{let w={...P,disabled:e,required:t,label:p,helperText:c,validationText:m,validationStatus:n},y={width:r,direction:s,name:N,required:t,disabled:e,defaultValue:l,value:a,onValueChange:i,children:f};return o.createElement(u,{ref:E,className:b(v,d),...w},o.createElement(k,{...y}))});B.displayName=R;export{k as a,B as b};
|
|
2
|
-
//# sourceMappingURL=chunk-G4BATINY.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxGroupProps, CheckboxGroupRootProps } from './CheckboxGroup.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { Flex } from '../Flex/Flex';\nimport { CheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase';\nimport { Fieldset } from '../Fieldset/Fieldset';\n\nconst rootComponentName = 'CheckboxGroupRoot';\nconst rootComponentClassName = withGlobalPrefix(rootComponentName);\n\ntype CheckboxGroupRootElement = ElementRef<'div'>;\n\nexport const CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n name,\n disabled,\n value,\n defaultValue,\n onValueChange,\n width = 'fit-content',\n direction = 'column',\n children,\n className,\n ...props\n },\n ref\n ) => {\n const checkboxGroupBaseProps = { name, value, defaultValue, onValueChange, children };\n return (\n <Flex\n ref={ref}\n {...props}\n className={clsx(rootComponentClassName, className)}\n data-orientation={direction === 'column' ? 'vertical' : 'horizontal'}\n data-disabled={disabled ? '' : undefined}\n width={width}\n >\n <CheckboxGroupBase {...checkboxGroupBaseProps} />\n </Flex>\n );\n }\n);\n\nCheckboxGroupRoot.displayName = rootComponentName;\n\nconst componentName = 'CheckboxGroup';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxGroupElement = ElementRef<'fieldset'>;\n\nexport const CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (\n {\n contentWidth,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n direction,\n value,\n defaultValue,\n onValueChange,\n children,\n className,\n name,\n ...props\n },\n ref\n ) => {\n const fieldsetProps = {\n ...props,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n };\n const checkboxGroupRootProps = {\n width: contentWidth,\n direction,\n name,\n required,\n disabled,\n defaultValue,\n value,\n onValueChange,\n children,\n };\n return (\n <Fieldset ref={ref} className={clsx(componentClassName, className)} {...fieldsetProps}>\n <CheckboxGroupRoot {...checkboxGroupRootProps} />\n </Fieldset>\n );\n }\n);\n\nCheckboxGroup.displayName = componentName;\n"],"mappings":"gKAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OASjB,IAAMC,EAAoB,oBACpBC,EAAyBC,EAAiBF,CAAiB,EAIpDG,EAA0B,aACrC,CACE,CACE,KAAAC,EACA,SAAAC,EACA,MAAAC,EACA,aAAAC,EACA,cAAAC,EACA,MAAAC,EAAQ,cACR,UAAAC,EAAY,SACZ,SAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,IAAMC,EAAyB,CAAE,KAAAX,EAAM,MAAAE,EAAO,aAAAC,EAAc,cAAAC,EAAe,SAAAG,CAAS,EACpF,OACE,gBAACK,EAAA,CACC,IAAKF,EACJ,GAAGD,EACJ,UAAWI,EAAKhB,EAAwBW,CAAS,EACjD,mBAAkBF,IAAc,SAAW,WAAa,aACxD,gBAAeL,EAAW,GAAK,OAC/B,MAAOI,GAEP,gBAACS,EAAA,CAAmB,GAAGH,EAAwB,CACjD,CAEJ,CACF,EAEAZ,EAAkB,YAAcH,EAEhC,IAAMmB,EAAgB,gBAChBC,EAAqBlB,EAAiBiB,CAAa,EAI5CE,EAAsB,aACjC,CACE,CACE,aAAAC,EACA,SAAAjB,EACA,SAAAkB,EACA,MAAAC,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,UAAAjB,EACA,MAAAJ,EACA,aAAAC,EACA,cAAAC,EACA,SAAAG,EACA,UAAAC,EACA,KAAAR,EACA,GAAGS,CACL,EACAC,IACG,CACH,IAAMc,EAAgB,CACpB,GAAGf,EACH,SAAAR,EACA,SAAAkB,EACA,MAAAC,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,CACF,EACME,EAAyB,CAC7B,MAAOP,EACP,UAAAZ,EACA,KAAAN,EACA,SAAAmB,EACA,SAAAlB,EACA,aAAAE,EACA,MAAAD,EACA,cAAAE,EACA,SAAAG,CACF,EACA,OACE,gBAACmB,EAAA,CAAS,IAAKhB,EAAK,UAAWG,EAAKG,EAAoBR,CAAS,EAAI,GAAGgB,GACtE,gBAACzB,EAAA,CAAmB,GAAG0B,EAAwB,CACjD,CAEJ,CACF,EAEAR,EAAc,YAAcF","names":["React","clsx","rootComponentName","rootComponentClassName","withGlobalPrefix","CheckboxGroupRoot","name","disabled","value","defaultValue","onValueChange","width","direction","children","className","props","ref","checkboxGroupBaseProps","Flex","clsx","CheckboxGroupBase","componentName","componentClassName","CheckboxGroup","contentWidth","required","label","helperText","validationText","validationStatus","fieldsetProps","checkboxGroupRootProps","Fieldset"]}
|
package/dist/chunk-ICPNBPYR.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkVRX67OL2cjs = require('./chunk-VRX67OL2.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var P="TextInput",O=_chunk4H5JT5ORcjs.b.call(void 0, P),j= exports.a =_react2.default.forwardRef((E,L)=>{let{className:N,validationStatus:t,validationText:d,label:F,helperText:r,children:w,id:H,disabled:n,readOnly:l,hideLabel:S,required:s,placeholder:V,...q}=_chunk5DRU6TDWcjs.a.call(void 0, E,_chunkLAVQWQP2cjs.a),{id:p,labelId:m,helperTextId:u,validationTextId:o}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:H,prefix:"input"}),f=!l&&!n&&t!==void 0&&d!==void 0,B=_chunkDSW76HKTcjs.a.call(void 0, r?u:void 0,f?o:void 0),D=_react2.default.useRef(null),i=L||D;return _react2.default.createElement(_chunkVRX67OL2cjs.a,{className:_clsx2.default.call(void 0, O,N),direction:"column",gap:"75","data-validation-status":t||void 0,"data-disabled":n?"":void 0,onPointerDown:U=>{if(!U.target.closest("input, button, a")&&i&&typeof i=="object"&&i.current){let C=i.current;requestAnimationFrame(()=>{C.focus()})}}},_react2.default.createElement(_chunkVRX67OL2cjs.a,{direction:"column","data-visually-hidden":S?"":void 0},_react2.default.createElement(_chunkGFWH3VRNcjs.a,{htmlFor:p,id:m,disableUserSelect:!0,fontWeight:"semibold"},F,s?null:_react2.default.createElement(_chunk7TQMVZ2Rcjs.a,{as:"span",marginLeft:"50"},"(optional)")),r?_react2.default.createElement(_chunkK5BEIZDAcjs.a,{id:u,disableUserSelect:!0},r):null),_react2.default.createElement("div",{className:"hearth-TextInputRoot"},_react2.default.createElement("input",{ref:i,spellCheck:"false",id:p,required:s,disabled:n,readOnly:l,placeholder:n?void 0:V,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":t==="invalid"?!0:void 0,"aria-errormessage":t==="invalid"?o:void 0,...q}),w),f?_react2.default.createElement(_chunkTIOWEGWWcjs.a,{status:t,disableUserSelect:!0,id:o},d):null)});j.displayName=P;exports.a = j;
|
|
2
|
-
//# sourceMappingURL=chunk-ICPNBPYR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ICPNBPYR.cjs","../src/components/TextInput/TextInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","TextInput","React","props","forwardedRef","className","validationStatus","validationText","label","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","defaultRef","inputRef","Flex","clsx","event","input","Label","BodyText","HelperText","ValidationText"],"mappings":"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","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ICPNBPYR.cjs","sourcesContent":[null,"import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useIds } from '../../hooks/use-ids';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { BodyText } from '../BodyText/BodyText';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextInputElement = ElementRef<'input'>;\n\nexport const TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n (props, forwardedRef) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n helperText,\n children,\n id: providedId,\n disabled,\n readOnly,\n hideLabel,\n required,\n placeholder,\n ...textInputProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'input',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n const defaultRef = React.useRef<HTMLInputElement>(null);\n const inputRef = forwardedRef || defaultRef;\n return (\n <Flex\n className={clsx(componentClassName, className)}\n direction=\"column\"\n gap=\"75\"\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n onPointerDown={event => {\n // avoid losing focus when users click on non-interactive slot elements, such as icons\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n const input = inputRef.current;\n requestAnimationFrame(() => {\n input.focus();\n });\n }\n }}\n >\n <Flex direction=\"column\" data-visually-hidden={hideLabel ? '' : undefined}>\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <div className=\"hearth-TextInputRoot\">\n <input\n ref={inputRef}\n spellCheck=\"false\"\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n {...textInputProps}\n />\n {children}\n </div>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n }\n);\n\nTextInput.displayName = componentName;\n"]}
|
package/dist/chunk-IKUFQM7T.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/Button.props.ts"],"sourcesContent":["import { PropDef } from '../../props/prop-def';\nimport { Responsive } from '../../types/responsive';\nimport { ButtonBaseProps } from '../ButtonBase/ButtonBase.props';\n\nconst sizes = ['sm', 'md'] as const;\n\nexport const buttonPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport type ButtonProps = ButtonBaseProps & {\n /**\n * Sets the button height.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n};\n"],"mappings":"AAIA,IAAMA,EAAQ,CAAC,KAAM,IAAI,EAEZC,EAAiB,CAC5B,KAAM,CAAE,UAAW,OAAQ,OAAQD,EAAO,WAAY,GAAM,QAAS,IAAK,CAC5E","names":["sizes","buttonPropDefs"]}
|
package/dist/chunk-JEB5LCIV.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkO63GLLKHcjs = require('./chunk-O63GLLKH.cjs');var _chunkDKMO72XCcjs = require('./chunk-DKMO72XC.cjs');var _chunkVRX67OL2cjs = require('./chunk-VRX67OL2.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var G="CheckboxGroupRoot",F=_chunk4H5JT5ORcjs.b.call(void 0, G),k= exports.a =o.forwardRef(({name:r,disabled:e,value:t,defaultValue:p,onValueChange:c,width:m="fit-content",direction:n="column",children:s,className:a,...l},i)=>{let f={name:r,value:t,defaultValue:p,onValueChange:c,children:s};return o.createElement(_chunkVRX67OL2cjs.a,{ref:i,...l,className:_clsx2.default.call(void 0, F,a),"data-orientation":n==="column"?"vertical":"horizontal","data-disabled":e?"":void 0,width:m},o.createElement(_chunkDKMO72XCcjs.a,{...f}))});k.displayName=G;var R="CheckboxGroup",v=_chunk4H5JT5ORcjs.b.call(void 0, R),B= exports.b =o.forwardRef(({contentWidth:r,disabled:e,required:t,label:p,helperText:c,validationText:m,validationStatus:n,direction:s,value:a,defaultValue:l,onValueChange:i,children:f,className:d,name:N,...P},E)=>{let w={...P,disabled:e,required:t,label:p,helperText:c,validationText:m,validationStatus:n},y={width:r,direction:s,name:N,required:t,disabled:e,defaultValue:l,value:a,onValueChange:i,children:f};return o.createElement(_chunkO63GLLKHcjs.a,{ref:E,className:_clsx2.default.call(void 0, v,d),...w},o.createElement(k,{...y}))});B.displayName=R;exports.a = k; exports.b = B;
|
|
2
|
-
//# sourceMappingURL=chunk-JEB5LCIV.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-JEB5LCIV.cjs","../src/components/CheckboxGroup/CheckboxGroup.tsx"],"names":["rootComponentName","rootComponentClassName","withGlobalPrefix","CheckboxGroupRoot","name","disabled","value","defaultValue","onValueChange","width","direction","children","className","props","ref","checkboxGroupBaseProps","Flex","clsx","CheckboxGroupBase","componentName","componentClassName","CheckboxGroup","contentWidth","required","label","helperText","validationText","validationStatus","fieldsetProps","checkboxGroupRootProps","Fieldset"],"mappings":"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","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-JEB5LCIV.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxGroupProps, CheckboxGroupRootProps } from './CheckboxGroup.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { Flex } from '../Flex/Flex';\nimport { CheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase';\nimport { Fieldset } from '../Fieldset/Fieldset';\n\nconst rootComponentName = 'CheckboxGroupRoot';\nconst rootComponentClassName = withGlobalPrefix(rootComponentName);\n\ntype CheckboxGroupRootElement = ElementRef<'div'>;\n\nexport const CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n name,\n disabled,\n value,\n defaultValue,\n onValueChange,\n width = 'fit-content',\n direction = 'column',\n children,\n className,\n ...props\n },\n ref\n ) => {\n const checkboxGroupBaseProps = { name, value, defaultValue, onValueChange, children };\n return (\n <Flex\n ref={ref}\n {...props}\n className={clsx(rootComponentClassName, className)}\n data-orientation={direction === 'column' ? 'vertical' : 'horizontal'}\n data-disabled={disabled ? '' : undefined}\n width={width}\n >\n <CheckboxGroupBase {...checkboxGroupBaseProps} />\n </Flex>\n );\n }\n);\n\nCheckboxGroupRoot.displayName = rootComponentName;\n\nconst componentName = 'CheckboxGroup';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxGroupElement = ElementRef<'fieldset'>;\n\nexport const CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (\n {\n contentWidth,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n direction,\n value,\n defaultValue,\n onValueChange,\n children,\n className,\n name,\n ...props\n },\n ref\n ) => {\n const fieldsetProps = {\n ...props,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n };\n const checkboxGroupRootProps = {\n width: contentWidth,\n direction,\n name,\n required,\n disabled,\n defaultValue,\n value,\n onValueChange,\n children,\n };\n return (\n <Fieldset ref={ref} className={clsx(componentClassName, className)} {...fieldsetProps}>\n <CheckboxGroupRoot {...checkboxGroupRootProps} />\n </Fieldset>\n );\n }\n);\n\nCheckboxGroup.displayName = componentName;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport type { RadioProps } from './Radio.props';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { useIds } from '../../hooks/use-ids';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'Radio';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioElement = ElementRef<'button'>;\n\n/**\n * `Radio` can be used to choose between a set of more than two options.\n *\n * `Radio` should always be used with a `RadioGroup` or `RadioGridGroup` to\n * handle the state control and layout.\n *\n * `Radio` is, by default, appropriately labelled when using\n * the `label` prop, if you do not provide a label, you must specify an\n * `aria-label` or `aria-labelledby` for accessibility.\n *\n * > This component does not need to be wrapped in a `ThemeProvider` and can be used standalone with other component libraries.\n */\nexport const Radio = React.forwardRef<RadioElement, RadioProps>(\n (\n {\n id: providedId,\n label,\n helperText,\n className,\n labelFontWeight,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFieldset();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const showLabel = !!label;\n return (\n <div className={clsx(componentClassName, className)}>\n <div className=\"hearth-RadioContainer\">\n <RadixRadioGroup.Item\n ref={ref}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n className=\"hearth-RadioItem\"\n >\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </RadixRadioGroup.Item>\n </div>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label\n id={labelId}\n htmlFor={id}\n disableUserSelect\n fontWeight={labelFontWeight}\n className=\"hearth-RadioLabel\"\n >\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </div>\n );\n }\n);\n\nRadio.displayName = componentName;\n"],"mappings":"gPAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAIjB,OAAS,cAAcC,MAAuB,WAS9C,IAAMC,EAAgB,QAChBC,EAAqBC,EAAiBF,CAAa,EAgB5CG,EAAc,aACzB,CACE,CACE,GAAIC,EACJ,MAAAC,EACA,WAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAX,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAY,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAY,EAC1EC,EAAyB,CAACH,GAAsBV,IAAe,OAC/Dc,EAAY,CAAC,CAACf,EACpB,OACE,gBAAC,OAAI,UAAWgB,EAAKpB,EAAoBM,CAAS,GAChD,gBAAC,OAAI,UAAU,yBACb,gBAACe,EAAgB,KAAhB,CACC,IAAKX,EACJ,GAAGD,EACJ,GAAIE,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCJ,EAAQQ,EAAU,QACrE,UAAU,oBAEV,gBAACS,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,CACF,EACCF,EACC,gBAACG,EAAA,CAAK,UAAU,SAAS,IAAI,MAC3B,gBAACC,EAAA,CACC,GAAIX,EACJ,QAASD,EACT,kBAAiB,GACjB,WAAYJ,EACZ,UAAU,qBAETH,CACH,EACCc,EACC,gBAACM,EAAA,CAAW,GAAIX,EAAc,kBAAiB,IAC5CR,CACH,EACE,IACN,EACE,IACN,CAEJ,CACF,EAEAH,EAAM,YAAcH","names":["React","clsx","RadixRadioGroup","componentName","componentClassName","withGlobalPrefix","Radio","providedId","label","helperText","className","labelFontWeight","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFieldset","showHelperText","showLabel","clsx","RadixRadioGroup","Flex","Label","HelperText"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-MLABIXLN.cjs","../src/components/Radio/Radio.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Radio","providedId","label","helperText","className","labelFontWeight","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFieldset","showHelperText","showLabel","clsx","RadixRadioGroup","Flex","Label","HelperText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEAEN,mCAI6B,IASxCA,CAAAA,CAAgB,OAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAgB5CC,CAAAA,aAAc,CAAA,CAAA,UAAA,CACzB,CACE,CACE,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAX,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAY,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAY,CAC1EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBV,CAAAA,GAAe,KAAA,CAAA,CAC/Dc,CAAAA,CAAY,CAAC,CAACf,CAAAA,CACpB,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWgB,4BAAAA,CAAKpB,CAAoBM,CAAS,CAAA,CAAA,CAChD,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACe,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKX,CAAAA,CACJ,GAAGD,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCJ,CAAAA,CAAQQ,CAAAA,CAAU,KAAA,CAAA,CAAA,CACrE,SAAA,CAAU,kBAAA,CAAA,CAEV,CAAA,CAAA,aAAA,CAACS,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CACF,CAAA,CACCF,CAAAA,CACC,CAAA,CAAA,aAAA,CAACG,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAA,CAC3B,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CACC,EAAA,CAAIX,CAAAA,CACJ,OAAA,CAASD,CAAAA,CACT,iBAAA,CAAiB,CAAA,CAAA,CACjB,UAAA,CAAYJ,CAAAA,CACZ,SAAA,CAAU,mBAAA,CAAA,CAETH,CACH,CAAA,CACCc,CAAAA,CACC,CAAA,CAAA,aAAA,CAACM,mBAAAA,CAAA,CAAW,EAAA,CAAIX,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CR,CACH,CAAA,CACE,IACN,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAH,CAAAA,CAAM,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-MLABIXLN.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport type { RadioProps } from './Radio.props';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { useIds } from '../../hooks/use-ids';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'Radio';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioElement = ElementRef<'button'>;\n\n/**\n * `Radio` can be used to choose between a set of more than two options.\n *\n * `Radio` should always be used with a `RadioGroup` or `RadioGridGroup` to\n * handle the state control and layout.\n *\n * `Radio` is, by default, appropriately labelled when using\n * the `label` prop, if you do not provide a label, you must specify an\n * `aria-label` or `aria-labelledby` for accessibility.\n *\n * > This component does not need to be wrapped in a `ThemeProvider` and can be used standalone with other component libraries.\n */\nexport const Radio = React.forwardRef<RadioElement, RadioProps>(\n (\n {\n id: providedId,\n label,\n helperText,\n className,\n labelFontWeight,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFieldset();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const showLabel = !!label;\n return (\n <div className={clsx(componentClassName, className)}>\n <div className=\"hearth-RadioContainer\">\n <RadixRadioGroup.Item\n ref={ref}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n className=\"hearth-RadioItem\"\n >\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </RadixRadioGroup.Item>\n </div>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label\n id={labelId}\n htmlFor={id}\n disableUserSelect\n fontWeight={labelFontWeight}\n className=\"hearth-RadioLabel\"\n >\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </div>\n );\n }\n);\n\nRadio.displayName = componentName;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-N2FOD332.cjs","../src/components/Checkbox/Checkbox.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Checkbox","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","checkboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","context","useFieldset","checkboxContext","useCheckboxGroupBase","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","Flex","clsx","RadixCheckbox","TickSmallIcon","Label","HelperText"],"mappings":"AAAA,u/BAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECApV,wEACN,wEAMa,mCAMY,IAGpCA,CAAAA,CAAgB,UAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAiB,CAAA,CAAA,UAAA,CAA2C,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACvF,GAAM,CACJ,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaX,CAAOY,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAd,CAAAA,CAAY,MAAA,CAAQ,UAAW,CAAC,CAAA,CACzEe,CAAAA,CAAUC,iCAAAA,CAAY,CACtBC,CAAAA,CAAkBC,iCAAAA,CAAqB,CACvCC,CAAAA,iBAAUF,CAAAA,2BAAiB,KAAA,6BAAO,QAAA,mBAASX,CAAK,GAAA,CAChDc,CAAAA,iBAAqBL,CAAAA,6BAAS,oBAAA,CAC9BM,CAAAA,CAAkBN,CAAAA,CAAUA,CAAAA,CAAQ,kBAAkB,CAAA,CAAI,EAAA,CAC1DO,CAAAA,CAAiB,CAACF,CAAAA,EAAsB,CAAC,CAAClB,CAAAA,CAC1CqB,CAAAA,CAAY,CAAC,CAACtB,CAAAA,CAEpB,OACE,CAAA,CAAA,aAAA,CAACuB,mBAAAA,CAAA,CACC,GAAA,CAAI,KAAA,CACJ,SAAA,CAAWC,4BAAAA,CAAK9B,CAAoBQ,CAAS,CAAA,CAC7C,eAAA,CAAeC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAAA,CAE/B,CAAA,CAAA,aAAA,CAACsB,iBAAAA,CAAc,IAAA,CAAd,CACC,GAAA,CAAK3B,CAAAA,CACL,SAAA,CAAU,qBAAA,CACV,IAAA,iBAAMkB,CAAAA,6BAAiB,MAAA,CACvB,OAAA,CAASE,CAAAA,CACT,KAAA,CAAOb,CAAAA,CACN,GAAGE,CAAAA,CACJ,EAAA,CAAIG,CAAAA,CACJ,QAAA,CAAUP,CAAAA,CACV,kBAAA,CAAkBkB,CAAAA,CAAiBT,CAAAA,CAAeQ,CAAAA,CAClD,iBAAA,CAAiBd,CAAAA,EAAkBgB,CAAAA,CAAYX,CAAAA,CAAU,KAAA,CAAA,CACzD,eAAA,CAAkBO,CAAAA,EAAqB,CACjCJ,CAAAA,EAAAA,CACEI,CAAAA,iBACFF,CAAAA,6BAAiB,WAAA,mBAAYX,CAAK,GAAA,iBAElCW,CAAAA,6BAAiB,aAAA,mBAAcX,CAAK,GAAA,CAAA,CAGpCD,CAAAA,EACFA,CAAAA,CAAgBc,CAAO,CAE3B,CAAA,CAAA,CAEA,CAAA,CAAA,aAAA,CAACO,iBAAAA,CAAc,SAAA,CAAd,CAAwB,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAU,0BAAA,CAAA,CACzC,CAAA,CAAA,aAAA,CAACC,+BAAAA,CAAA,IAAc,CACjB,CACF,CAAA,CACCJ,CAAAA,CACC,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAA,CAC3B,CAAA,CAAA,aAAA,CAACI,mBAAAA,CAAA,CAAM,EAAA,CAAIhB,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC/CV,CACH,CAAA,CACCqB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,CAAW,EAAA,CAAIhB,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CX,CACH,CAAA,CACE,IACN,CAAA,CACE,IACN,CAEJ,CAAC,CAAA,CAEDL,CAAAA,CAAS,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-N2FOD332.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { CheckboxProps } from './Checkbox.props';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useCheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase.context';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'Checkbox';\nconst componentClassName = withGlobalPrefix(componentName);\n\nexport type CheckboxElement = ElementRef<'button'>;\n\nexport const Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>((props, ref) => {\n const {\n id: providedId,\n label,\n helperText,\n className,\n disabled,\n onCheckedChange,\n value = 'on',\n 'aria-labelledby': ariaLabelledby,\n ...checkboxProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'checkbox' });\n const context = useFieldset();\n const checkboxContext = useCheckboxGroupBase();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n\n return (\n <Flex\n gap=\"100\"\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...checkboxProps}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </Flex>\n );\n});\n\nCheckbox.displayName = componentName;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-NYIZVR6U.cjs","../src/components/CheckboxTile/CheckboxTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","CheckboxTile","className","providedId","disabled","value","onCheckedChange","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","context","useFieldset","checkboxContext","useCheckboxGroupBase","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","clsx","RadixCheckbox","TickSmallIcon","Flex","Label","HelperText"],"mappings":"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","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-NYIZVR6U.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxTileProps } from './CheckboxTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useCheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase.context';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\n\nconst componentName = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxTileElement = ElementRef<'button'>;\n\nexport const CheckboxTile = React.forwardRef<CheckboxTileElement, CheckboxTileProps>(\n (\n {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const context = useFieldset();\n const checkboxContext = useCheckboxGroupBase();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n return (\n <label\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...props}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </label>\n );\n }\n);\n\nCheckboxTile.displayName = componentName;\n"]}
|
package/dist/chunk-O63GLLKH.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkV63VK7GLcjs = require('./chunk-V63VK7GL.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkPFCKEVNTcjs = require('./chunk-PFCKEVNT.cjs');var _chunkVRX67OL2cjs = require('./chunk-VRX67OL2.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var P="Fieldset",M=_chunk4H5JT5ORcjs.b.call(void 0, P),S= exports.a =e.forwardRef((I,N)=>{let{children:B,className:E,id:H,label:r,helperText:i,validationText:t,validationStatus:o,disabled:l,"aria-labelledby":R,"aria-describedby":V,"aria-errormessage":s,...L}=_chunk5DRU6TDWcjs.a.call(void 0, I,_chunkLAVQWQP2cjs.a),{id:w,labelId:n,helperTextId:m,validationTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:H,prefix:"fieldset"}),D=!!r,p=!!i,a=!!(o&&t),f=_chunkDSW76HKTcjs.a.call(void 0, V||i?m:void 0,s||a?d:void 0),G={hasGroupHelperText:p,hasGroupValidationText:o!==void 0&&t!==void 0,"aria-describedby":f};return e.createElement("fieldset",{className:_clsx2.default.call(void 0, M,E),ref:N,...L,disabled:l,id:w,"data-disabled":l?"":void 0,"aria-errormessage":s||a?d:void 0,"aria-labelledby":_nullishCoalesce(R, () => ((r?n:void 0))),"aria-invalid":a,"aria-describedby":f},D?e.createElement(e.Fragment,null,e.createElement(_chunkV63VK7GLcjs.a,{id:n},r),p||a?e.createElement(_chunkVRX67OL2cjs.a,{direction:"column",alignItems:"start",className:"hearth-HelperTextContainer"},i?e.createElement(_chunkK5BEIZDAcjs.a,{id:m,disabled:l},i):null,a?e.createElement(_chunkTIOWEGWWcjs.a,{id:d,status:o},t):null):null):null,e.createElement(_chunkPFCKEVNTcjs.b,{value:G},B))});S.displayName=P;exports.a = S;
|
|
2
|
-
//# sourceMappingURL=chunk-O63GLLKH.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-O63GLLKH.cjs","../src/components/Fieldset/Fieldset.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Fieldset","props","ref","children","className","providedId","label","helperText","validationText","validationStatus","disabled","ariaLabelledby","ariaDescribedby","ariaErrorMessage","fieldsetProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","hasLabel","hasHelperText","showValidationText","ariaDescribedbyValue","mergeIds","value","clsx","Legend","Flex","HelperText","ValidationText","FieldsetProvider"],"mappings":"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","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-O63GLLKH.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { Flex } from '../Flex/Flex';\nimport { HelperText } from '../HelperText/HelperText';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport clsx from 'clsx';\nimport type { FieldsetProps } from './Fieldset.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { FieldsetProvider } from './Fieldset.context';\nimport { Legend } from '../Legend/Legend';\n\nconst componentName = 'Fieldset';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype FieldsetElement = ElementRef<'fieldset'>;\n\nexport const Fieldset = React.forwardRef<FieldsetElement, FieldsetProps>((props, ref) => {\n const {\n children,\n className,\n id: providedId,\n label,\n helperText,\n validationText,\n validationStatus,\n disabled,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-errormessage': ariaErrorMessage,\n ...fieldsetProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'fieldset',\n });\n const hasLabel = Boolean(label);\n const hasHelperText = Boolean(helperText);\n const showValidationText = Boolean(validationStatus && validationText);\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby || !!helperText ? helperTextId : undefined,\n ariaErrorMessage || showValidationText ? validationTextId : undefined\n );\n const value = {\n hasGroupHelperText: hasHelperText,\n hasGroupValidationText: Boolean(validationStatus !== undefined && validationText !== undefined),\n 'aria-describedby': ariaDescribedbyValue,\n };\n\n return (\n <fieldset\n className={clsx(componentClassName, className)}\n ref={ref}\n {...fieldsetProps}\n disabled={disabled}\n id={id}\n data-disabled={disabled ? '' : undefined}\n aria-errormessage={ariaErrorMessage || showValidationText ? validationTextId : undefined}\n aria-labelledby={ariaLabelledby ?? (Boolean(label) ? labelId : undefined)}\n aria-invalid={showValidationText}\n aria-describedby={ariaDescribedbyValue}\n >\n {hasLabel ? (\n <>\n <Legend id={labelId}>{label}</Legend>\n {hasHelperText || showValidationText ? (\n <Flex direction=\"column\" alignItems=\"start\" className=\"hearth-HelperTextContainer\">\n {helperText ? (\n <HelperText id={helperTextId} disabled={disabled}>\n {helperText}\n </HelperText>\n ) : null}\n {showValidationText ? (\n <ValidationText id={validationTextId} status={validationStatus}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n ) : null}\n </>\n ) : null}\n <FieldsetProvider value={value}>{children}</FieldsetProvider>\n </fieldset>\n );\n});\n\nFieldset.displayName = componentName;\n"]}
|
package/dist/chunk-OFJ7WSSK.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/Button.props.ts"],"names":["sizes","buttonPropDefs"],"mappings":"AAIA,6EAAMA,CAAAA,CAAQ,CAAC,IAAA,CAAM,IAAI,CAAA,CAEZC,CAAAA,aAAiB,CAC5B,IAAA,CAAM,CAAE,SAAA,CAAW,MAAA,CAAQ,MAAA,CAAQD,CAAAA,CAAO,UAAA,CAAY,CAAA,CAAA,CAAM,OAAA,CAAS,IAAK,CAC5E,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-OFJ7WSSK.cjs","sourcesContent":["import { PropDef } from '../../props/prop-def';\nimport { Responsive } from '../../types/responsive';\nimport { ButtonBaseProps } from '../ButtonBase/ButtonBase.props';\n\nconst sizes = ['sm', 'md'] as const;\n\nexport const buttonPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport type ButtonProps = ButtonBaseProps & {\n /**\n * Sets the button height.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n};\n"]}
|
package/dist/chunk-PFCKEVNT.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _react = require('react');var e=_react.createContext.call(void 0, {hasGroupHelperText:!1}),s= exports.b =e.Provider,l= exports.c =()=>_react.useContext.call(void 0, e);exports.a = e; exports.b = s; exports.c = l;
|
|
2
|
-
//# sourceMappingURL=chunk-PFCKEVNT.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Fieldset/Fieldset.context.ts"],"names":["FieldsetContext","createContext","FieldsetProvider","useFieldset","useContext"],"mappings":"AAAA,uGAA0C,IAO7BA,CAAAA,CAAkBC,kCAAAA,CAC7B,kBAAA,CAAoB,CAAA,CACtB,CAAyB,CAAA,CAEZC,CAAAA,aAAmBF,CAAAA,CAAgB,QAAA,CAEnCG,CAAAA,aAAc,CAAA,CAAA,EAAMC,+BAAAA,CAA0B,CAAA,CAAA,4CAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-PFCKEVNT.cjs","sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type FieldsetContextValue = {\n hasGroupHelperText: boolean;\n 'aria-describedby'?: string;\n};\n\nexport const FieldsetContext = createContext<FieldsetContextValue>({\n hasGroupHelperText: false,\n} as FieldsetContextValue);\n\nexport const FieldsetProvider = FieldsetContext.Provider;\n\nexport const useFieldset = () => useContext(FieldsetContext);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-QE7SFMVD.cjs","../src/components/RadioTile/RadioTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioTile","className","providedId","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFieldset","showHelperText","RadixRadioGroup","clsx","Flex","Label","HelperText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEACN,mCAI6B,IAOxCA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAkB,CAAA,CAAA,UAAA,CAC7B,CACE,CAAE,SAAA,CAAAC,CAAAA,CAAW,EAAA,CAAIC,CAAAA,CAAY,KAAA,CAAAC,CAAAA,CAAO,UAAA,CAAAC,CAAAA,CAAY,iBAAA,CAAmBC,CAAAA,CAAgB,GAAGC,CAAM,CAAA,CAC5FC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAT,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAU,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAY,CAC1EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBR,CAAAA,GAAe,KAAA,CAAA,CACrE,OACE,CAAA,CAAA,aAAA,CAACY,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKT,CAAAA,CACL,SAAA,CAAWU,4BAAAA,CAAKnB,CAAoBG,CAAS,CAAA,CAC5C,GAAGK,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCF,CAAAA,CAAQM,CAAAA,CAAU,KAAA,CAAA,CAAA,CAAA,CAErE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,kBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CAAA,CACA,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAA,CACd,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIV,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC/CL,CACH,CAAA,CACCY,CAAAA,CACC,CAAA,CAAA,aAAA,CAACK,mBAAAA,CAAA,CAAW,EAAA,CAAIV,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CN,CACH,CAAA,CACE,IACN,CACF,CACF,CAEJ,CACF,CAAA,CAEAJ,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-QE7SFMVD.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\n\nconst componentName = 'RadioTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioTileElement = ElementRef<'button'>;\n\nexport const RadioTile = React.forwardRef<RadioTileElement, RadioTileProps>(\n (\n { className, id: providedId, label, helperText, 'aria-labelledby': ariaLabelledby, ...props },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFieldset();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className=\"hearth-RadioContainer\">\n <div className=\"hearth-RadioItem\">\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </div>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </div>\n </RadixRadioGroup.Item>\n );\n }\n);\n\nRadioTile.displayName = componentName;\n"]}
|
package/dist/chunk-QEWR2ON7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunk-C2M7FEJX.js";import{a as y}from"./chunk-PJXMEG7B.js";import{a as h}from"./chunk-JPYVWTDN.js";import{a}from"./chunk-35HZSCJP.js";import{a as T}from"./chunk-VBMXLPU5.js";import{a as b}from"./chunk-XQ5A24NX.js";import{a as v}from"./chunk-QC4ZMGCU.js";import{a as x}from"./chunk-RTGGS5XX.js";import{b as c}from"./chunk-4PEMW3UE.js";import{a as g}from"./chunk-DVGYWBKQ.js";import M from"clsx";import e from"react";var P="TextInput",O=c(P),j=e.forwardRef((E,L)=>{let{className:N,validationStatus:t,validationText:d,label:F,helperText:r,children:w,id:H,disabled:n,readOnly:l,hideLabel:S,required:s,placeholder:V,...q}=x(E,b),{id:p,labelId:m,helperTextId:u,validationTextId:o}=v({providedId:H,prefix:"input"}),f=!l&&!n&&t!==void 0&&d!==void 0,B=g(r?u:void 0,f?o:void 0),D=e.useRef(null),i=L||D;return e.createElement(a,{className:M(O,N),direction:"column",gap:"75","data-validation-status":t||void 0,"data-disabled":n?"":void 0,onPointerDown:U=>{if(!U.target.closest("input, button, a")&&i&&typeof i=="object"&&i.current){let C=i.current;requestAnimationFrame(()=>{C.focus()})}}},e.createElement(a,{direction:"column","data-visually-hidden":S?"":void 0},e.createElement(I,{htmlFor:p,id:m,disableUserSelect:!0,fontWeight:"semibold"},F,s?null:e.createElement(T,{as:"span",marginLeft:"50"},"(optional)")),r?e.createElement(h,{id:u,disableUserSelect:!0},r):null),e.createElement("div",{className:"hearth-TextInputRoot"},e.createElement("input",{ref:i,spellCheck:"false",id:p,required:s,disabled:n,readOnly:l,placeholder:n?void 0:V,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":t==="invalid"?!0:void 0,"aria-errormessage":t==="invalid"?o:void 0,...q}),w),f?e.createElement(y,{status:t,disableUserSelect:!0,id:o},d):null)});j.displayName=P;export{j as a};
|
|
2
|
-
//# sourceMappingURL=chunk-QEWR2ON7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TextInput/TextInput.tsx"],"sourcesContent":["import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useIds } from '../../hooks/use-ids';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { BodyText } from '../BodyText/BodyText';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextInputElement = ElementRef<'input'>;\n\nexport const TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n (props, forwardedRef) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n helperText,\n children,\n id: providedId,\n disabled,\n readOnly,\n hideLabel,\n required,\n placeholder,\n ...textInputProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'input',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n const defaultRef = React.useRef<HTMLInputElement>(null);\n const inputRef = forwardedRef || defaultRef;\n return (\n <Flex\n className={clsx(componentClassName, className)}\n direction=\"column\"\n gap=\"75\"\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n onPointerDown={event => {\n // avoid losing focus when users click on non-interactive slot elements, such as icons\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n const input = inputRef.current;\n requestAnimationFrame(() => {\n input.focus();\n });\n }\n }}\n >\n <Flex direction=\"column\" data-visually-hidden={hideLabel ? '' : undefined}>\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <div className=\"hearth-TextInputRoot\">\n <input\n ref={inputRef}\n spellCheck=\"false\"\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n {...textInputProps}\n />\n {children}\n </div>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n }\n);\n\nTextInput.displayName = componentName;\n"],"mappings":"2YAIA,OAAOA,MAAU,OACjB,OAAOC,MAAW,QAUlB,IAAMC,EAAgB,YAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAYC,EAAM,WAC7B,CAACC,EAAOC,IAAiB,CACvB,GAAM,CACJ,UAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,MAAAC,EACA,WAAAC,EACA,SAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,YAAAC,EACA,GAAGC,CACL,EAAIC,EAAaf,EAAOgB,CAAc,EAChC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAb,EACA,OAAQ,OACV,CAAC,EAEKc,EACJ,CAACZ,GAAY,CAACD,GAAYN,IAAqB,QAAaC,IAAmB,OAE3EmB,EAAuBC,EACzBlB,EAAaa,EAAe,OAC9BG,EAAqBF,EAAmB,MAC1C,EAEMK,EAAa1B,EAAM,OAAyB,IAAI,EAChD2B,EAAWzB,GAAgBwB,EACjC,OACE1B,EAAA,cAAC4B,EAAA,CACC,UAAWC,EAAKhC,EAAoBM,CAAS,EAC7C,UAAU,SACV,IAAI,KACJ,yBAAwBC,GAAsC,OAC9D,gBAAeM,EAAW,GAAK,OAC/B,cAAeoB,GAAS,CAGtB,GAAI,CADWA,EAAM,OACV,QAAQ,kBAAkB,GAEjCH,GAAY,OAAOA,GAAa,UAAYA,EAAS,QAAS,CAChE,IAAMI,EAAQJ,EAAS,QACvB,sBAAsB,IAAM,CAC1BI,EAAM,MAAM,CACd,CAAC,CACH,CACF,GAEA/B,EAAA,cAAC4B,EAAA,CAAK,UAAU,SAAS,uBAAsBhB,EAAY,GAAK,QAC9DZ,EAAA,cAACgC,EAAA,CAAM,QAASd,EAAI,GAAIC,EAAS,kBAAiB,GAAC,WAAW,YAC3Db,EACAO,EAAW,KACVb,EAAA,cAACiC,EAAA,CAAS,GAAG,OAAO,WAAW,MAAK,YAEpC,CAEJ,EACC1B,EACCP,EAAA,cAACkC,EAAA,CAAW,GAAId,EAAc,kBAAiB,IAC5Cb,CACH,EACE,IACN,EACAP,EAAA,cAAC,OAAI,UAAU,wBACbA,EAAA,cAAC,SACC,IAAK2B,EACL,WAAW,QACX,GAAIT,EACJ,SAAUL,EACV,SAAUH,EACV,SAAUC,EACV,YAAcD,EAAyB,OAAdI,EACzB,kBAAiBK,EACjB,mBAAkBK,EAClB,eAAcpB,IAAqB,UAAY,GAAO,OACtD,oBAAmBA,IAAqB,UAAYiB,EAAmB,OACtE,GAAGN,EACN,EACCP,CACH,EACCe,EACCvB,EAAA,cAACmC,EAAA,CAAe,OAAQ/B,EAAkB,kBAAiB,GAAC,GAAIiB,GAC7DhB,CACH,EACE,IACN,CAEJ,CACF,EAEAN,EAAU,YAAcH","names":["clsx","React","componentName","componentClassName","withGlobalPrefix","TextInput","React","props","forwardedRef","className","validationStatus","validationText","label","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","defaultRef","inputRef","Flex","clsx","event","input","Label","BodyText","HelperText","ValidationText"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxGroupBase/CheckboxGroupBase.context.ts"],"names":["CheckboxGroupBaseContext","createContext","CheckboxGroupBaseProvider","useCheckboxGroupBase","useContext"],"mappings":"AAAA,uGAA0C,IAQ7BA,CAAAA,CAA2BC,kCAAAA,KACtC,CACF,CAAA,CACaC,CAAAA,aAA4BF,CAAAA,CAAyB,QAAA,CACrDG,CAAAA,aAAuB,CAAA,CAAA,EAAMC,+BAAAA,CAAmC,CAAA,CAAA,4CAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-QUG4RSGO.cjs","sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type CheckboxGroupBaseContextValue = {\n name?: string;\n value?: Array<string>;\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\nexport const CheckboxGroupBaseContext = createContext<CheckboxGroupBaseContextValue | undefined>(\n undefined\n);\nexport const CheckboxGroupBaseProvider = CheckboxGroupBaseContext.Provider;\nexport const useCheckboxGroupBase = () => useContext(CheckboxGroupBaseContext);\n"]}
|
package/dist/chunk-RSZBNTZ7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-C2M7FEJX.js";import{a as f}from"./chunk-JPYVWTDN.js";import{c as C}from"./chunk-Z27JG5SL.js";import{c as u}from"./chunk-BYAQL5FQ.js";import{a as x}from"./chunk-35HZSCJP.js";import{a as k}from"./chunk-QC4ZMGCU.js";import{b as p}from"./chunk-4PEMW3UE.js";import*as e from"react";import P from"clsx";import{TickSmallIcon as S}from"@utilitywarehouse/hearth-react-icons";import{Checkbox as T}from"radix-ui";var R="CheckboxTile",U=p(R),B=e.forwardRef(({className:I,id:y,disabled:i,value:o="on",onCheckedChange:a,label:c,helperText:l,"aria-labelledby":N,...H},w)=>{let{id:s,labelId:m,helperTextId:n}=k({providedId:y,prefix:"radio"}),t=C(),r=u(),E=r?.value?.includes(o),F=t?.hasGroupHelperText,G=t?t["aria-describedby"]:"",d=!F&&!!l,L=!!c;return e.createElement("label",{className:P(U,I),"data-disabled":i?"":void 0},e.createElement(T.Root,{ref:w,className:"hearth-CheckboxRoot",name:r?.name,checked:E,value:o,...H,id:s,disabled:i,"aria-describedby":d?n:G,"aria-labelledby":N||L?m:void 0,onCheckedChange:b=>{t&&(b?r?.onItemCheck(o):r?.onItemUncheck(o)),a&&a(b)}},e.createElement(T.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(S,null))),e.createElement(x,{direction:"column"},e.createElement(h,{id:m,htmlFor:s,disableUserSelect:!0},c),d?e.createElement(f,{id:n,disableUserSelect:!0},l):null))});B.displayName=R;export{B as a};
|
|
2
|
-
//# sourceMappingURL=chunk-RSZBNTZ7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxTile/CheckboxTile.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxTileProps } from './CheckboxTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useCheckboxGroupBase } from '../CheckboxGroupBase/CheckboxGroupBase.context';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFieldset } from '../Fieldset/Fieldset.context';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\n\nconst componentName = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxTileElement = ElementRef<'button'>;\n\nexport const CheckboxTile = React.forwardRef<CheckboxTileElement, CheckboxTileProps>(\n (\n {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const context = useFieldset();\n const checkboxContext = useCheckboxGroupBase();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n return (\n <label\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...props}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </label>\n );\n }\n);\n\nCheckboxTile.displayName = componentName;\n"],"mappings":"wRAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAMjB,OAAS,iBAAAC,MAAqB,uCAM9B,OAAS,YAAYC,MAAqB,WAE1C,IAAMC,EAAgB,eAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAqB,aAChC,CACE,CACE,UAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,MAAAC,EAAQ,KACR,gBAAAC,EACA,MAAAC,EACA,WAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAZ,EAAY,OAAQ,OAAQ,CAAC,EACtEa,EAAUC,EAAY,EACtBC,EAAkBC,EAAqB,EACvCC,EAAUF,GAAiB,OAAO,SAASb,CAAK,EAChDgB,EAAqBL,GAAS,mBAC9BM,EAAkBN,EAAUA,EAAQ,kBAAkB,EAAI,GAC1DO,EAAiB,CAACF,GAAsB,CAAC,CAACb,EAC1CgB,EAAY,CAAC,CAACjB,EACpB,OACE,gBAAC,SACC,UAAWkB,EAAK1B,EAAoBG,CAAS,EAC7C,gBAAeE,EAAW,GAAK,QAE/B,gBAACP,EAAc,KAAd,CACC,IAAKc,EACL,UAAU,sBACV,KAAMO,GAAiB,KACvB,QAASE,EACT,MAAOf,EACN,GAAGK,EACJ,GAAIE,EACJ,SAAUR,EACV,mBAAkBmB,EAAiBT,EAAeQ,EAClD,kBAAiBb,GAAkBe,EAAYX,EAAU,OACzD,gBAAkBO,GAAqB,CACjCJ,IACEI,EACFF,GAAiB,YAAYb,CAAK,EAElCa,GAAiB,cAAcb,CAAK,GAGpCC,GACFA,EAAgBc,CAAO,CAE3B,GAEA,gBAACvB,EAAc,UAAd,CAAwB,QAAO,GAAC,UAAU,4BACzC,gBAAC6B,EAAA,IAAc,CACjB,CACF,EACA,gBAACC,EAAA,CAAK,UAAU,UACd,gBAACC,EAAA,CAAM,GAAIf,EAAS,QAASD,EAAI,kBAAiB,IAC/CL,CACH,EACCgB,EACC,gBAACM,EAAA,CAAW,GAAIf,EAAc,kBAAiB,IAC5CN,CACH,EACE,IACN,CACF,CAEJ,CACF,EAEAP,EAAa,YAAcH","names":["React","clsx","TickSmallIcon","RadixCheckbox","componentName","componentClassName","withGlobalPrefix","CheckboxTile","className","providedId","disabled","value","onCheckedChange","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","context","useFieldset","checkboxContext","useCheckboxGroupBase","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","clsx","TickSmallIcon","Flex","Label","HelperText"]}
|
package/dist/chunk-TKW3USYF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-PJXMEG7B.js";import{a as g}from"./chunk-BC7Y6MZO.js";import{a as T}from"./chunk-JPYVWTDN.js";import{b as v}from"./chunk-Z27JG5SL.js";import{a as x}from"./chunk-35HZSCJP.js";import{a as u}from"./chunk-XQ5A24NX.js";import{a as h}from"./chunk-QC4ZMGCU.js";import{a as b}from"./chunk-RTGGS5XX.js";import{b as c}from"./chunk-4PEMW3UE.js";import{a as F}from"./chunk-DVGYWBKQ.js";import*as e from"react";import C from"clsx";var P="Fieldset",M=c(P),S=e.forwardRef((I,N)=>{let{children:B,className:E,id:H,label:r,helperText:i,validationText:t,validationStatus:o,disabled:l,"aria-labelledby":R,"aria-describedby":V,"aria-errormessage":s,...L}=b(I,u),{id:w,labelId:n,helperTextId:m,validationTextId:d}=h({providedId:H,prefix:"fieldset"}),D=!!r,p=!!i,a=!!(o&&t),f=F(V||i?m:void 0,s||a?d:void 0),G={hasGroupHelperText:p,hasGroupValidationText:o!==void 0&&t!==void 0,"aria-describedby":f};return e.createElement("fieldset",{className:C(M,E),ref:N,...L,disabled:l,id:w,"data-disabled":l?"":void 0,"aria-errormessage":s||a?d:void 0,"aria-labelledby":R??(r?n:void 0),"aria-invalid":a,"aria-describedby":f},D?e.createElement(e.Fragment,null,e.createElement(g,{id:n},r),p||a?e.createElement(x,{direction:"column",alignItems:"start",className:"hearth-HelperTextContainer"},i?e.createElement(T,{id:m,disabled:l},i):null,a?e.createElement(y,{id:d,status:o},t):null):null):null,e.createElement(v,{value:G},B))});S.displayName=P;export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-TKW3USYF.js.map
|