@bynder/compact-view 5.2.1 → 5.2.2
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/AccessToken.js +5 -0
- package/AccessToken2.js +176 -0
- package/AccessToken3.js +4 -0
- package/ActiveFilter.js +6 -5
- package/ActiveFilters.js +24 -24
- package/AddMedia.js +1 -1
- package/AdditionalInfo.js +18 -0
- package/Advanced.js +3 -3
- package/App.js +46 -43
- package/Arrow.js +14 -0
- package/AssetCard.js +32 -29
- package/AssetCardMetaproperties.js +14 -13
- package/AssetFilter.js +36 -35
- package/AssetFilterContext.js +3 -3
- package/AssetItem.js +14 -13
- package/AssetList.js +7 -7
- package/AssetTypeItem.js +13 -12
- package/Autocomplete_new.js +41 -37
- package/Axios2.js +136 -0
- package/AxiosError.js +54 -0
- package/AxiosHeaders.js +181 -0
- package/AxiosURLSearchParams.js +33 -0
- package/Badge.js +44 -0
- package/Baloon.js +42 -0
- package/BaseStyles.js +10 -0
- package/Blob.js +4 -0
- package/Box.js +22 -0
- package/Button.js +39 -0
- package/Button.styles.js +40 -0
- package/ButtonAction.js +3 -3
- package/ButtonLegacy.js +48 -0
- package/ButtonLegacy.styles.js +28 -0
- package/CancelToken.js +77 -0
- package/CanceledError.js +11 -0
- package/Card.js +84 -0
- package/CardSkeleton.js +15 -14
- package/Checkbox.js +85 -0
- package/Checkbox.styles.js +2 -2
- package/Checkmark.js +7 -0
- package/Chip.js +70 -40
- package/Chip2.js +42 -0
- package/CollectionCard.js +9 -8
- package/CollectionItem.js +15 -14
- package/CollectionList.js +2 -2
- package/CollectionView.js +2 -2
- package/CollectionsView.js +6 -6
- package/ColorHexInput.js +31 -0
- package/ColorPicker.js +66 -0
- package/ColorPickerSolid.js +20 -0
- package/ColorPickerWithOpacity.js +37 -0
- package/Combobox.js +61 -0
- package/ConcealedAction.js +16 -0
- package/ConnectButton.js +1 -1
- package/Container.js +14 -13
- package/Container2.js +31 -0
- package/Content.js +16 -0
- package/ContextAction.js +18 -17
- package/ContextActionButton.js +29 -0
- package/ControlGroup.js +32 -0
- package/DOMFunctions.js +27 -0
- package/Dat.js +62 -50
- package/DatDropdownItem.js +20 -19
- package/DesignSystemContext.js +4 -4
- package/DesignSystemProvider.js +29 -0
- package/DirectionSelect.js +16 -15
- package/Divider.js +21 -0
- package/DomainInput.js +15 -14
- package/DragRange.js +25 -0
- package/DragSelect.js +11 -11
- package/Dropdown.js +12 -11
- package/Dropdown2.js +169 -0
- package/DropdownContent.js +2 -2
- package/DropdownListItem.js +3 -3
- package/Enum.js +12 -0
- package/ErrorMessage.js +20 -19
- package/FieldSelect.js +4 -4
- package/FilePlaceholder.js +19 -0
- package/FileSelector.js +11 -10
- package/Flex.js +21 -0
- package/FontPicker.js +104 -0
- package/Footer.js +16 -0
- package/Form.js +23 -0
- package/FormData.js +4 -0
- package/Frame.js +64 -0
- package/Group.js +17 -0
- package/Group2.js +26 -0
- package/Header2.js +43 -0
- package/Header22.js +15 -0
- package/HelperText.js +26 -0
- package/HorizontalScroll.js +4 -4
- package/HttpHandler.js +74 -0
- package/HttpResponse.js +85 -0
- package/HttpStatusCode.js +71 -0
- package/IconPlaceholder.js +18 -0
- package/Image.js +19 -0
- package/Images.js +30 -0
- package/Indicator.js +74 -0
- package/InfiniteScroll.js +8 -8
- package/InlineBanner.js +51 -0
- package/Input.js +109 -0
- package/Input.styles.js +71 -0
- package/InputContainer.js +9 -0
- package/InputField.js +74 -0
- package/InputRow.js +18 -0
- package/Inspector.js +34 -0
- package/InteractiveIcon.js +28 -0
- package/InterceptorManager.js +58 -0
- package/Item.js +107 -0
- package/Item2.js +14 -0
- package/Item4.js +190 -0
- package/Label.js +33 -0
- package/LeftArrow.js +3 -3
- package/List.js +25 -0
- package/ListItem.js +11 -0
- package/ListItem2.js +58 -0
- package/ListItem4.js +37 -0
- package/MetapropertyFilterContent.js +2 -2
- package/MetapropertyOption.js +2 -3
- package/Middleware.js +49 -0
- package/Middleware2.js +49 -0
- package/Modal.js +2 -2
- package/Modal2.js +31 -0
- package/ModalBase.js +117 -0
- package/ModalBase.styles.js +75 -0
- package/ModalConfirmation.js +8 -0
- package/NoResults.js +16 -15
- package/OffsetContext.js +9 -0
- package/Oops.js +1 -1
- package/OpacityInput.js +17 -0
- package/Option_new.js +19 -18
- package/Overlay.js +35 -0
- package/Parser.js +131 -0
- package/Prefixer.js +187 -0
- package/Radio.js +78 -0
- package/RadioGroup.js +25 -0
- package/RangeInput.js +41 -0
- package/RefreshingSpinner.js +3 -3
- package/ReportModal.js +16 -14
- package/RequestHandler.js +119 -0
- package/RightArrow.js +4 -4
- package/Row.js +16 -0
- package/SearchInput.js +15 -15
- package/SearchInput2.js +46 -0
- package/SectionTitle.js +17 -0
- package/Select.js +49 -0
- package/SelectButtonText.js +16 -0
- package/SelectedItemContainer.js +11 -10
- package/SelectedItems.js +2 -2
- package/SelectionFooter.js +8 -7
- package/Serializer.js +27 -0
- package/ShadowRootInternal.js +17 -17
- package/Sidebar.js +17 -0
- package/Skeleton.js +6 -6
- package/Slider.constants.js +6 -0
- package/Slider.js +128 -0
- package/SmartFilterContent.js +2 -2
- package/SmartFilterSelect_new.js +2 -2
- package/Smartfilters_new.js +53 -50
- package/Spinner.js +2 -2
- package/Spinner2.js +15 -0
- package/StatefulAssetList.js +15 -15
- package/Stats.js +16 -0
- package/StatsItem.js +23 -0
- package/Status.js +32 -0
- package/Switch.js +82 -0
- package/SwitchNLS.js +26 -23
- package/Tabs2.js +10 -0
- package/TagItem.js +8 -8
- package/Tags.js +9 -9
- package/Text2.js +11 -0
- package/Text22.js +18 -0
- package/Text4.js +18 -0
- package/Textarea.js +92 -0
- package/Theming.js +4 -4
- package/Thumb.js +28 -0
- package/Thumbnail.js +91 -0
- package/Tokenizer.js +147 -0
- package/Toolbar.js +13 -12
- package/Tooltip.js +2 -2
- package/Tooltip2.js +111 -0
- package/TruncatedText.js +34 -0
- package/URLSearchParams.js +5 -0
- package/Utility.js +56 -0
- package/ViewSwitch.js +8 -7
- package/_check_private_redeclaration.js +7 -0
- package/_class_apply_descriptor_get.js +6 -0
- package/_class_apply_descriptor_set.js +11 -0
- package/_class_extract_field_descriptor.js +7 -0
- package/_class_private_field_get.js +9 -0
- package/_class_private_field_init.js +7 -0
- package/_class_private_field_set.js +9 -0
- package/_commonjsHelpers.js +6 -0
- package/adapters.js +53 -0
- package/api.js +25 -0
- package/api2.js +40 -0
- package/api3.js +406 -0
- package/applyScopeDataToEvent.js +83 -0
- package/applyScopeDataToEvent2.js +55 -0
- package/asset.type.js +9 -9
- package/autocomplete.js +2 -2
- package/axios.js +46 -0
- package/base.js +57 -0
- package/baseclient.js +498 -0
- package/bind.js +8 -0
- package/browser.js +44 -0
- package/buildFullPath.js +9 -0
- package/buildURL.js +23 -0
- package/bundle.esm.js +81 -0
- package/calculateContainerMaxHeight.js +12 -0
- package/calculateNodeHeight.js +35 -0
- package/carrier.js +13 -0
- package/chain.js +8 -0
- package/checkGlobals.js +13 -0
- package/checks.js +178 -0
- package/chunk-6HYIRFX2.js +1 -0
- package/cleanUrl.js +11 -0
- package/client.js +76 -0
- package/clientreport.js +15 -0
- package/clsx.js +17 -0
- package/colorTransforms.js +12 -0
- package/combineMetaproperties.js +1 -1
- package/combineURLs.js +6 -0
- package/composeSignals.js +30 -0
- package/constants.js +2 -12
- package/constants2.js +82 -0
- package/constants3.js +14 -0
- package/constants4.js +8 -0
- package/constants5.js +4 -0
- package/constants6.js +4 -0
- package/context.js +12 -0
- package/context10.js +12 -0
- package/context2.js +9 -0
- package/context3.js +12 -0
- package/context6.js +5 -0
- package/cookieStore.js +116 -0
- package/cookies.js +32 -0
- package/core.js +42 -0
- package/currentScopes.js +9 -0
- package/data.js +4 -0
- package/de_DE.json.js +18 -0
- package/debug-build.js +4 -0
- package/debug-build2.js +4 -0
- package/debug-build3.js +4 -0
- package/debug-build4.js +4 -0
- package/debug-build5.js +4 -0
- package/debug-build6.js +4 -0
- package/decorators.js +37 -0
- package/defaultScopes.js +12 -0
- package/devUtils.js +20 -0
- package/dispatchRequest.js +31 -0
- package/doc.js +26 -0
- package/domHelpers.js +15 -0
- package/dsn.js +54 -0
- package/dynamicSamplingContext.js +34 -0
- package/dynamicSamplingContext2.js +34 -0
- package/emotion-unitless.esm.js +52 -0
- package/en_US.json.js +23 -0
- package/englishText-12403056.js +6 -0
- package/env.js +6 -0
- package/envelope.js +113 -0
- package/envelope2.js +23 -0
- package/envelope3.js +24 -0
- package/error.js +9 -0
- package/errors.js +33 -0
- package/errors2.js +55 -0
- package/es_ES.json.js +18 -0
- package/es_MX.json.js +18 -0
- package/eventProcessors.js +27 -0
- package/eventProcessors2.js +23 -0
- package/eventbuilder.js +128 -0
- package/exports.js +11 -0
- package/exports2.js +16 -0
- package/exports3.js +8 -0
- package/fetch.js +44 -0
- package/fetch2.js +141 -0
- package/filterAssets.js +1 -1
- package/fixFontSpaceInUrl.js +8 -0
- package/focusWithoutScrolling.js +45 -0
- package/forceHiddenStyles.js +19 -0
- package/formDataToJSON.js +31 -0
- package/fr_FR.json.js +18 -0
- package/getAbsoluteUrl.js +13 -0
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +2 -2
- package/getCallFrame.js +12 -0
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getRequestCookies.js +40 -0
- package/getRootSpan.js +6 -0
- package/getRootSpan2.js +6 -0
- package/getSimilarityAssets.js +1 -1
- package/getSizingData.js +45 -0
- package/getStatusCodeColor.js +6 -0
- package/getThumbPosition.js +6 -0
- package/getTimestamp.js +7 -0
- package/getUseLayerOptions.js +49 -0
- package/handlers.js +92 -6
- package/handlers2.js +6 -0
- package/helpers.js +3 -4
- package/helpers2.js +6 -0
- package/hexFromPercentage.js +7 -0
- package/http.js +17 -0
- package/hub.js +446 -0
- package/hub2.js +442 -0
- package/immer.js +472 -0
- package/import.js +7 -0
- package/index-esm.js +10781 -0
- package/index-esm2.js +138 -0
- package/index-esm3.js +131 -0
- package/index.browser.js +11 -0
- package/index.module.js +57 -0
- package/index.module2.js +72 -0
- package/index.module3.js +57 -0
- package/index10.js +20 -0
- package/index102.js +273 -0
- package/index11.js +18 -0
- package/index112.js +29 -0
- package/index12.js +38 -0
- package/index13.js +2432 -0
- package/index14.js +558 -0
- package/index15.js +58 -0
- package/index16.js +4 -0
- package/index17.js +89 -0
- package/index18.js +9 -0
- package/index19.js +62 -0
- package/index20.js +15 -0
- package/index21.js +11 -0
- package/index22.js +42 -0
- package/index23.js +9 -0
- package/index24.js +10 -0
- package/index25.js +7 -0
- package/index26.js +12 -0
- package/index27.js +11 -0
- package/index28.js +639 -0
- package/index29.js +76 -0
- package/index3.js +5 -53
- package/index30.js +7 -0
- package/index31.js +22 -0
- package/index32.js +2 -0
- package/index33.js +7 -0
- package/index34.js +20 -0
- package/index35.js +8 -0
- package/index36.js +4 -0
- package/index37.js +13 -0
- package/index38.js +13 -0
- package/index39.js +15 -0
- package/index4.js +1684 -17
- package/index40.js +13 -0
- package/index41.js +21 -0
- package/index42.js +66 -0
- package/index43.js +8 -0
- package/index44.js +57 -0
- package/index45.js +69 -0
- package/index46.js +33 -0
- package/index47.js +13 -0
- package/index48.js +123 -0
- package/index49.js +88 -0
- package/index5.js +27 -0
- package/index50.js +10 -0
- package/index51.js +13 -0
- package/index52.js +16 -0
- package/index53.js +16 -0
- package/index54.js +9 -0
- package/index55.js +9 -0
- package/index56.js +17 -0
- package/index57.js +31 -0
- package/index58.js +18 -0
- package/index6.js +315 -0
- package/index7.js +4 -0
- package/index72.js +228 -0
- package/index8.js +5051 -0
- package/index82.js +8 -0
- package/index9.js +55 -0
- package/index92.js +12 -0
- package/integration.js +38 -0
- package/is.js +77 -0
- package/is2.js +14 -0
- package/is3.js +14 -0
- package/isAbsoluteURL.js +6 -0
- package/isAbsoluteUrl2.js +6 -0
- package/isAxiosError.js +7 -0
- package/isCancel.js +6 -0
- package/isIterable.js +6 -0
- package/isStringEqual.js +6 -0
- package/isURLSameOrigin.js +8 -0
- package/isValidHexValue.js +6 -0
- package/isVirtualEvent.js +11 -0
- package/iso.js +38 -0
- package/it_IT.json.js +18 -0
- package/itemContext.js +5 -0
- package/ja_JP.json.js +18 -0
- package/ko_KR.json.js +18 -0
- package/localStorageHelper.js +32 -0
- package/localStorageHelper2.js +4 -0
- package/localization.js +46 -0
- package/logger2.js +56 -0
- package/logger3.js +56 -0
- package/logger4.js +56 -0
- package/makeHexWithOpacity.js +12 -0
- package/makeInternalTokens.js +22 -0
- package/matchRequestUrl.js +23 -0
- package/memo.js +25 -0
- package/merge.js +13 -0
- package/mergeConfig.js +70 -0
- package/mergeProps.js +22 -0
- package/mergeRefs.js +9 -0
- package/middleware.js +177 -0
- package/middleware2.js +177 -0
- package/misc.js +58 -0
- package/misc2.js +28 -0
- package/misc3.js +24 -0
- package/nl_NL.json.js +18 -0
- package/normalize.js +97 -0
- package/normalizePath.js +11 -0
- package/normalizeResponse.js +1 -1
- package/normalizeRows.js +10 -0
- package/notify.js +52 -0
- package/null.js +4 -0
- package/object.js +110 -0
- package/object2.js +39 -0
- package/object3.js +17 -0
- package/opacityPercentageFromHex.js +9 -0
- package/openLink.js +27 -0
- package/package.json +1 -1
- package/packageVersion.js +4 -0
- package/parse.js +9 -0
- package/parse2.js +44 -0
- package/parseHeaders.js +30 -0
- package/parseProtocol.js +7 -0
- package/pl_PL.json.js +18 -0
- package/platform.js +42 -0
- package/prepareEvent.js +141 -0
- package/prepareEvent2.js +5 -0
- package/prepareEvent3.js +5 -0
- package/progressEventReducer.js +35 -0
- package/promisebuffer.js +44 -0
- package/propagationContext.js +11 -0
- package/pt_BR.json.js +18 -0
- package/ratelimit.js +37 -0
- package/react.js +19 -0
- package/react2.js +19 -0
- package/regexes.js +51 -0
- package/registries.js +41 -0
- package/resolveConfig.js +33 -0
- package/ru_RU.json.js +18 -0
- package/runAfterTransition.js +35 -0
- package/schemas.js +368 -0
- package/schemas2.js +691 -0
- package/scope.js +412 -0
- package/scope2.js +407 -0
- package/scope3.js +348 -0
- package/sdk-DhxX43BH.js +4813 -0
- package/sdkMetadata.js +15 -0
- package/serializeRequest.js +12 -0
- package/serializeResponse.js +14 -0
- package/session.js +57 -0
- package/session2.js +57 -0
- package/session3.js +16 -0
- package/settle.js +14 -0
- package/shadowdom.js +13 -0
- package/shadowdom2.js +13 -0
- package/spanOnScope.js +12 -0
- package/spanUtils.js +31 -0
- package/spanUtils2.js +31 -0
- package/speedometer.js +19 -0
- package/spread.js +8 -0
- package/stack-parsers.js +48 -0
- package/stackStrategy.js +98 -0
- package/stacktrace.js +49 -0
- package/state.js +106 -0
- package/store/useDatStore.d.ts +11 -8
- package/string.js +6 -0
- package/styled-components.browser.esm.js +530 -0
- package/styles.js +55 -0
- package/styles2.js +17 -0
- package/supports.js +6 -0
- package/syncpromise.js +121 -0
- package/syncpromise2.js +109 -0
- package/textSelection.js +33 -0
- package/textStyles.js +20 -0
- package/theme.js +238 -0
- package/themeContainers.js +20 -0
- package/themes3.js +26 -0
- package/throttle.js +15 -0
- package/time.js +24 -0
- package/time2.js +24 -0
- package/time3.js +24 -0
- package/toFormData.js +85 -0
- package/toPublicUrl.js +9 -0
- package/toURLEncodedForm.js +13 -0
- package/token.js +236 -0
- package/tokenExpirationHelper.js +48 -0
- package/tokenExpirationHelper2.js +4 -0
- package/tokensAndThemes.js +92 -0
- package/tr_TR.json.js +18 -0
- package/trackStream.js +63 -0
- package/transformData.js +13 -0
- package/transitional.js +8 -0
- package/trimMetapropertyValue.js +1 -1
- package/tslib.es6.js +18 -0
- package/typeof.js +11 -0
- package/urlHelper.js +15 -0
- package/urlHelper2.js +4 -0
- package/useAutoHeight.js +25 -0
- package/useDatStore.js +31 -27
- package/useEffectEvent.js +18 -0
- package/useFocus.js +30 -0
- package/useFocusRing.js +34 -0
- package/useFocusVisible.js +92 -0
- package/useFocusWithin.js +57 -0
- package/useFonts.js +118 -0
- package/useGlobalListeners.js +34 -0
- package/useGroupContext.js +10 -0
- package/useHover.js +79 -0
- package/useId.js +8 -0
- package/useId2.js +17 -0
- package/useKeyDown.js +14 -0
- package/useLayoutEffect.js +6 -0
- package/useOrderingStore.js +6 -6
- package/usePress.js +359 -0
- package/useRouterStore.js +6 -6
- package/useScrollHighlightedIntoView.js +24 -0
- package/useSearchStore.js +5 -5
- package/useSimilaritySearchStore.js +6 -6
- package/useSyncRef.js +12 -0
- package/useTranslate.js +13 -0
- package/useZIndex.js +9 -0
- package/userfeedback.js +28 -0
- package/util.js +265 -0
- package/utils/fixFontSpaceInUrl.d.ts +1 -0
- package/utils.js +26 -44
- package/utils2.js +43 -45
- package/utils3.js +50 -0
- package/utils4.js +12 -0
- package/utils5.js +71 -0
- package/utils6.js +222 -0
- package/utils7.js +9 -0
- package/utils8.js +70 -0
- package/validator.js +54 -0
- package/vanilla.js +14 -0
- package/vanilla2.js +14 -0
- package/version.js +4 -0
- package/version2.js +4 -0
- package/version3.js +4 -0
- package/versionContext.js +9 -0
- package/versions.js +8 -0
- package/worldwide.js +19 -0
- package/worldwide2.js +15 -0
- package/worldwide3.js +10 -0
- package/xhr.js +71 -0
- package/zh_CN.json.js +18 -0
- package/zh_TW.json.js +18 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import n from "./utils6.js";
|
|
2
|
+
class a {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.handlers = [];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Add a new interceptor to the stack
|
|
8
|
+
*
|
|
9
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
10
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
11
|
+
*
|
|
12
|
+
* @return {Number} An ID used to remove interceptor later
|
|
13
|
+
*/
|
|
14
|
+
use(s, h, r) {
|
|
15
|
+
return this.handlers.push({
|
|
16
|
+
fulfilled: s,
|
|
17
|
+
rejected: h,
|
|
18
|
+
synchronous: r ? r.synchronous : !1,
|
|
19
|
+
runWhen: r ? r.runWhen : null
|
|
20
|
+
}), this.handlers.length - 1;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Remove an interceptor from the stack
|
|
24
|
+
*
|
|
25
|
+
* @param {Number} id The ID that was returned by `use`
|
|
26
|
+
*
|
|
27
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
28
|
+
*/
|
|
29
|
+
eject(s) {
|
|
30
|
+
this.handlers[s] && (this.handlers[s] = null);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Clear all interceptors from the stack
|
|
34
|
+
*
|
|
35
|
+
* @returns {void}
|
|
36
|
+
*/
|
|
37
|
+
clear() {
|
|
38
|
+
this.handlers && (this.handlers = []);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Iterate over all the registered interceptors
|
|
42
|
+
*
|
|
43
|
+
* This method is particularly useful for skipping over any
|
|
44
|
+
* interceptors that may have become `null` calling `eject`.
|
|
45
|
+
*
|
|
46
|
+
* @param {Function} fn The function to call for each interceptor
|
|
47
|
+
*
|
|
48
|
+
* @returns {void}
|
|
49
|
+
*/
|
|
50
|
+
forEach(s) {
|
|
51
|
+
n.forEach(this.handlers, function(r) {
|
|
52
|
+
r !== null && s(r);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
a as default
|
|
58
|
+
};
|
package/Item.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsxs as C, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import L, { forwardRef as j } from "react";
|
|
3
|
+
import a, { css as l } from "./styled-components.browser.esm.js";
|
|
4
|
+
import { useFocusRing as O } from "./useFocusRing.js";
|
|
5
|
+
import { textStyles as T } from "./textStyles.js";
|
|
6
|
+
import { token as e } from "./token.js";
|
|
7
|
+
import { Checkbox as w } from "./Checkbox.js";
|
|
8
|
+
import { Thumbnail as B } from "./Thumbnail.js";
|
|
9
|
+
import { useId as M } from "./useId.js";
|
|
10
|
+
import { Switch as $ } from "./Switch.js";
|
|
11
|
+
import { TruncatedText as I } from "./TruncatedText.js";
|
|
12
|
+
import { useItemDragAndDropContext as _ } from "./context10.js";
|
|
13
|
+
import { makeInternalTokens as q } from "./makeInternalTokens.js";
|
|
14
|
+
const me = j(({
|
|
15
|
+
children: i,
|
|
16
|
+
subtext: u,
|
|
17
|
+
switchProps: d,
|
|
18
|
+
thumbnail: b,
|
|
19
|
+
rightElements: y,
|
|
20
|
+
onClick: s,
|
|
21
|
+
isDisabled: r = !1,
|
|
22
|
+
isSelected: D = !1,
|
|
23
|
+
checkedVariant: c,
|
|
24
|
+
isChecked: v = !1,
|
|
25
|
+
isIndeterminateCheckbox: S = !1,
|
|
26
|
+
...A
|
|
27
|
+
}, R) => {
|
|
28
|
+
const m = M("list-item-label"), {
|
|
29
|
+
isFocusVisible: N,
|
|
30
|
+
focusProps: z
|
|
31
|
+
} = O(), h = _(), x = L.useRef(null), E = d?.onChange ? "" : $.pointerEventsClassname, F = [w.pointerEventsClassname, E, B.pointerEventsClassname].join(" "), g = typeof s == "function", K = c === "switch" && !!d?.onChange, k = g && !!c && !K, p = g && !r && !k;
|
|
32
|
+
function P(t) {
|
|
33
|
+
t.key !== "ArrowDown" && t.key !== "ArrowUp" && t.key !== "ArrowLeft" && t.key !== "ArrowRight" && t.stopPropagation();
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ C(G, { $isDragging: h?.isDragging ?? !1, $isSelected: D, $isActive: g, tabIndex: p ? 0 : void 0, onClick: g && !r ? s : void 0, onKeyDown: (t) => {
|
|
36
|
+
p && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), s());
|
|
37
|
+
}, $isDisabled: r, "aria-disabled": r, className: F, $isFocusVisible: N, ref: R, "aria-labelledby": p ? m : void 0, ...A, ...z, children: [
|
|
38
|
+
c === "checkbox" && /* @__PURE__ */ o(H, { onClick: (t) => {
|
|
39
|
+
t.stopPropagation();
|
|
40
|
+
}, onKeyDown: (t) => {
|
|
41
|
+
t.stopPropagation();
|
|
42
|
+
}, children: /* @__PURE__ */ o(w, { isChecked: v, isIndeterminate: S, isDisabled: r, "aria-labelledby": m, onChange: s }) }),
|
|
43
|
+
b && /* @__PURE__ */ o(J, { $isDisabled: r, children: b }),
|
|
44
|
+
/* @__PURE__ */ C(Q, { id: m, children: [
|
|
45
|
+
/* @__PURE__ */ o(I, { children: i }),
|
|
46
|
+
u ? /* @__PURE__ */ o(V, { $isDisabled: r, children: /* @__PURE__ */ o(I, { children: u }) }) : null
|
|
47
|
+
] }),
|
|
48
|
+
y && /* @__PURE__ */ o(
|
|
49
|
+
f,
|
|
50
|
+
{
|
|
51
|
+
ref: x,
|
|
52
|
+
onClick: (t) => {
|
|
53
|
+
x?.current?.querySelectorAll("a, button").length && t.stopPropagation();
|
|
54
|
+
},
|
|
55
|
+
onKeyDown: P,
|
|
56
|
+
children: y
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
c === "switch" && /* @__PURE__ */ o(f, { onClick: (t) => {
|
|
60
|
+
t.stopPropagation();
|
|
61
|
+
}, onKeyDown: (t) => {
|
|
62
|
+
t.stopPropagation();
|
|
63
|
+
}, children: /* @__PURE__ */ o($, { isChecked: v, isDisabled: r, "aria-labelledby": m, onChange: k ? s : void 0, ...d }) }),
|
|
64
|
+
h?.dragIndicator && /* @__PURE__ */ o(f, { children: h?.dragIndicator })
|
|
65
|
+
] });
|
|
66
|
+
}), {
|
|
67
|
+
internalTokens: n,
|
|
68
|
+
declareTokens: U
|
|
69
|
+
} = q({
|
|
70
|
+
lightTheme: {
|
|
71
|
+
"list-item-active-background-hover": e.gray25,
|
|
72
|
+
"list-item-active-background-focus": e.gray25,
|
|
73
|
+
"list-item-active-background-active": e.gray50,
|
|
74
|
+
"list-item-right-elements-color": e.gray200,
|
|
75
|
+
"list-item-right-elements-color-active": e.gray600,
|
|
76
|
+
"list-item-focus-ring": `inset 0 0 0 2px ${e.gray50}, inset 0 0 0 4px ${e.gray10}`
|
|
77
|
+
},
|
|
78
|
+
darkTheme: {
|
|
79
|
+
"list-item-active-background-hover": e.gray25a,
|
|
80
|
+
"list-item-active-background-focus": e.gray25a,
|
|
81
|
+
"list-item-active-background-active": e.gray50a,
|
|
82
|
+
"list-item-right-elements-color": e.gray200a,
|
|
83
|
+
"list-item-right-elements-color-active": e.gray600a,
|
|
84
|
+
"list-item-focus-ring": `inset 0 0 0 2px ${e.gray300a}, inset 0 0 0 4px ${e.gray50}`
|
|
85
|
+
}
|
|
86
|
+
}), G = a.div.withConfig({
|
|
87
|
+
displayName: "ItemStyled",
|
|
88
|
+
componentId: "sc-18m0z46-0"
|
|
89
|
+
})(["", " --list-item-right-elements-color:", ";display:flex;align-items:center;margin-right:calc(", " * -1);margin-left:calc(", " * -1);padding:", " ", ";border-radius:var(--ds-list-item-border-radius-override,", ");color:", ";&:hover{--list-item-concealead-action-opacity:1;--list-item-concealead-action-width:auto;}", " ", " ", ""], U, n["list-item-right-elements-color"], e.spacing4, e.spacing4, e.spacing3, e.spacing4, e.radiusLarge, e.colorText, (i) => i.$isActive && l(["outline:none;cursor:pointer;&&:hover{--list-item-right-elements-color:", ";background:", ";}", " &&:active{background:", ";box-shadow:none;}", ""], n["list-item-right-elements-color-active"], n["list-item-active-background-hover"], i.$isFocusVisible && l(["--list-item-right-elements-color:", ";background:", ";box-shadow:var( --ds-list-item-focus-ring-override,", " );"], n["list-item-right-elements-color-active"], n["list-item-active-background-focus"], n["list-item-focus-ring"]), n["list-item-active-background-active"], i.$isDisabled && l(["color:", ";pointer-events:none;"], e.colorTextDisabled)), (i) => i.$isSelected && l(["--list-item-right-elements-color:", ";&&,&&:hover{background:", ";}"], n["list-item-right-elements-color-active"], n["list-item-active-background-active"]), (i) => i.$isDragging && l(["--list-item-right-elements-color:", ";background:", ";box-shadow:", ";cursor:grabbing;"], n["list-item-right-elements-color-active"], e.gray25, e.elevation4)), H = a.div.withConfig({
|
|
90
|
+
displayName: "CheckboxContainer",
|
|
91
|
+
componentId: "sc-18m0z46-1"
|
|
92
|
+
})(["flex:none;margin-right:", ";"], e.spacing4), J = a.div.withConfig({
|
|
93
|
+
displayName: "ThumbnailContainer",
|
|
94
|
+
componentId: "sc-18m0z46-2"
|
|
95
|
+
})(["flex:none;margin-right:", ";", ""], e.spacing4, (i) => i.$isDisabled && "opacity: 50%;"), Q = a.div.withConfig({
|
|
96
|
+
displayName: "Content",
|
|
97
|
+
componentId: "sc-18m0z46-3"
|
|
98
|
+
})(["", " flex:1;min-width:0;"], T.uiTextM), V = a.div.withConfig({
|
|
99
|
+
displayName: "Subtext",
|
|
100
|
+
componentId: "sc-18m0z46-4"
|
|
101
|
+
})(["", " color:", ";"], T.uiTextS, (i) => i.$isDisabled ? e.colorTextDisabled : e.colorTextMuted), f = a.div.withConfig({
|
|
102
|
+
displayName: "RightElements",
|
|
103
|
+
componentId: "sc-18m0z46-5"
|
|
104
|
+
})(["display:flex;flex:none;gap:", ";align-items:center;margin-left:", ";color:var(--list-item-right-elements-color);"], e.spacing3, e.spacing4);
|
|
105
|
+
export {
|
|
106
|
+
me as Item
|
|
107
|
+
};
|
package/Item2.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Dropdown as p } from "./Dropdown2.js";
|
|
3
|
+
function u({
|
|
4
|
+
children: o,
|
|
5
|
+
onClick: r,
|
|
6
|
+
icon: t,
|
|
7
|
+
isChecked: m,
|
|
8
|
+
...e
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ n(p.Item, { onClick: r, icon: t, isChecked: m, role: "option", ...e, children: o });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
u as Item
|
|
14
|
+
};
|
package/Item4.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { jsx as t, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as F, useContext as V, useEffect as C } from "react";
|
|
3
|
+
import s, { css as H } from "./styled-components.browser.esm.js";
|
|
4
|
+
import { useHover as ee } from "./useHover.js";
|
|
5
|
+
import { useFocusRing as oe } from "./useFocusRing.js";
|
|
6
|
+
import { useLayer as ne } from "react-laag";
|
|
7
|
+
import { IconCheck as te, IconArrowRight as re } from "./index4.js";
|
|
8
|
+
import { textStyles as ie } from "./textStyles.js";
|
|
9
|
+
import { token as e } from "./token.js";
|
|
10
|
+
import { Checkbox as A } from "./Checkbox.js";
|
|
11
|
+
import { useId as I } from "./useId.js";
|
|
12
|
+
import { useKeyDown as L } from "./useKeyDown.js";
|
|
13
|
+
import { Switch as M } from "./Switch.js";
|
|
14
|
+
import { Container as ae } from "./Container2.js";
|
|
15
|
+
import { useDropdownContext as se } from "./context3.js";
|
|
16
|
+
import { ItemContext as R } from "./itemContext.js";
|
|
17
|
+
function Ke({
|
|
18
|
+
children: n,
|
|
19
|
+
isDisabled: i,
|
|
20
|
+
icon: f,
|
|
21
|
+
checkedVariant: m = "checkmark",
|
|
22
|
+
checkboxProps: j,
|
|
23
|
+
isChecked: c = !1,
|
|
24
|
+
badge: v,
|
|
25
|
+
onClick: $,
|
|
26
|
+
submenu: O,
|
|
27
|
+
role: D,
|
|
28
|
+
...N
|
|
29
|
+
}) {
|
|
30
|
+
const [h, l] = F(!1), [b, x] = F(!1), p = I("dropdown-item"), y = I("dropdown-item-label"), q = I("dropdown-submenu"), r = !!O, {
|
|
31
|
+
dispatch: d,
|
|
32
|
+
...a
|
|
33
|
+
} = se(), u = a.highlightedItemId === p, W = V(R), {
|
|
34
|
+
isFocusVisible: P,
|
|
35
|
+
focusProps: B
|
|
36
|
+
} = oe(), {
|
|
37
|
+
hoverProps: z
|
|
38
|
+
} = ee({
|
|
39
|
+
onHoverStart: () => {
|
|
40
|
+
r && l(!0);
|
|
41
|
+
},
|
|
42
|
+
onHoverEnd: () => {
|
|
43
|
+
r && l(!1);
|
|
44
|
+
}
|
|
45
|
+
}), T = h && r, {
|
|
46
|
+
triggerProps: G,
|
|
47
|
+
layerProps: J,
|
|
48
|
+
renderLayer: Q
|
|
49
|
+
} = ne({
|
|
50
|
+
isOpen: T,
|
|
51
|
+
auto: !0,
|
|
52
|
+
placement: "right-start",
|
|
53
|
+
possiblePlacements: ["right-end", "right-start", "left-start", "left-end"],
|
|
54
|
+
triggerOffset: -4,
|
|
55
|
+
onParentClose: () => {
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
C(() => {
|
|
59
|
+
d({
|
|
60
|
+
type: "add-item",
|
|
61
|
+
payload: {
|
|
62
|
+
id: p,
|
|
63
|
+
parentId: W,
|
|
64
|
+
isDisabled: i,
|
|
65
|
+
isSelected: m === "checkmark" ? c : void 0
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}), C(() => {
|
|
69
|
+
b && d({
|
|
70
|
+
type: "highlight-submenu"
|
|
71
|
+
});
|
|
72
|
+
}, [d, b]), C(() => {
|
|
73
|
+
a.hasSearch || a.isKeepingFocusOnTrigger || u && document.querySelector("#" + p)?.focus();
|
|
74
|
+
}, [a.hasSearch, a.isKeepingFocusOnTrigger, p, u]), L("ArrowLeft", (o) => {
|
|
75
|
+
r && b && (d({
|
|
76
|
+
type: "highlight-item",
|
|
77
|
+
payload: p
|
|
78
|
+
}), l(!1), x(!1), o.preventDefault());
|
|
79
|
+
}), L("ArrowRight", (o) => {
|
|
80
|
+
u && r && (l(!0), x(!0), o.preventDefault());
|
|
81
|
+
});
|
|
82
|
+
const U = le(m), g = ce(D, m, c), X = g === "menuitemcheckbox" || g === "menuitemradio" || g === "option" ? c : void 0, Y = r ? {
|
|
83
|
+
"aria-haspopup": !0,
|
|
84
|
+
"aria-expanded": h,
|
|
85
|
+
"aria-controls": q
|
|
86
|
+
} : {};
|
|
87
|
+
function w(o) {
|
|
88
|
+
if ($?.(o), !r) {
|
|
89
|
+
if (g === "menuitemcheckbox") {
|
|
90
|
+
d({
|
|
91
|
+
type: "keep-highlight"
|
|
92
|
+
});
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
a.close();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function Z(o) {
|
|
99
|
+
r && (o.key === " " || o.key === "Enter") && ($?.(o), l((_) => {
|
|
100
|
+
const K = !_;
|
|
101
|
+
return x(K), K;
|
|
102
|
+
}), o.preventDefault());
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ t(R.Provider, { value: p, children: /* @__PURE__ */ E(
|
|
105
|
+
pe,
|
|
106
|
+
{
|
|
107
|
+
...z,
|
|
108
|
+
...G,
|
|
109
|
+
onClick: (o) => o.stopPropagation(),
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ E(
|
|
112
|
+
k,
|
|
113
|
+
{
|
|
114
|
+
disabled: i,
|
|
115
|
+
"aria-disabled": i,
|
|
116
|
+
$isChecked: c,
|
|
117
|
+
"aria-checked": X,
|
|
118
|
+
"aria-selected": a.hasSearch || a.isKeepingFocusOnTrigger ? u : void 0,
|
|
119
|
+
role: g,
|
|
120
|
+
as: N.href ? "a" : "button",
|
|
121
|
+
onClick: w,
|
|
122
|
+
tabIndex: -1,
|
|
123
|
+
id: p,
|
|
124
|
+
onKeyDown: Z,
|
|
125
|
+
$isHighlighted: u || P,
|
|
126
|
+
$isSubmenuOpen: h,
|
|
127
|
+
className: U,
|
|
128
|
+
...Y,
|
|
129
|
+
...B,
|
|
130
|
+
...N,
|
|
131
|
+
onMouseEnter: () => r && l(!0),
|
|
132
|
+
children: [
|
|
133
|
+
m === "checkbox" && /* @__PURE__ */ t(me, { onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ t(
|
|
134
|
+
A,
|
|
135
|
+
{
|
|
136
|
+
...j,
|
|
137
|
+
isChecked: c,
|
|
138
|
+
isDisabled: i,
|
|
139
|
+
"aria-labelledby": y,
|
|
140
|
+
onChange: w
|
|
141
|
+
}
|
|
142
|
+
) }),
|
|
143
|
+
f && /* @__PURE__ */ t(ue, { children: f }),
|
|
144
|
+
/* @__PURE__ */ t(de, { id: y, children: n }),
|
|
145
|
+
m === "checkmark" && c && /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(te, {}) }),
|
|
146
|
+
v && /* @__PURE__ */ t(S, { children: v }),
|
|
147
|
+
m === "switch" && /* @__PURE__ */ t(S, { onClick: (o) => o.stopPropagation(), children: /* @__PURE__ */ t(M, { isChecked: c, isDisabled: i, "aria-labelledby": y, onChange: w }) }),
|
|
148
|
+
r && /* @__PURE__ */ t(ge, { $isActive: h || P || u, children: /* @__PURE__ */ t(re, {}) })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
T && Q(/* @__PURE__ */ t(fe, { "data-testid": "ds-dropdown-submenu", id: q, ...J, onMouseLeave: () => l(!1), children: O }))
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
) });
|
|
156
|
+
}
|
|
157
|
+
function ce(n, i, f) {
|
|
158
|
+
return n || (i === "checkbox" || i === "switch" ? "menuitemcheckbox" : i === "checkmark" && f ? "menuitemradio" : "menuitem");
|
|
159
|
+
}
|
|
160
|
+
function le(n) {
|
|
161
|
+
return n === "checkbox" ? A.pointerEventsClassname : n === "switch" ? M.pointerEventsClassname : "";
|
|
162
|
+
}
|
|
163
|
+
const pe = s.div.withConfig({
|
|
164
|
+
displayName: "ItemWrapper",
|
|
165
|
+
componentId: "sc-10x21qo-0"
|
|
166
|
+
})(["position:relative;"]), k = s.button.withConfig({
|
|
167
|
+
displayName: "ItemStyled",
|
|
168
|
+
componentId: "sc-10x21qo-1"
|
|
169
|
+
})(["", " display:flex;align-items:center;box-sizing:border-box;width:100%;height:36px;margin:0;padding:0 ", ";border:none;background:none;color:", ";outline:none;font-family:", ";text-decoration:none;cursor:pointer;", " ", " &:hover{background:", ";color:", ";}&:active{background:", ";color:", ";}&:disabled{background:none;color:", ";cursor:default;}"], ie.uiTextS, e.spacing5, (n) => n.$isChecked ? e.colorText : e.colorTextMuted, e.brandFontStackBase, (n) => n.$isSubmenuOpen && H(["background:", ";color:", ";"], e.gray25, e.gray800), (n) => n.$isHighlighted && H(["background:", ";color:", ";"], e.gray50, e.gray800), e.gray25, e.colorText, e.gray50, e.gray800, e.colorTextDisabled), me = s.span.withConfig({
|
|
170
|
+
displayName: "CheckboxContainer",
|
|
171
|
+
componentId: "sc-10x21qo-2"
|
|
172
|
+
})(["display:flex;flex:none;justify-content:center;align-items:center;width:24px;height:24px;margin-right:", ";"], e.spacing3), ue = s.span.withConfig({
|
|
173
|
+
displayName: "Icon",
|
|
174
|
+
componentId: "sc-10x21qo-3"
|
|
175
|
+
})(["display:flex;flex:none;justify-content:center;align-items:center;width:24px;height:24px;margin-right:", ";"], e.spacing3), de = s.span.withConfig({
|
|
176
|
+
displayName: "Label",
|
|
177
|
+
componentId: "sc-10x21qo-4"
|
|
178
|
+
})(["flex:1;overflow:hidden;min-width:0;text-align:left;text-overflow:ellipsis;white-space:nowrap;"]), S = s.span.withConfig({
|
|
179
|
+
displayName: "RightContainer",
|
|
180
|
+
componentId: "sc-10x21qo-5"
|
|
181
|
+
})(["flex:none;margin:0 ", ";&:last-child{margin-right:calc(", " * -1);}"], e.spacing3, e.spacing2), ge = s.span.withConfig({
|
|
182
|
+
displayName: "SubmenuIconContainer",
|
|
183
|
+
componentId: "sc-10x21qo-6"
|
|
184
|
+
})(["flex:none;margin-right:calc(", " * -1);margin-left:", ";color:", ";", ":hover,", ":active{color:", ";}"], e.spacing3, e.spacing3, (n) => n.$isActive ? e.gray400 : e.gray200, k, k, e.gray400), fe = s(ae).withConfig({
|
|
185
|
+
displayName: "SubMenuContainer",
|
|
186
|
+
componentId: "sc-10x21qo-7"
|
|
187
|
+
})(["margin-top:calc(", " * -1);"], e.spacing3);
|
|
188
|
+
export {
|
|
189
|
+
Ke as Item
|
|
190
|
+
};
|
package/Label.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as i, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import e from "./styled-components.browser.esm.js";
|
|
3
|
+
import { textStyles as a } from "./textStyles.js";
|
|
4
|
+
import { token as o } from "./token.js";
|
|
5
|
+
import { useGroupParent as d } from "./useGroupContext.js";
|
|
6
|
+
function u({
|
|
7
|
+
children: t,
|
|
8
|
+
secondaryText: n,
|
|
9
|
+
htmlFor: r,
|
|
10
|
+
id: l,
|
|
11
|
+
...p
|
|
12
|
+
}) {
|
|
13
|
+
return d("Label"), /* @__PURE__ */ i(s, { htmlFor: r, id: l, ...p, children: [
|
|
14
|
+
t,
|
|
15
|
+
n ? /* @__PURE__ */ i(m, { children: [
|
|
16
|
+
/* @__PURE__ */ c(h, { children: " " }),
|
|
17
|
+
n
|
|
18
|
+
] }) : null
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
const s = e.label.withConfig({
|
|
22
|
+
displayName: "LabelStyled",
|
|
23
|
+
componentId: "sc-7rhip3-0"
|
|
24
|
+
})(["", " display:block;margin:0 0 ", ";padding:0;border:none;color:", ";"], a.uiTextM, o.spacing3, o.colorText), m = e.span.withConfig({
|
|
25
|
+
displayName: "SecondaryText",
|
|
26
|
+
componentId: "sc-7rhip3-1"
|
|
27
|
+
})(["color:", ";"], o.colorTextMuted), h = e.span.withConfig({
|
|
28
|
+
displayName: "Space",
|
|
29
|
+
componentId: "sc-7rhip3-2"
|
|
30
|
+
})(["display:inline-block;width:", ";"], o.spacing3);
|
|
31
|
+
export {
|
|
32
|
+
u as Label
|
|
33
|
+
};
|
package/LeftArrow.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import t from "styled-components";
|
|
3
|
-
import { IconArrowLeft as i } from "
|
|
4
|
-
import { Button as e } from "
|
|
2
|
+
import t from "./styled-components.browser.esm.js";
|
|
3
|
+
import { IconArrowLeft as i } from "./index4.js";
|
|
4
|
+
import { Button as e } from "./Button.js";
|
|
5
5
|
function p(r) {
|
|
6
6
|
return /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(
|
|
7
7
|
e,
|
package/List.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import e from "./styled-components.browser.esm.js";
|
|
3
|
+
import { token as t } from "./token.js";
|
|
4
|
+
import { Divider as p } from "./Divider.js";
|
|
5
|
+
import { ConcealedAction as d } from "./ConcealedAction.js";
|
|
6
|
+
import { Group as s } from "./Group2.js";
|
|
7
|
+
import { Item as c } from "./Item.js";
|
|
8
|
+
function o({
|
|
9
|
+
children: i,
|
|
10
|
+
isContained: r = !1,
|
|
11
|
+
...m
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ n(a, { $isContained: r, ...m, children: i });
|
|
14
|
+
}
|
|
15
|
+
o.Group = s;
|
|
16
|
+
o.Item = c;
|
|
17
|
+
o.Divider = p;
|
|
18
|
+
o.ConcealedAction = d;
|
|
19
|
+
const a = e.div.withConfig({
|
|
20
|
+
displayName: "ListStyled",
|
|
21
|
+
componentId: "sc-1cm11o3-0"
|
|
22
|
+
})(["padding:", ";"], (i) => i.$isContained ? `0 ${t.spacing5}` : `${t.spacing3} 0`);
|
|
23
|
+
export {
|
|
24
|
+
o as List
|
|
25
|
+
};
|
package/ListItem.js
ADDED
package/ListItem2.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as s, jsxs as I, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as m } from "react";
|
|
3
|
+
import v from "./styled-components.browser.esm.js";
|
|
4
|
+
import { IconCheck as y } from "./index4.js";
|
|
5
|
+
import { token as a } from "./token.js";
|
|
6
|
+
import { useId as S } from "./useId.js";
|
|
7
|
+
import { useDropdownContext as w } from "./context3.js";
|
|
8
|
+
import { List as x } from "./List.js";
|
|
9
|
+
function E({
|
|
10
|
+
children: p,
|
|
11
|
+
isDisabled: r,
|
|
12
|
+
isChecked: t = !1,
|
|
13
|
+
onClick: g,
|
|
14
|
+
role: n = "menuitem",
|
|
15
|
+
rightElements: c,
|
|
16
|
+
...u
|
|
17
|
+
}) {
|
|
18
|
+
const o = S("dropdown-item"), {
|
|
19
|
+
dispatch: f,
|
|
20
|
+
...e
|
|
21
|
+
} = w(), i = e.highlightedItemId === o;
|
|
22
|
+
m(() => {
|
|
23
|
+
f({
|
|
24
|
+
type: "add-item",
|
|
25
|
+
payload: {
|
|
26
|
+
id: o,
|
|
27
|
+
parentId: void 0,
|
|
28
|
+
isDisabled: r,
|
|
29
|
+
isSelected: t
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}), m(() => {
|
|
33
|
+
e.hasSearch || e.isKeepingFocusOnTrigger || i && document.querySelector("#" + o)?.focus();
|
|
34
|
+
}, [e.hasSearch, e.isKeepingFocusOnTrigger, o, i]);
|
|
35
|
+
function l() {
|
|
36
|
+
g?.(), e.close();
|
|
37
|
+
}
|
|
38
|
+
const d = t ? /* @__PURE__ */ s(y, { style: {
|
|
39
|
+
color: a.gray800
|
|
40
|
+
} }) : null;
|
|
41
|
+
return /* @__PURE__ */ s(
|
|
42
|
+
C,
|
|
43
|
+
{
|
|
44
|
+
onClick: (h) => h.stopPropagation(),
|
|
45
|
+
children: /* @__PURE__ */ s(x.Item, { isSelected: i, isDisabled: r, onClick: l, "aria-disabled": r, "aria-checked": n === "menuitemradio" || n === "option" ? t : void 0, "aria-selected": e.hasSearch || e.isKeepingFocusOnTrigger ? i : void 0, role: n, rightElements: c ? /* @__PURE__ */ I(k, { children: [
|
|
46
|
+
c,
|
|
47
|
+
d
|
|
48
|
+
] }) : d, id: o, ...u, children: p })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const C = v.div.withConfig({
|
|
53
|
+
displayName: "ItemWrapper",
|
|
54
|
+
componentId: "sc-1msckna-0"
|
|
55
|
+
})(["--ds-list-item-border-radius-override:0;--ds-list-item-focus-ring-override:none;padding:0 ", ";"], a.spacing4);
|
|
56
|
+
export {
|
|
57
|
+
E as ListItem
|
|
58
|
+
};
|
package/ListItem4.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs as e, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import t from "./styled-components.browser.esm.js";
|
|
3
|
+
import { textStyles as p } from "./textStyles.js";
|
|
4
|
+
import { token as n } from "./token.js";
|
|
5
|
+
import { internalTokens as d } from "./themes3.js";
|
|
6
|
+
function u({
|
|
7
|
+
children: l,
|
|
8
|
+
subtext: i,
|
|
9
|
+
thumbnail: o,
|
|
10
|
+
rightElements: m,
|
|
11
|
+
...r
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ e(s, { ...r, children: [
|
|
14
|
+
o && /* @__PURE__ */ c(a, { children: o }),
|
|
15
|
+
/* @__PURE__ */ e(f, { children: [
|
|
16
|
+
l,
|
|
17
|
+
i ? /* @__PURE__ */ c(h, { children: i }) : null
|
|
18
|
+
] }),
|
|
19
|
+
m
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
const s = t.div.withConfig({
|
|
23
|
+
displayName: "ItemStyled",
|
|
24
|
+
componentId: "sc-1hpfyv0-0"
|
|
25
|
+
})(["display:flex;gap:", ";align-items:center;margin-inline:calc(", " * -1);padding:", " ", ";"], n.spacing3, n.spacing5, n.spacing3, n.spacing5), a = t.div.withConfig({
|
|
26
|
+
displayName: "ThumbnailContainer",
|
|
27
|
+
componentId: "sc-1hpfyv0-1"
|
|
28
|
+
})(["flex:none;"]), f = t.div.withConfig({
|
|
29
|
+
displayName: "Content",
|
|
30
|
+
componentId: "sc-1hpfyv0-2"
|
|
31
|
+
})(["", " flex:1;min-width:0;"], p.uiTextM), h = t.div.withConfig({
|
|
32
|
+
displayName: "Subtext",
|
|
33
|
+
componentId: "sc-1hpfyv0-3"
|
|
34
|
+
})(["", " color:", ";"], p.uiTextS, d["tooltip-secondary-text-color"]);
|
|
35
|
+
export {
|
|
36
|
+
u as ListItem
|
|
37
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import i from "styled-components";
|
|
3
|
-
import { token as o } from "
|
|
2
|
+
import i from "./styled-components.browser.esm.js";
|
|
3
|
+
import { token as o } from "./token.js";
|
|
4
4
|
import "./MetapropertyOption.js";
|
|
5
5
|
i.div`
|
|
6
6
|
h1 {
|
package/MetapropertyOption.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { token as i } from "
|
|
4
|
-
import "@bynder/icons";
|
|
2
|
+
import r from "./styled-components.browser.esm.js";
|
|
3
|
+
import { token as i } from "./token.js";
|
|
5
4
|
import "./Checkbox.styles.js";
|
|
6
5
|
r.span`
|
|
7
6
|
display: flex;
|
package/Middleware.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RULESET as g, KEYFRAMES as x, DECLARATION as $, WEBKIT as w, MOZ as n, MS as y } from "./Enum.js";
|
|
2
|
+
import { combine as A, replace as u, sizeof as M, match as R, assign as h, filter as E } from "./Utility.js";
|
|
3
|
+
import { copy as i, lift as t } from "./Tokenizer.js";
|
|
4
|
+
import { serialize as S } from "./Serializer.js";
|
|
5
|
+
import { prefix as T } from "./Prefixer.js";
|
|
6
|
+
function B(r) {
|
|
7
|
+
var o = M(r);
|
|
8
|
+
return function(f, s, p, d) {
|
|
9
|
+
for (var c = "", a = 0; a < o; a++)
|
|
10
|
+
c += r[a](f, s, p, d) || "";
|
|
11
|
+
return c;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function C(r) {
|
|
15
|
+
return function(o) {
|
|
16
|
+
o.root || (o = o.return) && r(o);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function D(r, o, f, s) {
|
|
20
|
+
if (r.length > -1 && !r.return)
|
|
21
|
+
switch (r.type) {
|
|
22
|
+
case $:
|
|
23
|
+
r.return = T(r.value, r.length, f);
|
|
24
|
+
return;
|
|
25
|
+
case x:
|
|
26
|
+
return S([i(r, { value: u(r.value, "@", "@" + w) })], s);
|
|
27
|
+
case g:
|
|
28
|
+
if (r.length)
|
|
29
|
+
return A(f = r.props, function(p) {
|
|
30
|
+
switch (R(p, s = /(::plac\w+|:read-\w+)/)) {
|
|
31
|
+
// :read-(only|write)
|
|
32
|
+
case ":read-only":
|
|
33
|
+
case ":read-write":
|
|
34
|
+
t(i(r, { props: [u(p, /:(read-\w+)/, ":" + n + "$1")] })), t(i(r, { props: [p] })), h(r, { props: E(f, s) });
|
|
35
|
+
break;
|
|
36
|
+
// :placeholder
|
|
37
|
+
case "::placeholder":
|
|
38
|
+
t(i(r, { props: [u(p, /:(plac\w+)/, ":" + w + "input-$1")] })), t(i(r, { props: [u(p, /:(plac\w+)/, ":" + n + "$1")] })), t(i(r, { props: [u(p, /:(plac\w+)/, y + "input-$1")] })), t(i(r, { props: [p] })), h(r, { props: E(f, s) });
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
return "";
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
B as middleware,
|
|
47
|
+
D as prefixer,
|
|
48
|
+
C as rulesheet
|
|
49
|
+
};
|
package/Middleware2.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { RULESET as g, KEYFRAMES as x, DECLARATION as $, WEBKIT as w, MOZ as n, MS as y } from "./Enum.js";
|
|
2
|
+
import { combine as A, replace as u, sizeof as M, match as R, assign as h, filter as E } from "./Utility.js";
|
|
3
|
+
import { copy as i, lift as t } from "./Tokenizer.js";
|
|
4
|
+
import { serialize as S } from "./Serializer.js";
|
|
5
|
+
import { prefix as T } from "./Prefixer.js";
|
|
6
|
+
function B(r) {
|
|
7
|
+
var o = M(r);
|
|
8
|
+
return function(f, s, p, d) {
|
|
9
|
+
for (var c = "", a = 0; a < o; a++)
|
|
10
|
+
c += r[a](f, s, p, d) || "";
|
|
11
|
+
return c;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function C(r) {
|
|
15
|
+
return function(o) {
|
|
16
|
+
o.root || (o = o.return) && r(o);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function D(r, o, f, s) {
|
|
20
|
+
if (r.length > -1 && !r.return)
|
|
21
|
+
switch (r.type) {
|
|
22
|
+
case $:
|
|
23
|
+
r.return = T(r.value, r.length, f);
|
|
24
|
+
return;
|
|
25
|
+
case x:
|
|
26
|
+
return S([i(r, { value: u(r.value, "@", "@" + w) })], s);
|
|
27
|
+
case g:
|
|
28
|
+
if (r.length)
|
|
29
|
+
return A(f = r.props, function(p) {
|
|
30
|
+
switch (R(p, s = /(::plac\w+|:read-\w+)/)) {
|
|
31
|
+
// :read-(only|write)
|
|
32
|
+
case ":read-only":
|
|
33
|
+
case ":read-write":
|
|
34
|
+
t(i(r, { props: [u(p, /:(read-\w+)/, ":" + n + "$1")] })), t(i(r, { props: [p] })), h(r, { props: E(f, s) });
|
|
35
|
+
break;
|
|
36
|
+
// :placeholder
|
|
37
|
+
case "::placeholder":
|
|
38
|
+
t(i(r, { props: [u(p, /:(plac\w+)/, ":" + w + "input-$1")] })), t(i(r, { props: [u(p, /:(plac\w+)/, ":" + n + "$1")] })), t(i(r, { props: [u(p, /:(plac\w+)/, y + "input-$1")] })), t(i(r, { props: [p] })), h(r, { props: E(f, s) });
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
return "";
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
B as middleware,
|
|
47
|
+
D as prefixer,
|
|
48
|
+
C as rulesheet
|
|
49
|
+
};
|