@planningcenter/tapestry 4.11.0 → 4.12.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DataTable/DataTable.d.ts +47 -13
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +29 -23
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/DeleteSavedViewAlertDialog.d.ts +14 -0
- package/dist/components/DataTable/DeleteSavedViewAlertDialog.d.ts.map +1 -0
- package/dist/components/DataTable/DeleteSavedViewAlertDialog.js +10 -0
- package/dist/components/DataTable/DeleteSavedViewAlertDialog.js.map +1 -0
- package/dist/components/DataTable/ManageSavedViewsButton.d.ts +4 -1
- package/dist/components/DataTable/ManageSavedViewsButton.d.ts.map +1 -1
- package/dist/components/DataTable/ManageSavedViewsButton.js +3 -7
- package/dist/components/DataTable/ManageSavedViewsButton.js.map +1 -1
- package/dist/components/DataTable/ManageSavedViewsModal.d.ts +8 -1
- package/dist/components/DataTable/ManageSavedViewsModal.d.ts.map +1 -1
- package/dist/components/DataTable/ManageSavedViewsModal.js +116 -5
- package/dist/components/DataTable/ManageSavedViewsModal.js.map +1 -1
- package/dist/components/DataTable/ManageSavedViewsModal.module.css.js +4 -0
- package/dist/components/DataTable/ManageSavedViewsModal.module.css.js.map +1 -0
- package/dist/components/DataTable/NewSavedViewModal.d.ts +4 -1
- package/dist/components/DataTable/NewSavedViewModal.d.ts.map +1 -1
- package/dist/components/DataTable/NewSavedViewModal.js.map +1 -1
- package/dist/components/DataTable/ResultsCount.d.ts +9 -0
- package/dist/components/DataTable/ResultsCount.d.ts.map +1 -1
- package/dist/components/DataTable/ResultsCount.js +1 -1
- package/dist/components/DataTable/ResultsCount.js.map +1 -1
- package/dist/components/DataTable/SavedViewsBar.d.ts +14 -6
- package/dist/components/DataTable/SavedViewsBar.d.ts.map +1 -1
- package/dist/components/DataTable/SavedViewsBar.js +162 -45
- package/dist/components/DataTable/SavedViewsBar.js.map +1 -1
- package/dist/components/DataTable/TableActions.d.ts.map +1 -1
- package/dist/components/DataTable/TableActions.js +4 -6
- package/dist/components/DataTable/TableActions.js.map +1 -1
- package/dist/components/DataTable/ViewSettingsToggle.d.ts.map +1 -1
- package/dist/components/DataTable/ViewSettingsToggle.js +2 -4
- package/dist/components/DataTable/ViewSettingsToggle.js.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/savedViews.d.ts +16 -15
- package/dist/components/DataTable/savedViews.d.ts.map +1 -1
- package/dist/components/DataTable/savedViews.js +28 -6
- package/dist/components/DataTable/savedViews.js.map +1 -1
- package/dist/components/DataTable/useActiveSavedView.d.ts +1 -1
- package/dist/components/DataTable/useActiveSavedView.d.ts.map +1 -1
- package/dist/components/DataTable/useActiveSavedView.js +9 -3
- package/dist/components/DataTable/useActiveSavedView.js.map +1 -1
- package/dist/components/DataTable/useFilterAnnouncement.d.ts +24 -0
- package/dist/components/DataTable/useFilterAnnouncement.d.ts.map +1 -0
- package/dist/components/DataTable/useFilterAnnouncement.js +49 -0
- package/dist/components/DataTable/useFilterAnnouncement.js.map +1 -0
- package/dist/components/DataTable/useUpdateSavedViewName.d.ts +7 -0
- package/dist/components/DataTable/useUpdateSavedViewName.d.ts.map +1 -0
- package/dist/components/DataTable/useUpdateSavedViewName.js +12 -0
- package/dist/components/DataTable/useUpdateSavedViewName.js.map +1 -0
- package/dist/components/button/ActionsDropdownIconButton.d.ts +17 -9
- package/dist/components/button/ActionsDropdownIconButton.d.ts.map +1 -1
- package/dist/components/button/ActionsDropdownIconButton.js +5 -2
- package/dist/components/button/ActionsDropdownIconButton.js.map +1 -1
- package/dist/components/button/DropdownIconButton.d.ts +4 -5
- package/dist/components/button/DropdownIconButton.d.ts.map +1 -1
- package/dist/components/button/DropdownIconButton.js +2 -1
- package/dist/components/button/DropdownIconButton.js.map +1 -1
- package/dist/components/button/IconButton.d.ts +33 -10
- package/dist/components/button/IconButton.d.ts.map +1 -1
- package/dist/components/button/IconButton.js +8 -2
- package/dist/components/button/IconButton.js.map +1 -1
- package/dist/components/button/ToggleIconButton.d.ts +2 -2
- package/dist/components/button/ToggleIconButton.d.ts.map +1 -1
- package/dist/components/button/ToggleIconButton.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.d.ts +6 -0
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.js.map +1 -1
- package/dist/components/internal/alert-dialog/AlertDialog.d.ts +56 -0
- package/dist/components/internal/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/internal/alert-dialog/AlertDialog.js +68 -0
- package/dist/components/internal/alert-dialog/AlertDialog.js.map +1 -0
- package/dist/components/internal/alert-dialog/index.d.ts +5 -0
- package/dist/components/internal/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/internal/tooltip/Tooltip.d.ts +9 -3
- package/dist/components/internal/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/internal/tooltip/Tooltip.js +63 -8
- package/dist/components/internal/tooltip/Tooltip.js.map +1 -1
- package/dist/components/pane/PaneDivider.d.ts +5 -2
- package/dist/components/pane/PaneDivider.d.ts.map +1 -1
- package/dist/components/pane/PaneDivider.js +2 -2
- package/dist/components/pane/PaneDivider.js.map +1 -1
- package/dist/index.css +27 -27
- package/dist/index.css.map +1 -1
- package/dist/reactRender.css +1301 -1189
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +1301 -1189
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/tapestryMount.css +1301 -1189
- package/dist/tapestryMount.css.map +1 -1
- package/dist/tapestryMountLegacy.css +1301 -1189
- package/dist/tapestryMountLegacy.css.map +1 -1
- package/dist/unstable.css +112 -0
- package/dist/unstable.css.map +1 -1
- package/dist/utilities/useAnnounce.d.ts +15 -0
- package/dist/utilities/useAnnounce.d.ts.map +1 -0
- package/dist/utilities/useAnnounce.js +27 -0
- package/dist/utilities/useAnnounce.js.map +1 -0
- package/package.json +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"savedViews.js","sources":["../../../src/components/DataTable/savedViews.ts"],"sourcesContent":["import type { Sort } from \"./DataTable\"\nimport type { ActiveFilter } from \"./FilterTypes\"\n\nexport interface SavedView {\n activeFilters: ActiveFilter[]\n /**
|
|
1
|
+
{"version":3,"file":"savedViews.js","sources":["../../../src/components/DataTable/savedViews.ts"],"sourcesContent":["import type { Sort } from \"./DataTable\"\nimport type { ActiveFilter } from \"./FilterTypes\"\n\nexport interface SavedView {\n activeFilters: ActiveFilter[]\n /** Omit to leave the current column visibility unchanged when applied. */\n hiddenColumnNames?: string[]\n /** Assigned by the consumer once the view is saved. */\n id?: number | string\n name: string\n /** Omit to leave the current sort unchanged when applied. */\n sort?: Sort\n}\n\n/** An app-provided view. Read-only. */\nexport type StaticView = SavedView & { id: number | string }\n\n/**\n * Always listed, so there's a view to fall back to. Added before the static\n * views unless one of them uses its id, which replaces it.\n */\nexport const initialView: StaticView = {\n activeFilters: [],\n id: \"initial\",\n name: \"All\",\n}\n\ninterface SavedViewState {\n activeFilters: ActiveFilter[]\n hiddenColumnNames: string[]\n sort: Sort | undefined\n}\n\n/**\n * The most specific view matching the current state, or undefined. Only\n * picks the initially selected view. Filters match regardless of order,\n * ignoring display-only labels. A view's `sort` and `hiddenColumnNames` are\n * only compared when the view sets them, so a view that sets more of them is\n * more specific. Among equally specific matches, the first wins.\n */\nexport function findActiveSavedView(\n savedViews: SavedView[],\n state: SavedViewState\n): SavedView | undefined {\n let mostSpecificMatch: SavedView | undefined\n for (const view of savedViews) {\n if (!savedViewMatches(view, state)) continue\n if (\n !mostSpecificMatch ||\n specificity(view) > specificity(mostSpecificMatch)\n ) {\n mostSpecificMatch = view\n }\n }\n return mostSpecificMatch\n}\n\nfunction specificity(view: SavedView): number {\n return Number(Boolean(view.sort)) + Number(Boolean(view.hiddenColumnNames))\n}\n\nfunction savedViewMatches(view: SavedView, state: SavedViewState): boolean {\n if (!filtersMatch(view.activeFilters, state.activeFilters)) return false\n if (view.sort && !sortMatches(view.sort, state.sort)) return false\n return (\n !view.hiddenColumnNames ||\n namesMatch(view.hiddenColumnNames, state.hiddenColumnNames)\n )\n}\n\nfunction filtersMatch(a: ActiveFilter[], b: ActiveFilter[]): boolean {\n if (a.length !== b.length) return false\n const unmatched = [...b]\n return a.every((filter) => {\n const index = unmatched.findIndex((other) => filterMatches(filter, other))\n if (index === -1) return false\n unmatched.splice(index, 1)\n return true\n })\n}\n\nfunction filterMatches(a: ActiveFilter, b: ActiveFilter): boolean {\n return (\n a.name === b.name &&\n a.operator === b.operator &&\n a.scope === b.scope &&\n valueMatches(a.value, b.value)\n )\n}\n\nfunction valueMatches(a: unknown, b: unknown): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, i) => item === b[i])\n }\n return a === b\n}\n\nfunction sortMatches(a: Sort, b: Sort | undefined): boolean {\n return a.column === b?.column && a.direction === b?.direction\n}\n\nfunction namesMatch(a: string[], b: string[]): boolean {\n const names = new Set(b)\n return new Set(a).size === names.size && a.every((name) => names.has(name))\n}\n"],"names":[],"mappings":"AAiBA;;;AAGG;AACI,MAAM,WAAW,GAAe;AACrC,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,IAAI,EAAE,KAAK;;AASb;;;;;;AAMG;AACG,SAAU,mBAAmB,CACjC,UAAuB,EACvB,KAAqB,EAAA;AAErB,IAAA,IAAI,iBAAwC;AAC5C,IAAA,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;AAC7B,QAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC;YAAE;AACpC,QAAA,IACE,CAAC,iBAAiB;YAClB,WAAW,CAAC,IAAI,CAAC,GAAG,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AS,aAAa,CAAC,CAAe,EAAE,CAAe,EAAA;AACrD,IAAA,QACE,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;AACjB,QAAA,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;AACzB,QAAA,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,YAAY,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;AAElC;AAEA,SAAS,YAAY,CAAC,CAAU,EAAE,CAAU,EAAA;AAC1C,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACxC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE;IACA,OAAO,CAAC,KAAK,CAAC;AAChB;AAEA,SAAS,WAAW,CAAC,CAAO,EAAE,CAAmB,EAAA;AAC/C,IAAA,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,SAAS,KAAK,CAAC,EAAE,SAAS;AAC/D;AAEA,SAAS,UAAU,CAAC,CAAW,EAAE,CAAW,EAAA;AAC1C,IAAA,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;AACxB,IAAA,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7E;;;;"}
|
|
@@ -2,6 +2,6 @@ import type { SavedView } from "./savedViews";
|
|
|
2
2
|
export declare function useActiveSavedView(savedViews: SavedView[], getInitialView: () => SavedView | undefined): {
|
|
3
3
|
activeSavedView: SavedView | undefined;
|
|
4
4
|
select: (view: SavedView) => void;
|
|
5
|
-
selectWhenSaved: (
|
|
5
|
+
selectWhenSaved: (savedView: Promise<SavedView> | SavedView) => Promise<void>;
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=useActiveSavedView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveSavedView.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/useActiveSavedView.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,SAAS,EAAE,EACvB,cAAc,EAAE,MAAM,SAAS,GAAG,SAAS;;
|
|
1
|
+
{"version":3,"file":"useActiveSavedView.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/useActiveSavedView.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,SAAS,EAAE,EACvB,cAAc,EAAE,MAAM,SAAS,GAAG,SAAS;;mBAY1B,SAAS;iCAIW,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS;EAQpE"}
|
|
@@ -5,14 +5,20 @@ function useActiveSavedView(savedViews, getInitialView) {
|
|
|
5
5
|
// Lets a slow save skip selecting its view if the user picked another.
|
|
6
6
|
const selectionCount = useRef(0);
|
|
7
7
|
return {
|
|
8
|
-
|
|
8
|
+
// A view without an id isn't saved yet, so it can't be the active one.
|
|
9
|
+
activeSavedView: activeId === undefined
|
|
10
|
+
? undefined
|
|
11
|
+
: savedViews.find(({ id }) => id === activeId),
|
|
9
12
|
select: (view) => {
|
|
10
13
|
selectionCount.current++;
|
|
11
14
|
setActiveId(view.id);
|
|
12
15
|
},
|
|
13
|
-
selectWhenSaved: async (
|
|
16
|
+
selectWhenSaved: async (savedView) => {
|
|
14
17
|
const selection = ++selectionCount.current;
|
|
15
|
-
|
|
18
|
+
// Tolerates a consumer that returns nothing, leaving the selection as is.
|
|
19
|
+
const id = (await savedView)?.id;
|
|
20
|
+
if (id === undefined)
|
|
21
|
+
return;
|
|
16
22
|
if (selection === selectionCount.current)
|
|
17
23
|
setActiveId(id);
|
|
18
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveSavedView.js","sources":["../../../src/components/DataTable/useActiveSavedView.ts"],"sourcesContent":["import { useRef, useState } from \"react\"\n\nimport type { SavedView } from \"./savedViews\"\n\nexport function useActiveSavedView(\n savedViews: SavedView[],\n getInitialView: () => SavedView | undefined\n) {\n const [activeId, setActiveId] = useState(() => getInitialView()?.id)\n // Lets a slow save skip selecting its view if the user picked another.\n const selectionCount = useRef(0)\n\n return {\n activeSavedView: savedViews.find(({ id }) => id === activeId),\n select: (view: SavedView) => {\n selectionCount.current++\n setActiveId(view.id)\n },\n selectWhenSaved: async (
|
|
1
|
+
{"version":3,"file":"useActiveSavedView.js","sources":["../../../src/components/DataTable/useActiveSavedView.ts"],"sourcesContent":["import { useRef, useState } from \"react\"\n\nimport type { SavedView } from \"./savedViews\"\n\nexport function useActiveSavedView(\n savedViews: SavedView[],\n getInitialView: () => SavedView | undefined\n) {\n const [activeId, setActiveId] = useState(() => getInitialView()?.id)\n // Lets a slow save skip selecting its view if the user picked another.\n const selectionCount = useRef(0)\n\n return {\n // A view without an id isn't saved yet, so it can't be the active one.\n activeSavedView:\n activeId === undefined\n ? undefined\n : savedViews.find(({ id }) => id === activeId),\n select: (view: SavedView) => {\n selectionCount.current++\n setActiveId(view.id)\n },\n selectWhenSaved: async (savedView: Promise<SavedView> | SavedView) => {\n const selection = ++selectionCount.current\n // Tolerates a consumer that returns nothing, leaving the selection as is.\n const id = (await savedView)?.id\n if (id === undefined) return\n if (selection === selectionCount.current) setActiveId(id)\n },\n }\n}\n"],"names":[],"mappings":";;AAIM,SAAU,kBAAkB,CAChC,UAAuB,EACvB,cAA2C,EAAA;AAE3C,IAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,MAAM,cAAc,EAAE,EAAE,EAAE,CAAC;;AAEpE,IAAA,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC;IAEhC,OAAO;;QAEL,eAAe,EACb,QAAQ,KAAK;AACX,cAAE;AACF,cAAE,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,QAAQ,CAAC;AAClD,QAAA,MAAM,EAAE,CAAC,IAAe,KAAI;YAC1B,cAAc,CAAC,OAAO,EAAE;AACxB,YAAA,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,CAAC;AACD,QAAA,eAAe,EAAE,OAAO,SAAyC,KAAI;AACnE,YAAA,MAAM,SAAS,GAAG,EAAE,cAAc,CAAC,OAAO;;YAE1C,MAAM,EAAE,GAAG,CAAC,MAAM,SAAS,GAAG,EAAE;YAChC,IAAI,EAAE,KAAK,SAAS;gBAAE;AACtB,YAAA,IAAI,SAAS,KAAK,cAAc,CAAC,OAAO;gBAAE,WAAW,CAAC,EAAE,CAAC;QAC3D,CAAC;KACF;AACH;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DataTableLoadingState } from "./DataTable";
|
|
2
|
+
import type { ActiveFilter } from "./FilterTypes";
|
|
3
|
+
import { type ResultNoun } from "./ResultsCount";
|
|
4
|
+
export declare const FILTER_ANNOUNCEMENT_DELAY_MS = 500;
|
|
5
|
+
/**
|
|
6
|
+
* Announces the results count to screen reader users after each filter
|
|
7
|
+
* change, once the results settle: `loadingState` is not `"loading"`, and
|
|
8
|
+
* neither it nor the count has changed for
|
|
9
|
+
* {@link FILTER_ANNOUNCEMENT_DELAY_MS}. A change to `"error"` cancels the
|
|
10
|
+
* message, because the error is announced on its own. An `"error"` left over
|
|
11
|
+
* from an earlier request only delays it.
|
|
12
|
+
*
|
|
13
|
+
* Returns an `onActiveFiltersChange` to use in place of the caller's, so only
|
|
14
|
+
* changes the user makes are announced.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useFilterAnnouncement({ isPageCount, loadingState, onActiveFiltersChange, resultNoun, totalCount, }: {
|
|
17
|
+
/** Whether `totalCount` covers only the current page, not the whole set. */
|
|
18
|
+
isPageCount: boolean;
|
|
19
|
+
loadingState: DataTableLoadingState;
|
|
20
|
+
onActiveFiltersChange: (activeFilters: ActiveFilter[]) => void;
|
|
21
|
+
resultNoun: ResultNoun | undefined;
|
|
22
|
+
totalCount: number;
|
|
23
|
+
}): (activeFilters: ActiveFilter[]) => void;
|
|
24
|
+
//# sourceMappingURL=useFilterAnnouncement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterAnnouncement.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/useFilterAnnouncement.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtE,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAE/C;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,UAAU,EACV,UAAU,GACX,EAAE;IACD,4EAA4E;IAC5E,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,qBAAqB,CAAA;IACnC,qBAAqB,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,IAAI,CAAA;IAC9D,UAAU,EAAE,UAAU,GAAG,SAAS,CAAA;IAClC,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,IAAI,CA8B1C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useAnnounce } from '../../utilities/useAnnounce.js';
|
|
2
|
+
import { useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { getResultsCountLabel } from './ResultsCount.js';
|
|
4
|
+
|
|
5
|
+
const FILTER_ANNOUNCEMENT_DELAY_MS = 500;
|
|
6
|
+
/**
|
|
7
|
+
* Announces the results count to screen reader users after each filter
|
|
8
|
+
* change, once the results settle: `loadingState` is not `"loading"`, and
|
|
9
|
+
* neither it nor the count has changed for
|
|
10
|
+
* {@link FILTER_ANNOUNCEMENT_DELAY_MS}. A change to `"error"` cancels the
|
|
11
|
+
* message, because the error is announced on its own. An `"error"` left over
|
|
12
|
+
* from an earlier request only delays it.
|
|
13
|
+
*
|
|
14
|
+
* Returns an `onActiveFiltersChange` to use in place of the caller's, so only
|
|
15
|
+
* changes the user makes are announced.
|
|
16
|
+
*/
|
|
17
|
+
function useFilterAnnouncement({ isPageCount, loadingState, onActiveFiltersChange, resultNoun, totalCount, }) {
|
|
18
|
+
const announce = useAnnounce();
|
|
19
|
+
const isDue = useRef(false);
|
|
20
|
+
const previousLoadingState = useRef(loadingState);
|
|
21
|
+
const [changeCount, setChangeCount] = useState(0);
|
|
22
|
+
const countLabel = getResultsCountLabel(totalCount, resultNoun || true);
|
|
23
|
+
const message = isPageCount ? `${countLabel} on this page` : countLabel;
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const failed = loadingState === "error" && previousLoadingState.current !== "error";
|
|
26
|
+
previousLoadingState.current = loadingState;
|
|
27
|
+
if (!isDue.current)
|
|
28
|
+
return;
|
|
29
|
+
if (failed) {
|
|
30
|
+
isDue.current = false;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (loadingState !== "idle")
|
|
34
|
+
return;
|
|
35
|
+
const timeout = setTimeout(() => {
|
|
36
|
+
isDue.current = false;
|
|
37
|
+
announce(message);
|
|
38
|
+
}, FILTER_ANNOUNCEMENT_DELAY_MS);
|
|
39
|
+
return () => clearTimeout(timeout);
|
|
40
|
+
}, [announce, changeCount, loadingState, message]);
|
|
41
|
+
return (activeFilters) => {
|
|
42
|
+
isDue.current = true;
|
|
43
|
+
setChangeCount((count) => count + 1);
|
|
44
|
+
onActiveFiltersChange(activeFilters);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { FILTER_ANNOUNCEMENT_DELAY_MS, useFilterAnnouncement };
|
|
49
|
+
//# sourceMappingURL=useFilterAnnouncement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilterAnnouncement.js","sources":["../../../src/components/DataTable/useFilterAnnouncement.ts"],"sourcesContent":["import { useAnnounce } from \"@utilities/useAnnounce\"\nimport { useEffect, useRef, useState } from \"react\"\n\nimport type { DataTableLoadingState } from \"./DataTable\"\nimport type { ActiveFilter } from \"./FilterTypes\"\nimport { getResultsCountLabel, type ResultNoun } from \"./ResultsCount\"\n\nexport const FILTER_ANNOUNCEMENT_DELAY_MS = 500\n\n/**\n * Announces the results count to screen reader users after each filter\n * change, once the results settle: `loadingState` is not `\"loading\"`, and\n * neither it nor the count has changed for\n * {@link FILTER_ANNOUNCEMENT_DELAY_MS}. A change to `\"error\"` cancels the\n * message, because the error is announced on its own. An `\"error\"` left over\n * from an earlier request only delays it.\n *\n * Returns an `onActiveFiltersChange` to use in place of the caller's, so only\n * changes the user makes are announced.\n */\nexport function useFilterAnnouncement({\n isPageCount,\n loadingState,\n onActiveFiltersChange,\n resultNoun,\n totalCount,\n}: {\n /** Whether `totalCount` covers only the current page, not the whole set. */\n isPageCount: boolean\n loadingState: DataTableLoadingState\n onActiveFiltersChange: (activeFilters: ActiveFilter[]) => void\n resultNoun: ResultNoun | undefined\n totalCount: number\n}): (activeFilters: ActiveFilter[]) => void {\n const announce = useAnnounce()\n const isDue = useRef(false)\n const previousLoadingState = useRef(loadingState)\n const [changeCount, setChangeCount] = useState(0)\n const countLabel = getResultsCountLabel(totalCount, resultNoun || true)\n const message = isPageCount ? `${countLabel} on this page` : countLabel\n\n useEffect(() => {\n const failed =\n loadingState === \"error\" && previousLoadingState.current !== \"error\"\n previousLoadingState.current = loadingState\n if (!isDue.current) return\n if (failed) {\n isDue.current = false\n return\n }\n if (loadingState !== \"idle\") return\n const timeout = setTimeout(() => {\n isDue.current = false\n announce(message)\n }, FILTER_ANNOUNCEMENT_DELAY_MS)\n return () => clearTimeout(timeout)\n }, [announce, changeCount, loadingState, message])\n\n return (activeFilters) => {\n isDue.current = true\n setChangeCount((count) => count + 1)\n onActiveFiltersChange(activeFilters)\n }\n}\n"],"names":[],"mappings":";;;;AAOO,MAAM,4BAA4B,GAAG;AAE5C;;;;;;;;;;AAUG;AACG,SAAU,qBAAqB,CAAC,EACpC,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,UAAU,EACV,UAAU,GAQX,EAAA;AACC,IAAA,MAAM,QAAQ,GAAG,WAAW,EAAE;AAC9B,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC3B,IAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,YAAY,CAAC;IACjD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAU,EAAE,UAAU,IAAI,IAAI,CAAC;AACvE,IAAA,MAAM,OAAO,GAAG,WAAW,GAAG,CAAA,EAAG,UAAU,CAAA,aAAA,CAAe,GAAG,UAAU;IAEvE,SAAS,CAAC,MAAK;QACb,MAAM,MAAM,GACV,YAAY,KAAK,OAAO,IAAI,oBAAoB,CAAC,OAAO,KAAK,OAAO;AACtE,QAAA,oBAAoB,CAAC,OAAO,GAAG,YAAY;QAC3C,IAAI,CAAC,KAAK,CAAC,OAAO;YAAE;QACpB,IAAI,MAAM,EAAE;AACV,YAAA,KAAK,CAAC,OAAO,GAAG,KAAK;YACrB;QACF;QACA,IAAI,YAAY,KAAK,MAAM;YAAE;AAC7B,QAAA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAK;AAC9B,YAAA,KAAK,CAAC,OAAO,GAAG,KAAK;YACrB,QAAQ,CAAC,OAAO,CAAC;QACnB,CAAC,EAAE,4BAA4B,CAAC;AAChC,QAAA,OAAO,MAAM,YAAY,CAAC,OAAO,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAElD,OAAO,CAAC,aAAa,KAAI;AACvB,QAAA,KAAK,CAAC,OAAO,GAAG,IAAI;QACpB,cAAc,CAAC,CAAC,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC;QACpC,qBAAqB,CAAC,aAAa,CAAC;AACtC,IAAA,CAAC;AACH;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SavedView } from "./savedViews";
|
|
2
|
+
/**
|
|
3
|
+
* Saves a view's new name, trimmed. Callers skip blank and unchanged names,
|
|
4
|
+
* since `view.name` is out of date while a save is pending.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useUpdateSavedViewName(onUpdate?: (savedView: SavedView) => Promise<SavedView> | SavedView): (view: SavedView, name: string) => Promise<void>;
|
|
7
|
+
//# sourceMappingURL=useUpdateSavedViewName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateSavedViewName.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/useUpdateSavedViewName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,IAErD,MAAM,SAAS,EAAE,MAAM,MAAM,mBAG5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saves a view's new name, trimmed. Callers skip blank and unchanged names,
|
|
3
|
+
* since `view.name` is out of date while a save is pending.
|
|
4
|
+
*/
|
|
5
|
+
function useUpdateSavedViewName(onUpdate) {
|
|
6
|
+
return async (view, name) => {
|
|
7
|
+
await onUpdate?.({ ...view, name: name.trim() });
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { useUpdateSavedViewName };
|
|
12
|
+
//# sourceMappingURL=useUpdateSavedViewName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateSavedViewName.js","sources":["../../../src/components/DataTable/useUpdateSavedViewName.ts"],"sourcesContent":["import type { SavedView } from \"./savedViews\"\n\n/**\n * Saves a view's new name, trimmed. Callers skip blank and unchanged names,\n * since `view.name` is out of date while a save is pending.\n */\nexport function useUpdateSavedViewName(\n onUpdate?: (savedView: SavedView) => Promise<SavedView> | SavedView\n) {\n return async (view: SavedView, name: string) => {\n await onUpdate?.({ ...view, name: name.trim() })\n }\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACG,SAAU,sBAAsB,CACpC,QAAmE,EAAA;AAEnE,IAAA,OAAO,OAAO,IAAe,EAAE,IAAY,KAAI;AAC7C,QAAA,MAAM,QAAQ,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;AAClD,IAAA,CAAC;AACH;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ComponentSize } from "../../utilities/buttonLinkShared";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
4
|
-
export type ActionsDropdownIconButtonProps = Omit<
|
|
3
|
+
import { IconButtonBaseProps, TooltipPlacement } from "./IconButton";
|
|
4
|
+
export type ActionsDropdownIconButtonProps = Omit<IconButtonBaseProps, "aria-label" | "icon" | "kind" | "loading" | "size"> & {
|
|
5
5
|
/**
|
|
6
|
-
* Accessible name. Defaults to `"Actions"
|
|
7
|
-
* several actions menus that need
|
|
8
|
-
* Jane Doe"`).
|
|
6
|
+
* Accessible name. Defaults to `"Actions"` when `tooltip` is not set.
|
|
7
|
+
* Override when a page has several actions menus that need
|
|
8
|
+
* distinguishing (e.g. `"Actions for Jane Doe"`).
|
|
9
9
|
*/
|
|
10
10
|
"aria-label"?: string;
|
|
11
11
|
/**
|
|
@@ -38,6 +38,10 @@ export type ActionsDropdownIconButtonProps = Omit<IconButtonProps, "aria-label"
|
|
|
38
38
|
size?: Exclude<ComponentSize, "xs">;
|
|
39
39
|
/** Not supported — no caret, and nothing else in the suffix slot. */
|
|
40
40
|
suffix?: never;
|
|
41
|
+
/** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `"Delete"`, aria-label `"Delete, 3 selected"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */
|
|
42
|
+
tooltip?: string;
|
|
43
|
+
/** Where the tooltip renders relative to the button. Default `"bottom"`. Has no effect without `tooltip`. */
|
|
44
|
+
tooltipPlacement?: TooltipPlacement;
|
|
41
45
|
};
|
|
42
46
|
/**
|
|
43
47
|
* An icon-only dropdown trigger with a vertical-ellipsis glyph and no
|
|
@@ -45,11 +49,11 @@ export type ActionsDropdownIconButtonProps = Omit<IconButtonProps, "aria-label"
|
|
|
45
49
|
*
|
|
46
50
|
* @component
|
|
47
51
|
*/
|
|
48
|
-
export declare const ActionsDropdownIconButton: React.ForwardRefExoticComponent<Omit<
|
|
52
|
+
export declare const ActionsDropdownIconButton: React.ForwardRefExoticComponent<Omit<IconButtonBaseProps, "aria-label" | "size" | "icon" | "kind" | "loading"> & {
|
|
49
53
|
/**
|
|
50
|
-
* Accessible name. Defaults to `"Actions"
|
|
51
|
-
* several actions menus that need
|
|
52
|
-
* Jane Doe"`).
|
|
54
|
+
* Accessible name. Defaults to `"Actions"` when `tooltip` is not set.
|
|
55
|
+
* Override when a page has several actions menus that need
|
|
56
|
+
* distinguishing (e.g. `"Actions for Jane Doe"`).
|
|
53
57
|
*/
|
|
54
58
|
"aria-label"?: string;
|
|
55
59
|
/**
|
|
@@ -82,5 +86,9 @@ export declare const ActionsDropdownIconButton: React.ForwardRefExoticComponent<
|
|
|
82
86
|
size?: Exclude<ComponentSize, "xs">;
|
|
83
87
|
/** Not supported — no caret, and nothing else in the suffix slot. */
|
|
84
88
|
suffix?: never;
|
|
89
|
+
/** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `"Delete"`, aria-label `"Delete, 3 selected"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */
|
|
90
|
+
tooltip?: string;
|
|
91
|
+
/** Where the tooltip renders relative to the button. Default `"bottom"`. Has no effect without `tooltip`. */
|
|
92
|
+
tooltipPlacement?: TooltipPlacement;
|
|
85
93
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
86
94
|
//# sourceMappingURL=ActionsDropdownIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsDropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/ActionsDropdownIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAG3D,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,OAAO,EAAc,
|
|
1
|
+
{"version":3,"file":"ActionsDropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/ActionsDropdownIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAG3D,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,OAAO,EAAc,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEhF,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,mBAAmB,EACnB,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CACpD,GAAG;IACF;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,yEAAyE;IACzE,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAA;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAA;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;IACnC,qEAAqE;IACrE,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,wSAAwS;IACxS,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6GAA6G;IAC7G,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;IAhDpC;;;;OAIG;mBACY,MAAM;IACrB;;;OAGG;gBACS,KAAK;IACjB,yEAAyE;WAClE,KAAK;IACZ;;;OAGG;WACI,OAAO,GAAG,SAAS;IAC1B;;;OAGG;cACO,KAAK;IACf;;;OAGG;aACM,KAAK;IACd;;;;OAIG;WACI,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC;IACnC,qEAAqE;aAC5D,KAAK;IACd,wSAAwS;cAC9R,MAAM;IAChB,6GAA6G;uBAC1F,gBAAgB;2CAiDpC,CAAA"}
|
|
@@ -10,9 +10,12 @@ import { IconButton } from './IconButton.js';
|
|
|
10
10
|
*
|
|
11
11
|
* @component
|
|
12
12
|
*/
|
|
13
|
-
const ActionsDropdownIconButton = forwardRef(({ "aria-label": ariaLabel
|
|
13
|
+
const ActionsDropdownIconButton = forwardRef(({ "aria-label": ariaLabel, className, kind = "ghost", tooltip, ...restProps }, ref) => {
|
|
14
14
|
const contextProps = useContext(DropdownTriggerContext);
|
|
15
|
-
|
|
15
|
+
const nameProps = tooltip
|
|
16
|
+
? { "aria-label": ariaLabel, tooltip }
|
|
17
|
+
: { "aria-label": ariaLabel ?? "Actions" };
|
|
18
|
+
return (React.createElement(IconButton, { ref: ref, ...restProps, ...contextProps, ...nameProps, className: classNames(className, "tds-btn--actions-dropdown"), fullWidth: false, icon: React.createElement(Icon, { className: "actions-icon", symbol: "general#three-dots", "aria-hidden": true }), kind: kind, loading: undefined, prefix: undefined, suffix: undefined }));
|
|
16
19
|
});
|
|
17
20
|
ActionsDropdownIconButton.displayName = "ActionsDropdownIconButton";
|
|
18
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsDropdownIconButton.js","sources":["../../../src/components/button/ActionsDropdownIconButton.tsx"],"sourcesContent":["import { DropdownTriggerContext } from \"@components/dropdown/DropdownTriggerContext\"\nimport { ComponentSize } from \"@utilities/buttonLinkShared\"\nimport Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, useContext } from \"react\"\n\nimport { IconButton,
|
|
1
|
+
{"version":3,"file":"ActionsDropdownIconButton.js","sources":["../../../src/components/button/ActionsDropdownIconButton.tsx"],"sourcesContent":["import { DropdownTriggerContext } from \"@components/dropdown/DropdownTriggerContext\"\nimport { ComponentSize } from \"@utilities/buttonLinkShared\"\nimport Icon from \"@utilities/Icon\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, useContext } from \"react\"\n\nimport { IconButton, IconButtonBaseProps, TooltipPlacement } from \"./IconButton\"\n\nexport type ActionsDropdownIconButtonProps = Omit<\n IconButtonBaseProps,\n \"aria-label\" | \"icon\" | \"kind\" | \"loading\" | \"size\"\n> & {\n /**\n * Accessible name. Defaults to `\"Actions\"` when `tooltip` is not set.\n * Override when a page has several actions menus that need\n * distinguishing (e.g. `\"Actions for Jane Doe\"`).\n */\n \"aria-label\"?: string\n /**\n * Not supported — an actions trigger is a fixed-size icon button and\n * shouldn't stretch to fill a container. Always rendered as `false`.\n */\n fullWidth?: never\n /** Not supported — the vertical ellipsis is the component's identity. */\n icon?: never\n /**\n * Only `\"ghost\"` and `\"neutral\"` are supported treatments for an actions\n * trigger. Defaults to `\"ghost\"`.\n */\n kind?: \"ghost\" | \"neutral\"\n /**\n * Not supported — `.tds-btn--loading` hides every non-spinner child, so a\n * loading actions button would render a bare spinner with no glyph.\n */\n loading?: never\n /**\n * Not supported — same reasoning as `suffix`: total control over the\n * button's contents, and no slot besides the fixed ellipsis icon.\n */\n prefix?: never\n /**\n * `xs` is excluded — at 20px effective height it falls below the WCAG 2.2\n * AA 24×24 minimum target size, and an icon-only button has no text\n * content to widen it past the minimum.\n */\n size?: Exclude<ComponentSize, \"xs\">\n /** Not supported — no caret, and nothing else in the suffix slot. */\n suffix?: never\n /** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `\"Delete\"`, aria-label `\"Delete, 3 selected\"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */\n tooltip?: string\n /** Where the tooltip renders relative to the button. Default `\"bottom\"`. Has no effect without `tooltip`. */\n tooltipPlacement?: TooltipPlacement\n}\n\n/**\n * An icon-only dropdown trigger with a vertical-ellipsis glyph and no\n * caret, for action menus where a caret is visually redundant.\n *\n * @component\n */\nexport const ActionsDropdownIconButton = forwardRef<\n HTMLButtonElement,\n ActionsDropdownIconButtonProps\n>(\n (\n {\n \"aria-label\": ariaLabel,\n className,\n kind = \"ghost\",\n tooltip,\n ...restProps\n }: ActionsDropdownIconButtonProps,\n ref\n ) => {\n const contextProps = useContext(DropdownTriggerContext)\n const nameProps = tooltip\n ? { \"aria-label\": ariaLabel, tooltip }\n : { \"aria-label\": ariaLabel ?? \"Actions\" }\n return (\n <IconButton\n ref={ref}\n {...restProps}\n {...contextProps}\n {...nameProps}\n className={classNames(className, \"tds-btn--actions-dropdown\")}\n fullWidth={false}\n icon={\n <Icon\n className=\"actions-icon\"\n symbol=\"general#three-dots\"\n aria-hidden\n />\n }\n kind={kind}\n loading={undefined}\n prefix={undefined}\n suffix={undefined}\n />\n )\n }\n)\n\nActionsDropdownIconButton.displayName = \"ActionsDropdownIconButton\"\n"],"names":[],"mappings":";;;;;;AAsDA;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,UAAU,CAIjD,CACE,EACE,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,IAAI,GAAG,OAAO,EACd,OAAO,EACP,GAAG,SAAS,EACmB,EACjC,GAAG,KACD;AACF,IAAA,MAAM,YAAY,GAAG,UAAU,CAAC,sBAAsB,CAAC;IACvD,MAAM,SAAS,GAAG;AAChB,UAAE,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO;UAClC,EAAE,YAAY,EAAE,SAAS,IAAI,SAAS,EAAE;IAC5C,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,EAAA,GACT,YAAY,EAAA,GACZ,SAAS,EACb,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,2BAA2B,CAAC,EAC7D,SAAS,EAAE,KAAK,EAChB,IAAI,EACF,oBAAC,IAAI,EAAA,EACH,SAAS,EAAC,cAAc,EACxB,MAAM,EAAC,oBAAoB,EAAA,aAAA,EAAA,IAAA,EAAA,CAE3B,EAEJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EAAA,CACjB;AAEN,CAAC;AAGH,yBAAyB,CAAC,WAAW,GAAG,2BAA2B;;;;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DropdownButtonProps } from "./DropdownButton";
|
|
3
|
+
import { IconButtonProps } from "./IconButton";
|
|
3
4
|
/**
|
|
4
5
|
* An icon-only button that toggles a dropdown menu or popover. Appends a
|
|
5
6
|
* caret suffix to the icon and wires up `aria-controls` and `aria-expanded`
|
|
6
|
-
* to the controlled element. Requires an `aria-label` for
|
|
7
|
+
* to the controlled element. Requires an `aria-label` or `tooltip` for
|
|
8
|
+
* accessibility.
|
|
7
9
|
*
|
|
8
10
|
* @component
|
|
9
11
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-dropdown-icon-button--docs | Storybook Documentation}
|
|
10
12
|
* @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
|
|
11
13
|
*/
|
|
12
|
-
export declare const DropdownIconButton: React.ForwardRefExoticComponent<
|
|
13
|
-
"aria-label": string;
|
|
14
|
-
icon: React.ReactNode;
|
|
15
|
-
} & DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export declare const DropdownIconButton: React.ForwardRefExoticComponent<(IconButtonProps & DropdownButtonProps) & React.RefAttributes<HTMLButtonElement>>;
|
|
16
15
|
//# sourceMappingURL=DropdownIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,mBAAmB,EAAiB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"DropdownIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/DropdownIconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,mBAAmB,EAAiB,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAA;AAE1D;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,mHAa7B,CAAA"}
|
|
@@ -6,7 +6,8 @@ import { IconButton } from './IconButton.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* An icon-only button that toggles a dropdown menu or popover. Appends a
|
|
8
8
|
* caret suffix to the icon and wires up `aria-controls` and `aria-expanded`
|
|
9
|
-
* to the controlled element. Requires an `aria-label` for
|
|
9
|
+
* to the controlled element. Requires an `aria-label` or `tooltip` for
|
|
10
|
+
* accessibility.
|
|
10
11
|
*
|
|
11
12
|
* @component
|
|
12
13
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-dropdown-icon-button--docs | Storybook Documentation}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownIconButton.js","sources":["../../../src/components/button/DropdownIconButton.tsx"],"sourcesContent":["import { DropdownTriggerContext } from \"@components/dropdown/DropdownTriggerContext\"\nimport React, { forwardRef, useContext } from \"react\"\n\nimport { DropdownButtonProps, dropdownProps } from \"./DropdownButton\"\nimport { IconButton, IconButtonProps } from \"./IconButton\"\n\n/**\n * An icon-only button that toggles a dropdown menu or popover. Appends a\n * caret suffix to the icon and wires up `aria-controls` and `aria-expanded`\n * to the controlled element. Requires an `aria-label` for accessibility.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-dropdown-icon-button--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const DropdownIconButton = forwardRef<\n HTMLButtonElement,\n IconButtonProps & DropdownButtonProps\n>((props, ref) => {\n const contextProps = useContext(DropdownTriggerContext)\n return (\n <IconButton\n ref={ref}\n {...props}\n {...contextProps}\n {...dropdownProps(props)}\n />\n )\n})\n\nDropdownIconButton.displayName = \"DropdownIconButton\"\n"],"names":[],"mappings":";;;;;AAMA
|
|
1
|
+
{"version":3,"file":"DropdownIconButton.js","sources":["../../../src/components/button/DropdownIconButton.tsx"],"sourcesContent":["import { DropdownTriggerContext } from \"@components/dropdown/DropdownTriggerContext\"\nimport React, { forwardRef, useContext } from \"react\"\n\nimport { DropdownButtonProps, dropdownProps } from \"./DropdownButton\"\nimport { IconButton, IconButtonProps } from \"./IconButton\"\n\n/**\n * An icon-only button that toggles a dropdown menu or popover. Appends a\n * caret suffix to the icon and wires up `aria-controls` and `aria-expanded`\n * to the controlled element. Requires an `aria-label` or `tooltip` for\n * accessibility.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-dropdown-icon-button--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const DropdownIconButton = forwardRef<\n HTMLButtonElement,\n IconButtonProps & DropdownButtonProps\n>((props, ref) => {\n const contextProps = useContext(DropdownTriggerContext)\n return (\n <IconButton\n ref={ref}\n {...props}\n {...contextProps}\n {...dropdownProps(props)}\n />\n )\n})\n\nDropdownIconButton.displayName = \"DropdownIconButton\"\n"],"names":[],"mappings":";;;;;AAMA;;;;;;;;;AASG;AACI,MAAM,kBAAkB,GAAG,UAAU,CAG1C,CAAC,KAAK,EAAE,GAAG,KAAI;AACf,IAAA,MAAM,YAAY,GAAG,UAAU,CAAC,sBAAsB,CAAC;AACvD,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,IACT,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EAAA,GACL,YAAY,KACZ,aAAa,CAAC,KAAK,CAAC,EAAA,CACxB;AAEN,CAAC;AAED,kBAAkB,CAAC,WAAW,GAAG,oBAAoB;;;;"}
|
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
import "./btn.css";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { type Placement } from "react-aria/useOverlayPosition";
|
|
3
4
|
import { BaseButtonElementProps } from "./BaseButton";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/** Where a tooltip renders relative to its button. */
|
|
6
|
+
export type TooltipPlacement = Placement;
|
|
7
|
+
type IconButtonSharedProps = Omit<BaseButtonElementProps, "label"> & {
|
|
7
8
|
/** The icon to display in the button. Set via story args for non-primitive values. */
|
|
8
9
|
icon: React.ReactNode;
|
|
9
10
|
};
|
|
11
|
+
export type IconButtonBaseProps = IconButtonSharedProps & {
|
|
12
|
+
/** Accessible label. Required for icon-only buttons to provide context about the button's purpose. */
|
|
13
|
+
"aria-label": string;
|
|
14
|
+
};
|
|
15
|
+
type IconButtonTooltipProps = {
|
|
16
|
+
/** Accessible label. Required for icon-only buttons to provide context about the button's purpose. Not required when `tooltip` is set. When both are set, this is the name and the tooltip is visual only. */
|
|
17
|
+
"aria-label"?: string;
|
|
18
|
+
/** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `"Delete"`, aria-label `"Delete, 3 selected"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */
|
|
19
|
+
tooltip: string;
|
|
20
|
+
};
|
|
21
|
+
type IconButtonAriaLabelProps = {
|
|
22
|
+
/** Accessible label. Required for icon-only buttons to provide context about the button's purpose. Not required when `tooltip` is set. When both are set, this is the name and the tooltip is visual only. */
|
|
23
|
+
"aria-label": string;
|
|
24
|
+
/** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `"Delete"`, aria-label `"Delete, 3 selected"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* An icon-only button needs a name: `aria-label`, `tooltip`, or both.
|
|
29
|
+
* `IconButtonAriaLabelProps` is declared last so that a missing name
|
|
30
|
+
* reports "aria-label is missing", not "tooltip is missing".
|
|
31
|
+
*/
|
|
32
|
+
type IconButtonNameProps = IconButtonAriaLabelProps | IconButtonTooltipProps;
|
|
33
|
+
export type IconButtonProps = IconButtonSharedProps & IconButtonNameProps & {
|
|
34
|
+
/** Where the tooltip renders relative to the button. Default `"bottom"`. Has no effect without `tooltip`. */
|
|
35
|
+
tooltipPlacement?: TooltipPlacement;
|
|
36
|
+
};
|
|
10
37
|
/**
|
|
11
38
|
* An icon-only button component that renders as a button element.
|
|
12
|
-
* Requires an icon and aria-label for accessibility.
|
|
39
|
+
* Requires an icon, and an aria-label or tooltip for accessibility.
|
|
13
40
|
*
|
|
14
41
|
* @component
|
|
15
42
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-icon-button--docs | Storybook Documentation}
|
|
16
43
|
* @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
|
|
17
44
|
*/
|
|
18
|
-
export declare const IconButton: React.ForwardRefExoticComponent<
|
|
19
|
-
|
|
20
|
-
"aria-label": string;
|
|
21
|
-
/** The icon to display in the button. Set via story args for non-primitive values. */
|
|
22
|
-
icon: React.ReactNode;
|
|
23
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
export {};
|
|
24
47
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;AAIlB,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAE9D,OAAO,EAAc,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAEjE,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAA;AAExC,KAAK,qBAAqB,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,GAAG;IACnE,sFAAsF;IACtF,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,GAAG;IACxD,sGAAsG;IACtG,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,KAAK,sBAAsB,GAAG;IAC5B,8MAA8M;IAC9M,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,wSAAwS;IACxS,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,wBAAwB,GAAG;IAC9B,8MAA8M;IAC9M,YAAY,EAAE,MAAM,CAAA;IACpB,wSAAwS;IACxS,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;GAIG;AACH,KAAK,mBAAmB,GAAG,wBAAwB,GAAG,sBAAsB,CAAA;AAE5E,MAAM,MAAM,eAAe,GAAG,qBAAqB,GACjD,mBAAmB,GAAG;IACpB,6GAA6G;IAC7G,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC,CAAA;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,2FA0CtB,CAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
import { Tooltip } from '../internal/tooltip/Tooltip.js';
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import React, { forwardRef } from 'react';
|
|
3
4
|
import { BaseButton } from './BaseButton.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* An icon-only button component that renders as a button element.
|
|
7
|
-
* Requires an icon and aria-label for accessibility.
|
|
8
|
+
* Requires an icon, and an aria-label or tooltip for accessibility.
|
|
8
9
|
*
|
|
9
10
|
* @component
|
|
10
11
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-icon-button--docs | Storybook Documentation}
|
|
11
12
|
* @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}
|
|
12
13
|
*/
|
|
13
|
-
const IconButton = forwardRef(({ className, icon, ...restProps }, ref) => {
|
|
14
|
+
const IconButton = forwardRef(({ className, icon, tooltip, tooltipPlacement = "bottom", ...restProps }, ref) => {
|
|
14
15
|
const iconOnlyClassName = classNames("tds-btn--icononly", className);
|
|
16
|
+
if (tooltip) {
|
|
17
|
+
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...buttonProps } = restProps;
|
|
18
|
+
return (React.createElement(Tooltip, { content: tooltip, placement: tooltipPlacement, visualOnly: true },
|
|
19
|
+
React.createElement(BaseButton, { ...buttonProps, "aria-label": ariaLabel || tooltip, label: icon, className: iconOnlyClassName, ref: ref })));
|
|
20
|
+
}
|
|
15
21
|
return (React.createElement(BaseButton, { ...restProps, label: icon, className: iconOnlyClassName, ref: ref }));
|
|
16
22
|
});
|
|
17
23
|
IconButton.displayName = "IconButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../src/components/button/IconButton.tsx"],"sourcesContent":["import \"./btn.css\"\n\nimport classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\n\nimport { BaseButton, BaseButtonElementProps } from \"./BaseButton\"\n\nexport type
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../src/components/button/IconButton.tsx"],"sourcesContent":["import \"./btn.css\"\n\nimport { Tooltip } from \"@components/internal/tooltip\"\nimport classNames from \"classnames\"\nimport React, { forwardRef } from \"react\"\nimport { type Placement } from \"react-aria/useOverlayPosition\"\n\nimport { BaseButton, BaseButtonElementProps } from \"./BaseButton\"\n\n/** Where a tooltip renders relative to its button. */\nexport type TooltipPlacement = Placement\n\ntype IconButtonSharedProps = Omit<BaseButtonElementProps, \"label\"> & {\n /** The icon to display in the button. Set via story args for non-primitive values. */\n icon: React.ReactNode\n}\n\nexport type IconButtonBaseProps = IconButtonSharedProps & {\n /** Accessible label. Required for icon-only buttons to provide context about the button's purpose. */\n \"aria-label\": string\n}\n\ntype IconButtonTooltipProps = {\n /** Accessible label. Required for icon-only buttons to provide context about the button's purpose. Not required when `tooltip` is set. When both are set, this is the name and the tooltip is visual only. */\n \"aria-label\"?: string\n /** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `\"Delete\"`, aria-label `\"Delete, 3 selected\"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */\n tooltip: string\n}\n\ntype IconButtonAriaLabelProps = {\n /** Accessible label. Required for icon-only buttons to provide context about the button's purpose. Not required when `tooltip` is set. When both are set, this is the name and the tooltip is visual only. */\n \"aria-label\": string\n /** Text shown on hover and focus. Without `aria-label`, it is also used as the `aria-label`. With `aria-label`, start the `aria-label` with the same text (e.g. tooltip `\"Delete\"`, aria-label `\"Delete, 3 selected\"`). The tooltip itself is hidden from screen readers. Ignores `aria-labelledby`. */\n tooltip?: string\n}\n\n/**\n * An icon-only button needs a name: `aria-label`, `tooltip`, or both.\n * `IconButtonAriaLabelProps` is declared last so that a missing name\n * reports \"aria-label is missing\", not \"tooltip is missing\".\n */\ntype IconButtonNameProps = IconButtonAriaLabelProps | IconButtonTooltipProps\n\nexport type IconButtonProps = IconButtonSharedProps &\n IconButtonNameProps & {\n /** Where the tooltip renders relative to the button. Default `\"bottom\"`. Has no effect without `tooltip`. */\n tooltipPlacement?: TooltipPlacement\n }\n\n/**\n * An icon-only button component that renders as a button element.\n * Requires an icon, and an aria-label or tooltip for accessibility.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/buttons-icon-button--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n className,\n icon,\n tooltip,\n tooltipPlacement = \"bottom\",\n ...restProps\n }: IconButtonProps,\n ref\n ) => {\n const iconOnlyClassName = classNames(\"tds-btn--icononly\", className)\n\n if (tooltip) {\n const {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...buttonProps\n } = restProps\n\n return (\n <Tooltip content={tooltip} placement={tooltipPlacement} visualOnly>\n <BaseButton\n {...buttonProps}\n aria-label={ariaLabel || tooltip}\n label={icon}\n className={iconOnlyClassName}\n ref={ref}\n />\n </Tooltip>\n )\n }\n\n return (\n <BaseButton\n {...restProps}\n label={icon}\n className={iconOnlyClassName}\n ref={ref}\n />\n )\n }\n)\n\nIconButton.displayName = \"IconButton\"\n"],"names":[],"mappings":";;;;;AAiDA;;;;;;;AAOG;AACI,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,IAAI,EACJ,OAAO,EACP,gBAAgB,GAAG,QAAQ,EAC3B,GAAG,SAAS,EACI,EAClB,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAEpE,IAAI,OAAO,EAAE;AACX,QAAA,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,GAAG,WAAW,EACf,GAAG,SAAS;AAEb,QAAA,QACE,KAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAA,IAAA,EAAA;YAChE,KAAA,CAAA,aAAA,CAAC,UAAU,OACL,WAAW,EAAA,YAAA,EACH,SAAS,IAAI,OAAO,EAChC,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,CACR,CACM;IAEd;AAEA,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,UAAU,OACL,SAAS,EACb,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,iBAAiB,EAC5B,GAAG,EAAE,GAAG,EAAA,CACR;AAEN,CAAC;AAGH,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { IconButtonBaseProps } from "./IconButton";
|
|
3
3
|
import { ToggleButtonProps } from "./ToggleButton";
|
|
4
4
|
/**
|
|
5
5
|
* An icon-only button that stays either "on" or "off" after each click.
|
|
@@ -13,5 +13,5 @@ import { ToggleButtonProps } from "./ToggleButton";
|
|
|
13
13
|
* @component
|
|
14
14
|
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/unstable-toggle-icon-button--docs | Storybook Documentation}
|
|
15
15
|
*/
|
|
16
|
-
export declare const ToggleIconButton: React.ForwardRefExoticComponent<(Omit<
|
|
16
|
+
export declare const ToggleIconButton: React.ForwardRefExoticComponent<(Omit<IconButtonBaseProps, "onChange"> & ToggleButtonProps) & React.RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
//# sourceMappingURL=ToggleIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/ToggleIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAc,
|
|
1
|
+
{"version":3,"file":"ToggleIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/ToggleIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAc,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EACL,iBAAiB,EAGlB,MAAM,gBAAgB,CAAA;AAEvB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,uIAkC5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleIconButton.js","sources":["../../../src/components/button/ToggleIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\n\nimport { IconButton,
|
|
1
|
+
{"version":3,"file":"ToggleIconButton.js","sources":["../../../src/components/button/ToggleIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\n\nimport { IconButton, IconButtonBaseProps } from \"./IconButton\"\nimport {\n ToggleButtonProps,\n toggleButtonProps,\n usePressedState,\n} from \"./ToggleButton\"\n\n/**\n * An icon-only button that stays either \"on\" or \"off\" after each click.\n * Maps `pressed` to the native `aria-pressed` attribute, always present\n * since a toggle button must announce that state. Manages its own pressed\n * state, starting from `false`, when `pressed` is omitted — pass\n * `defaultPressed` and/or `onChange` to seed or observe that\n * uncontrolled state. Carries no default `kind` or CSS; `kind`/`className`\n * stay exactly as caller-controlled as they are on plain `IconButton`.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/unstable-toggle-icon-button--docs | Storybook Documentation}\n */\nexport const ToggleIconButton = forwardRef<\n HTMLButtonElement,\n Omit<IconButtonBaseProps, \"onChange\"> & ToggleButtonProps\n>(\n (\n {\n defaultPressed,\n onClick,\n onChange,\n pressed,\n ...restProps\n }: Omit<IconButtonBaseProps, \"onChange\"> & ToggleButtonProps,\n ref\n ) => {\n const [currentPressed, togglePressed] = usePressedState({\n defaultPressed,\n onChange,\n pressed,\n })\n\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (event) => {\n togglePressed()\n onClick?.(event)\n }\n\n return (\n <IconButton\n ref={ref}\n {...restProps}\n onClick={handleClick}\n {...toggleButtonProps({ pressed: currentPressed })}\n />\n )\n }\n)\n\nToggleIconButton.displayName = \"ToggleIconButton\"\n"],"names":["React"],"mappings":";;;;AASA;;;;;;;;;;;AAWG;MACU,gBAAgB,GAAG,UAAU,CAIxC,CACE,EACE,cAAc,EACd,OAAO,EACP,QAAQ,EACR,OAAO,EACP,GAAG,SAAS,EAC8C,EAC5D,GAAG,KACD;AACF,IAAA,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,GAAG,eAAe,CAAC;QACtD,cAAc;QACd,QAAQ;QACR,OAAO;AACR,KAAA,CAAC;AAEF,IAAA,MAAM,WAAW,GAA+C,CAAC,KAAK,KAAI;AACxE,QAAA,aAAa,EAAE;AACf,QAAA,OAAO,GAAG,KAAK,CAAC;AAClB,IAAA,CAAC;IAED,QACEA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG,EAAA,GACJ,SAAS,EACb,OAAO,EAAE,WAAW,EAAA,GAChB,iBAAiB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAA,CAClD;AAEN,CAAC;AAGH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -7,6 +7,7 @@ export type { DropdownButtonProps } from "./DropdownButton";
|
|
|
7
7
|
export { DropdownButton } from "./DropdownButton";
|
|
8
8
|
export { DropdownIconButton } from "./DropdownIconButton";
|
|
9
9
|
export type { IconButtonProps } from "./IconButton";
|
|
10
|
+
export type { TooltipPlacement } from "./IconButton";
|
|
10
11
|
export { IconButton } from "./IconButton";
|
|
11
12
|
export type { LoadingButtonProps } from "./LoadingButton";
|
|
12
13
|
export { LoadingButton } from "./LoadingButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;AAElB,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,YAAY,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAA;AAElB,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,YAAY,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAA"}
|
|
@@ -8,6 +8,12 @@ export type ComboBoxSize = "md" | "lg";
|
|
|
8
8
|
export type ComboBoxLoadingState = "error" | "filtering" | "idle" | "loading" | "loadingMore" | "sorting";
|
|
9
9
|
type ComboBoxChildren<T extends object> = NonNullable<AriaListBoxProps<T>["children"]>;
|
|
10
10
|
export interface ComboBoxProps<T extends object = object> {
|
|
11
|
+
/**
|
|
12
|
+
* If `true`, keeps typed text that does not match an option. Turn it on when
|
|
13
|
+
* ComboBox is a standalone search and the suggestions are shortcuts. Leave it
|
|
14
|
+
* off in forms, where the value needs to match one of the options.
|
|
15
|
+
*/
|
|
16
|
+
allowsCustomValue?: boolean;
|
|
11
17
|
/** The contents of the listbox. */
|
|
12
18
|
children: ComboBoxChildren<T>;
|
|
13
19
|
/** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/combo-box/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,aAAa,CAAA;AAKpB,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AACzD,OAAO,EAIL,KAAK,aAAa,IAAI,iBAAiB,EAGvC,KAAK,GAAG,EAIR,KAAK,gBAAgB,EAErB,KAAK,YAAY,IAAI,gBAAgB,EAErC,KAAK,mBAAmB,EAGzB,MAAM,gCAAgC,CAAA;AAIvC,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAA;AAEtC,MAAM,MAAM,oBAAoB,GAC5B,OAAO,GACP,WAAW,GACX,MAAM,GACN,SAAS,GACT,aAAa,GACb,SAAS,CAAA;AAEb,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,WAAW,CACnD,gBAAgB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAChC,CAAA;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACtD,mCAAmC;IACnC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC7B,gGAAgG;IAChG,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mFAAmF;IACnF,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAA;IAC3D,qGAAqG;IACrG,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gDAAgD;IACh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