@commercetools/nimbus 2.0.1-rc1 → 2.0.1-rc2
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/chunks/{Button-CrgZzRm9.es.js → Button-Dx3xzN8n.es.js} +2 -2
- package/dist/chunks/{Button-CrgZzRm9.es.js.map → Button-Dx3xzN8n.es.js.map} +1 -1
- package/dist/chunks/{DateField-qGypjFaJ.es.js → DateField-B-4ymU5i.es.js} +3 -3
- package/dist/chunks/{DateField-qGypjFaJ.es.js.map → DateField-B-4ymU5i.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-Dn0LNd7V.es.js → DatePicker-ByxT1sNF.es.js} +6 -6
- package/dist/chunks/{DatePicker-Dn0LNd7V.es.js.map → DatePicker-ByxT1sNF.es.js.map} +1 -1
- package/dist/chunks/{Dialog-B2hCMJnM.es.js → Dialog-Qpq4hk89.es.js} +6 -6
- package/dist/chunks/{Dialog-B2hCMJnM.es.js.map → Dialog-Qpq4hk89.es.js.map} +1 -1
- package/dist/chunks/{Header-B4V0zxSN.es.js → Header-DFcQWjkP.es.js} +3 -3
- package/dist/chunks/{Header-B4V0zxSN.es.js.map → Header-DFcQWjkP.es.js.map} +1 -1
- package/dist/chunks/{Heading-CfiWDgRZ.es.js → Heading-DFiVmZUR.es.js} +4 -4
- package/dist/chunks/{Heading-CfiWDgRZ.es.js.map → Heading-DFiVmZUR.es.js.map} +1 -1
- package/dist/chunks/{ListBox-DAcVFwWW.es.js → ListBox-_1Uk-5-7.es.js} +6 -6
- package/dist/chunks/{ListBox-DAcVFwWW.es.js.map → ListBox-_1Uk-5-7.es.js.map} +1 -1
- package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js → ListKeyboardDelegate-ByRdSpOe.es.js} +2 -2
- package/dist/chunks/{ListKeyboardDelegate-D-k0fIME.es.js.map → ListKeyboardDelegate-ByRdSpOe.es.js.map} +1 -1
- package/dist/chunks/{Modal-D91zBjIP.es.js → Modal-DZrVgGsJ.es.js} +3 -3
- package/dist/chunks/{Modal-D91zBjIP.es.js.map → Modal-DZrVgGsJ.es.js.map} +1 -1
- package/dist/chunks/{SelectionManager-2q7N4psD.es.js → SelectionManager-DMLLo5N3.es.js} +3 -3
- package/dist/chunks/{SelectionManager-2q7N4psD.es.js.map → SelectionManager-DMLLo5N3.es.js.map} +1 -1
- package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js → ToggleButton-881iW8P_.es.js} +2 -2
- package/dist/chunks/{ToggleButton-Cj9AtHpY.es.js.map → ToggleButton-881iW8P_.es.js.map} +1 -1
- package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +1 -1
- package/dist/chunks/{accordion-DSLccfDW.es.js → accordion-CKDnNkVv.es.js} +2 -2
- package/dist/chunks/accordion-CKDnNkVv.es.js.map +1 -0
- package/dist/chunks/{alert-Cz2mnKir.es.js → alert-lNg0Rz2w.es.js} +2 -2
- package/dist/chunks/{alert-Cz2mnKir.es.js.map → alert-lNg0Rz2w.es.js.map} +1 -1
- package/dist/chunks/{button-Cnui897Z.es.js → button-IZUJaJku.es.js} +3 -3
- package/dist/chunks/{button-Cnui897Z.es.js.map → button-IZUJaJku.es.js.map} +1 -1
- package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +1 -1
- package/dist/chunks/{calendar-BTdHdh7y.es.js → calendar-lD6G93R9.es.js} +5 -5
- package/dist/chunks/calendar-lD6G93R9.es.js.map +1 -0
- package/dist/chunks/{checkbox-Bm4Yqa_0.es.js → checkbox-BB-WJdal.es.js} +3 -3
- package/dist/chunks/{checkbox-Bm4Yqa_0.es.js.map → checkbox-BB-WJdal.es.js.map} +1 -1
- package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +1 -1
- package/dist/chunks/{collapsible-motion-OOUmjdKw.es.js → collapsible-motion-CSrKjF8X.es.js} +2 -2
- package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +1 -0
- package/dist/chunks/combobox-B5UxZWSX.cjs.js.map +1 -1
- package/dist/chunks/{combobox-Ch4VokC9.es.js → combobox-D_7gr3DY.es.js} +13 -13
- package/dist/chunks/{combobox-Ch4VokC9.es.js.map → combobox-D_7gr3DY.es.js.map} +1 -1
- package/dist/chunks/{data-table-DC369pb3.es.js → data-table-ClMivKY1.es.js} +8 -8
- package/dist/chunks/{data-table-DC369pb3.es.js.map → data-table-ClMivKY1.es.js.map} +1 -1
- package/dist/chunks/{date-input-KVuRsFzs.es.js → date-input-Do1wXp3t.es.js} +2 -2
- package/dist/chunks/{date-input-KVuRsFzs.es.js.map → date-input-Do1wXp3t.es.js.map} +1 -1
- package/dist/chunks/{date-picker-C304WfAN.es.js → date-picker-ClYge74a.es.js} +9 -9
- package/dist/chunks/{date-picker-C304WfAN.es.js.map → date-picker-ClYge74a.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-CkRgcwfm.es.js → date-range-picker-KRcGUZW-.es.js} +9 -9
- package/dist/chunks/{date-range-picker-CkRgcwfm.es.js.map → date-range-picker-KRcGUZW-.es.js.map} +1 -1
- package/dist/chunks/{dialog-gTeRW6GK.es.js → dialog-BwtIcIvd.es.js} +2 -2
- package/dist/chunks/{dialog-gTeRW6GK.es.js.map → dialog-BwtIcIvd.es.js.map} +1 -1
- package/dist/chunks/{dialog.title-B9cEUH8w.es.js → dialog.title-CP_ZeiK4.es.js} +5 -5
- package/dist/chunks/{dialog.title-B9cEUH8w.es.js.map → dialog.title-CP_ZeiK4.es.js.map} +1 -1
- package/dist/chunks/{draggable-list-BIJ7t5ou.es.js → draggable-list-s43baxoM.es.js} +11 -11
- package/dist/chunks/{draggable-list-BIJ7t5ou.es.js.map → draggable-list-s43baxoM.es.js.map} +1 -1
- package/dist/chunks/{drawer-DKF34Nfc.es.js → drawer-BJ4qvGnj.es.js} +5 -5
- package/dist/chunks/{drawer-DKF34Nfc.es.js.map → drawer-BJ4qvGnj.es.js.map} +1 -1
- package/dist/chunks/{form-field-cRZo4WSf.es.js → form-field-BYlpCXdY.es.js} +3 -3
- package/dist/chunks/{form-field-cRZo4WSf.es.js.map → form-field-BYlpCXdY.es.js.map} +1 -1
- package/dist/chunks/group-BqUFlw5R.cjs.js.map +1 -1
- package/dist/chunks/group-CWADf2vF.es.js.map +1 -1
- package/dist/chunks/icon-CenxuChf.es.js.map +1 -1
- package/dist/chunks/icon-D39U--jA.cjs.js.map +1 -1
- package/dist/chunks/{icon-button-9Ni8-hO7.es.js → icon-button-DQS2apw-.es.js} +2 -2
- package/dist/chunks/{icon-button-9Ni8-hO7.es.js.map → icon-button-DQS2apw-.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js → icon-toggle-button-Bi-9Obfx.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js.map → icon-toggle-button-Bi-9Obfx.es.js.map} +1 -1
- package/dist/chunks/kbd-BaeV_DL-.cjs.js.map +1 -1
- package/dist/chunks/kbd-CH9rYghB.es.js.map +1 -1
- package/dist/chunks/{link-QwdgCWJd.es.js → link-BEhlSTUU.es.js} +3 -3
- package/dist/chunks/{link-QwdgCWJd.es.js.map → link-BEhlSTUU.es.js.map} +1 -1
- package/dist/chunks/{localized-field-pJSLdod5.es.js → localized-field-D3G0Uy7Z.es.js} +8 -8
- package/dist/chunks/{localized-field-pJSLdod5.es.js.map → localized-field-D3G0Uy7Z.es.js.map} +1 -1
- package/dist/chunks/{menu-4QTf2m-7.es.js → menu-D-vE6ZpM.es.js} +4 -4
- package/dist/chunks/menu-D-vE6ZpM.es.js.map +1 -0
- package/dist/chunks/menu-DIepV2KZ.cjs.js.map +1 -1
- package/dist/chunks/{money-input-BJpffXRR.es.js → money-input-sk0Slpeu.es.js} +3 -3
- package/dist/chunks/{money-input-BJpffXRR.es.js.map → money-input-sk0Slpeu.es.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js → nimbus-provider-BHNFDQ0f.es.js} +5 -5
- package/dist/chunks/{nimbus-provider-BfpEKy6w.es.js.map → nimbus-provider-BHNFDQ0f.es.js.map} +1 -1
- package/dist/chunks/{number-input-DXiwgboS.es.js → number-input-CktMxOdZ.es.js} +2 -2
- package/dist/chunks/{number-input-DXiwgboS.es.js.map → number-input-CktMxOdZ.es.js.map} +1 -1
- package/dist/chunks/{openLink-DT8XzqFh.es.js → openLink-CY66vjvW.es.js} +3 -3
- package/dist/chunks/{openLink-DT8XzqFh.es.js.map → openLink-CY66vjvW.es.js.map} +1 -1
- package/dist/chunks/{pagination-Sq1twv0k.es.js → pagination-Bcq69Nv3.es.js} +4 -4
- package/dist/chunks/{pagination-Sq1twv0k.es.js.map → pagination-Bcq69Nv3.es.js.map} +1 -1
- package/dist/chunks/{password-input-CBhC_e5Z.es.js → password-input-6MO4I-2j.es.js} +2 -2
- package/dist/chunks/{password-input-CBhC_e5Z.es.js.map → password-input-6MO4I-2j.es.js.map} +1 -1
- package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
- package/dist/chunks/{popover-Cz6TnNt_.es.js → popover-DNaC7CwB.es.js} +2 -2
- package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -0
- package/dist/chunks/{radio-input-DhqS9ipf.es.js → radio-input-4jw6HUjC.es.js} +2 -2
- package/dist/chunks/{radio-input-DhqS9ipf.es.js.map → radio-input-4jw6HUjC.es.js.map} +1 -1
- package/dist/chunks/{range-calendar-RBEpLQJb.es.js → range-calendar-DBpl6y5i.es.js} +5 -5
- package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +1 -0
- package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +1 -1
- package/dist/chunks/{rich-text-input-CrjP71KM.es.js → rich-text-input-BC8CBVio.es.js} +5 -5
- package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +1 -0
- package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +1 -1
- package/dist/chunks/{search-input-DCpjVXVS.es.js → search-input-DJy2NHYW.es.js} +3 -3
- package/dist/chunks/{search-input-DCpjVXVS.es.js.map → search-input-DJy2NHYW.es.js.map} +1 -1
- package/dist/chunks/{select-xlqMXZuO.es.js → select-BmMhTBo-.es.js} +9 -9
- package/dist/chunks/{select-xlqMXZuO.es.js.map → select-BmMhTBo-.es.js.map} +1 -1
- package/dist/chunks/separator-CvRn_J0r.cjs.js.map +1 -1
- package/dist/chunks/separator-DJGUFG-o.es.js.map +1 -1
- package/dist/chunks/split-button-BO52sL7h.cjs.js.map +1 -1
- package/dist/chunks/{split-button-C5MmKuVW.es.js → split-button-BxyZmuNi.es.js} +4 -4
- package/dist/chunks/split-button-BxyZmuNi.es.js.map +1 -0
- package/dist/chunks/{switch-B5bEl91n.es.js → switch-01hEhL9A.es.js} +2 -2
- package/dist/chunks/switch-01hEhL9A.es.js.map +1 -0
- package/dist/chunks/switch-CdLhBEPq.cjs.js.map +1 -1
- package/dist/chunks/tabs-CJ0OAUSR.cjs.js.map +1 -1
- package/dist/chunks/{tabs-DGzmzlun.es.js → tabs-Dhte-RCe.es.js} +4 -4
- package/dist/chunks/{tabs-DGzmzlun.es.js.map → tabs-Dhte-RCe.es.js.map} +1 -1
- package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
- package/dist/chunks/{tag-group-pJFnuRoJ.es.js → tag-group-D2dgXSsV.es.js} +9 -9
- package/dist/chunks/{tag-group-pJFnuRoJ.es.js.map → tag-group-D2dgXSsV.es.js.map} +1 -1
- package/dist/chunks/{time-input-BUej1BjY.es.js → time-input-DDrB_c0M.es.js} +2 -2
- package/dist/chunks/{time-input-BUej1BjY.es.js.map → time-input-DDrB_c0M.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-CPzjUSI_.es.js → toggle-button-awb1jBf8.es.js} +2 -2
- package/dist/chunks/{toggle-button-CPzjUSI_.es.js.map → toggle-button-awb1jBf8.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-group-DOxjowig.es.js → toggle-button-group-Ce7ezOED.es.js} +2 -2
- package/dist/chunks/{toggle-button-group-DOxjowig.es.js.map → toggle-button-group-Ce7ezOED.es.js.map} +1 -1
- package/dist/chunks/tooltip-BPTOkK7W.cjs.js.map +1 -1
- package/dist/chunks/tooltip-sgakxhiy.es.js.map +1 -1
- package/dist/chunks/{useButton-DkQVxdIF.es.js → useButton-_sJ3_8ha.es.js} +2 -2
- package/dist/chunks/{useButton-DkQVxdIF.es.js.map → useButton-_sJ3_8ha.es.js.map} +1 -1
- package/dist/chunks/{useDateFormatter-BkKCXbud.es.js → useDateFormatter-C4zVAL_K.es.js} +2 -2
- package/dist/chunks/{useDateFormatter-BkKCXbud.es.js.map → useDateFormatter-C4zVAL_K.es.js.map} +1 -1
- package/dist/chunks/{useGridListItem-Cosrmt8g.es.js → useGridListItem--iMluO7K.es.js} +4 -4
- package/dist/chunks/{useGridListItem-Cosrmt8g.es.js.map → useGridListItem--iMluO7K.es.js.map} +1 -1
- package/dist/chunks/{useListState-CUO8Wibt.es.js → useListState-Cf8n791-.es.js} +2 -2
- package/dist/chunks/{useListState-CUO8Wibt.es.js.map → useListState-Cf8n791-.es.js.map} +1 -1
- package/dist/chunks/{usePress-Bxb2-xLP.es.js → usePress-Dc6amhnJ.es.js} +2 -2
- package/dist/chunks/{usePress-Bxb2-xLP.es.js.map → usePress-Dc6amhnJ.es.js.map} +1 -1
- package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js → useSingleSelectListState-DLY6K_dU.es.js} +2 -2
- package/dist/chunks/{useSingleSelectListState-CnVWWOJD.es.js.map → useSingleSelectListState-DLY6K_dU.es.js.map} +1 -1
- package/dist/chunks/{useToggle-CUMQAGyE.es.js → useToggle-CKEhqMIa.es.js} +2 -2
- package/dist/chunks/{useToggle-CUMQAGyE.es.js.map → useToggle-CKEhqMIa.es.js.map} +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/collapsible-motion.es.js +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/dialog.es.js +1 -1
- package/dist/components/draggable-list.es.js +1 -1
- package/dist/components/drawer.es.js +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/localized-field.es.js +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/popover.es.js +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/scoped-search-input.es.js +2 -2
- package/dist/components/search-input.es.js +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tabs.es.js +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button-group.es.js +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +34 -0
- package/dist/index.es.js +203 -198
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/accordion-DSLccfDW.es.js.map +0 -1
- package/dist/chunks/calendar-BTdHdh7y.es.js.map +0 -1
- package/dist/chunks/collapsible-motion-OOUmjdKw.es.js.map +0 -1
- package/dist/chunks/menu-4QTf2m-7.es.js.map +0 -1
- package/dist/chunks/popover-Cz6TnNt_.es.js.map +0 -1
- package/dist/chunks/range-calendar-RBEpLQJb.es.js.map +0 -1
- package/dist/chunks/rich-text-input-CrjP71KM.es.js.map +0 -1
- package/dist/chunks/split-button-C5MmKuVW.es.js.map +0 -1
- package/dist/chunks/switch-B5bEl91n.es.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import w, { useContext as R, createContext as S } from "react";
|
|
3
|
-
import { k as v, h as N } from "./Dialog-
|
|
3
|
+
import { k as v, h as N } from "./Dialog-Qpq4hk89.es.js";
|
|
4
4
|
import { createSlotRecipeContext as O, useSlotRecipe as H, chakra as B } from "@chakra-ui/react/styled-system";
|
|
5
5
|
import { l as m } from "./index-CtB71yr7.es.js";
|
|
6
|
-
import { a as I } from "./Button-
|
|
6
|
+
import { a as I } from "./Button-Dx3xzN8n.es.js";
|
|
7
7
|
import { e as g } from "./extractStyleProps-DYXEhLtq.es.js";
|
|
8
|
-
import { $ as M, a as F } from "./Modal-
|
|
8
|
+
import { $ as M, a as F } from "./Modal-DZrVgGsJ.es.js";
|
|
9
9
|
import { H as k } from "./heading-BtazVUd5.es.js";
|
|
10
10
|
import { Close as E } from "@commercetools/nimbus-icons";
|
|
11
11
|
import { defineMessages as V, useIntl as _ } from "react-intl";
|
|
12
|
-
import { I as j } from "./icon-button-
|
|
12
|
+
import { I as j } from "./icon-button-DQS2apw-.es.js";
|
|
13
13
|
const { withProvider: z, withContext: s } = /* @__PURE__ */ O({
|
|
14
14
|
recipe: m
|
|
15
15
|
}), A = /* @__PURE__ */ z(
|
|
@@ -301,4 +301,4 @@ const we = {
|
|
|
301
301
|
export {
|
|
302
302
|
we as D
|
|
303
303
|
};
|
|
304
|
-
//# sourceMappingURL=drawer-
|
|
304
|
+
//# sourceMappingURL=drawer-BJ4qvGnj.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-DKF34Nfc.es.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":";;;;;;;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAIYC,IAAiB,gBAAAJ;AAAA,EAC5B;AAAA,EACA;AACF,GAIaK,IAAoB,gBAAAJ,EAG/B,UAAU,SAAS,GAIRK,IAAyB,gBAAAL,EAGpC,OAAO,cAAc,GAIVM,IAAkB,gBAAAN,EAG7B,OAAO,OAAO,GAIHO,IAAoB,gBAAAP,EAG/B,OAAO,SAAS,GAILQ,IAAmB,gBAAAR;AAAA,EAC9B;AAAA,EACA;AACF,GAIaS,IAAiB,gBAAAT;AAAA,EAC5B;AAAA,EACA;AACF,GAIaU,IAAmB,gBAAAV;AAAA,EAC9B;AAAA,EACA;AACF,GAIaW,IAAkB,gBAAAX,EAG7B,MAAM,OAAO,GAIFY,IAAyB,gBAAAZ,EAGpC,OAAO,cAAc,GCtEVa,IAA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AChB;"}
|
|
1
|
+
{"version":3,"file":"drawer-BJ4qvGnj.es.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":";;;;;;;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAIYC,IAAiB,gBAAAJ;AAAA,EAC5B;AAAA,EACA;AACF,GAIaK,IAAoB,gBAAAJ,EAG/B,UAAU,SAAS,GAIRK,IAAyB,gBAAAL,EAGpC,OAAO,cAAc,GAIVM,IAAkB,gBAAAN,EAG7B,OAAO,OAAO,GAIHO,IAAoB,gBAAAP,EAG/B,OAAO,SAAS,GAILQ,IAAmB,gBAAAR;AAAA,EAC9B;AAAA,EACA;AACF,GAIaS,IAAiB,gBAAAT;AAAA,EAC5B;AAAA,EACA;AACF,GAIaU,IAAmB,gBAAAV;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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBP,cAAcI;AAChB;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as w, useRef as y, useState as I, useMemo as F, useEffect as c, Children as L, isValidElement as j, cloneElement as z, useContext as f } from "react";
|
|
3
3
|
import { createSlotRecipeContext as A, mergeRefs as V } from "@chakra-ui/react";
|
|
4
|
-
import { k as _, $ as H, h as N } from "./Dialog-
|
|
4
|
+
import { k as _, $ as H, h as N } from "./Dialog-Qpq4hk89.es.js";
|
|
5
5
|
import { HelpOutline as G, ErrorOutline as J } from "@commercetools/nimbus-icons";
|
|
6
6
|
import { $ as K } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
7
7
|
import { $ as O } from "./useField-B0j4t47V.es.js";
|
|
8
8
|
import { B as b } from "./box-DuBoAZvq.es.js";
|
|
9
|
-
import { I as Q } from "./icon-button-
|
|
9
|
+
import { I as Q } from "./icon-button-DQS2apw-.es.js";
|
|
10
10
|
const a = /* @__PURE__ */ w({
|
|
11
11
|
context: {
|
|
12
12
|
label: null,
|
|
@@ -228,4 +228,4 @@ export {
|
|
|
228
228
|
ro as e,
|
|
229
229
|
to as f
|
|
230
230
|
};
|
|
231
|
-
//# sourceMappingURL=form-field-
|
|
231
|
+
//# sourceMappingURL=form-field-BYlpCXdY.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-cRZo4WSf.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.types\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FormFieldRootSlotProps,\n FormFieldLabelSlotProps,\n FormFieldInputSlotProps,\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldPopoverSlotProps,\n} from \"./form-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"formField\",\n});\n\n// Root slot\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useMemo,\n useState,\n useRef,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField, useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = function FormFieldRoot({\n ref: forwardedRef,\n id,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n children,\n ...props\n}: FormFieldProps) {\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = useMemo(() => {\n const args: Parameters<typeof useField>[0] = {\n id,\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n args.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n args[\"aria-label\"] = \"empty-label\";\n args[\"aria-labelledby\"] = \"empty-label\";\n }\n\n return args;\n }, [id, context.description, context.error, context.label]);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = useMemo(\n () => ({\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }),\n [fieldProps, isInvalid, isRequired, isDisabled, isReadOnly]\n );\n\n const contextValue = useMemo(() => ({ context, setContext }), [context]);\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n alignSelf=\"center\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.types\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n\n // Cleanup: clear label when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n label: null,\n labelSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.types\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.types\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n\n // Cleanup: clear description when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n description: null,\n descriptionSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.types\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n\n // Cleanup: clear error when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n error: null,\n errorSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n\n // Cleanup: clear info when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n info: null,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardedRef","id","isInvalid","isRequired","isDisabled","isReadOnly","children","props","localRef","useRef","ref","useObjectRef","mergeRefs","context","setContext","useState","useFieldArgs","useMemo","args","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","contextValue","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GC5BK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,OAAO,GAGHI,IAAqB,gBAAAJ,EAGhC,OAAO,OAAO,GAGHK,IAA2B,gBAAAL,EAGtC,OAAO,aAAa,GAGTM,IAAqB,gBAAAN,EAGhC,OAAO,OAAO,GAGHO,IAAuB,gBAAAP,EAGlC,OAAO,SAAS,GCbLQ,IAAgB,SAAuB;AAAA,EAClD,KAAKC;AAAA,EACL,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AA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T,GClBaoC,KAAmB,CAAC,EAAE,UAAA5C,QAAsC;AACvE,QAAM,EAAE,YAAAQ,EAAA,IAAe6B,EAAWvD,CAAgB;AAElD,SAAAoC,EAAU,OACRV,EAAW,CAACW,OAAiB;AAAA,IAC3B,GAAGA;AAAA,IACH,MAAMnB;AAAA,EAAA,EACN,GAGK,MAAM;AACX,IAAAQ,EAAW,CAACW,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAM;AAAA,IAAA,EACN;AAAA,EACJ,IACC,CAACnB,GAAUQ,CAAU,CAAC,GAElB;AACT,GCtBaqC,KAAY;AAAA,EACvB,MAAMpD;AAAA,EACN,OAAO0C;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
|
|
1
|
+
{"version":3,"file":"form-field-BYlpCXdY.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.types\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FormFieldRootSlotProps,\n FormFieldLabelSlotProps,\n FormFieldInputSlotProps,\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldPopoverSlotProps,\n} from \"./form-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"formField\",\n});\n\n// Root slot\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useMemo,\n useState,\n useRef,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField, useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = function FormFieldRoot({\n ref: forwardedRef,\n id,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n children,\n ...props\n}: FormFieldProps) {\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = useMemo(() => {\n const args: Parameters<typeof useField>[0] = {\n id,\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n args.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n args[\"aria-label\"] = \"empty-label\";\n args[\"aria-labelledby\"] = \"empty-label\";\n }\n\n return args;\n }, [id, context.description, context.error, context.label]);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = useMemo(\n () => ({\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }),\n [fieldProps, isInvalid, isRequired, isDisabled, isReadOnly]\n );\n\n const contextValue = useMemo(() => ({ context, setContext }), [context]);\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n alignSelf=\"center\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.types\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n\n // Cleanup: clear label when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n label: null,\n labelSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.types\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.types\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n\n // Cleanup: clear description when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n description: null,\n descriptionSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.types\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n\n // Cleanup: clear error when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n error: null,\n errorSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n\n // Cleanup: clear info when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n info: null,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardedRef","id","isInvalid","isRequired","isDisabled","isReadOnly","children","props","localRef","useRef","ref","useObjectRef","mergeRefs","context","setContext","useState","useFieldArgs","useMemo","args","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","contextValue","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GC5BK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,OAAO,GAGHI,IAAqB,gBAAAJ,EAGhC,OAAO,OAAO,GAGHK,IAA2B,gBAAAL,EAGtC,OAAO,aAAa,GAGTM,IAAqB,gBAAAN,EAGhC,OAAO,OAAO,GAGHO,IAAuB,gBAAAP,EAGlC,OAAO,SAAS,GCbLQ,IAAgB,SAAuB;AAAA,EAClD,KAAKC;AAAA,EACL,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAmB;AACjB,QAAMC,IAAWC,EAAuB,IAAI,GACtCC,IAAMC,EAAaC,EAAUJ,GAAUR,CAAY,CAAC,GACpD,CAACa,GAASC,CAAU,IAAIC,EAAsC;AAAA,IAClE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,IACP,WAAAb;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKW,IAA+CC,EAAQ,MAAM;AACjE,UAAMC,IAAuC;AAAA,MAC3C,IAAAjB;AAAA,MACA,aAAaY,EAAQ;AAA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,SAASE;AACX;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-BqUFlw5R.cjs.js","sources":["../../src/components/group/group.slots.tsx","../../src/components/group/group.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Group as RaGroup } from \"react-aria-components\";\nimport type { GroupRootSlotProps } from \"./group.types\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"group-BqUFlw5R.cjs.js","sources":["../../src/components/group/group.slots.tsx","../../src/components/group/group.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Group as RaGroup } from \"react-aria-components\";\nimport type { GroupRootSlotProps } from \"./group.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withContext } = createRecipeContext({\n key: \"group\",\n});\n\n/**\n * Slot component that provides the styling context for the Group component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const GroupSlot: SlotComponent<typeof RaGroup, GroupRootSlotProps> =\n withContext<typeof RaGroup, GroupRootSlotProps>(RaGroup);\n","import { GroupSlot } from \"./group.slots\";\nimport type { GroupComponent } from \"./group.types\";\n\nexport const Group: GroupComponent = (props) => {\n const { ref, children, ...rest } = props;\n return (\n <GroupSlot ref={ref} {...rest}>\n {children}\n </GroupSlot>\n );\n};\n"],"names":["withContext","createRecipeContext","GroupSlot","RaGroup","Group","props","ref","children","rest","jsx"],"mappings":"qHAKM,CAAE,YAAAA,CAAA,EAAgBC,sBAAoB,CAC1C,IAAK,OACP,CAAC,EAMYC,EACXF,EAAgDG,2CAAO,ECX5CC,EAAyBC,GAAU,CAC9C,KAAM,CAAE,IAAAC,EAAK,SAAAC,EAAU,GAAGC,GAASH,EACnC,OACEI,EAAAA,IAACP,EAAA,CAAU,IAAAI,EAAW,GAAGE,EACtB,SAAAD,EACH,CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-CWADf2vF.es.js","sources":["../../src/components/group/group.slots.tsx","../../src/components/group/group.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Group as RaGroup } from \"react-aria-components\";\nimport type { GroupRootSlotProps } from \"./group.types\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"group-CWADf2vF.es.js","sources":["../../src/components/group/group.slots.tsx","../../src/components/group/group.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport { Group as RaGroup } from \"react-aria-components\";\nimport type { GroupRootSlotProps } from \"./group.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withContext } = createRecipeContext({\n key: \"group\",\n});\n\n/**\n * Slot component that provides the styling context for the Group component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const GroupSlot: SlotComponent<typeof RaGroup, GroupRootSlotProps> =\n withContext<typeof RaGroup, GroupRootSlotProps>(RaGroup);\n","import { GroupSlot } from \"./group.slots\";\nimport type { GroupComponent } from \"./group.types\";\n\nexport const Group: GroupComponent = (props) => {\n const { ref, children, ...rest } = props;\n return (\n <GroupSlot ref={ref} {...rest}>\n {children}\n </GroupSlot>\n );\n};\n"],"names":["withContext","createRecipeContext","GroupSlot","RaGroup","Group","props","ref","children","rest","jsx"],"mappings":";;;AAKA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,KAAK;AACP,CAAC,GAMYC,IACX,gBAAAF,EAAgDG,CAAO,GCX5CC,IAAwB,CAACC,MAAU;AAC9C,QAAM,EAAE,KAAAC,GAAK,UAAAC,GAAU,GAAGC,MAASH;AACnC,SACE,gBAAAI,EAACP,GAAA,EAAU,KAAAI,GAAW,GAAGE,GACtB,UAAAD,GACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-CenxuChf.es.js","sources":["../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { IconRootSlotProps } from \"./icon.types\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"icon-CenxuChf.es.js","sources":["../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { IconRootSlotProps } from \"./icon.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withContext } = createRecipeContext({ key: \"icon\" });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const IconRootSlot: SlotComponent<SVGSVGElement, IconRootSlotProps> =\n withContext<SVGSVGElement, IconRootSlotProps>(\"svg\");\n","import { IconRootSlot } from \"./icon.slots\";\nimport type { IconProps } from \"./icon.types\";\n\n/**\n * # Icon\n *\n * displays icon components\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/media/icon}\n */\nexport const Icon = (props: IconProps) => {\n const { ref, ...restProps } = props;\n return <IconRootSlot ref={ref} asChild={!restProps.as} {...restProps} />;\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["withContext","createRecipeContext","IconRootSlot","Icon","props","ref","restProps","jsx"],"mappings":";;AAIA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,KAAK,QAAQ,GAM9CC,IACX,gBAAAF,EAA8C,KAAK,GCDxCG,IAAO,CAACC,MAAqB;AACxC,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AAC9B,SAAO,gBAAAG,EAACL,KAAa,KAAAG,GAAU,SAAS,CAACC,EAAU,IAAK,GAAGA,GAAW;AACxE;AAEAH,EAAK,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-D39U--jA.cjs.js","sources":["../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { IconRootSlotProps } from \"./icon.types\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"icon-D39U--jA.cjs.js","sources":["../../src/components/icon/icon.slots.tsx","../../src/components/icon/icon.tsx"],"sourcesContent":["import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { IconRootSlotProps } from \"./icon.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withContext } = createRecipeContext({ key: \"icon\" });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const IconRootSlot: SlotComponent<SVGSVGElement, IconRootSlotProps> =\n withContext<SVGSVGElement, IconRootSlotProps>(\"svg\");\n","import { IconRootSlot } from \"./icon.slots\";\nimport type { IconProps } from \"./icon.types\";\n\n/**\n * # Icon\n *\n * displays icon components\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/media/icon}\n */\nexport const Icon = (props: IconProps) => {\n const { ref, ...restProps } = props;\n return <IconRootSlot ref={ref} asChild={!restProps.as} {...restProps} />;\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["withContext","createRecipeContext","IconRootSlot","Icon","props","ref","restProps","jsx"],"mappings":"gFAIM,CAAE,YAAAA,CAAA,EAAgBC,EAAAA,oBAAoB,CAAE,IAAK,OAAQ,EAM9CC,EACXF,EAA8C,KAAK,ECDxCG,EAAQC,GAAqB,CACxC,KAAM,CAAE,IAAAC,EAAK,GAAGC,CAAA,EAAcF,EAC9B,OAAOG,EAAAA,IAACL,GAAa,IAAAG,EAAU,QAAS,CAACC,EAAU,GAAK,GAAGA,EAAW,CACxE,EAEAH,EAAK,YAAc"}
|
|
@@ -2,7 +2,7 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as n } from "react";
|
|
3
3
|
import { mergeRefs as p } from "@chakra-ui/react";
|
|
4
4
|
import { $ as a } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
5
|
-
import { B as c } from "./button-
|
|
5
|
+
import { B as c } from "./button-IZUJaJku.es.js";
|
|
6
6
|
const i = (o) => {
|
|
7
7
|
const { children: r, ref: t, ...e } = o, f = n(null), s = a(p(f, t));
|
|
8
8
|
return /* @__PURE__ */ m(c, { px: 0, py: 0, ...e, ref: s, children: r });
|
|
@@ -11,4 +11,4 @@ i.displayName = "IconButton";
|
|
|
11
11
|
export {
|
|
12
12
|
i as I
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=icon-button-
|
|
14
|
+
//# sourceMappingURL=icon-button-DQS2apw-.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button-
|
|
1
|
+
{"version":3,"file":"icon-button-DQS2apw-.es.js","sources":["../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport type { IconButtonProps } from \"./icon-button.types\";\nimport { Button } from \"@/components\";\n\n/**\n * # IconButton\n *\n * displays a button with an icon only as child\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/iconbutton}\n */\nexport const IconButton = (props: IconButtonProps) => {\n const { children, ref: forwardedRef, ...restProps } = props;\n\n // Create a local ref and merge with forwarded ref\n const localRef = useRef<HTMLButtonElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n return (\n <Button px={0} py={0} {...restProps} ref={ref}>\n {children}\n </Button>\n );\n};\n\nIconButton.displayName = \"IconButton\";\n"],"names":["IconButton","props","children","forwardedRef","restProps","localRef","useRef","ref","useObjectRef","mergeRefs","jsx","Button"],"mappings":";;;;;AAaO,MAAMA,IAAa,CAACC,MAA2B;AACpD,QAAM,EAAE,UAAAC,GAAU,KAAKC,GAAc,GAAGC,MAAcH,GAGhDI,IAAWC,EAA0B,IAAI,GACzCC,IAAMC,EAAaC,EAAUJ,GAAUF,CAAY,CAAC;AAE1D,SACE,gBAAAO,EAACC,KAAO,IAAI,GAAG,IAAI,GAAI,GAAGP,GAAW,KAAAG,GAClC,UAAAL,EAAA,CACH;AAEJ;AAEAF,EAAW,cAAc;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { T as l } from "./toggle-button-
|
|
2
|
+
import { T as l } from "./toggle-button-awb1jBf8.es.js";
|
|
3
3
|
const n = ({
|
|
4
4
|
"aria-label": o,
|
|
5
5
|
children: t,
|
|
@@ -10,4 +10,4 @@ n.displayName = "IconToggleButton";
|
|
|
10
10
|
export {
|
|
11
11
|
n as I
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=icon-toggle-button-
|
|
13
|
+
//# sourceMappingURL=icon-toggle-button-Bi-9Obfx.es.js.map
|
package/dist/chunks/{icon-toggle-button-Db8CLmE5.es.js.map → icon-toggle-button-Bi-9Obfx.es.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-toggle-button-
|
|
1
|
+
{"version":3,"file":"icon-toggle-button-Bi-9Obfx.es.js","sources":["../../src/components/icon-toggle-button/icon-toggle-button.tsx"],"sourcesContent":["import { ToggleButton } from \"@/components/toggle-button\";\nimport type { IconToggleButtonProps } from \"./icon-toggle-button.types\";\n\n/**\n * # IconToggleButton\n * ============================================================\n * A toggle button with only an icon as child. It is based\n * on the regular `ToggleButton` component, but with a few adjustments.\n *\n */\nexport const IconToggleButton = ({\n \"aria-label\": ariaLabel,\n children,\n ref,\n ...props\n}: IconToggleButtonProps) => {\n return (\n <ToggleButton ref={ref} aria-label={ariaLabel} px={0} py={0} {...props}>\n {children}\n </ToggleButton>\n );\n};\n\nIconToggleButton.displayName = \"IconToggleButton\";\n"],"names":["IconToggleButton","ariaLabel","children","ref","props","jsx","ToggleButton"],"mappings":";;AAUO,MAAMA,IAAmB,CAAC;AAAA,EAC/B,cAAcC;AAAA,EACd,UAAAC;AAAA,EACA,KAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC,EAACC,GAAA,EAAa,KAAAH,GAAU,cAAYF,GAAW,IAAI,GAAG,IAAI,GAAI,GAAGG,GAC9D,UAAAF,EAAA,CACH;AAIJF,EAAiB,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd-BaeV_DL-.cjs.js","sources":["../../src/components/kbd/kbd.slots.ts","../../src/components/kbd/kbd.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"kbd-BaeV_DL-.cjs.js","sources":["../../src/components/kbd/kbd.slots.ts","../../src/components/kbd/kbd.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the svg element.\n */\ntype KbdRecipeProps = RecipeProps<\"kbd\"> & UnstyledProp;\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport type KbdRootSlotProps = HTMLChakraProps<\"kbd\", KbdRecipeProps>;\n\nconst { withContext } = createRecipeContext({ key: \"kbd\" });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const KbdRootSlot: SlotComponent<HTMLElement, KbdRootSlotProps> =\n withContext<HTMLElement, KbdRootSlotProps>(\"kbd\");\n","import { KeyboardContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { type KbdProps as ChakraKbdProps } from \"@chakra-ui/react/kbd\";\nimport { useRef } from \"react\";\nimport type React from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { KbdRootSlot } from \"./kbd.slots\";\n\nexport type KbdProps = Omit<ChakraKbdProps, \"slot\"> & {\n ref?: React.Ref<HTMLElement>;\n slot?: string | null | undefined;\n};\n\n/**\n * # Kbd\n *\n * Renders a keyboard shortcut or key combination, styled for visual clarity.\n * Typically used to visually represent keyboard keys.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/typography/kbd}\n */\nexport const Kbd = ({ ref: forwardedRef, slot, ...props }: KbdProps) => {\n const localRef = useRef<HTMLElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [rest] = useContextProps(props, ref, KeyboardContext);\n\n return <KbdRootSlot ref={ref} slot={slot || undefined} {...rest} />;\n};\n"],"names":["withContext","createRecipeContext","KbdRootSlot","Kbd","forwardedRef","slot","props","localRef","useRef","ref","useObjectRef","mergeRefs","rest","useContextProps","KeyboardContext"],"mappings":"kQAqBM,CAAE,YAAAA,CAAA,EAAgBC,EAAAA,oBAAoB,CAAE,IAAK,MAAO,EAM7CC,EACXF,EAA2C,KAAK,ECPrCG,EAAM,CAAC,CAAE,IAAKC,EAAc,KAAAC,EAAM,GAAGC,KAAsB,CACtE,MAAMC,EAAWC,EAAAA,OAAoB,IAAI,EACnCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUH,CAAY,CAAC,EACpD,CAACQ,CAAI,EAAIC,EAAAA,0CAAgBP,EAAOG,EAAKK,EAAAA,yCAAe,EAE1D,aAAQZ,EAAA,CAAY,IAAAO,EAAU,KAAMJ,GAAQ,OAAY,GAAGO,EAAM,CACnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd-CH9rYghB.es.js","sources":["../../src/components/kbd/kbd.slots.ts","../../src/components/kbd/kbd.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"
|
|
1
|
+
{"version":3,"file":"kbd-CH9rYghB.es.js","sources":["../../src/components/kbd/kbd.slots.ts","../../src/components/kbd/kbd.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the svg element.\n */\ntype KbdRecipeProps = RecipeProps<\"kbd\"> & UnstyledProp;\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport type KbdRootSlotProps = HTMLChakraProps<\"kbd\", KbdRecipeProps>;\n\nconst { withContext } = createRecipeContext({ key: \"kbd\" });\n\n/**\n * Root component that provides the styling context for the Icon component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const KbdRootSlot: SlotComponent<HTMLElement, KbdRootSlotProps> =\n withContext<HTMLElement, KbdRootSlotProps>(\"kbd\");\n","import { KeyboardContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { type KbdProps as ChakraKbdProps } from \"@chakra-ui/react/kbd\";\nimport { useRef } from \"react\";\nimport type React from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { KbdRootSlot } from \"./kbd.slots\";\n\nexport type KbdProps = Omit<ChakraKbdProps, \"slot\"> & {\n ref?: React.Ref<HTMLElement>;\n slot?: string | null | undefined;\n};\n\n/**\n * # Kbd\n *\n * Renders a keyboard shortcut or key combination, styled for visual clarity.\n * Typically used to visually represent keyboard keys.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/typography/kbd}\n */\nexport const Kbd = ({ ref: forwardedRef, slot, ...props }: KbdProps) => {\n const localRef = useRef<HTMLElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [rest] = useContextProps(props, ref, KeyboardContext);\n\n return <KbdRootSlot ref={ref} slot={slot || undefined} {...rest} />;\n};\n"],"names":["withContext","createRecipeContext","KbdRootSlot","Kbd","forwardedRef","slot","props","localRef","useRef","ref","useObjectRef","mergeRefs","rest","useContextProps","KeyboardContext"],"mappings":";;;;;;;AAqBA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,KAAK,OAAO,GAM7CC,IACX,gBAAAF,EAA2C,KAAK,GCPrCG,IAAM,CAAC,EAAE,KAAKC,GAAc,MAAAC,GAAM,GAAGC,QAAsB;AACtE,QAAMC,IAAWC,EAAoB,IAAI,GACnCC,IAAMC,EAAaC,EAAUJ,GAAUH,CAAY,CAAC,GACpD,CAACQ,CAAI,IAAIC,EAAgBP,GAAOG,GAAKK,CAAe;AAE1D,2BAAQZ,GAAA,EAAY,KAAAO,GAAU,MAAMJ,KAAQ,QAAY,GAAGO,GAAM;AACnE;"}
|
|
@@ -4,8 +4,8 @@ import { createRecipeContext as h, mergeRefs as y } from "@chakra-ui/react";
|
|
|
4
4
|
import { $ as L } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
5
5
|
import { a as b } from "./mergeProps-CzyOU2NE.es.js";
|
|
6
6
|
import { $ as v } from "./filterDOMProps-BSVCO5jK.es.js";
|
|
7
|
-
import { b as D, c as E, d as S } from "./openLink-
|
|
8
|
-
import { $ as T } from "./usePress-
|
|
7
|
+
import { b as D, c as E, d as S } from "./openLink-CY66vjvW.es.js";
|
|
8
|
+
import { $ as T } from "./usePress-Dc6amhnJ.es.js";
|
|
9
9
|
import { $ as w } from "./useFocusable-D1mzTlxa.es.js";
|
|
10
10
|
function _(e, o) {
|
|
11
11
|
let { elementType: s = "a", onPress: n, onPressStart: i, onPressEnd: t, onClick: c, isDisabled: r, ...d } = e, a = {};
|
|
@@ -45,4 +45,4 @@ H.displayName = "Link";
|
|
|
45
45
|
export {
|
|
46
46
|
H as L
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=link-
|
|
48
|
+
//# sourceMappingURL=link-BEhlSTUU.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-
|
|
1
|
+
{"version":3,"file":"link-BEhlSTUU.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+link@3.8.6_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/link/dist/useLink.mjs","../../src/components/link/link.slots.tsx","../../src/components/link/link.tsx"],"sourcesContent":["import {filterDOMProps as $5Ot33$filterDOMProps, mergeProps as $5Ot33$mergeProps, useRouter as $5Ot33$useRouter, useLinkProps as $5Ot33$useLinkProps, handleLinkClick as $5Ot33$handleLinkClick} from \"@react-aria/utils\";\nimport {useFocusable as $5Ot33$useFocusable, usePress as $5Ot33$usePress} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {\n let { elementType: elementType = 'a', onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onClick: onClick, isDisabled: isDisabled, ...otherProps } = props;\n let linkProps = {};\n if (elementType !== 'a') linkProps = {\n role: 'link',\n tabIndex: !isDisabled ? 0 : undefined\n };\n let { focusableProps: focusableProps } = (0, $5Ot33$useFocusable)(props, ref);\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5Ot33$usePress)({\n onPress: onPress,\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onClick: onClick,\n isDisabled: isDisabled,\n ref: ref\n });\n let domProps = (0, $5Ot33$filterDOMProps)(otherProps, {\n labelable: true\n });\n let interactionHandlers = (0, $5Ot33$mergeProps)(focusableProps, pressProps);\n let router = (0, $5Ot33$useRouter)();\n let routerLinkProps = (0, $5Ot33$useLinkProps)(props);\n return {\n isPressed: isPressed,\n linkProps: (0, $5Ot33$mergeProps)(domProps, routerLinkProps, {\n ...interactionHandlers,\n ...linkProps,\n 'aria-disabled': isDisabled || undefined,\n 'aria-current': props['aria-current'],\n onClick: (e)=>{\n var _pressProps_onClick;\n (_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, e);\n (0, $5Ot33$handleLinkClick)(e, router, props.href, props.routerOptions);\n }\n })\n };\n}\n\n\nexport {$298d61e98472621b$export$dcf14c9974fe2767 as useLink};\n//# sourceMappingURL=useLink.module.js.map\n","import { createRecipeContext } from \"@chakra-ui/react\";\nimport type { LinkRootSlotProps } from \"./link.types\";\n\nconst { withContext } = createRecipeContext({ key: \"link\" });\n\n/**\n * Root component that provides the styling context for the Link component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const LinkRoot = withContext<HTMLAnchorElement, LinkRootSlotProps>(\"a\");\n","import { useRef } from \"react\";\nimport { LinkRoot } from \"./link.slots\";\nimport type { LinkProps } from \"./link.types\";\nimport { useLink, useObjectRef, mergeProps } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\n\n/**\n * # Link\n *\n * To allow a user to navigate to a different page or resource\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/link}\n */\nexport const Link = (props: LinkProps) => {\n const { as, asChild, children, ref: forwardedRef, ...rest } = props;\n\n const localRef = useRef<HTMLAnchorElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = (as as string) || (asChild ? \"span\" : \"a\") || \"a\";\n const { linkProps } = useLink({ ...rest, elementType }, ref);\n\n return (\n <LinkRoot {...mergeProps(rest, linkProps, { as, asChild, ref })}>\n {children}\n </LinkRoot>\n );\n};\n\nLink.displayName = \"Link\";\n"],"names":["$298d61e98472621b$export$dcf14c9974fe2767","props","ref","elementType","onPress","onPressStart","onPressEnd","onClick","isDisabled","otherProps","linkProps","focusableProps","$5Ot33$useFocusable","pressProps","isPressed","$5Ot33$usePress","domProps","$5Ot33$filterDOMProps","interactionHandlers","$5Ot33$mergeProps","router","$5Ot33$useRouter","routerLinkProps","$5Ot33$useLinkProps","e","_pressProps_onClick","$5Ot33$handleLinkClick","withContext","createRecipeContext","LinkRoot","Link","as","asChild","children","forwardedRef","rest","localRef","useRef","useObjectRef","mergeRefs","useLink","jsx","mergeProps"],"mappings":";;;;;;;;;AAeA,SAASA,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,aAAaC,IAAc,KAAK,SAASC,GAAS,cAAcC,GAAc,YAAYC,GAAY,SAASC,GAAS,YAAYC,GAAY,GAAGC,EAAU,IAAKR,GACpKS,IAAY,CAAA;AAChB,EAAIP,MAAgB,QAAKO,IAAY;AAAA,IACjC,MAAM;AAAA,IACN,UAAWF,IAAiB,SAAJ;AAAA,EAChC;AACI,MAAI,EAAE,gBAAgBG,EAAc,IAASC,EAAqBX,GAAOC,CAAG,GACxE,EAAE,YAAYW,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,SAASX;AAAA,IACT,cAAcC;AAAA,IACd,YAAYC;AAAA,IACZ,SAASC;AAAA,IACT,YAAYC;AAAA,IACZ,KAAKN;AAAA,EACb,CAAK,GACGc,IAAeC,EAAuBR,GAAY;AAAA,IAClD,WAAW;AAAA,EACnB,CAAK,GACGS,IAA0BC,EAAmBR,GAAgBE,CAAU,GACvEO,IAAaC,EAAgB,GAC7BC,IAAsBC,EAAqBtB,CAAK;AACpD,SAAO;AAAA,IACH,WAAWa;AAAA,IACX,WAAeK,EAAmBH,GAAUM,GAAiB;AAAA,MACzD,GAAGJ;AAAA,MACH,GAAGR;AAAA,MACH,iBAAiBF,KAAc;AAAA,MAC/B,gBAAgBP,EAAM,cAAc;AAAA,MACpC,SAAS,CAACuB,MAAI;AACV,YAAIC;AACJ,SAACA,IAAsBZ,EAAW,aAAa,QAAQY,MAAwB,UAAkBA,EAAoB,KAAKZ,GAAYW,CAAC,GACnIE,EAAwBF,GAAGJ,GAAQnB,EAAM,MAAMA,EAAM,aAAa;AAAA,MAC1E;AAAA,IACZ,CAAS;AAAA,EACT;AACA;AChDA,MAAM,EAAE,aAAA0B,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,KAAK,QAAQ,GAM9CC,IAAW,gBAAAF,EAAkD,GAAG,GCIhEG,IAAO,CAAC7B,MAAqB;AACxC,QAAM,EAAE,IAAA8B,GAAI,SAAAC,GAAS,UAAAC,GAAU,KAAKC,GAAc,GAAGC,MAASlC,GAExDmC,IAAWC,EAA0B,IAAI,GACzCnC,IAAMoC,EAAaC,EAAUH,GAAUF,CAAY,CAAC,GAEpD/B,IAAe4B,MAAkBC,IAAU,SAAS,MACpD,EAAE,WAAAtB,MAAc8B,EAAQ,EAAE,GAAGL,GAAM,aAAAhC,EAAA,GAAeD,CAAG;AAE3D,SACE,gBAAAuC,EAACZ,GAAA,EAAU,GAAGa,EAAWP,GAAMzB,GAAW,EAAE,IAAAqB,GAAI,SAAAC,GAAS,KAAA9B,GAAK,GAC3D,UAAA+B,EAAA,CACH;AAEJ;AAEAH,EAAK,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as i, jsxs as c, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as me, useState as pe, useMemo as fe } from "react";
|
|
3
3
|
import { defineMessages as he, FormattedMessage as be, useIntl as Fe } from "react-intl";
|
|
4
|
-
import { k as Le, h as ve } from "./Dialog-
|
|
4
|
+
import { k as Le, h as ve } from "./Dialog-Qpq4hk89.es.js";
|
|
5
5
|
import { g as xe } from "./CollectionBuilder-Wz-mnWjQ.es.js";
|
|
6
6
|
import { WarningAmber as ne, HelpOutline as Ie, Payments as $e, Language as Me, ErrorOutline as we } from "@commercetools/nimbus-icons";
|
|
7
|
-
import { P as Ce } from "./popover-
|
|
7
|
+
import { P as Ce } from "./popover-DNaC7CwB.es.js";
|
|
8
8
|
import { createSlotRecipeContext as je } from "@chakra-ui/react";
|
|
9
|
-
import { M as S } from "./money-input-
|
|
10
|
-
import { F as I } from "./form-field-
|
|
11
|
-
import { R as Ee } from "./rich-text-input-
|
|
9
|
+
import { M as S } from "./money-input-sk0Slpeu.es.js";
|
|
10
|
+
import { F as I } from "./form-field-BYlpCXdY.es.js";
|
|
11
|
+
import { R as Ee } from "./rich-text-input-BC8CBVio.es.js";
|
|
12
12
|
import { M as ke } from "./multiline-text-input-CilSJJaO.es.js";
|
|
13
13
|
import { I as W } from "./icon-CenxuChf.es.js";
|
|
14
14
|
import { T as ze } from "./text-input-CSAODlCw.es.js";
|
|
@@ -16,9 +16,9 @@ import { $ as te } from "./mergeProps-CzyOU2NE.es.js";
|
|
|
16
16
|
import { $ as Se } from "./useField-B0j4t47V.es.js";
|
|
17
17
|
import { F as ie } from "./field-errors-ClQprmQz.es.js";
|
|
18
18
|
import { S as D } from "./stack-CoNreM7B.es.js";
|
|
19
|
-
import { I as Te } from "./icon-button-
|
|
19
|
+
import { I as Te } from "./icon-button-DQS2apw-.es.js";
|
|
20
20
|
import { B as oe } from "./box-DuBoAZvq.es.js";
|
|
21
|
-
import { B as Pe } from "./button-
|
|
21
|
+
import { B as Pe } from "./button-IZUJaJku.es.js";
|
|
22
22
|
const $ = /* @__PURE__ */ he({
|
|
23
23
|
missingRequiredField: {
|
|
24
24
|
id: "Nimbus.LocalizedField.missingRequiredField",
|
|
@@ -467,4 +467,4 @@ const tt = (e, t) => Object.values(e).map((o) => S.convertToMoneyValue(o, t)), i
|
|
|
467
467
|
export {
|
|
468
468
|
kt as L
|
|
469
469
|
};
|
|
470
|
-
//# sourceMappingURL=localized-field-
|
|
470
|
+
//# sourceMappingURL=localized-field-D3G0Uy7Z.es.js.map
|