@flipdish/ui-library 0.53.1 → 0.54.1
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/components/forms/Form/hooks/{useSaveForm/useSaveForm.cjs → useSaveForm.cjs} +1 -1
- package/dist/components/forms/Form/hooks/useSaveForm.cjs.map +1 -0
- package/dist/components/forms/Form/hooks/useSaveForm.d.ts.map +1 -0
- package/dist/components/forms/Form/hooks/{useSaveForm/useSaveForm.js → useSaveForm.js} +1 -1
- package/dist/components/forms/Form/hooks/useSaveForm.js.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn.cjs.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn.d.ts.map +1 -0
- package/dist/components/forms/Form/hooks/useSubmitInTurn.js.map +1 -0
- package/dist/components/forms/Form/index.cjs +2 -2
- package/dist/components/forms/Form/index.d.ts +2 -2
- package/dist/components/forms/Form/index.d.ts.map +1 -1
- package/dist/components/forms/Form/index.js +2 -2
- package/dist/components/layouts/AppShell/hooks/usePageAreaBounds.cjs.map +1 -0
- package/dist/components/layouts/AppShell/hooks/usePageAreaBounds.d.ts.map +1 -0
- package/dist/components/layouts/AppShell/hooks/usePageAreaBounds.js.map +1 -0
- package/dist/components/layouts/AppShell/hooks/usePageCover.cjs.map +1 -0
- package/dist/components/layouts/AppShell/hooks/usePageCover.d.ts.map +1 -0
- package/dist/components/layouts/AppShell/hooks/usePageCover.js.map +1 -0
- package/dist/components/layouts/AppShell/index.cjs +40 -0
- package/dist/components/layouts/AppShell/index.cjs.map +1 -0
- package/dist/components/layouts/AppShell/index.d.ts +40 -0
- package/dist/components/layouts/AppShell/index.d.ts.map +1 -0
- package/dist/components/layouts/AppShell/index.js +38 -0
- package/dist/components/layouts/AppShell/index.js.map +1 -0
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.cjs.map +1 -0
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.d.ts.map +1 -0
- package/dist/components/layouts/PageHubLayout/components/PageHubLayoutSectionNav.js.map +1 -0
- package/dist/components/layouts/PageHubLayout/index.cjs +65 -0
- package/dist/components/layouts/PageHubLayout/index.cjs.map +1 -0
- package/dist/components/layouts/PageHubLayout/index.d.ts +56 -0
- package/dist/components/layouts/PageHubLayout/index.d.ts.map +1 -0
- package/dist/components/layouts/PageHubLayout/index.js +63 -0
- package/dist/components/layouts/PageHubLayout/index.js.map +1 -0
- package/dist/components/layouts/PageHubLayout/pageHubLayout.types.d.ts.map +1 -0
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.cjs.map +1 -0
- package/dist/components/{templates/PageHubLayout → layouts/PageHubLayout/utilities}/pageHubLayout.utils.d.ts +1 -1
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.d.ts.map +1 -0
- package/dist/components/layouts/PageHubLayout/utilities/pageHubLayout.utils.js.map +1 -0
- package/dist/components/layouts/PageLayout/index.cjs +31 -0
- package/dist/components/layouts/PageLayout/index.cjs.map +1 -0
- package/dist/components/layouts/PageLayout/index.d.ts +44 -0
- package/dist/components/layouts/PageLayout/index.d.ts.map +1 -0
- package/dist/components/layouts/PageLayout/index.js +29 -0
- package/dist/components/layouts/PageLayout/index.js.map +1 -0
- package/dist/components/layouts/WidgetLayout/index.cjs +42 -0
- package/dist/components/layouts/WidgetLayout/index.cjs.map +1 -0
- package/dist/components/layouts/WidgetLayout/index.d.ts +57 -0
- package/dist/components/layouts/WidgetLayout/index.d.ts.map +1 -0
- package/dist/components/layouts/WidgetLayout/index.js +40 -0
- package/dist/components/layouts/WidgetLayout/index.js.map +1 -0
- package/dist/components/molecules/Alerts/Alert/Alert.cjs.map +1 -0
- package/dist/components/molecules/Alerts/Alert/Alert.d.ts.map +1 -0
- package/dist/components/molecules/Alerts/Alert/Alert.js.map +1 -0
- package/dist/components/molecules/Alerts/{components → SaveErrorAlert}/SaveErrorAlert.cjs +1 -1
- package/dist/components/molecules/Alerts/SaveErrorAlert/SaveErrorAlert.cjs.map +1 -0
- package/dist/components/molecules/Alerts/SaveErrorAlert/SaveErrorAlert.d.ts.map +1 -0
- package/dist/components/molecules/Alerts/{components → SaveErrorAlert}/SaveErrorAlert.js +1 -1
- package/dist/components/molecules/Alerts/SaveErrorAlert/SaveErrorAlert.js.map +1 -0
- package/dist/components/molecules/Alerts/index.cjs +2 -2
- package/dist/components/molecules/Alerts/index.d.ts +7 -5
- package/dist/components/molecules/Alerts/index.d.ts.map +1 -1
- package/dist/components/molecules/Alerts/index.js +2 -2
- package/dist/components/molecules/Modals/{components → ConfirmationModal}/ConfirmationModal.cjs +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.cjs.map +1 -0
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.d.ts.map +1 -0
- package/dist/components/molecules/Modals/{components → ConfirmationModal}/ConfirmationModal.js +1 -1
- package/dist/components/molecules/Modals/ConfirmationModal/ConfirmationModal.js.map +1 -0
- package/dist/components/molecules/Modals/Modal/Modal.cjs.map +1 -0
- package/dist/components/molecules/Modals/Modal/Modal.d.ts.map +1 -0
- package/dist/components/molecules/Modals/Modal/Modal.js.map +1 -0
- package/dist/components/molecules/Modals/{components → UnsavedChangesModal}/UnsavedChangesModal.cjs +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.cjs.map +1 -0
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.d.ts.map +1 -0
- package/dist/components/molecules/Modals/{components → UnsavedChangesModal}/UnsavedChangesModal.js +1 -1
- package/dist/components/molecules/Modals/UnsavedChangesModal/UnsavedChangesModal.js.map +1 -0
- package/dist/components/molecules/Modals/index.cjs +3 -3
- package/dist/components/molecules/Modals/index.d.ts +9 -7
- package/dist/components/molecules/Modals/index.d.ts.map +1 -1
- package/dist/components/molecules/Modals/index.js +3 -3
- package/dist/components/molecules/Tags/Tag/Tag.cjs +58 -0
- package/dist/components/molecules/Tags/Tag/Tag.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/Tag.d.ts +43 -0
- package/dist/components/molecules/Tags/Tag/Tag.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/Tag.js +56 -0
- package/dist/components/molecules/Tags/Tag/Tag.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.cjs +17 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.d.ts +6 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.js +15 -0
- package/dist/components/molecules/Tags/Tag/TagAvatar.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCheckbox.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCheckbox.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCheckbox.js.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCloseX.cjs.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCloseX.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tag/TagCloseX.js.map +1 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.cjs +23 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.cjs.map +1 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts +25 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.d.ts.map +1 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.js +20 -0
- package/dist/components/molecules/Tags/TagGroup/TagGroup.js.map +1 -0
- package/dist/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.d.ts +10 -0
- package/dist/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.d.ts.map +1 -0
- package/dist/components/molecules/Tags/Tags.styles.cjs +1 -1
- package/dist/components/molecules/Tags/Tags.styles.d.ts +1 -1
- package/dist/components/molecules/Tags/Tags.styles.js +1 -1
- package/dist/components/molecules/Tags/index.cjs +8 -64
- package/dist/components/molecules/Tags/index.cjs.map +1 -1
- package/dist/components/molecules/Tags/index.d.ts +13 -54
- package/dist/components/molecules/Tags/index.d.ts.map +1 -1
- package/dist/components/molecules/Tags/index.js +3 -63
- package/dist/components/molecules/Tags/index.js.map +1 -1
- package/dist/components/molecules/Tags/providers/TagGroup.context.cjs +12 -0
- package/dist/components/molecules/Tags/providers/TagGroup.context.cjs.map +1 -0
- package/dist/components/molecules/Tags/providers/TagGroup.context.d.ts +7 -0
- package/dist/components/molecules/Tags/providers/TagGroup.context.d.ts.map +1 -0
- package/dist/components/molecules/Tags/providers/TagGroup.context.js +10 -0
- package/dist/components/molecules/Tags/providers/TagGroup.context.js.map +1 -0
- package/dist/components/organisms/Charts/{components → ActivityGauge}/ActivityGauge.cjs +1 -1
- package/dist/components/organisms/Charts/ActivityGauge/ActivityGauge.cjs.map +1 -0
- package/dist/components/organisms/Charts/ActivityGauge/ActivityGauge.d.ts.map +1 -0
- package/dist/components/organisms/Charts/{components → ActivityGauge}/ActivityGauge.js +1 -1
- package/dist/components/organisms/Charts/ActivityGauge/ActivityGauge.js.map +1 -0
- package/dist/components/organisms/Charts/{components → BarChart}/BarChart.cjs +1 -1
- package/dist/components/organisms/Charts/BarChart/BarChart.cjs.map +1 -0
- package/dist/components/organisms/Charts/{components → BarChart}/BarChart.d.ts +1 -1
- package/dist/components/organisms/Charts/{components → BarChart}/BarChart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/{components → BarChart}/BarChart.js +1 -1
- package/dist/components/organisms/Charts/BarChart/BarChart.js.map +1 -0
- package/dist/components/organisms/Charts/{components → LineChart}/LineChart.cjs +1 -1
- package/dist/components/organisms/Charts/LineChart/LineChart.cjs.map +1 -0
- package/dist/components/organisms/Charts/{components → LineChart}/LineChart.d.ts +1 -1
- package/dist/components/organisms/Charts/LineChart/LineChart.d.ts.map +1 -0
- package/dist/components/organisms/Charts/{components → LineChart}/LineChart.js +1 -1
- package/dist/components/organisms/Charts/LineChart/LineChart.js.map +1 -0
- package/dist/components/organisms/Charts/Metrics/Metrics.cjs.map +1 -0
- package/dist/components/organisms/Charts/Metrics/Metrics.d.ts.map +1 -0
- package/dist/components/organisms/Charts/Metrics/Metrics.js.map +1 -0
- package/dist/components/organisms/Charts/{components → PieChart}/PieChart.cjs +1 -1
- package/dist/components/organisms/Charts/PieChart/PieChart.cjs.map +1 -0
- package/dist/components/organisms/Charts/{components → PieChart}/PieChart.d.ts +1 -1
- package/dist/components/organisms/Charts/{components → PieChart}/PieChart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/{components → PieChart}/PieChart.js +1 -1
- package/dist/components/organisms/Charts/PieChart/PieChart.js.map +1 -0
- package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.cjs +1 -1
- package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.cjs.map +1 -1
- package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.d.ts.map +1 -1
- package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.js +1 -1
- package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.js.map +1 -1
- package/dist/components/organisms/Charts/components/ChartsBase.cjs +1 -1
- package/dist/components/organisms/Charts/components/ChartsBase.js +1 -1
- package/dist/components/organisms/Charts/index.cjs +6 -6
- package/dist/components/organisms/Charts/index.d.ts +16 -14
- package/dist/components/organisms/Charts/index.d.ts.map +1 -1
- package/dist/components/organisms/Charts/index.js +6 -6
- package/dist/components/organisms/Charts/utilities/chartTooltip.utils.cjs.map +1 -0
- package/dist/components/organisms/Charts/utilities/chartTooltip.utils.d.ts.map +1 -0
- package/dist/components/organisms/Charts/utilities/chartTooltip.utils.js.map +1 -0
- package/dist/components/templates/AppShell/index.cjs +3 -34
- package/dist/components/templates/AppShell/index.cjs.map +1 -1
- package/dist/components/templates/AppShell/index.d.ts +7 -39
- package/dist/components/templates/AppShell/index.d.ts.map +1 -1
- package/dist/components/templates/AppShell/index.js +3 -34
- package/dist/components/templates/AppShell/index.js.map +1 -1
- package/dist/components/templates/PageHubLayout/index.cjs +3 -59
- package/dist/components/templates/PageHubLayout/index.cjs.map +1 -1
- package/dist/components/templates/PageHubLayout/index.d.ts +7 -55
- package/dist/components/templates/PageHubLayout/index.d.ts.map +1 -1
- package/dist/components/templates/PageHubLayout/index.js +3 -59
- package/dist/components/templates/PageHubLayout/index.js.map +1 -1
- package/dist/components/templates/PageLayout/index.cjs +3 -25
- package/dist/components/templates/PageLayout/index.cjs.map +1 -1
- package/dist/components/templates/PageLayout/index.d.ts +5 -42
- package/dist/components/templates/PageLayout/index.d.ts.map +1 -1
- package/dist/components/templates/PageLayout/index.js +3 -25
- package/dist/components/templates/PageLayout/index.js.map +1 -1
- package/dist/components/templates/WidgetLayout/index.cjs +3 -36
- package/dist/components/templates/WidgetLayout/index.cjs.map +1 -1
- package/dist/components/templates/WidgetLayout/index.d.ts +7 -56
- package/dist/components/templates/WidgetLayout/index.d.ts.map +1 -1
- package/dist/components/templates/WidgetLayout/index.js +3 -36
- package/dist/components/templates/WidgetLayout/index.js.map +1 -1
- package/dist/native/components/layouts/AppShell/index.d.ts +12 -0
- package/dist/native/components/layouts/PageHubLayout/index.d.ts +12 -0
- package/dist/native/components/layouts/PageLayout/index.d.ts +12 -0
- package/dist/native/components/layouts/WidgetLayout/index.d.ts +12 -0
- package/dist/native/components/molecules/Tags/Tag/Tag.d.ts +62 -0
- package/dist/native/components/molecules/Tags/Tag/Tag.d.ts.map +1 -0
- package/dist/native/components/molecules/Tags/Tag/Tag.js +78 -0
- package/dist/native/components/molecules/Tags/Tag/Tag.js.map +1 -0
- package/dist/native/components/molecules/Tags/TagGroup/TagGroup.d.ts +45 -0
- package/dist/native/components/molecules/Tags/TagGroup/TagGroup.d.ts.map +1 -0
- package/dist/native/components/molecules/Tags/TagGroup/TagGroup.js +36 -0
- package/dist/native/components/molecules/Tags/TagGroup/TagGroup.js.map +1 -0
- package/dist/native/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.d.ts +10 -0
- package/dist/native/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.d.ts.map +1 -0
- package/dist/native/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.js +23 -0
- package/dist/native/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.js.map +1 -0
- package/dist/native/components/molecules/Tags/Tags.styles.d.ts +1 -1
- package/dist/native/components/molecules/Tags/Tags.styles.js +1 -1
- package/dist/native/components/molecules/Tags/index.d.ts +5 -96
- package/dist/native/components/molecules/Tags/index.d.ts.map +1 -1
- package/dist/native/components/molecules/Tags/index.js +2 -104
- package/dist/native/components/molecules/Tags/index.js.map +1 -1
- package/dist/native/components/molecules/Tags/providers/TagGroup.context.d.ts +13 -0
- package/dist/native/components/molecules/Tags/providers/TagGroup.context.d.ts.map +1 -0
- package/dist/native/components/molecules/Tags/providers/TagGroup.context.js +12 -0
- package/dist/native/components/molecules/Tags/providers/TagGroup.context.js.map +1 -0
- package/package.json +11 -2
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.cjs.map +0 -1
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.d.ts.map +0 -1
- package/dist/components/forms/Form/hooks/useSaveForm/useSaveForm.js.map +0 -1
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.cjs.map +0 -1
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.d.ts.map +0 -1
- package/dist/components/forms/Form/hooks/useSubmitInTurn/useSubmitInTurn.js.map +0 -1
- package/dist/components/molecules/Alerts/components/Alert.cjs.map +0 -1
- package/dist/components/molecules/Alerts/components/Alert.d.ts.map +0 -1
- package/dist/components/molecules/Alerts/components/Alert.js.map +0 -1
- package/dist/components/molecules/Alerts/components/SaveErrorAlert.cjs.map +0 -1
- package/dist/components/molecules/Alerts/components/SaveErrorAlert.d.ts.map +0 -1
- package/dist/components/molecules/Alerts/components/SaveErrorAlert.js.map +0 -1
- package/dist/components/molecules/Modals/components/ConfirmationModal.cjs.map +0 -1
- package/dist/components/molecules/Modals/components/ConfirmationModal.d.ts.map +0 -1
- package/dist/components/molecules/Modals/components/ConfirmationModal.js.map +0 -1
- package/dist/components/molecules/Modals/components/Modal.cjs.map +0 -1
- package/dist/components/molecules/Modals/components/Modal.d.ts.map +0 -1
- package/dist/components/molecules/Modals/components/Modal.js.map +0 -1
- package/dist/components/molecules/Modals/components/UnsavedChangesModal.cjs.map +0 -1
- package/dist/components/molecules/Modals/components/UnsavedChangesModal.d.ts.map +0 -1
- package/dist/components/molecules/Modals/components/UnsavedChangesModal.js.map +0 -1
- package/dist/components/molecules/Tags/components/TagCheckbox.cjs.map +0 -1
- package/dist/components/molecules/Tags/components/TagCheckbox.d.ts.map +0 -1
- package/dist/components/molecules/Tags/components/TagCheckbox.js.map +0 -1
- package/dist/components/molecules/Tags/components/TagCloseX.cjs.map +0 -1
- package/dist/components/molecules/Tags/components/TagCloseX.d.ts.map +0 -1
- package/dist/components/molecules/Tags/components/TagCloseX.js.map +0 -1
- package/dist/components/organisms/Charts/chartTooltip.utils.cjs.map +0 -1
- package/dist/components/organisms/Charts/chartTooltip.utils.d.ts.map +0 -1
- package/dist/components/organisms/Charts/chartTooltip.utils.js.map +0 -1
- package/dist/components/organisms/Charts/components/ActivityGauge.cjs.map +0 -1
- package/dist/components/organisms/Charts/components/ActivityGauge.d.ts.map +0 -1
- package/dist/components/organisms/Charts/components/ActivityGauge.js.map +0 -1
- package/dist/components/organisms/Charts/components/BarChart.cjs.map +0 -1
- package/dist/components/organisms/Charts/components/BarChart.js.map +0 -1
- package/dist/components/organisms/Charts/components/LineChart.cjs.map +0 -1
- package/dist/components/organisms/Charts/components/LineChart.d.ts.map +0 -1
- package/dist/components/organisms/Charts/components/LineChart.js.map +0 -1
- package/dist/components/organisms/Charts/components/Metrics.cjs.map +0 -1
- package/dist/components/organisms/Charts/components/Metrics.d.ts.map +0 -1
- package/dist/components/organisms/Charts/components/Metrics.js.map +0 -1
- package/dist/components/organisms/Charts/components/PieChart.cjs.map +0 -1
- package/dist/components/organisms/Charts/components/PieChart.js.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageAreaBounds.cjs.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageAreaBounds.d.ts.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageAreaBounds.js.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageCover.cjs.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageCover.d.ts.map +0 -1
- package/dist/components/templates/AppShell/hooks/usePageCover.js.map +0 -1
- package/dist/components/templates/PageHubLayout/components/PageHubLayoutSectionNav.cjs.map +0 -1
- package/dist/components/templates/PageHubLayout/components/PageHubLayoutSectionNav.d.ts.map +0 -1
- package/dist/components/templates/PageHubLayout/components/PageHubLayoutSectionNav.js.map +0 -1
- package/dist/components/templates/PageHubLayout/pageHubLayout.types.d.ts.map +0 -1
- package/dist/components/templates/PageHubLayout/pageHubLayout.utils.cjs.map +0 -1
- package/dist/components/templates/PageHubLayout/pageHubLayout.utils.d.ts.map +0 -1
- package/dist/components/templates/PageHubLayout/pageHubLayout.utils.js.map +0 -1
- /package/dist/components/forms/Form/hooks/{useSaveForm/useSaveForm.d.ts → useSaveForm.d.ts} +0 -0
- /package/dist/components/forms/Form/hooks/{useSubmitInTurn/useSubmitInTurn.cjs → useSubmitInTurn.cjs} +0 -0
- /package/dist/components/forms/Form/hooks/{useSubmitInTurn/useSubmitInTurn.d.ts → useSubmitInTurn.d.ts} +0 -0
- /package/dist/components/forms/Form/hooks/{useSubmitInTurn/useSubmitInTurn.js → useSubmitInTurn.js} +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageAreaBounds.cjs +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageAreaBounds.d.ts +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageAreaBounds.js +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageCover.cjs +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageCover.d.ts +0 -0
- /package/dist/components/{templates → layouts}/AppShell/hooks/usePageCover.js +0 -0
- /package/dist/components/{templates → layouts}/PageHubLayout/components/PageHubLayoutSectionNav.cjs +0 -0
- /package/dist/components/{templates → layouts}/PageHubLayout/components/PageHubLayoutSectionNav.d.ts +0 -0
- /package/dist/components/{templates → layouts}/PageHubLayout/components/PageHubLayoutSectionNav.js +0 -0
- /package/dist/components/{templates → layouts}/PageHubLayout/pageHubLayout.types.d.ts +0 -0
- /package/dist/components/{templates/PageHubLayout → layouts/PageHubLayout/utilities}/pageHubLayout.utils.cjs +0 -0
- /package/dist/components/{templates/PageHubLayout → layouts/PageHubLayout/utilities}/pageHubLayout.utils.js +0 -0
- /package/dist/components/molecules/Alerts/{components → Alert}/Alert.cjs +0 -0
- /package/dist/components/molecules/Alerts/{components → Alert}/Alert.d.ts +0 -0
- /package/dist/components/molecules/Alerts/{components → Alert}/Alert.js +0 -0
- /package/dist/components/molecules/Alerts/{components → SaveErrorAlert}/SaveErrorAlert.d.ts +0 -0
- /package/dist/components/molecules/Modals/{components → ConfirmationModal}/ConfirmationModal.d.ts +0 -0
- /package/dist/components/molecules/Modals/{components → Modal}/Modal.cjs +0 -0
- /package/dist/components/molecules/Modals/{components → Modal}/Modal.d.ts +0 -0
- /package/dist/components/molecules/Modals/{components → Modal}/Modal.js +0 -0
- /package/dist/components/molecules/Modals/{components → UnsavedChangesModal}/UnsavedChangesModal.d.ts +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCheckbox.cjs +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCheckbox.d.ts +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCheckbox.js +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCloseX.cjs +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCloseX.d.ts +0 -0
- /package/dist/components/molecules/Tags/{components → Tag}/TagCloseX.js +0 -0
- /package/dist/components/organisms/Charts/{components → ActivityGauge}/ActivityGauge.d.ts +0 -0
- /package/dist/components/organisms/Charts/{components → Metrics}/Metrics.cjs +0 -0
- /package/dist/components/organisms/Charts/{components → Metrics}/Metrics.d.ts +0 -0
- /package/dist/components/organisms/Charts/{components → Metrics}/Metrics.js +0 -0
- /package/dist/components/organisms/Charts/{components → RadarChart}/RadarChart.d.ts +0 -0
- /package/dist/components/organisms/Charts/{chartTooltip.utils.cjs → utilities/chartTooltip.utils.cjs} +0 -0
- /package/dist/components/organisms/Charts/{chartTooltip.utils.d.ts → utilities/chartTooltip.utils.d.ts} +0 -0
- /package/dist/components/organisms/Charts/{chartTooltip.utils.js → utilities/chartTooltip.utils.js} +0 -0
|
@@ -1,42 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var ErrorBoundary = require('@flipdish/ui-library/providers/ErrorBoundary');
|
|
5
|
-
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
6
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
3
|
+
var WidgetLayout$1 = require('@flipdish/ui-library/components/layouts/WidgetLayout');
|
|
7
4
|
|
|
8
|
-
/**
|
|
9
|
-
const
|
|
10
|
-
/**
|
|
11
|
-
* Widget-shaped template for a micro-frontend mounted beside a page: a named `region` that fills
|
|
12
|
-
* the height its host gives it, with pinned `header` and `footer` slots around a content area
|
|
13
|
-
* that scrolls internally, and an error boundary keyed by `widgetName`. Reach for it instead of
|
|
14
|
-
* `PageLayout` whenever the host page already owns `<main>` and the document must not scroll.
|
|
15
|
-
*
|
|
16
|
-
* @summary bounded-height widget template with pinned header and footer
|
|
17
|
-
*/
|
|
18
|
-
const WidgetLayout = ({ widgetName, label, header, footer, children, renderError, onError, scrollAreaProps, className, 'data-testid': dataTestId, }) => {
|
|
19
|
-
const widgetLayoutTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'widget-layout', rootName: 'widget-layout' });
|
|
20
|
-
const scrollAreaTestId = scrollAreaProps?.['data-testid'] ?? testIdUtils.joinTestId(widgetLayoutTestId, 'scroll-area');
|
|
21
|
-
// A `<section>` with an accessible name is a `region` landmark; without a name it is a plain `div`, so a
|
|
22
|
-
// host that already provides the landmark does not get a nested, same-named one.
|
|
23
|
-
const Root = label ? 'section' : 'div';
|
|
24
|
-
return (
|
|
25
|
-
// `h-full`, never a viewport unit: the host supplies the bounded height, and WebView viewport units can
|
|
26
|
-
// disagree with the visible area. `min-h-0` lets the scroll region shrink below its content's height.
|
|
27
|
-
jsxRuntime.jsxs(Root, { "aria-label": label, "data-testid": widgetLayoutTestId, className: cx.cx('flex h-full min-h-0 w-full flex-col gap-md p-md pb-[max(var(--spacing-md),env(safe-area-inset-bottom))]', className), children: [header, jsxRuntime.jsx("div", { id: scrollAreaProps?.id, ref: scrollAreaProps?.ref, "data-testid": scrollAreaTestId,
|
|
28
|
-
// Focusable so keyboard users can scroll content that has no focusable element of its own (axe: scrollable-region-focusable).
|
|
29
|
-
// biome-ignore lint/a11y/noNoninteractiveTabindex: a scrollable region must be reachable by keyboard
|
|
30
|
-
tabIndex: 0,
|
|
31
|
-
// `overscroll-contain` keeps a scroll that reaches the end from chaining to the host page.
|
|
32
|
-
className: cx.cx('min-h-0 flex-1 overflow-y-auto overscroll-contain outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', scrollAreaProps?.className), children: jsxRuntime.jsx(ErrorBoundary.ErrorBoundary, { identifier: widgetName, onError: onError, renderFallback: (error) => {
|
|
33
|
-
// `undefined`, not nullish: an explicit `null` from `renderError` is honoured as "render nothing".
|
|
34
|
-
const customFallback = renderError?.({ error, widgetName });
|
|
35
|
-
if (customFallback !== undefined)
|
|
36
|
-
return customFallback;
|
|
37
|
-
return jsxRuntime.jsx(DefaultWidgetError, { testId: testIdUtils.joinTestId(widgetLayoutTestId, 'error') });
|
|
38
|
-
}, children: children }) }), footer] }));
|
|
39
|
-
};
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/layouts/WidgetLayout`. Removed in the next major. */
|
|
6
|
+
const WidgetLayout = WidgetLayout$1.WidgetLayout;
|
|
40
7
|
|
|
41
8
|
exports.WidgetLayout = WidgetLayout;
|
|
42
9
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"sourcesContent":[null],"names":["WidgetLayoutNext"],"mappings":";;;;AAUA;AACO,MAAM,YAAY,GAAGA;;"}
|
|
@@ -1,57 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
className?: string;
|
|
9
|
-
/** Overrides the scrolling element's `data-testid` (defaults to `<root>--scroll-area`). */
|
|
10
|
-
'data-testid'?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface WidgetLayoutProps {
|
|
13
|
-
/**
|
|
14
|
-
* Stable, human-readable name of the widget (e.g. "ChatWidget"). Tags the widget-scoped error
|
|
15
|
-
* boundary so a thrown error can be attributed in logs/RUM, and is forwarded to `renderError`
|
|
16
|
-
* and `onError`.
|
|
17
|
-
*/
|
|
18
|
-
widgetName: string;
|
|
19
|
-
/**
|
|
20
|
-
* Accessible name that makes the root a `region` landmark. Set it when the widget is the landmark,
|
|
21
|
-
* since the host page already owns `<main>`; omit it when the host already wraps the widget in a named
|
|
22
|
-
* landmark such as `SidePanel`, so the root is a plain `div` and no nested region repeats the name.
|
|
23
|
-
*/
|
|
24
|
-
label?: string;
|
|
25
|
-
/** Pinned above the scroll region and rendered OUTSIDE the error boundary, so a title or close control stays usable when content throws. */
|
|
26
|
-
header?: ReactNode;
|
|
27
|
-
/** Pinned below the scroll region and rendered OUTSIDE the error boundary; the composer slot. Keeps clear of the device's bottom safe area. */
|
|
28
|
-
footer?: ReactNode;
|
|
29
|
-
/** Widget content, rendered INSIDE the error boundary and the scroll region. */
|
|
30
|
-
children: ReactNode;
|
|
31
|
-
/**
|
|
32
|
-
* Replaces the default fallback shown when a child throws. Receives the thrown error and `widgetName` so consumers can render
|
|
33
|
-
* localised copy. Return `null` to render nothing, or `undefined` to keep the default fallback.
|
|
34
|
-
*/
|
|
35
|
-
renderError?: (props: {
|
|
36
|
-
error: Error;
|
|
37
|
-
widgetName: string;
|
|
38
|
-
}) => ReactNode;
|
|
39
|
-
/** Called when a child throws — wire app-level reporting (e.g. Datadog RUM) here. */
|
|
40
|
-
onError?: (error: Error, info: ErrorInfo) => void;
|
|
41
|
-
/** Hooks for the element that scrolls the content, since the host's bounded height means the widget never scrolls the document. */
|
|
42
|
-
scrollAreaProps?: WidgetLayoutScrollAreaProps;
|
|
43
|
-
/** Extra classes merged onto the root `<section>`. */
|
|
44
|
-
className?: string;
|
|
45
|
-
/** Overrides the `data-testid` (defaults to `fd-widget-layout`). */
|
|
46
|
-
'data-testid'?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Widget-shaped template for a micro-frontend mounted beside a page: a named `region` that fills
|
|
50
|
-
* the height its host gives it, with pinned `header` and `footer` slots around a content area
|
|
51
|
-
* that scrolls internally, and an error boundary keyed by `widgetName`. Reach for it instead of
|
|
52
|
-
* `PageLayout` whenever the host page already owns `<main>` and the document must not scroll.
|
|
53
|
-
*
|
|
54
|
-
* @summary bounded-height widget template with pinned header and footer
|
|
55
|
-
*/
|
|
56
|
-
export declare const WidgetLayout: ({ widgetName, label, header, footer, children, renderError, onError, scrollAreaProps, className, "data-testid": dataTestId, }: WidgetLayoutProps) => ReactNode;
|
|
1
|
+
import { type WidgetLayoutProps as WidgetLayoutPropsNext, type WidgetLayoutScrollAreaProps as WidgetLayoutScrollAreaPropsNext } from '@flipdish/ui-library/components/layouts/WidgetLayout';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/layouts/WidgetLayout`. Removed in the next major. */
|
|
3
|
+
export declare const WidgetLayout: ({ widgetName, label, header, footer, children, renderError, onError, scrollAreaProps, className, "data-testid": dataTestId, }: WidgetLayoutPropsNext) => import("react").ReactNode;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/layouts/WidgetLayout`. Removed in the next major. */
|
|
5
|
+
export type WidgetLayoutProps = WidgetLayoutPropsNext;
|
|
6
|
+
/** @deprecated Import from `@flipdish/ui-library/components/layouts/WidgetLayout`. Removed in the next major. */
|
|
7
|
+
export type WidgetLayoutScrollAreaProps = WidgetLayoutScrollAreaPropsNext;
|
|
57
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,2BAA2B,IAAI,+BAA+B,EACpE,MAAM,sDAAsD,CAAC;AAE9D,iHAAiH;AACjH,eAAO,MAAM,YAAY,qLAAmB,CAAC;AAC7C,iHAAiH;AACjH,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AACtD,iHAAiH;AACjH,MAAM,MAAM,2BAA2B,GAAG,+BAA+B,CAAC"}
|
|
@@ -1,40 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ErrorBoundary } from '@flipdish/ui-library/providers/ErrorBoundary';
|
|
3
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
4
|
-
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
1
|
+
import { WidgetLayout as WidgetLayout$1 } from '@flipdish/ui-library/components/layouts/WidgetLayout';
|
|
5
2
|
|
|
6
|
-
/**
|
|
7
|
-
const
|
|
8
|
-
/**
|
|
9
|
-
* Widget-shaped template for a micro-frontend mounted beside a page: a named `region` that fills
|
|
10
|
-
* the height its host gives it, with pinned `header` and `footer` slots around a content area
|
|
11
|
-
* that scrolls internally, and an error boundary keyed by `widgetName`. Reach for it instead of
|
|
12
|
-
* `PageLayout` whenever the host page already owns `<main>` and the document must not scroll.
|
|
13
|
-
*
|
|
14
|
-
* @summary bounded-height widget template with pinned header and footer
|
|
15
|
-
*/
|
|
16
|
-
const WidgetLayout = ({ widgetName, label, header, footer, children, renderError, onError, scrollAreaProps, className, 'data-testid': dataTestId, }) => {
|
|
17
|
-
const widgetLayoutTestId = useResolvedTestId({ testId: dataTestId, segment: 'widget-layout', rootName: 'widget-layout' });
|
|
18
|
-
const scrollAreaTestId = scrollAreaProps?.['data-testid'] ?? joinTestId(widgetLayoutTestId, 'scroll-area');
|
|
19
|
-
// A `<section>` with an accessible name is a `region` landmark; without a name it is a plain `div`, so a
|
|
20
|
-
// host that already provides the landmark does not get a nested, same-named one.
|
|
21
|
-
const Root = label ? 'section' : 'div';
|
|
22
|
-
return (
|
|
23
|
-
// `h-full`, never a viewport unit: the host supplies the bounded height, and WebView viewport units can
|
|
24
|
-
// disagree with the visible area. `min-h-0` lets the scroll region shrink below its content's height.
|
|
25
|
-
jsxs(Root, { "aria-label": label, "data-testid": widgetLayoutTestId, className: cx('flex h-full min-h-0 w-full flex-col gap-md p-md pb-[max(var(--spacing-md),env(safe-area-inset-bottom))]', className), children: [header, jsx("div", { id: scrollAreaProps?.id, ref: scrollAreaProps?.ref, "data-testid": scrollAreaTestId,
|
|
26
|
-
// Focusable so keyboard users can scroll content that has no focusable element of its own (axe: scrollable-region-focusable).
|
|
27
|
-
// biome-ignore lint/a11y/noNoninteractiveTabindex: a scrollable region must be reachable by keyboard
|
|
28
|
-
tabIndex: 0,
|
|
29
|
-
// `overscroll-contain` keeps a scroll that reaches the end from chaining to the host page.
|
|
30
|
-
className: cx('min-h-0 flex-1 overflow-y-auto overscroll-contain outline-focus-ring focus-visible:outline-2 focus-visible:-outline-offset-2', scrollAreaProps?.className), children: jsx(ErrorBoundary, { identifier: widgetName, onError: onError, renderFallback: (error) => {
|
|
31
|
-
// `undefined`, not nullish: an explicit `null` from `renderError` is honoured as "render nothing".
|
|
32
|
-
const customFallback = renderError?.({ error, widgetName });
|
|
33
|
-
if (customFallback !== undefined)
|
|
34
|
-
return customFallback;
|
|
35
|
-
return jsx(DefaultWidgetError, { testId: joinTestId(widgetLayoutTestId, 'error') });
|
|
36
|
-
}, children: children }) }), footer] }));
|
|
37
|
-
};
|
|
3
|
+
/** @deprecated Import from `@flipdish/ui-library/components/layouts/WidgetLayout`. Removed in the next major. */
|
|
4
|
+
const WidgetLayout = WidgetLayout$1;
|
|
38
5
|
|
|
39
6
|
export { WidgetLayout };
|
|
40
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/templates/WidgetLayout/index.tsx"],"sourcesContent":[null],"names":["WidgetLayoutNext"],"mappings":";;AAUA;AACO,MAAM,YAAY,GAAGA;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `AppShell` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/layouts/AppShell` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `AppShell` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PageHubLayout` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/layouts/PageHubLayout` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `PageHubLayout` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PageLayout` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/layouts/PageLayout` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `PageLayout` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `WidgetLayout` has no React Native implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
|
|
5
|
+
* that importing `@flipdish/ui-library/components/layouts/WidgetLayout` from React Native fails at
|
|
6
|
+
* compile time rather than resolving to the web build's types. There is no
|
|
7
|
+
* matching `index.js`, so Metro cannot bundle this module either.
|
|
8
|
+
*
|
|
9
|
+
* To make `WidgetLayout` available on React Native, add an `index.native.tsx` beside
|
|
10
|
+
* its `index.tsx` — the build picks it up automatically and this stub disappears.
|
|
11
|
+
*/
|
|
12
|
+
export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type DotColor } from '@flipdish/ui-library/components/atoms/Dot';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type TagKey } from '../providers/TagGroup.context';
|
|
4
|
+
export interface TagItem {
|
|
5
|
+
/** Stable key for the tag: selection, removal and the derived test id all read it. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Text of the tag. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Number shown after the label, such as how many items the tag stands for. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** Image URL for a leading avatar; a user icon shows when it is missing or fails to load. */
|
|
12
|
+
avatarSrc?: string;
|
|
13
|
+
/** Thin dark outline that keeps the avatar visible on a light surface. */
|
|
14
|
+
avatarContrastBorder?: boolean;
|
|
15
|
+
/** Shows a leading status dot; an avatar takes its place when `avatarSrc` is set. */
|
|
16
|
+
dot?: boolean;
|
|
17
|
+
/** Semantic fill for the status dot; same tokens as `Dot`'s `color`. Defaults to `fg-success-secondary`. */
|
|
18
|
+
dotColor?: DotColor;
|
|
19
|
+
/** Mutes the tag and stops it being selected or removed. */
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
/** Shows a close button and is called with the tag id when it is pressed. */
|
|
22
|
+
onClose?: (id: string) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface TagAvatarProps {
|
|
25
|
+
/** Image URL; when missing or load fails, a user silhouette icon is shown. */
|
|
26
|
+
src?: string;
|
|
27
|
+
/** Accessible name for the image. */
|
|
28
|
+
alt?: string;
|
|
29
|
+
/** Thin dark outline so the avatar stays visible on light surfaces. */
|
|
30
|
+
contrastBorder?: boolean;
|
|
31
|
+
/** Layout classes merged onto the root `View`. */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Small round avatar at the start of a native `Tag`. Same fallback behaviour as web;
|
|
36
|
+
* contrast border uses a `border` rather than CSS `outline`.
|
|
37
|
+
*
|
|
38
|
+
* @summary small round avatar for a tag (React Native)
|
|
39
|
+
*/
|
|
40
|
+
export declare const TagAvatar: ({ src, alt, contrastBorder, className }: TagAvatarProps) => import("react").JSX.Element;
|
|
41
|
+
export interface TagProps extends Omit<TagItem, 'label' | 'id'> {
|
|
42
|
+
/** Stable id used for selection, removal and the derived `testID`. */
|
|
43
|
+
id: TagKey;
|
|
44
|
+
/** Tag label — strings are wrapped in `Text`; other nodes render as-is. */
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
/** Layout classes merged onto the root. */
|
|
47
|
+
className?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Overrides the derived `testID` for this tag (defaults to
|
|
50
|
+
* `<root>--tag-<slug>`, slugified from `id`).
|
|
51
|
+
*/
|
|
52
|
+
'data-testid'?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* React Native `Tag` — optional avatar or status dot, count, selection checkbox and
|
|
56
|
+
* remove button. Selection and close use `Pressable`; label colour is a light-mode hex
|
|
57
|
+
* because `Text` ignores `className` under the current `react-native-css` preview.
|
|
58
|
+
*
|
|
59
|
+
* @summary single tag with optional adornments and selection (React Native)
|
|
60
|
+
*/
|
|
61
|
+
export declare const Tag: ({ id, avatarSrc, avatarContrastBorder, dot, dotColor, isDisabled, count, className, children, onClose, "data-testid": dataTestId, }: TagProps) => import("react").JSX.Element;
|
|
62
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/Tags/Tag/Tag.native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAG/E,OAAO,EAAE,KAAK,SAAS,EA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IAYjB,QAAQ,gCAwHV,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Check, X, User01 } from '@flipdish/ui-icons';
|
|
3
|
+
import { Dot } from '../../../atoms/Dot/index.js';
|
|
4
|
+
import { cx } from '../../../../utilities/cx/index.js';
|
|
5
|
+
import { useTestIdPrefix, slugifyTestId, joinTestId } from '../../../../utilities/testIdUtils/index.js';
|
|
6
|
+
import { useContext, useState } from 'react';
|
|
7
|
+
import { Text, View, Pressable, Image } from 'react-native';
|
|
8
|
+
import { TagGroupContext } from '../providers/TagGroup.context.js';
|
|
9
|
+
import { styles } from '../Tags.styles.js';
|
|
10
|
+
|
|
11
|
+
/** Grows the close target outward only — a left slop would cover the end of the label. */
|
|
12
|
+
const CLOSE_HIT_SLOP = { top: 8, bottom: 8, right: 8 };
|
|
13
|
+
/** Gives back the pill's own padding as touch area when the checkbox shares the pill with a close button. */
|
|
14
|
+
const SELECT_HIT_SLOP = { top: 8, bottom: 8, left: 8 };
|
|
15
|
+
/**
|
|
16
|
+
* Small round avatar at the start of a native `Tag`. Same fallback behaviour as web;
|
|
17
|
+
* contrast border uses a `border` rather than CSS `outline`.
|
|
18
|
+
*
|
|
19
|
+
* @summary small round avatar for a tag (React Native)
|
|
20
|
+
*/
|
|
21
|
+
const TagAvatar = ({ src, alt, contrastBorder = true, className }) => {
|
|
22
|
+
// Holds the source that failed, not a flag, so a new `src` is tried instead of staying on the fallback.
|
|
23
|
+
const [failedSrc, setFailedSrc] = useState();
|
|
24
|
+
const size = styles.native.avatarSize;
|
|
25
|
+
return (jsx(View, { className: cx(styles.avatar, contrastBorder && 'border border-black/16', className), style: { width: size, height: size, borderRadius: size / 2 }, children: src && src !== failedSrc ? (jsx(Image, { source: { uri: src }, accessibilityLabel: alt, onError: () => setFailedSrc(src), style: { width: size, height: size, borderRadius: size / 2 } })) : (jsx(User01, { size: styles.native.avatarIconSize, color: styles.native.closeIconColor })) }));
|
|
26
|
+
};
|
|
27
|
+
// Check icon is authored at 24px; web's 14px viewBox used stroke 2 → 24/7 for equivalent weight.
|
|
28
|
+
const CHECK_STROKE = 24 / 7;
|
|
29
|
+
/**
|
|
30
|
+
* React Native `Tag` — optional avatar or status dot, count, selection checkbox and
|
|
31
|
+
* remove button. Selection and close use `Pressable`; label colour is a light-mode hex
|
|
32
|
+
* because `Text` ignores `className` under the current `react-native-css` preview.
|
|
33
|
+
*
|
|
34
|
+
* @summary single tag with optional adornments and selection (React Native)
|
|
35
|
+
*/
|
|
36
|
+
const Tag = ({ id, avatarSrc, avatarContrastBorder = true, dot, dotColor = 'fg-success-secondary', isDisabled, count, className, children, onClose, 'data-testid': dataTestId, }) => {
|
|
37
|
+
const context = useContext(TagGroupContext);
|
|
38
|
+
const prefix = useTestIdPrefix();
|
|
39
|
+
const idPart = slugifyTestId(String(id));
|
|
40
|
+
const tagTestId = dataTestId ?? (prefix ? joinTestId(prefix, `tag-${idPart}`) : undefined);
|
|
41
|
+
const closeTestId = tagTestId ? `${tagTestId}-close` : undefined;
|
|
42
|
+
const isSelected = context.selectedKeys.has(id);
|
|
43
|
+
const inSelectionGroup = context.selectionMode !== 'none';
|
|
44
|
+
const sizeStyles = styles.sizes[context.size];
|
|
45
|
+
const [closePressed, setClosePressed] = useState(false);
|
|
46
|
+
const renderLeadingContent = () => {
|
|
47
|
+
if (avatarSrc)
|
|
48
|
+
return jsx(TagAvatar, { src: avatarSrc, alt: "Avatar", contrastBorder: avatarContrastBorder });
|
|
49
|
+
if (dot)
|
|
50
|
+
return jsx(Dot, { color: dotColor, size: "sm" });
|
|
51
|
+
return null;
|
|
52
|
+
};
|
|
53
|
+
const leadingContent = renderLeadingContent();
|
|
54
|
+
const labelNode = typeof children === 'string' || typeof children === 'number' ? (jsx(Text, { style: { color: styles.native.labelColor, fontWeight: '500', ...styles.native.labelText[context.size] }, children: children })) : (children);
|
|
55
|
+
const content = (jsxs(Fragment, { children: [inSelectionGroup && (jsx(View, { className: cx('items-center justify-center rounded border border-primary bg-primary', styles.checkbox[context.size].root, isSelected && 'border-brand-solid bg-brand-solid', isDisabled && 'opacity-50', isDisabled && !isSelected && 'bg-tertiary'), children: isSelected ? jsx(Check, { size: styles.native.checkIconSize[context.size], color: styles.native.checkColor, strokeWidth: CHECK_STROKE }) : null })), leadingContent, labelNode, typeof count === 'number' && (jsx(View, { className: cx(styles.count, sizeStyles.count), children: jsx(Text, { style: { color: styles.native.labelColor, fontWeight: '500', ...styles.native.countText[context.size] }, children: count }) }))] }));
|
|
56
|
+
const contentClassName = cx('flex flex-row items-center gap-1', sizeStyles.content);
|
|
57
|
+
const closeButton = onClose && (jsx(Pressable, { testID: closeTestId, accessibilityRole: "button", accessibilityLabel: "Remove this tag", disabled: isDisabled, hitSlop: CLOSE_HIT_SLOP, onPress: () => onClose(String(id)), onPressIn: () => setClosePressed(true), onPressOut: () => setClosePressed(false), className: cx('items-center justify-center rounded-[3px]', styles.close[context.size].root, closePressed && 'bg-primary_hover'), children: jsx(X, { size: styles.native.closeIconSize[context.size], color: closePressed ? styles.native.closeIconColorPressed : styles.native.closeIconColor, strokeWidth: styles.native.closeIconStroke[context.size] }) }));
|
|
58
|
+
const rootClassName = cx(styles.rootNative, sizeStyles.root.base, avatarSrc && sizeStyles.root.withAvatar, onClose && sizeStyles.root.withClose, dot && sizeStyles.root.withDot, typeof count === 'number' && sizeStyles.root.withCount, inSelectionGroup && sizeStyles.root.withCheckbox, className);
|
|
59
|
+
// A `Pressable` even when disabled, so a disabled and selected tag still exposes its checkbox role and checked state.
|
|
60
|
+
const checkboxProps = {
|
|
61
|
+
testID: tagTestId,
|
|
62
|
+
disabled: isDisabled,
|
|
63
|
+
onPress: () => context.toggle(id),
|
|
64
|
+
accessibilityRole: 'checkbox',
|
|
65
|
+
accessibilityState: { checked: isSelected, disabled: Boolean(isDisabled) },
|
|
66
|
+
};
|
|
67
|
+
if (inSelectionGroup && closeButton) {
|
|
68
|
+
// Siblings, never nested: VoiceOver cannot reach an accessible element inside another, so a nested remove button is lost to it.
|
|
69
|
+
return (jsxs(View, { className: rootClassName, children: [jsx(Pressable, { ...checkboxProps, hitSlop: SELECT_HIT_SLOP, className: contentClassName, children: content }), closeButton] }));
|
|
70
|
+
}
|
|
71
|
+
if (inSelectionGroup) {
|
|
72
|
+
return (jsx(Pressable, { ...checkboxProps, className: rootClassName, children: jsx(View, { className: contentClassName, children: content }) }));
|
|
73
|
+
}
|
|
74
|
+
return (jsxs(View, { testID: tagTestId, accessibilityState: { disabled: Boolean(isDisabled) }, className: rootClassName, children: [jsx(View, { className: contentClassName, children: content }), closeButton] }));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { Tag, TagAvatar };
|
|
78
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../../../src/components/molecules/Tags/Tag/Tag.native.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment","XClose"],"mappings":";;;;;;;;;;AASA;AACA,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AACtD;AACA,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;AAkCtD;;;;;AAKG;AACI,MAAM,SAAS,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAkB,KAAI;;IAE1F,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAU;AACpD,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU;IAErC,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,IAAI,wBAAwB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,IAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAE,aAAa,EAAA,QAAA,EAAA,CAC5BD,GAAA,CAAC,SAAS,EAAA,EAAA,GAAK,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAA,QAAA,EAChF,OAAO,EAAA,CACE,EACX,WAAW,CAAA,EAAA,CACP;IAEX;IAEA,IAAI,gBAAgB,EAAE;QACpB,QACEA,IAAC,SAAS,EAAA,EAAA,GAAK,aAAa,EAAE,SAAS,EAAE,aAAa,EAAA,QAAA,EACpDA,IAAC,IAAI,EAAA,EAAC,SAAS,EAAE,gBAAgB,YAAG,OAAO,EAAA,CAAQ,EAAA,CACzC;IAEhB;AAEA,IAAA,QACEC,IAAA,CAAC,IAAI,EAAA,EAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,aAAa,EAAA,QAAA,EAAA,CACtGD,GAAA,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAA,QAAA,EAAG,OAAO,EAAA,CAAQ,EAClD,WAAW,CAAA,EAAA,CACP;AAEX;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type SelectionMode, type TagKey } from '../providers/TagGroup.context';
|
|
3
|
+
import type { TagSize } from '../Tags.styles';
|
|
4
|
+
export interface TagGroupProps {
|
|
5
|
+
/** Accessible name of the group. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Size of every `Tag` in the group, shared through context. */
|
|
8
|
+
size?: TagSize;
|
|
9
|
+
/** `'none'` display-only; `'single'` one at a time; `'multiple'` any combination. */
|
|
10
|
+
selectionMode?: SelectionMode;
|
|
11
|
+
/** Controlled selected keys. */
|
|
12
|
+
selectedKeys?: Iterable<TagKey>;
|
|
13
|
+
/** Initial selection for uncontrolled usage. */
|
|
14
|
+
defaultSelectedKeys?: Iterable<TagKey>;
|
|
15
|
+
/** Called whenever the selection set changes. */
|
|
16
|
+
onSelectionChange?: (keys: Set<TagKey>) => void;
|
|
17
|
+
/** The `TagList` (and its `Tag` children). */
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
/** Layout classes merged onto the root `View`. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Overrides the derived root `testID` (defaults to `fd-tag-group`).
|
|
23
|
+
* Tags derive their ids from this prefix, so overriding it re-roots every
|
|
24
|
+
* non-overridden `Tag` beneath it.
|
|
25
|
+
*/
|
|
26
|
+
'data-testid'?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* React Native `TagGroup` — display-only, single-select, multi-select and removable
|
|
30
|
+
* tags built from `View` / `Pressable` instead of react-aria. Keyboard Backspace/Delete
|
|
31
|
+
* removal (`onRemove`) and `dotClassName` are web-only; use `onClose` per tag and
|
|
32
|
+
* `dotColor` for status-dot colour.
|
|
33
|
+
*
|
|
34
|
+
* @summary group of tags for filtering, selection or categorisation (React Native)
|
|
35
|
+
*/
|
|
36
|
+
export declare const TagGroup: ({ label, selectionMode, size, selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, children, className, "data-testid": dataTestId, }: TagGroupProps) => import("react").JSX.Element;
|
|
37
|
+
export interface TagListProps {
|
|
38
|
+
/** The `Tag` items. */
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
/** Layout classes — typically `flex flex-row flex-wrap gap-2`. */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Horizontal wrapping row of tags inside a `TagGroup`. */
|
|
44
|
+
export declare const TagList: ({ children, className }: TagListProps) => import("react").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=TagGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/components/molecules/Tags/TagGroup/TagGroup.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAmB,KAAK,MAAM,EAAE,MAAM,sCAAsC,CAAC;AACxG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qFAAqF;IACrF,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gCAAgC;IAChC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvC,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAChD,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,yJAUtB,aAAa,gCAsBf,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,uBAAuB;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2DAA2D;AAC3D,eAAO,MAAM,OAAO,GAAI,yBAAyB,YAAY,gCAAuF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { cx } from '../../../../utilities/cx/index.js';
|
|
3
|
+
import { useResolvedTestId, TestIdProvider } from '../../../../utilities/testIdUtils/index.js';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { TagGroupContext } from '../providers/TagGroup.context.js';
|
|
7
|
+
import { selectionAfterPress } from './utilities/tagSelection.utils.js';
|
|
8
|
+
|
|
9
|
+
const toKeySet = (keys) => new Set(keys ?? []);
|
|
10
|
+
/**
|
|
11
|
+
* React Native `TagGroup` — display-only, single-select, multi-select and removable
|
|
12
|
+
* tags built from `View` / `Pressable` instead of react-aria. Keyboard Backspace/Delete
|
|
13
|
+
* removal (`onRemove`) and `dotClassName` are web-only; use `onClose` per tag and
|
|
14
|
+
* `dotColor` for status-dot colour.
|
|
15
|
+
*
|
|
16
|
+
* @summary group of tags for filtering, selection or categorisation (React Native)
|
|
17
|
+
*/
|
|
18
|
+
const TagGroup = ({ label, selectionMode = 'none', size = 'sm', selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelectionChange, children, className, 'data-testid': dataTestId, }) => {
|
|
19
|
+
const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'tag-group', rootName: 'tag-group' });
|
|
20
|
+
const [uncontrolledKeys, setUncontrolledKeys] = useState(() => toKeySet(defaultSelectedKeys));
|
|
21
|
+
const selectedKeys = selectedKeysProp !== undefined ? toKeySet(selectedKeysProp) : uncontrolledKeys;
|
|
22
|
+
const toggle = (id) => {
|
|
23
|
+
const next = selectionAfterPress(selectedKeys, id, selectionMode);
|
|
24
|
+
if (!next)
|
|
25
|
+
return;
|
|
26
|
+
if (selectedKeysProp === undefined)
|
|
27
|
+
setUncontrolledKeys(next);
|
|
28
|
+
onSelectionChange?.(next);
|
|
29
|
+
};
|
|
30
|
+
return (jsx(TagGroupContext.Provider, { value: { selectionMode, size, selectedKeys, toggle }, children: jsx(TestIdProvider, { value: rootTestId, children: jsx(View, { testID: rootTestId, accessibilityLabel: label, className: className, children: children }) }) }));
|
|
31
|
+
};
|
|
32
|
+
/** Horizontal wrapping row of tags inside a `TagGroup`. */
|
|
33
|
+
const TagList = ({ children, className }) => jsx(View, { className: cx('flex flex-row flex-wrap gap-2', className), children: children });
|
|
34
|
+
|
|
35
|
+
export { TagGroup, TagList };
|
|
36
|
+
//# sourceMappingURL=TagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagGroup.js","sources":["../../../../../../../src/components/molecules/Tags/TagGroup/TagGroup.native.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;AAiCA,MAAM,QAAQ,GAAG,CAAC,IAAkC,KAAkB,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;AAEzF;;;;;;;AAOG;AACI,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,EACL,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,gBAAgB,EAC9B,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,aAAa,EAAE,UAAU,GACX,KAAI;AAClB,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACzG,IAAA,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,MAAM,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAC7F,IAAA,MAAM,YAAY,GAAG,gBAAgB,KAAK,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AAEnG,IAAA,MAAM,MAAM,GAAG,CAAC,EAAU,KAAI;QAC5B,MAAM,IAAI,GAAG,mBAAmB,CAAC,YAAY,EAAE,EAAE,EAAE,aAAa,CAAC;AACjE,QAAA,IAAI,CAAC,IAAI;YAAE;QAEX,IAAI,gBAAgB,KAAK,SAAS;YAAE,mBAAmB,CAAC,IAAI,CAAC;AAC7D,QAAA,iBAAiB,GAAG,IAAI,CAAC;AAC3B,IAAA,CAAC;IAED,QACEA,IAAC,eAAe,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,EAAA,QAAA,EAC5EA,GAAA,CAAC,cAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BA,IAAC,IAAI,EAAA,EAAC,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAA,QAAA,EACtE,QAAQ,EAAA,CACJ,EAAA,CACQ,EAAA,CACQ;AAE/B;AASA;AACO,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAgB,KAAKA,GAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,EAAA,QAAA,EAAG,QAAQ,EAAA;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Works out the selection after a tag is pressed, as the native `TagGroup` applies it.
|
|
3
|
+
*
|
|
4
|
+
* @param selectedKeys The keys selected before the press; never mutated.
|
|
5
|
+
* @param id The key of the pressed tag.
|
|
6
|
+
* @param selectionMode `'single'` swaps the selection to the pressed tag and never empties it; `'multiple'` toggles the pressed tag.
|
|
7
|
+
* @returns The new selection, or `undefined` when the press changes nothing.
|
|
8
|
+
*/
|
|
9
|
+
export declare const selectionAfterPress: <Key>(selectedKeys: ReadonlySet<Key>, id: Key, selectionMode: "none" | "single" | "multiple") => Set<Key> | undefined;
|
|
10
|
+
//# sourceMappingURL=tagSelection.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagSelection.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,EACrC,cAAc,WAAW,CAAC,GAAG,CAAC,EAC9B,IAAI,GAAG,EACP,eAAe,MAAM,GAAG,QAAQ,GAAG,UAAU,KAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,SAWb,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Works out the selection after a tag is pressed, as the native `TagGroup` applies it.
|
|
3
|
+
*
|
|
4
|
+
* @param selectedKeys The keys selected before the press; never mutated.
|
|
5
|
+
* @param id The key of the pressed tag.
|
|
6
|
+
* @param selectionMode `'single'` swaps the selection to the pressed tag and never empties it; `'multiple'` toggles the pressed tag.
|
|
7
|
+
* @returns The new selection, or `undefined` when the press changes nothing.
|
|
8
|
+
*/
|
|
9
|
+
const selectionAfterPress = (selectedKeys, id, selectionMode) => {
|
|
10
|
+
if (selectionMode === 'none')
|
|
11
|
+
return undefined;
|
|
12
|
+
if (selectionMode === 'single') {
|
|
13
|
+
const isOnlySelection = selectedKeys.size === 1 && selectedKeys.has(id);
|
|
14
|
+
return isOnlySelection ? undefined : new Set([id]);
|
|
15
|
+
}
|
|
16
|
+
const next = new Set(selectedKeys);
|
|
17
|
+
if (!next.delete(id))
|
|
18
|
+
next.add(id);
|
|
19
|
+
return next;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { selectionAfterPress };
|
|
23
|
+
//# sourceMappingURL=tagSelection.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tagSelection.utils.js","sources":["../../../../../../../../src/components/molecules/Tags/TagGroup/utilities/tagSelection.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AACI,MAAM,mBAAmB,GAAG,CACjC,YAA8B,EAC9B,EAAO,EACP,aAA6C,KACrB;IACxB,IAAI,aAAa,KAAK,MAAM;AAAE,QAAA,OAAO,SAAS;AAE9C,IAAA,IAAI,aAAa,KAAK,QAAQ,EAAE;AAC9B,QAAA,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,KAAK,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;AACvE,QAAA,OAAO,eAAe,GAAG,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACpD;AAEA,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC;AAClC,IAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;AAAE,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAClC,IAAA,OAAO,IAAI;AACb;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared `Tags` style config, read by
|
|
2
|
+
* Shared `Tags` style config, read by `Tag` and `TagGroup` on web and React Native.
|
|
3
3
|
*
|
|
4
4
|
* Complete literal class names only — Tailwind scans source for whole candidates.
|
|
5
5
|
* `native` holds pixel sizes and light-mode hex colours that React Native needs as
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared `Tags` style config, read by
|
|
2
|
+
* Shared `Tags` style config, read by `Tag` and `TagGroup` on web and React Native.
|
|
3
3
|
*
|
|
4
4
|
* Complete literal class names only — Tailwind scans source for whole candidates.
|
|
5
5
|
* `native` holds pixel sizes and light-mode hex colours that React Native needs as
|