@sps-woodland/core 8.56.1 → 8.56.3

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.
Files changed (289) hide show
  1. package/lib/action-bar/action-bar/ActionBar.js +44 -59
  2. package/lib/action-bar/action-bar/ActionBar.ve.js +4 -11
  3. package/lib/action-bar/action-bar-additional-content/ActionBarAdditionalContent.js +14 -22
  4. package/lib/action-bar/index.js +54 -74
  5. package/lib/action-bar/index.umd.cjs +1 -1
  6. package/lib/action-bar/style.css +2 -1
  7. package/lib/add-to-list/add-to-list/AddToList.css.d.ts.map +1 -1
  8. package/lib/add-to-list/add-to-list/AddToList.d.ts.map +1 -1
  9. package/lib/add-to-list/add-to-list/AddToList.js +220 -295
  10. package/lib/add-to-list/add-to-list/AddToList.ve.js +79 -24
  11. package/lib/add-to-list/add-to-list/ItemsList.d.ts.map +1 -1
  12. package/lib/add-to-list/add-to-list/ItemsList.js +42 -66
  13. package/lib/add-to-list/add-to-list/ListItem.js +24 -50
  14. package/lib/add-to-list/index.js +393 -444
  15. package/lib/add-to-list/index.umd.cjs +1 -1
  16. package/lib/add-to-list/style.css +2 -1
  17. package/lib/buttons/button/Button.css.d.ts.map +1 -1
  18. package/lib/buttons/button/Button.js +95 -121
  19. package/lib/buttons/button/Button.ve.js +150 -9
  20. package/lib/buttons/index.js +281 -171
  21. package/lib/buttons/index.umd.cjs +1 -1
  22. package/lib/buttons/style.css +2 -1
  23. package/lib/cards/card/Card.css.d.ts.map +1 -1
  24. package/lib/cards/card/Card.js +19 -27
  25. package/lib/cards/card/Card.ve.js +4 -4
  26. package/lib/cards/card-footer/CardFooter.js +12 -13
  27. package/lib/cards/card-footer/CardFooter.ve.js +4 -4
  28. package/lib/cards/card-header/CardHeader.js +12 -13
  29. package/lib/cards/card-header/CardHeader.ve.js +4 -4
  30. package/lib/cards/card-title/CardTitle.js +11 -12
  31. package/lib/cards/card-title/CardTitle.ve.js +4 -4
  32. package/lib/cards/index.js +52 -52
  33. package/lib/cards/index.umd.cjs +1 -1
  34. package/lib/cards/style.css +2 -1
  35. package/lib/column-manager/column-manager/ColumnManager.d.ts.map +1 -1
  36. package/lib/column-manager/column-manager/ColumnManager.js +95 -112
  37. package/lib/column-manager/column-manager/useColumnManager.js +59 -48
  38. package/lib/column-manager/index.js +2 -5
  39. package/lib/components/icon/Icon.ve.js +15 -5
  40. package/lib/components/icon/icons/sprite.svg.js +4 -4
  41. package/lib/content-row/content-row/ContentRow.js +146 -173
  42. package/lib/content-row/content-row/ContentRow.ve.js +105 -18
  43. package/lib/content-row/content-row-col/ContentRowCol.js +37 -48
  44. package/lib/content-row/content-row-col/ContentRowCol.ve.js +49 -6
  45. package/lib/content-row/content-row-expansion/ContentRowExpansion.js +16 -24
  46. package/lib/content-row/index.js +407 -318
  47. package/lib/content-row/index.umd.cjs +1 -1
  48. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +24 -39
  49. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +13 -5
  50. package/lib/content-row/style.css +2 -1
  51. package/lib/content-tiles/content-tile/ContentTile.css.d.ts.map +1 -1
  52. package/lib/content-tiles/content-tile/ContentTile.js +71 -60
  53. package/lib/content-tiles/content-tile/ContentTile.ve.js +36 -14
  54. package/lib/content-tiles/content-tile-list/ContentTileList.js +12 -13
  55. package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +4 -5
  56. package/lib/content-tiles/index.js +156 -118
  57. package/lib/content-tiles/index.umd.cjs +1 -1
  58. package/lib/content-tiles/style.css +2 -1
  59. package/lib/core.css +2 -1
  60. package/lib/dropdowns/dropdown/Dropdown.css.d.ts.map +1 -1
  61. package/lib/dropdowns/dropdown/Dropdown.js +56 -68
  62. package/lib/dropdowns/dropdown/Dropdown.ve.js +37 -8
  63. package/lib/dropdowns/index.js +171 -171
  64. package/lib/dropdowns/index.umd.cjs +1 -1
  65. package/lib/dropdowns/option-list/Option.css.d.ts.map +1 -1
  66. package/lib/dropdowns/option-list/Option.js +14 -18
  67. package/lib/dropdowns/option-list/Option.ve.js +4 -5
  68. package/lib/dropdowns/option-list/OptionList.js +28 -44
  69. package/lib/dropdowns/option-list/OptionList.ve.js +4 -5
  70. package/lib/dropdowns/style.css +2 -1
  71. package/lib/editable-table/EditableTable.js +68 -85
  72. package/lib/editable-table/index.js +1 -4
  73. package/lib/feedback-block/FeedbackBlock.js +40 -35
  74. package/lib/feedback-block/FeedbackBlock.ve.js +56 -7
  75. package/lib/feedback-block/index.js +132 -85
  76. package/lib/feedback-block/index.umd.cjs +1 -1
  77. package/lib/feedback-block/style.css +2 -1
  78. package/lib/file-upload/file-upload/FileUpload.js +164 -202
  79. package/lib/file-upload/file-upload/FileUpload.ve.js +84 -18
  80. package/lib/file-upload/file-upload/mime-type.enum.js +106 -106
  81. package/lib/file-upload/index.js +390 -353
  82. package/lib/file-upload/index.umd.cjs +1 -1
  83. package/lib/file-upload/style.css +2 -1
  84. package/lib/filter-tiles/filter-tile/FilterTile.css.d.ts.map +1 -1
  85. package/lib/filter-tiles/filter-tile/FilterTile.d.ts.map +1 -1
  86. package/lib/filter-tiles/filter-tile/FilterTile.js +41 -33
  87. package/lib/filter-tiles/filter-tile/FilterTile.ve.js +51 -9
  88. package/lib/filter-tiles/filter-tile-set/FilterTileSet.js +12 -15
  89. package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +4 -4
  90. package/lib/filter-tiles/index.js +142 -94
  91. package/lib/filter-tiles/index.umd.cjs +1 -1
  92. package/lib/filter-tiles/style.css +2 -1
  93. package/lib/focused-task/focused-task/FocusedTask.js +52 -74
  94. package/lib/focused-task/focused-task/FocusedTask.ve.js +13 -12
  95. package/lib/focused-task/focused-task/useFocusedTask.js +20 -18
  96. package/lib/focused-task/focused-task-actions/FocusedTaskActions.js +12 -13
  97. package/lib/focused-task/index.js +127 -144
  98. package/lib/focused-task/index.umd.cjs +1 -1
  99. package/lib/focused-task/style.css +2 -1
  100. package/lib/growler/Growler.js +78 -90
  101. package/lib/growler/Growler.ve.js +23 -12
  102. package/lib/growler/GrowlerListProvider.js +38 -39
  103. package/lib/growler/Sonner.ve.js +17 -12
  104. package/lib/growler/index.js +249 -274
  105. package/lib/growler/index.umd.cjs +1 -1
  106. package/lib/growler/sonner.js +73 -102
  107. package/lib/growler/style.css +2 -1
  108. package/lib/index.js +520 -501
  109. package/lib/index.umd.cjs +4 -4
  110. package/lib/insight-card/InsightCard.js +90 -84
  111. package/lib/insight-card/InsightCard.ve.js +148 -15
  112. package/lib/insight-card/InsightCardSet.js +12 -12
  113. package/lib/insight-card/index.js +269 -141
  114. package/lib/insight-card/index.umd.cjs +1 -1
  115. package/lib/insight-card/style.css +2 -1
  116. package/lib/key-value-set/index.js +97 -87
  117. package/lib/key-value-set/index.umd.cjs +1 -1
  118. package/lib/key-value-set/key-value-set/KeyValueSet.js +17 -21
  119. package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +10 -5
  120. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.js +25 -21
  121. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +13 -6
  122. package/lib/key-value-set/style.css +2 -1
  123. package/lib/list-bar/advanced-search/AdvancedSearch.js +51 -54
  124. package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +30 -8
  125. package/lib/list-bar/index.js +305 -301
  126. package/lib/list-bar/index.umd.cjs +1 -1
  127. package/lib/list-bar/list-bar/InputGroupWrapper.js +10 -19
  128. package/lib/list-bar/list-bar/ListBar.js +105 -121
  129. package/lib/list-bar/list-bar/ListBar.ve.js +13 -17
  130. package/lib/list-bar/list-bar/ListBarSearch.js +20 -21
  131. package/lib/list-bar/list-bar/ListBarSearchInfo.js +8 -12
  132. package/lib/list-bar/list-bar/ListBarSortBy.js +28 -38
  133. package/lib/list-bar/search-results-bar/SearchResultsBar.js +38 -28
  134. package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +4 -11
  135. package/lib/list-bar/style.css +2 -1
  136. package/lib/matrix/index.js +79 -87
  137. package/lib/matrix/index.umd.cjs +1 -1
  138. package/lib/matrix/matrix/Matrix.js +18 -26
  139. package/lib/matrix/matrix/Matrix.ve.js +4 -7
  140. package/lib/matrix/matrix-body/MatrixBody.js +10 -13
  141. package/lib/matrix/matrix-cell/MatrixCell.js +23 -18
  142. package/lib/matrix/matrix-head/MatrixHead.js +10 -13
  143. package/lib/matrix/matrix-header/MatrixHeader.js +20 -23
  144. package/lib/matrix/matrix-row/MatrixRow.js +10 -13
  145. package/lib/matrix/style.css +2 -1
  146. package/lib/modal/index.js +197 -187
  147. package/lib/modal/index.umd.cjs +1 -1
  148. package/lib/modal/modal/Modal.js +90 -108
  149. package/lib/modal/modal/Modal.ve.js +43 -13
  150. package/lib/modal/modal/useModal.js +19 -24
  151. package/lib/modal/modal-footer/ModalFooter.js +11 -12
  152. package/lib/modal/style.css +2 -1
  153. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +49 -0
  154. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js +8 -10
  155. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js +4 -4
  156. package/lib/page-title/heading-level/HeadingLevel.js +8 -12
  157. package/lib/page-title/index.js +33 -40
  158. package/lib/page-title/index.umd.cjs +1 -1
  159. package/lib/page-title/page-subtitle/PageSubtitle.js +13 -18
  160. package/lib/page-title/page-subtitle/PageSubtitle.ve.js +4 -5
  161. package/lib/page-title/page-title/PageTitle.js +15 -19
  162. package/lib/page-title/page-title/PageTitle.ve.js +4 -7
  163. package/lib/page-title/style.css +2 -1
  164. package/lib/photo/index.js +174 -173
  165. package/lib/photo/index.umd.cjs +1 -1
  166. package/lib/photo/photo/Photo.js +72 -81
  167. package/lib/photo/photo/Photo.ve.js +21 -7
  168. package/lib/photo/photo-carousel/PhotoCarousel.css.d.ts.map +1 -1
  169. package/lib/photo/photo-carousel/PhotoCarousel.d.ts.map +1 -1
  170. package/lib/photo/photo-carousel/PhotoCarousel.js +36 -47
  171. package/lib/photo/photo-carousel/PhotoCarousel.ve.js +13 -9
  172. package/lib/photo/style.css +2 -1
  173. package/lib/product-bar/hooks/usePriorityPlus.js +88 -104
  174. package/lib/product-bar/index.js +372 -395
  175. package/lib/product-bar/index.umd.cjs +1 -1
  176. package/lib/product-bar/product-bar/ProductBar.js +77 -103
  177. package/lib/product-bar/product-bar/ProductBar.ve.js +46 -15
  178. package/lib/product-bar/product-bar-name/ProductBarName.js +37 -40
  179. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.js +48 -70
  180. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +4 -8
  181. package/lib/product-bar/product-bar-tab/ProductBarTab.js +28 -26
  182. package/lib/product-bar/slack-link/SlackLink.js +26 -30
  183. package/lib/product-bar/slack-link/SlackLink.ve.js +4 -5
  184. package/lib/product-bar/style.css +2 -1
  185. package/lib/product-bar-vertical/index.js +240 -251
  186. package/lib/product-bar-vertical/index.umd.cjs +1 -1
  187. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.js +42 -61
  188. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +53 -23
  189. package/lib/product-bar-vertical/product-bar-vertical-header/ProductBarVerticalHeader.js +30 -42
  190. package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.js +71 -89
  191. package/lib/product-bar-vertical/product-bar-vertical-section/ProductBarVerticalSection.js +22 -29
  192. package/lib/product-bar-vertical/style.css +2 -1
  193. package/lib/progress-indicators/index.js +372 -255
  194. package/lib/progress-indicators/index.umd.cjs +1 -1
  195. package/lib/progress-indicators/progress-bar/ProgressBar.js +66 -110
  196. package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +66 -13
  197. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.js +34 -54
  198. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +136 -8
  199. package/lib/progress-indicators/progress-ring/ProgressRing.js +45 -52
  200. package/lib/progress-indicators/style.css +2 -1
  201. package/lib/rich-text-editor/index.js +556 -582
  202. package/lib/rich-text-editor/index.umd.cjs +11 -11
  203. package/lib/rich-text-editor/rich-text-editor/RTELinkModal.js +29 -33
  204. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.css.d.ts.map +1 -1
  205. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +23 -37
  206. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +13 -6
  207. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.js +68 -77
  208. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +21 -8
  209. package/lib/rich-text-editor/rich-text-editor/hooks/useHtmlToMd.js +14 -20
  210. package/lib/rich-text-editor/rich-text-editor/hooks/useMdToHtml.js +14 -20
  211. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEContent.js +33 -27
  212. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEObserver.js +79 -88
  213. package/lib/rich-text-editor/rich-text-editor/hooks/useRTESelectionListener.js +28 -36
  214. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEToolbarButtons.js +195 -211
  215. package/lib/rich-text-editor/rich-text-editor/icons/BOLD.svg.js +4 -4
  216. package/lib/rich-text-editor/rich-text-editor/icons/INDENT.svg.js +4 -4
  217. package/lib/rich-text-editor/rich-text-editor/icons/ITALICS.svg.js +4 -4
  218. package/lib/rich-text-editor/rich-text-editor/icons/LINK.svg.js +4 -4
  219. package/lib/rich-text-editor/rich-text-editor/icons/ORDERED_LIST.svg.js +4 -4
  220. package/lib/rich-text-editor/rich-text-editor/icons/OUTDENT.svg.js +4 -4
  221. package/lib/rich-text-editor/rich-text-editor/icons/REDO.svg.js +4 -4
  222. package/lib/rich-text-editor/rich-text-editor/icons/UNDO.svg.js +4 -4
  223. package/lib/rich-text-editor/rich-text-editor/icons/UNLINK.svg.js +4 -4
  224. package/lib/rich-text-editor/rich-text-editor/icons/UNORDERED_LIST.svg.js +4 -4
  225. package/lib/rich-text-editor/rich-text-editor/utils/flattenListItemParagraphs.js +12 -12
  226. package/lib/rich-text-editor/rich-text-editor/utils/removeUnrepresentableBreaks.js +20 -19
  227. package/lib/rich-text-editor/rich-text-editor/utils/utils.js +11 -15
  228. package/lib/rich-text-editor/style.css +2 -1
  229. package/lib/scrollable-container/ScrollableContainer.js +18 -27
  230. package/lib/scrollable-container/ScrollableContainer.ve.js +4 -4
  231. package/lib/scrollable-container/index.js +20 -27
  232. package/lib/scrollable-container/index.umd.cjs +1 -1
  233. package/lib/scrollable-container/style.css +2 -1
  234. package/lib/side-nav/index.js +190 -216
  235. package/lib/side-nav/index.umd.cjs +1 -1
  236. package/lib/side-nav/side-nav/SideNav.css.d.ts.map +1 -1
  237. package/lib/side-nav/side-nav/SideNav.js +43 -60
  238. package/lib/side-nav/side-nav/SideNav.ve.js +22 -16
  239. package/lib/side-nav/side-nav/navContext.js +7 -7
  240. package/lib/side-nav/side-nav-header/SideNavHeader.js +14 -15
  241. package/lib/side-nav/side-nav-item/SideNavItem.d.ts.map +1 -1
  242. package/lib/side-nav/side-nav-item/SideNavItem.js +68 -82
  243. package/lib/side-nav/side-nav-section/SideNavSection.js +16 -26
  244. package/lib/side-nav/style.css +2 -1
  245. package/lib/sorting-header/caret/caret.ve.js +13 -5
  246. package/lib/sorting-header/index.js +269 -243
  247. package/lib/sorting-header/index.umd.cjs +1 -1
  248. package/lib/sorting-header/sorting-header/SortingHeader.js +110 -124
  249. package/lib/sorting-header/sorting-header/SortingHeader.ve.js +30 -6
  250. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.css.d.ts +2 -0
  251. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.css.d.ts.map +1 -1
  252. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.d.ts.map +1 -1
  253. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.js +69 -75
  254. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +21 -5
  255. package/lib/sorting-header/style.css +2 -1
  256. package/lib/style.css +2 -1
  257. package/lib/tabs/index.js +255 -200
  258. package/lib/tabs/index.umd.cjs +1 -1
  259. package/lib/tabs/style.css +2 -1
  260. package/lib/tabs/tab/Tab.css.d.ts.map +1 -1
  261. package/lib/tabs/tab/Tab.js +24 -27
  262. package/lib/tabs/tab/Tab.ve.js +76 -6
  263. package/lib/tabs/tab-panel/TabPanel.d.ts.map +1 -1
  264. package/lib/tabs/tab-panel/TabPanel.js +16 -23
  265. package/lib/tabs/tabs/Tabs.css.d.ts +1 -0
  266. package/lib/tabs/tabs/Tabs.css.d.ts.map +1 -1
  267. package/lib/tabs/tabs/Tabs.js +101 -112
  268. package/lib/tabs/tabs/Tabs.ve.js +13 -10
  269. package/lib/tags/clickable-tag/ClickableTag.css.d.ts +1 -1
  270. package/lib/tags/clickable-tag/ClickableTag.css.d.ts.map +1 -1
  271. package/lib/tags/clickable-tag/ClickableTag.d.ts.map +1 -1
  272. package/lib/tags/clickable-tag/ClickableTag.js +86 -70
  273. package/lib/tags/clickable-tag/ClickableTag.ve.js +66 -9
  274. package/lib/tags/index.js +342 -179
  275. package/lib/tags/index.umd.cjs +1 -1
  276. package/lib/tags/split-tag/SplitTag.css.d.ts.map +1 -1
  277. package/lib/tags/split-tag/SplitTag.js +49 -30
  278. package/lib/tags/split-tag/SplitTag.ve.js +35 -9
  279. package/lib/tags/style.css +2 -1
  280. package/lib/tags/tag/Tag.js +42 -38
  281. package/lib/tags/tag/Tag.ve.js +41 -6
  282. package/lib/utils/cl.js +5 -5
  283. package/lib/zero-state/ZeroState.js +36 -29
  284. package/lib/zero-state/ZeroState.ve.js +29 -11
  285. package/lib/zero-state/index.js +103 -78
  286. package/lib/zero-state/index.umd.cjs +1 -1
  287. package/lib/zero-state/style.css +2 -1
  288. package/package.json +12 -12
  289. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +0 -57
@@ -1,20 +1,16 @@
1
- import * as e from "react";
2
- import { Metadata as d, selectChildren as p, Icon as g, addClassName as T, cl as f } from "@sps-woodland/core";
3
- import { PageSubtitle as h } from "../page-subtitle/PageSubtitle.js";
4
- import { useHeadingLevel as u } from "../heading-level/HeadingLevel.js";
5
- import { pageTitleIcon as v, pageTitle as N, pageTitleText as x, pageTitleHeading as C } from "./PageTitle.ve.js";
6
- function E({
7
- as: l,
8
- children: n,
9
- className: m,
10
- ...c
11
- }) {
12
- const [[t], r, a] = p(n, [{ type: g }, { type: h }]), o = u(), i = l ?? (o ? `h${o}` : "h1"), s = t ? T(t, v) : "";
13
- return /* @__PURE__ */ e.createElement("div", { className: f(N, m), ...c }, s, /* @__PURE__ */ e.createElement("div", { className: x }, i === "div" ? a : e.createElement(i, { className: C }, a), r));
1
+ import { PageSubtitle as e } from "../page-subtitle/PageSubtitle.js";
2
+ import { useHeadingLevel as t } from "../heading-level/HeadingLevel.js";
3
+ import { pageTitle as n, pageTitleHeading as r, pageTitleIcon as i, pageTitleText as a } from "./PageTitle.ve.js";
4
+ import { Icon as o, Metadata as s, addClassName as c, cl as l, selectChildren as u } from "@sps-woodland/core";
5
+ import * as d from "react";
6
+ //#region src/page-title/page-title/PageTitle.tsx
7
+ function f({ as: s, children: f, className: p, ...m }) {
8
+ let [[h], g, _] = u(f, [{ type: o }, { type: e }]), v = t(), y = s ?? (v ? `h${v}` : "h1"), b = h ? c(h, i) : "";
9
+ return /* @__PURE__ */ d.createElement("div", {
10
+ className: l(n, p),
11
+ ...m
12
+ }, b, /* @__PURE__ */ d.createElement("div", { className: a }, y === "div" ? _ : d.createElement(y, { className: r }, _), g));
14
13
  }
15
- d.set(E, {
16
- name: "Page Title"
17
- });
18
- export {
19
- E as PageTitle
20
- };
14
+ s.set(f, { name: "Page Title" });
15
+ //#endregion
16
+ export { f as PageTitle };
@@ -1,8 +1,5 @@
1
1
  /* empty css */
2
- var e = "pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl00", a = "pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl01", l = "pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl02", o = "pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl03";
3
- export {
4
- e as pageTitle,
5
- o as pageTitleHeading,
6
- l as pageTitleIcon,
7
- a as pageTitleText
8
- };
2
+ //#region src/page-title/page-title/PageTitle.css.ts
3
+ var e = "pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl00", t = "pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl01", n = "pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl02", r = "pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl03";
4
+ //#endregion
5
+ export { e as pageTitle, r as pageTitleHeading, n as pageTitleIcon, t as pageTitleText };
@@ -1 +1,2 @@
1
- .pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_14qi3ku0{color:#4b5356;font-size:1.125rem;line-height:1.125rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_14qi3ku1{font-size:.75rem;line-height:1.125rem;margin-left:.25rem;margin-right:.25rem;margin-top:.25rem}.pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl00{display:flex;flex-direction:row}.pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl01{color:#1f282c;display:flex;flex-direction:column;font-size:1.5rem;line-height:1.5rem}.pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl02{align-self:flex-start;font-size:1.125rem;line-height:1.5rem;margin-right:.25rem;margin-top:.1875rem}.pkg_sps-woodland_core__family_page-title__version_8_56_1__hash_6nwwl03{color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}
1
+ .pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_14qi3ku0{color:#4b5356;margin-top:.25rem;font-size:1.125rem;line-height:1.125rem}.pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_14qi3ku1{margin-top:.25rem;margin-left:.25rem;margin-right:.25rem;font-size:.75rem;line-height:1.125rem}.pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl00{flex-direction:row;display:flex}.pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl01{color:#1f282c;flex-direction:column;font-size:1.5rem;line-height:1.5rem;display:flex}.pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl02{align-self:flex-start;margin-top:.1875rem;margin-right:.25rem;font-size:1.125rem;line-height:1.5rem}.pkg_sps-woodland_core__family_page-title__version_8_56_3__hash_6nwwl03{color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}
2
+ /*$vite$:1*/
@@ -1,179 +1,180 @@
1
- import * as r from "react";
2
- import { Metadata as V, cl as d, Icon as j, selectChildren as W } from "@sps-woodland/core";
3
- import { grid as h } from "@sps-woodland/tokens";
4
- import { SpsButton as v } from "@spscommerce/ds-react";
5
- import { SpsIcon as w, ButtonKind as g } from "@spscommerce/ds-shared";
6
- function B(e, a, o) {
7
- return a in e ? Object.defineProperty(e, a, {
8
- value: o,
9
- enumerable: !0,
10
- configurable: !0,
11
- writable: !0
12
- }) : e[a] = o, e;
1
+ import * as e from "react";
2
+ import { Icon as t, Metadata as n, cl as r, selectChildren as i } from "@sps-woodland/core";
3
+ import { grid as a } from "@sps-woodland/tokens";
4
+ import { Button as o } from "@sps-woodland/core/buttons";
5
+ import { useWoodlandLanguage as s } from "@spscommerce/i18n";
6
+ //#region ../../../node_modules/.pnpm/@vanilla-extract+recipes@0.2.5_@vanilla-extract+css@1.21.2/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
7
+ function c(e, t, n) {
8
+ return t in e ? Object.defineProperty(e, t, {
9
+ value: n,
10
+ enumerable: !0,
11
+ configurable: !0,
12
+ writable: !0
13
+ }) : e[t] = n, e;
13
14
  }
14
- function b(e, a) {
15
- var o = Object.keys(e);
16
- if (Object.getOwnPropertySymbols) {
17
- var t = Object.getOwnPropertySymbols(e);
18
- a && (t = t.filter(function(n) {
19
- return Object.getOwnPropertyDescriptor(e, n).enumerable;
20
- })), o.push.apply(o, t);
21
- }
22
- return o;
15
+ function l(e, t) {
16
+ var n = Object.keys(e);
17
+ if (Object.getOwnPropertySymbols) {
18
+ var r = Object.getOwnPropertySymbols(e);
19
+ t && (r = r.filter(function(t) {
20
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
21
+ })), n.push.apply(n, r);
22
+ }
23
+ return n;
23
24
  }
24
- function y(e) {
25
- for (var a = 1; a < arguments.length; a++) {
26
- var o = arguments[a] != null ? arguments[a] : {};
27
- a % 2 ? b(Object(o), !0).forEach(function(t) {
28
- B(e, t, o[t]);
29
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : b(Object(o)).forEach(function(t) {
30
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t));
31
- });
32
- }
33
- return e;
25
+ function u(e) {
26
+ for (var t = 1; t < arguments.length; t++) {
27
+ var n = arguments[t] == null ? {} : arguments[t];
28
+ t % 2 ? l(Object(n), !0).forEach(function(t) {
29
+ c(e, t, n[t]);
30
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : l(Object(n)).forEach(function(t) {
31
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
32
+ });
33
+ }
34
+ return e;
34
35
  }
35
- var F = (e, a, o) => {
36
- for (var t of Object.keys(e)) {
37
- var n;
38
- if (e[t] !== ((n = a[t]) !== null && n !== void 0 ? n : o[t]))
39
- return !1;
40
- }
41
- return !0;
42
- }, m = (e) => (a) => {
43
- var o = e.defaultClassName, t = y(y({}, e.defaultVariants), a);
44
- for (var n in t) {
45
- var i, c = (i = t[n]) !== null && i !== void 0 ? i : e.defaultVariants[n];
46
- if (c != null) {
47
- var _ = c;
48
- typeof _ == "boolean" && (_ = _ === !0 ? "true" : "false");
49
- var l = (
50
- // @ts-expect-error
51
- e.variantClassNames[n][_]
52
- );
53
- l && (o += " " + l);
54
- }
55
- }
56
- for (var [s, u] of e.compoundVariants)
57
- F(s, t, e.defaultVariants) && (o += " " + u);
58
- return o;
59
- }, L = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w0", variantClassNames: { placeholder: { true: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w1", false: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w2" } }, defaultVariants: { placeholder: !1 }, compoundVariants: [] }), A = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w3", variantClassNames: { mode: { fill: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w4", fit: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w5" } }, defaultVariants: { mode: "fill" }, compoundVariants: [] }), D = "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w6";
60
- function E({
61
- className: e,
62
- src: a,
63
- altText: o,
64
- mode: t = "fill",
65
- placeholderIcon: n = "photo",
66
- ...i
67
- }) {
68
- const c = r.useRef(null), _ = r.useRef(null), l = r.useRef(null), s = r.useRef(null), [u, O] = r.useState(), [N, P] = r.useState(!1);
69
- r.useEffect(() => {
70
- _.current && (l.current && (window.clearInterval(l.current), l.current = null), l.current = window.setInterval(() => {
71
- if (_.current) {
72
- const f = _.current.getBoundingClientRect();
73
- if (f.height) {
74
- l.current && (window.clearInterval(l.current), l.current = null);
75
- const p = f.width / f.height > 1;
76
- P(p === (t === "fit"));
77
- }
78
- }
79
- }, 1e3 / 60));
80
- }, [c.current, _.current, a]), r.useEffect(() => {
81
- s.current && (window.clearInterval(s.current), s.current = null), s.current = window.setInterval(() => {
82
- if (c.current) {
83
- const f = c.current.getBoundingClientRect();
84
- f.width && (R(f.width), s.current && (window.clearInterval(s.current), s.current = null));
85
- }
86
- }, 1e3 / 60);
87
- }, [c.current]);
88
- function R(f) {
89
- if (f) {
90
- const p = document?.body?.parentElement?.style?.fontSize || "16px", x = Number(p.substring(0, p.length - 2));
91
- O(f / x);
92
- }
93
- }
94
- function k() {
95
- if (typeof u < "u")
96
- return u * 0.05;
97
- }
98
- function S() {
99
- if (typeof u < "u")
100
- return 0.75 * u;
101
- }
102
- return /* @__PURE__ */ r.createElement(
103
- "div",
104
- {
105
- ref: c,
106
- className: d(L({ placeholder: !a }), e),
107
- style: {
108
- width: `${u}` && `${u}rem`,
109
- fontSize: `${k()}rem`,
110
- height: `${S()}rem`
111
- },
112
- ...i
113
- },
114
- a ? u ? /* @__PURE__ */ r.createElement(
115
- "img",
116
- {
117
- className: A({ mode: N ? "fit" : "fill" }),
118
- ref: _,
119
- src: a,
120
- alt: o
121
- }
122
- ) : /* @__PURE__ */ r.createElement("span", null) : /* @__PURE__ */ r.createElement(j, { className: D, icon: n })
123
- );
36
+ var d = (e, t, n) => {
37
+ for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
38
+ return !0;
39
+ }, f = (e) => (t) => {
40
+ var n = e.defaultClassName, r = u(u({}, e.defaultVariants), t);
41
+ for (var i in r) {
42
+ var a = r[i] ?? e.defaultVariants[i];
43
+ if (a != null) {
44
+ var o = a;
45
+ typeof o == "boolean" && (o = o === !0 ? "true" : "false");
46
+ var s = e.variantClassNames[i][o];
47
+ s && (n += " " + s);
48
+ }
49
+ }
50
+ for (var [c, l] of e.compoundVariants) d(c, r, e.defaultVariants) && (n += " " + l);
51
+ return n;
52
+ }, p = f({
53
+ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w0",
54
+ variantClassNames: { placeholder: {
55
+ true: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w1",
56
+ false: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w2"
57
+ } },
58
+ defaultVariants: { placeholder: !1 },
59
+ compoundVariants: []
60
+ }), m = f({
61
+ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w3",
62
+ variantClassNames: { mode: {
63
+ fill: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w4",
64
+ fit: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w5"
65
+ } },
66
+ defaultVariants: { mode: "fill" },
67
+ compoundVariants: []
68
+ }), h = "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w6";
69
+ //#endregion
70
+ //#region src/photo/photo/Photo.tsx
71
+ function g({ className: n, src: i, altText: a, mode: o = "fill", placeholderIcon: s = "photo", ...c }) {
72
+ let l = e.useRef(null), u = e.useRef(null), d = e.useRef(null), f = e.useRef(null), [g, _] = e.useState(), [v, y] = e.useState(!1);
73
+ e.useEffect(() => {
74
+ u.current && (d.current &&= (window.clearInterval(d.current), null), d.current = window.setInterval(() => {
75
+ if (u.current) {
76
+ let e = u.current.getBoundingClientRect();
77
+ if (e.height) {
78
+ d.current &&= (window.clearInterval(d.current), null);
79
+ let t = e.width / e.height > 1;
80
+ y(t === (o === "fit"));
81
+ }
82
+ }
83
+ }, 1e3 / 60));
84
+ }, [
85
+ l.current,
86
+ u.current,
87
+ i
88
+ ]), e.useEffect(() => {
89
+ f.current &&= (window.clearInterval(f.current), null), f.current = window.setInterval(() => {
90
+ if (l.current) {
91
+ let e = l.current.getBoundingClientRect();
92
+ e.width && (b(e.width), f.current &&= (window.clearInterval(f.current), null));
93
+ }
94
+ }, 1e3 / 60);
95
+ }, [l.current]);
96
+ function b(e) {
97
+ if (e) {
98
+ let t = document?.body?.parentElement?.style?.fontSize || "16px", n = Number(t.substring(0, t.length - 2));
99
+ _(e / n);
100
+ }
101
+ }
102
+ function x() {
103
+ if (g !== void 0) return g * .05;
104
+ }
105
+ function S() {
106
+ if (g !== void 0) return .75 * g;
107
+ }
108
+ return /* @__PURE__ */ e.createElement("div", {
109
+ ref: l,
110
+ className: r(p({ placeholder: !i }), n),
111
+ style: {
112
+ width: `${g}` && `${g}rem`,
113
+ fontSize: `${x()}rem`,
114
+ height: `${S()}rem`
115
+ },
116
+ ...c
117
+ }, i ? g ? /* @__PURE__ */ e.createElement("img", {
118
+ className: m({ mode: v ? "fit" : "fill" }),
119
+ ref: u,
120
+ src: i,
121
+ alt: a
122
+ }) : /* @__PURE__ */ e.createElement("span", null) : /* @__PURE__ */ e.createElement(t, {
123
+ className: h,
124
+ icon: s
125
+ }));
124
126
  }
125
- V.set(E, {
126
- name: "Photo",
127
- props: {
128
- src: "string",
129
- altText: "string",
130
- mode: {
131
- type: '"fill" | "fit"',
132
- default: '"fill"'
133
- },
134
- placeholderIcon: "IconName"
135
- }
127
+ n.set(g, {
128
+ name: "Photo",
129
+ props: {
130
+ src: "string",
131
+ altText: "string",
132
+ mode: {
133
+ type: "\"fill\" | \"fit\"",
134
+ default: "\"fill\""
135
+ },
136
+ placeholderIcon: "IconName"
137
+ }
136
138
  });
137
- var C = "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba10", I = "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba11", z = "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba12", T = "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba13", H = m({ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba14", variantClassNames: { selected: { true: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba15", false: "pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba16" } }, defaultVariants: { selected: !1 }, compoundVariants: [] });
138
- function J({
139
- children: e,
140
- className: a,
141
- ...o
142
- }) {
143
- const [t] = W(e, [{ type: E }]), [n, i] = r.useState(0);
144
- function c() {
145
- n + 1 === t.length ? i(0) : i(n + 1);
146
- }
147
- function _() {
148
- i(n === 0 ? t.length - 1 : n - 1);
149
- }
150
- return /* @__PURE__ */ r.createElement("div", { className: h.root, ...o }, /* @__PURE__ */ r.createElement("div", { className: d(C) }, /* @__PURE__ */ r.createElement("div", { className: d(I) }, /* @__PURE__ */ r.createElement(
151
- v,
152
- {
153
- tabIndex: 0,
154
- kind: g.ICON,
155
- icon: w.ARROW_LEFT_CIRCLE,
156
- onClick: _
157
- }
158
- ))), /* @__PURE__ */ r.createElement("div", { className: h[10] }, /* @__PURE__ */ r.createElement("div", { className: d(T, h[12]) }, t[n]), /* @__PURE__ */ r.createElement("div", { className: d(z, h[12]) }, t.map((l, s) => /* @__PURE__ */ r.createElement(
159
- "button",
160
- {
161
- tabIndex: 0,
162
- className: d(H({ selected: s === n })),
163
- onClick: () => i(s)
164
- },
165
- l
166
- )))), /* @__PURE__ */ r.createElement("div", { className: d(C) }, /* @__PURE__ */ r.createElement("div", { className: d(I) }, /* @__PURE__ */ r.createElement(
167
- v,
168
- {
169
- tabIndex: 0,
170
- kind: g.ICON,
171
- icon: w.ARROW_RIGHT_CIRCLE,
172
- onClick: c
173
- }
174
- ))));
139
+ //#endregion
140
+ //#region src/photo/photo-carousel/PhotoCarousel.css.ts
141
+ var _ = "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba10", v = "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba11", y = "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba12", b = "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba13", x = f({
142
+ defaultClassName: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba14",
143
+ variantClassNames: { selected: {
144
+ true: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba15",
145
+ false: "pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba16"
146
+ } },
147
+ defaultVariants: { selected: !1 },
148
+ compoundVariants: []
149
+ });
150
+ //#endregion
151
+ //#region src/photo/photo-carousel/PhotoCarousel.tsx
152
+ function S({ children: t, className: n, ...c }) {
153
+ let [l] = i(t, [{ type: g }]), [u, d] = e.useState(0), { t: f } = s();
154
+ function p() {
155
+ u + 1 === l.length ? d(0) : d(u + 1);
156
+ }
157
+ function m() {
158
+ d(u === 0 ? l.length - 1 : u - 1);
159
+ }
160
+ return /* @__PURE__ */ e.createElement("div", {
161
+ className: a.root,
162
+ ...c
163
+ }, /* @__PURE__ */ e.createElement("div", { className: r(_) }, /* @__PURE__ */ e.createElement("div", { className: r(v) }, /* @__PURE__ */ e.createElement(o, {
164
+ kind: "icon",
165
+ icon: "arrow-left-circle",
166
+ "aria-label": f("photo.previousPhoto", { defaultValue: "Previous Photo" }),
167
+ onClick: m
168
+ }))), /* @__PURE__ */ e.createElement("div", { className: a[10] }, /* @__PURE__ */ e.createElement("div", { className: r(b, a[12]) }, l[u]), /* @__PURE__ */ e.createElement("div", { className: r(y, a[12]) }, l.map((t, n) => /* @__PURE__ */ e.createElement("button", {
169
+ tabIndex: 0,
170
+ className: r(x({ selected: n === u })),
171
+ onClick: () => d(n)
172
+ }, t)))), /* @__PURE__ */ e.createElement("div", { className: r(_) }, /* @__PURE__ */ e.createElement("div", { className: r(v) }, /* @__PURE__ */ e.createElement(o, {
173
+ kind: "icon",
174
+ icon: "arrow-right-circle",
175
+ "aria-label": f("photo.nextPhoto", { defaultValue: "Next Photo" }),
176
+ onClick: p
177
+ }))));
175
178
  }
176
- export {
177
- E as Photo,
178
- J as PhotoCarousel
179
- };
179
+ //#endregion
180
+ export { g as Photo, S as PhotoCarousel };
@@ -1 +1 @@
1
- (function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/tokens"),require("@spscommerce/ds-react"),require("@spscommerce/ds-shared")):typeof define=="function"&&define.amd?define(["exports","react","@sps-woodland/core","@sps-woodland/tokens","@spscommerce/ds-react","@spscommerce/ds-shared"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.Photo={},s.react,s.spsWoodlandCore,s.spsWoodlandTokens,s.spscommerceDsReact,s.spscommerceDsShared))})(this,(function(s,m,c,h,y,v){"use strict";function E(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=E(m);function N(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?O(Object(t),!0).forEach(function(r){N(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var R=(e,n,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=n[r])!==null&&a!==void 0?a:t[r]))return!1}return!0},g=e=>n=>{var t=e.defaultClassName,r=C(C({},e.defaultVariants),n);for(var a in r){var u,d=(u=r[a])!==null&&u!==void 0?u:e.defaultVariants[a];if(d!=null){var l=d;typeof l=="boolean"&&(l=l===!0?"true":"false");var i=e.variantClassNames[a][l];i&&(t+=" "+i)}}for(var[_,f]of e.compoundVariants)R(_,r,e.defaultVariants)&&(t+=" "+f);return t},j=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w0",variantClassNames:{placeholder:{true:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w1",false:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w2"}},defaultVariants:{placeholder:!1},compoundVariants:[]}),S=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w3",variantClassNames:{mode:{fill:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w4",fit:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w5"}},defaultVariants:{mode:"fill"},compoundVariants:[]}),k="pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1orib4w6";function b({className:e,src:n,altText:t,mode:r="fill",placeholderIcon:a="photo",...u}){const d=o.useRef(null),l=o.useRef(null),i=o.useRef(null),_=o.useRef(null),[f,B]=o.useState(),[T,F]=o.useState(!1);o.useEffect(()=>{l.current&&(i.current&&(window.clearInterval(i.current),i.current=null),i.current=window.setInterval(()=>{if(l.current){const p=l.current.getBoundingClientRect();if(p.height){i.current&&(window.clearInterval(i.current),i.current=null);const w=p.width/p.height>1;F(w===(r==="fit"))}}},1e3/60))},[d.current,l.current,n]),o.useEffect(()=>{_.current&&(window.clearInterval(_.current),_.current=null),_.current=window.setInterval(()=>{if(d.current){const p=d.current.getBoundingClientRect();p.width&&(L(p.width),_.current&&(window.clearInterval(_.current),_.current=null))}},1e3/60)},[d.current]);function L(p){if(p){const w=document?.body?.parentElement?.style?.fontSize||"16px",A=Number(w.substring(0,w.length-2));B(p/A)}}function q(){if(typeof f<"u")return f*.05}function z(){if(typeof f<"u")return .75*f}return o.createElement("div",{ref:d,className:c.cl(j({placeholder:!n}),e),style:{width:`${f}`&&`${f}rem`,fontSize:`${q()}rem`,height:`${z()}rem`},...u},n?f?o.createElement("img",{className:S({mode:T?"fit":"fill"}),ref:l,src:n,alt:t}):o.createElement("span",null):o.createElement(c.Icon,{className:k,icon:a}))}c.Metadata.set(b,{name:"Photo",props:{src:"string",altText:"string",mode:{type:'"fill" | "fit"',default:'"fill"'},placeholderIcon:"IconName"}});var I="pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba10",P="pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba11",x="pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba12",V="pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba13",W=g({defaultClassName:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba14",variantClassNames:{selected:{true:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba15",false:"pkg_sps-woodland_core__family_photo__version_8_56_1__hash_1744ba16"}},defaultVariants:{selected:!1},compoundVariants:[]});function D({children:e,className:n,...t}){const[r]=c.selectChildren(e,[{type:b}]),[a,u]=o.useState(0);function d(){a+1===r.length?u(0):u(a+1)}function l(){u(a===0?r.length-1:a-1)}return o.createElement("div",{className:h.grid.root,...t},o.createElement("div",{className:c.cl(I)},o.createElement("div",{className:c.cl(P)},o.createElement(y.SpsButton,{tabIndex:0,kind:v.ButtonKind.ICON,icon:v.SpsIcon.ARROW_LEFT_CIRCLE,onClick:l}))),o.createElement("div",{className:h.grid[10]},o.createElement("div",{className:c.cl(V,h.grid[12])},r[a]),o.createElement("div",{className:c.cl(x,h.grid[12])},r.map((i,_)=>o.createElement("button",{tabIndex:0,className:c.cl(W({selected:_===a})),onClick:()=>u(_)},i)))),o.createElement("div",{className:c.cl(I)},o.createElement("div",{className:c.cl(P)},o.createElement(y.SpsButton,{tabIndex:0,kind:v.ButtonKind.ICON,icon:v.SpsIcon.ARROW_RIGHT_CIRCLE,onClick:d}))))}s.Photo=b,s.PhotoCarousel=D,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("@sps-woodland/core"),require("@sps-woodland/tokens"),require("@sps-woodland/core/buttons"),require("@spscommerce/i18n")):typeof define==`function`&&define.amd?define([`exports`,`react`,`@sps-woodland/core`,`@sps-woodland/tokens`,`@sps-woodland/core/buttons`,`@spscommerce/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.Photo={},e.react,e.spsWoodlandCore,e.spsWoodlandTokens,e.spsWoodlandCoreButtons,e.spscommerceI18n))})(this,function(e,t,n,r,i,a){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule||!d.call(e,`default`)?s(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?m(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var g=(e,t,n)=>{for(var r of Object.keys(e))if(e[r]!==(t[r]??n[r]))return!1;return!0},_=e=>t=>{var n=e.defaultClassName,r=h(h({},e.defaultVariants),t);for(var i in r){var a=r[i]??e.defaultVariants[i];if(a!=null){var o=a;typeof o==`boolean`&&(o=o===!0?`true`:`false`);var s=e.variantClassNames[i][o];s&&(n+=` `+s)}}for(var[c,l]of e.compoundVariants)g(c,r,e.defaultVariants)&&(n+=` `+l);return n},v=_({defaultClassName:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w0`,variantClassNames:{placeholder:{true:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w1`,false:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w2`}},defaultVariants:{placeholder:!1},compoundVariants:[]}),y=_({defaultClassName:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w3`,variantClassNames:{mode:{fill:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w4`,fit:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w5`}},defaultVariants:{mode:`fill`},compoundVariants:[]}),b=`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1orib4w6`;function x({className:e,src:r,altText:i,mode:a=`fill`,placeholderIcon:o=`photo`,...s}){let c=t.useRef(null),l=t.useRef(null),u=t.useRef(null),d=t.useRef(null),[f,p]=t.useState(),[m,h]=t.useState(!1);t.useEffect(()=>{l.current&&(u.current&&=(window.clearInterval(u.current),null),u.current=window.setInterval(()=>{if(l.current){let e=l.current.getBoundingClientRect();if(e.height){u.current&&=(window.clearInterval(u.current),null);let t=e.width/e.height>1;h(t===(a===`fit`))}}},1e3/60))},[c.current,l.current,r]),t.useEffect(()=>{d.current&&=(window.clearInterval(d.current),null),d.current=window.setInterval(()=>{if(c.current){let e=c.current.getBoundingClientRect();e.width&&(g(e.width),d.current&&=(window.clearInterval(d.current),null))}},1e3/60)},[c.current]);function g(e){if(e){let t=document?.body?.parentElement?.style?.fontSize||`16px`,n=Number(t.substring(0,t.length-2));p(e/n)}}function _(){if(f!==void 0)return f*.05}function x(){if(f!==void 0)return .75*f}return t.createElement(`div`,{ref:c,className:(0,n.cl)(v({placeholder:!r}),e),style:{width:`${f}`&&`${f}rem`,fontSize:`${_()}rem`,height:`${x()}rem`},...s},r?f?t.createElement(`img`,{className:y({mode:m?`fit`:`fill`}),ref:l,src:r,alt:i}):t.createElement(`span`,null):t.createElement(n.Icon,{className:b,icon:o}))}n.Metadata.set(x,{name:`Photo`,props:{src:`string`,altText:`string`,mode:{type:`"fill" | "fit"`,default:`"fill"`},placeholderIcon:`IconName`}});var S=`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba10`,C=`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba11`,w=`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba12`,T=`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba13`,E=_({defaultClassName:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba14`,variantClassNames:{selected:{true:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba15`,false:`pkg_sps-woodland_core__family_photo__version_8_56_3__hash_1744ba16`}},defaultVariants:{selected:!1},compoundVariants:[]});function D({children:e,className:o,...s}){let[c]=(0,n.selectChildren)(e,[{type:x}]),[l,u]=t.useState(0),{t:d}=(0,a.useWoodlandLanguage)();function f(){l+1===c.length?u(0):u(l+1)}function p(){u(l===0?c.length-1:l-1)}return t.createElement(`div`,{className:r.grid.root,...s},t.createElement(`div`,{className:(0,n.cl)(S)},t.createElement(`div`,{className:(0,n.cl)(C)},t.createElement(i.Button,{kind:`icon`,icon:`arrow-left-circle`,"aria-label":d(`photo.previousPhoto`,{defaultValue:`Previous Photo`}),onClick:p}))),t.createElement(`div`,{className:r.grid[10]},t.createElement(`div`,{className:(0,n.cl)(T,r.grid[12])},c[l]),t.createElement(`div`,{className:(0,n.cl)(w,r.grid[12])},c.map((e,r)=>t.createElement(`button`,{tabIndex:0,className:(0,n.cl)(E({selected:r===l})),onClick:()=>u(r)},e)))),t.createElement(`div`,{className:(0,n.cl)(S)},t.createElement(`div`,{className:(0,n.cl)(C)},t.createElement(i.Button,{kind:`icon`,icon:`arrow-right-circle`,"aria-label":d(`photo.nextPhoto`,{defaultValue:`Next Photo`}),onClick:f}))))}e.Photo=x,e.PhotoCarousel=D});