@audira/carbon-react-native 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/lib/commonjs/_carbon-react-native/index.js +25 -0
- package/lib/commonjs/_carbon-react-native/index.js.map +1 -0
- package/lib/commonjs/_style-sheet/create.js +59 -0
- package/lib/commonjs/_style-sheet/create.js.map +1 -0
- package/lib/commonjs/_style-sheet/index.js +12 -0
- package/lib/commonjs/_style-sheet/index.js.map +1 -0
- package/lib/commonjs/components/accordion/_context.js +9 -0
- package/lib/commonjs/components/accordion/_context.js.map +1 -0
- package/lib/commonjs/components/accordion/_header-border.js +33 -0
- package/lib/commonjs/components/accordion/_header-border.js.map +1 -0
- package/lib/commonjs/components/accordion/_header.js +156 -0
- package/lib/commonjs/components/accordion/_header.js.map +1 -0
- package/lib/commonjs/components/accordion/_item.js +91 -0
- package/lib/commonjs/components/accordion/_item.js.map +1 -0
- package/lib/commonjs/components/accordion/_motion.js +18 -0
- package/lib/commonjs/components/accordion/_motion.js.map +1 -0
- package/lib/commonjs/components/accordion/_styles.js +24 -0
- package/lib/commonjs/components/accordion/_styles.js.map +1 -0
- package/lib/commonjs/components/accordion/index.js +74 -0
- package/lib/commonjs/components/accordion/index.js.map +1 -0
- package/lib/commonjs/components/accordion/types.js +2 -0
- package/lib/commonjs/components/accordion/types.js.map +1 -0
- package/lib/commonjs/components/button/base/index.js +153 -0
- package/lib/commonjs/components/button/base/index.js.map +1 -0
- package/lib/commonjs/components/button/base-color/index.js +155 -0
- package/lib/commonjs/components/button/base-color/index.js.map +1 -0
- package/lib/commonjs/components/button/ghost/index.js +92 -0
- package/lib/commonjs/components/button/ghost/index.js.map +1 -0
- package/lib/commonjs/components/button/ghost-danger/index.js +92 -0
- package/lib/commonjs/components/button/ghost-danger/index.js.map +1 -0
- package/lib/commonjs/components/button/ghost-icon/index.js +81 -0
- package/lib/commonjs/components/button/ghost-icon/index.js.map +1 -0
- package/lib/commonjs/components/button/index.js +127 -0
- package/lib/commonjs/components/button/index.js.map +1 -0
- package/lib/commonjs/components/button/primary/index.js +74 -0
- package/lib/commonjs/components/button/primary/index.js.map +1 -0
- package/lib/commonjs/components/button/primary-danger/index.js +74 -0
- package/lib/commonjs/components/button/primary-danger/index.js.map +1 -0
- package/lib/commonjs/components/button/secondary/index.js +74 -0
- package/lib/commonjs/components/button/secondary/index.js.map +1 -0
- package/lib/commonjs/components/button/size.js +2 -0
- package/lib/commonjs/components/button/size.js.map +1 -0
- package/lib/commonjs/components/button/tertiary/index.js +89 -0
- package/lib/commonjs/components/button/tertiary/index.js.map +1 -0
- package/lib/commonjs/components/button/tertiary-danger/index.js +89 -0
- package/lib/commonjs/components/button/tertiary-danger/index.js.map +1 -0
- package/lib/commonjs/components/checkbox/index.js +117 -0
- package/lib/commonjs/components/checkbox/index.js.map +1 -0
- package/lib/commonjs/components/checkbox-group/index.js +98 -0
- package/lib/commonjs/components/checkbox-group/index.js.map +1 -0
- package/lib/commonjs/components/checkbox-input/index.js +208 -0
- package/lib/commonjs/components/checkbox-input/index.js.map +1 -0
- package/lib/commonjs/components/collapsible/index.js +134 -0
- package/lib/commonjs/components/collapsible/index.js.map +1 -0
- package/lib/commonjs/components/form-helper-text/index.js +41 -0
- package/lib/commonjs/components/form-helper-text/index.js.map +1 -0
- package/lib/commonjs/components/form-label/index.js +35 -0
- package/lib/commonjs/components/form-label/index.js.map +1 -0
- package/lib/commonjs/components/icon/index.js +42 -0
- package/lib/commonjs/components/icon/index.js.map +1 -0
- package/lib/commonjs/components/index.js +176 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/_base.js +52 -0
- package/lib/commonjs/components/notification/_status-hooks/_base.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/error/index.js +47 -0
- package/lib/commonjs/components/notification/_status-hooks/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/index.js +50 -0
- package/lib/commonjs/components/notification/_status-hooks/index.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/informational/index.js +47 -0
- package/lib/commonjs/components/notification/_status-hooks/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/success/index.js +47 -0
- package/lib/commonjs/components/notification/_status-hooks/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/_status-hooks/warning/index.js +47 -0
- package/lib/commonjs/components/notification/_status-hooks/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variant-context.js +24 -0
- package/lib/commonjs/components/notification/_variant-context.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/_button-ghost.js +43 -0
- package/lib/commonjs/components/notification/_variants/_button-ghost.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/_button-tertiary.js +43 -0
- package/lib/commonjs/components/notification/_variants/_button-tertiary.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/actionable/index.js +42 -0
- package/lib/commonjs/components/notification/_variants/actionable/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/actionable-inline/index.js +42 -0
- package/lib/commonjs/components/notification/_variants/actionable-inline/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/callout/index.js +35 -0
- package/lib/commonjs/components/notification/_variants/callout/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/callout-inline/index.js +35 -0
- package/lib/commonjs/components/notification/_variants/callout-inline/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/index.js +61 -0
- package/lib/commonjs/components/notification/_variants/index.js.map +1 -0
- package/lib/commonjs/components/notification/_variants/toast/index.js +63 -0
- package/lib/commonjs/components/notification/_variants/toast/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable/error/index.js +49 -0
- package/lib/commonjs/components/notification/actionable/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable/index.js +50 -0
- package/lib/commonjs/components/notification/actionable/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable/informational/index.js +49 -0
- package/lib/commonjs/components/notification/actionable/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable/success/index.js +49 -0
- package/lib/commonjs/components/notification/actionable/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable/warning/index.js +49 -0
- package/lib/commonjs/components/notification/actionable/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable-inline/error/index.js +48 -0
- package/lib/commonjs/components/notification/actionable-inline/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable-inline/index.js +50 -0
- package/lib/commonjs/components/notification/actionable-inline/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable-inline/informational/index.js +48 -0
- package/lib/commonjs/components/notification/actionable-inline/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable-inline/success/index.js +48 -0
- package/lib/commonjs/components/notification/actionable-inline/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/actionable-inline/warning/index.js +48 -0
- package/lib/commonjs/components/notification/actionable-inline/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/base/index.js +170 -0
- package/lib/commonjs/components/notification/base/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout/error/index.js +49 -0
- package/lib/commonjs/components/notification/callout/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout/index.js +50 -0
- package/lib/commonjs/components/notification/callout/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout/informational/index.js +49 -0
- package/lib/commonjs/components/notification/callout/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout/success/index.js +49 -0
- package/lib/commonjs/components/notification/callout/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout/warning/index.js +49 -0
- package/lib/commonjs/components/notification/callout/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout-inline/error/index.js +48 -0
- package/lib/commonjs/components/notification/callout-inline/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout-inline/index.js +50 -0
- package/lib/commonjs/components/notification/callout-inline/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout-inline/informational/index.js +48 -0
- package/lib/commonjs/components/notification/callout-inline/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout-inline/success/index.js +48 -0
- package/lib/commonjs/components/notification/callout-inline/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/callout-inline/warning/index.js +48 -0
- package/lib/commonjs/components/notification/callout-inline/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/index.js +62 -0
- package/lib/commonjs/components/notification/index.js.map +1 -0
- package/lib/commonjs/components/notification/subtitle/index.js +30 -0
- package/lib/commonjs/components/notification/subtitle/index.js.map +1 -0
- package/lib/commonjs/components/notification/subtitle-link/index.js +29 -0
- package/lib/commonjs/components/notification/subtitle-link/index.js.map +1 -0
- package/lib/commonjs/components/notification/toast/error/index.js +49 -0
- package/lib/commonjs/components/notification/toast/error/index.js.map +1 -0
- package/lib/commonjs/components/notification/toast/index.js +50 -0
- package/lib/commonjs/components/notification/toast/index.js.map +1 -0
- package/lib/commonjs/components/notification/toast/informational/index.js +49 -0
- package/lib/commonjs/components/notification/toast/informational/index.js.map +1 -0
- package/lib/commonjs/components/notification/toast/success/index.js +49 -0
- package/lib/commonjs/components/notification/toast/success/index.js.map +1 -0
- package/lib/commonjs/components/notification/toast/warning/index.js +49 -0
- package/lib/commonjs/components/notification/toast/warning/index.js.map +1 -0
- package/lib/commonjs/components/notification/types.js +2 -0
- package/lib/commonjs/components/notification/types.js.map +1 -0
- package/lib/commonjs/components/radio-button/index.js +106 -0
- package/lib/commonjs/components/radio-button/index.js.map +1 -0
- package/lib/commonjs/components/radio-button-group/_item-context.js +9 -0
- package/lib/commonjs/components/radio-button-group/_item-context.js.map +1 -0
- package/lib/commonjs/components/radio-button-group/_item.js +52 -0
- package/lib/commonjs/components/radio-button-group/_item.js.map +1 -0
- package/lib/commonjs/components/radio-button-group/_types/index.js +6 -0
- package/lib/commonjs/components/radio-button-group/_types/index.js.map +1 -0
- package/lib/commonjs/components/radio-button-group/_types/ref-base.js +6 -0
- package/lib/commonjs/components/radio-button-group/_types/ref-base.js.map +1 -0
- package/lib/commonjs/components/radio-button-group/index.js +141 -0
- package/lib/commonjs/components/radio-button-group/index.js.map +1 -0
- package/lib/commonjs/components/radio-button-input/index.js +200 -0
- package/lib/commonjs/components/radio-button-input/index.js.map +1 -0
- package/lib/commonjs/components/switch/index.js +245 -0
- package/lib/commonjs/components/switch/index.js.map +1 -0
- package/lib/commonjs/components/text/index.js +70 -0
- package/lib/commonjs/components/text/index.js.map +1 -0
- package/lib/commonjs/components/toggle/base/index.js +115 -0
- package/lib/commonjs/components/toggle/base/index.js.map +1 -0
- package/lib/commonjs/components/toggle/default/index.js +23 -0
- package/lib/commonjs/components/toggle/default/index.js.map +1 -0
- package/lib/commonjs/components/toggle/index.js +50 -0
- package/lib/commonjs/components/toggle/index.js.map +1 -0
- package/lib/commonjs/components/toggle/small/index.js +23 -0
- package/lib/commonjs/components/toggle/small/index.js.map +1 -0
- package/lib/commonjs/components/toggle/state.js +2 -0
- package/lib/commonjs/components/toggle/state.js.map +1 -0
- package/lib/commonjs/constants/color/code.json +273 -0
- package/lib/commonjs/constants/color/index.js +19 -0
- package/lib/commonjs/constants/color/index.js.map +1 -0
- package/lib/commonjs/constants/color/tokens/gray-10.js +181 -0
- package/lib/commonjs/constants/color/tokens/gray-10.js.map +1 -0
- package/lib/commonjs/constants/color/tokens/gray-100.js +181 -0
- package/lib/commonjs/constants/color/tokens/gray-100.js.map +1 -0
- package/lib/commonjs/constants/color/tokens/index.js +28 -0
- package/lib/commonjs/constants/color/tokens/index.js.map +1 -0
- package/lib/commonjs/constants/index.js +24 -0
- package/lib/commonjs/constants/index.js.map +1 -0
- package/lib/commonjs/constants/motion/index.js +71 -0
- package/lib/commonjs/constants/motion/index.js.map +1 -0
- package/lib/commonjs/constants/spacing.js +22 -0
- package/lib/commonjs/constants/spacing.js.map +1 -0
- package/lib/commonjs/constants/typography/font-family.js +23 -0
- package/lib/commonjs/constants/typography/font-family.js.map +1 -0
- package/lib/commonjs/constants/typography/index.js +28 -0
- package/lib/commonjs/constants/typography/index.js.map +1 -0
- package/lib/commonjs/constants/typography/type-sets.js +141 -0
- package/lib/commonjs/constants/typography/type-sets.js.map +1 -0
- package/lib/commonjs/contexts/global-config/context.js +12 -0
- package/lib/commonjs/contexts/global-config/context.js.map +1 -0
- package/lib/commonjs/contexts/global-config/provider.js +22 -0
- package/lib/commonjs/contexts/global-config/provider.js.map +1 -0
- package/lib/commonjs/contexts/index.js +28 -0
- package/lib/commonjs/contexts/index.js.map +1 -0
- package/lib/commonjs/contexts/theme/context.js +14 -0
- package/lib/commonjs/contexts/theme/context.js.map +1 -0
- package/lib/commonjs/contexts/theme/index.js +17 -0
- package/lib/commonjs/contexts/theme/index.js.map +1 -0
- package/lib/commonjs/contexts/theme/provider.js +31 -0
- package/lib/commonjs/contexts/theme/provider.js.map +1 -0
- package/lib/commonjs/globals/color-scheme/index.js +16 -0
- package/lib/commonjs/globals/color-scheme/index.js.map +1 -0
- package/lib/commonjs/globals/index.js +11 -0
- package/lib/commonjs/globals/index.js.map +1 -0
- package/lib/commonjs/helpers/color/get-color-scheme.js +15 -0
- package/lib/commonjs/helpers/color/get-color-scheme.js.map +1 -0
- package/lib/commonjs/helpers/color/get-color-token.js +14 -0
- package/lib/commonjs/helpers/color/get-color-token.js.map +1 -0
- package/lib/commonjs/helpers/color/hex-to-rgba.js +11 -0
- package/lib/commonjs/helpers/color/hex-to-rgba.js.map +1 -0
- package/lib/commonjs/helpers/color/index.js +39 -0
- package/lib/commonjs/helpers/color/index.js.map +1 -0
- package/lib/commonjs/helpers/index.js +11 -0
- package/lib/commonjs/helpers/index.js.map +1 -0
- package/lib/commonjs/index.js +94 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/styles/common.js +25 -0
- package/lib/commonjs/styles/common.js.map +1 -0
- package/lib/commonjs/styles/flex.js +82 -0
- package/lib/commonjs/styles/flex.js.map +1 -0
- package/lib/commonjs/styles/index.js +39 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/styles/text.js +67 -0
- package/lib/commonjs/styles/text.js.map +1 -0
- package/lib/commonjs/types/@carbon/icons/index.d.js +2 -0
- package/lib/commonjs/types/@carbon/icons/index.d.js.map +1 -0
- package/lib/commonjs/types/index.js +6 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/shared.js +2 -0
- package/lib/commonjs/types/shared.js.map +1 -0
- package/lib/commonjs/types/theme/color-scheme.js +2 -0
- package/lib/commonjs/types/theme/color-scheme.js.map +1 -0
- package/lib/commonjs/types/theme/color-token.js +2 -0
- package/lib/commonjs/types/theme/color-token.js.map +1 -0
- package/lib/commonjs/types/theme/index.js +2 -0
- package/lib/commonjs/types/theme/index.js.map +1 -0
- package/lib/commonjs/types/typography.js +6 -0
- package/lib/commonjs/types/typography.js.map +1 -0
- package/lib/module/_carbon-react-native/index.js +21 -0
- package/lib/module/_carbon-react-native/index.js.map +1 -0
- package/lib/module/_style-sheet/create.js +55 -0
- package/lib/module/_style-sheet/create.js.map +1 -0
- package/lib/module/_style-sheet/index.js +8 -0
- package/lib/module/_style-sheet/index.js.map +1 -0
- package/lib/module/components/accordion/_context.js +5 -0
- package/lib/module/components/accordion/_context.js.map +1 -0
- package/lib/module/components/accordion/_header-border.js +29 -0
- package/lib/module/components/accordion/_header-border.js.map +1 -0
- package/lib/module/components/accordion/_header.js +149 -0
- package/lib/module/components/accordion/_header.js.map +1 -0
- package/lib/module/components/accordion/_item.js +87 -0
- package/lib/module/components/accordion/_item.js.map +1 -0
- package/lib/module/components/accordion/_motion.js +14 -0
- package/lib/module/components/accordion/_motion.js.map +1 -0
- package/lib/module/components/accordion/_styles.js +21 -0
- package/lib/module/components/accordion/_styles.js.map +1 -0
- package/lib/module/components/accordion/index.js +70 -0
- package/lib/module/components/accordion/index.js.map +1 -0
- package/lib/module/components/accordion/types.js +2 -0
- package/lib/module/components/accordion/types.js.map +1 -0
- package/lib/module/components/button/base/index.js +149 -0
- package/lib/module/components/button/base/index.js.map +1 -0
- package/lib/module/components/button/base-color/index.js +151 -0
- package/lib/module/components/button/base-color/index.js.map +1 -0
- package/lib/module/components/button/ghost/index.js +88 -0
- package/lib/module/components/button/ghost/index.js.map +1 -0
- package/lib/module/components/button/ghost-danger/index.js +88 -0
- package/lib/module/components/button/ghost-danger/index.js.map +1 -0
- package/lib/module/components/button/ghost-icon/index.js +77 -0
- package/lib/module/components/button/ghost-icon/index.js.map +1 -0
- package/lib/module/components/button/index.js +14 -0
- package/lib/module/components/button/index.js.map +1 -0
- package/lib/module/components/button/primary/index.js +70 -0
- package/lib/module/components/button/primary/index.js.map +1 -0
- package/lib/module/components/button/primary-danger/index.js +70 -0
- package/lib/module/components/button/primary-danger/index.js.map +1 -0
- package/lib/module/components/button/secondary/index.js +70 -0
- package/lib/module/components/button/secondary/index.js.map +1 -0
- package/lib/module/components/button/size.js +2 -0
- package/lib/module/components/button/size.js.map +1 -0
- package/lib/module/components/button/tertiary/index.js +85 -0
- package/lib/module/components/button/tertiary/index.js.map +1 -0
- package/lib/module/components/button/tertiary-danger/index.js +85 -0
- package/lib/module/components/button/tertiary-danger/index.js.map +1 -0
- package/lib/module/components/checkbox/index.js +113 -0
- package/lib/module/components/checkbox/index.js.map +1 -0
- package/lib/module/components/checkbox-group/index.js +93 -0
- package/lib/module/components/checkbox-group/index.js.map +1 -0
- package/lib/module/components/checkbox-input/index.js +203 -0
- package/lib/module/components/checkbox-input/index.js.map +1 -0
- package/lib/module/components/collapsible/index.js +128 -0
- package/lib/module/components/collapsible/index.js.map +1 -0
- package/lib/module/components/form-helper-text/index.js +37 -0
- package/lib/module/components/form-helper-text/index.js.map +1 -0
- package/lib/module/components/form-label/index.js +31 -0
- package/lib/module/components/form-label/index.js.map +1 -0
- package/lib/module/components/icon/index.js +35 -0
- package/lib/module/components/icon/index.js.map +1 -0
- package/lib/module/components/index.js +20 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/_base.js +48 -0
- package/lib/module/components/notification/_status-hooks/_base.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/error/index.js +42 -0
- package/lib/module/components/notification/_status-hooks/error/index.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/index.js +7 -0
- package/lib/module/components/notification/_status-hooks/index.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/informational/index.js +42 -0
- package/lib/module/components/notification/_status-hooks/informational/index.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/success/index.js +42 -0
- package/lib/module/components/notification/_status-hooks/success/index.js.map +1 -0
- package/lib/module/components/notification/_status-hooks/warning/index.js +42 -0
- package/lib/module/components/notification/_status-hooks/warning/index.js.map +1 -0
- package/lib/module/components/notification/_variant-context.js +19 -0
- package/lib/module/components/notification/_variant-context.js.map +1 -0
- package/lib/module/components/notification/_variants/_button-ghost.js +39 -0
- package/lib/module/components/notification/_variants/_button-ghost.js.map +1 -0
- package/lib/module/components/notification/_variants/_button-tertiary.js +39 -0
- package/lib/module/components/notification/_variants/_button-tertiary.js.map +1 -0
- package/lib/module/components/notification/_variants/actionable/index.js +38 -0
- package/lib/module/components/notification/_variants/actionable/index.js.map +1 -0
- package/lib/module/components/notification/_variants/actionable-inline/index.js +38 -0
- package/lib/module/components/notification/_variants/actionable-inline/index.js.map +1 -0
- package/lib/module/components/notification/_variants/callout/index.js +31 -0
- package/lib/module/components/notification/_variants/callout/index.js.map +1 -0
- package/lib/module/components/notification/_variants/callout-inline/index.js +31 -0
- package/lib/module/components/notification/_variants/callout-inline/index.js.map +1 -0
- package/lib/module/components/notification/_variants/index.js +8 -0
- package/lib/module/components/notification/_variants/index.js.map +1 -0
- package/lib/module/components/notification/_variants/toast/index.js +59 -0
- package/lib/module/components/notification/_variants/toast/index.js.map +1 -0
- package/lib/module/components/notification/actionable/error/index.js +45 -0
- package/lib/module/components/notification/actionable/error/index.js.map +1 -0
- package/lib/module/components/notification/actionable/index.js +7 -0
- package/lib/module/components/notification/actionable/index.js.map +1 -0
- package/lib/module/components/notification/actionable/informational/index.js +45 -0
- package/lib/module/components/notification/actionable/informational/index.js.map +1 -0
- package/lib/module/components/notification/actionable/success/index.js +45 -0
- package/lib/module/components/notification/actionable/success/index.js.map +1 -0
- package/lib/module/components/notification/actionable/warning/index.js +45 -0
- package/lib/module/components/notification/actionable/warning/index.js.map +1 -0
- package/lib/module/components/notification/actionable-inline/error/index.js +44 -0
- package/lib/module/components/notification/actionable-inline/error/index.js.map +1 -0
- package/lib/module/components/notification/actionable-inline/index.js +7 -0
- package/lib/module/components/notification/actionable-inline/index.js.map +1 -0
- package/lib/module/components/notification/actionable-inline/informational/index.js +44 -0
- package/lib/module/components/notification/actionable-inline/informational/index.js.map +1 -0
- package/lib/module/components/notification/actionable-inline/success/index.js +44 -0
- package/lib/module/components/notification/actionable-inline/success/index.js.map +1 -0
- package/lib/module/components/notification/actionable-inline/warning/index.js +44 -0
- package/lib/module/components/notification/actionable-inline/warning/index.js.map +1 -0
- package/lib/module/components/notification/base/index.js +165 -0
- package/lib/module/components/notification/base/index.js.map +1 -0
- package/lib/module/components/notification/callout/error/index.js +45 -0
- package/lib/module/components/notification/callout/error/index.js.map +1 -0
- package/lib/module/components/notification/callout/index.js +7 -0
- package/lib/module/components/notification/callout/index.js.map +1 -0
- package/lib/module/components/notification/callout/informational/index.js +45 -0
- package/lib/module/components/notification/callout/informational/index.js.map +1 -0
- package/lib/module/components/notification/callout/success/index.js +45 -0
- package/lib/module/components/notification/callout/success/index.js.map +1 -0
- package/lib/module/components/notification/callout/warning/index.js +45 -0
- package/lib/module/components/notification/callout/warning/index.js.map +1 -0
- package/lib/module/components/notification/callout-inline/error/index.js +44 -0
- package/lib/module/components/notification/callout-inline/error/index.js.map +1 -0
- package/lib/module/components/notification/callout-inline/index.js +7 -0
- package/lib/module/components/notification/callout-inline/index.js.map +1 -0
- package/lib/module/components/notification/callout-inline/informational/index.js +44 -0
- package/lib/module/components/notification/callout-inline/informational/index.js.map +1 -0
- package/lib/module/components/notification/callout-inline/success/index.js +44 -0
- package/lib/module/components/notification/callout-inline/success/index.js.map +1 -0
- package/lib/module/components/notification/callout-inline/warning/index.js +44 -0
- package/lib/module/components/notification/callout-inline/warning/index.js.map +1 -0
- package/lib/module/components/notification/index.js +12 -0
- package/lib/module/components/notification/index.js.map +1 -0
- package/lib/module/components/notification/subtitle/index.js +26 -0
- package/lib/module/components/notification/subtitle/index.js.map +1 -0
- package/lib/module/components/notification/subtitle-link/index.js +25 -0
- package/lib/module/components/notification/subtitle-link/index.js.map +1 -0
- package/lib/module/components/notification/toast/error/index.js +45 -0
- package/lib/module/components/notification/toast/error/index.js.map +1 -0
- package/lib/module/components/notification/toast/index.js +7 -0
- package/lib/module/components/notification/toast/index.js.map +1 -0
- package/lib/module/components/notification/toast/informational/index.js +45 -0
- package/lib/module/components/notification/toast/informational/index.js.map +1 -0
- package/lib/module/components/notification/toast/success/index.js +45 -0
- package/lib/module/components/notification/toast/success/index.js.map +1 -0
- package/lib/module/components/notification/toast/warning/index.js +45 -0
- package/lib/module/components/notification/toast/warning/index.js.map +1 -0
- package/lib/module/components/notification/types.js +2 -0
- package/lib/module/components/notification/types.js.map +1 -0
- package/lib/module/components/radio-button/index.js +102 -0
- package/lib/module/components/radio-button/index.js.map +1 -0
- package/lib/module/components/radio-button-group/_item-context.js +5 -0
- package/lib/module/components/radio-button-group/_item-context.js.map +1 -0
- package/lib/module/components/radio-button-group/_item.js +48 -0
- package/lib/module/components/radio-button-group/_item.js.map +1 -0
- package/lib/module/components/radio-button-group/_types/index.js +4 -0
- package/lib/module/components/radio-button-group/_types/index.js.map +1 -0
- package/lib/module/components/radio-button-group/_types/ref-base.js +4 -0
- package/lib/module/components/radio-button-group/_types/ref-base.js.map +1 -0
- package/lib/module/components/radio-button-group/index.js +136 -0
- package/lib/module/components/radio-button-group/index.js.map +1 -0
- package/lib/module/components/radio-button-input/index.js +196 -0
- package/lib/module/components/radio-button-input/index.js.map +1 -0
- package/lib/module/components/switch/index.js +238 -0
- package/lib/module/components/switch/index.js.map +1 -0
- package/lib/module/components/text/index.js +66 -0
- package/lib/module/components/text/index.js.map +1 -0
- package/lib/module/components/toggle/base/index.js +111 -0
- package/lib/module/components/toggle/base/index.js.map +1 -0
- package/lib/module/components/toggle/default/index.js +19 -0
- package/lib/module/components/toggle/default/index.js.map +1 -0
- package/lib/module/components/toggle/index.js +7 -0
- package/lib/module/components/toggle/index.js.map +1 -0
- package/lib/module/components/toggle/small/index.js +19 -0
- package/lib/module/components/toggle/small/index.js.map +1 -0
- package/lib/module/components/toggle/state.js +2 -0
- package/lib/module/components/toggle/state.js.map +1 -0
- package/lib/module/constants/color/code.json +273 -0
- package/lib/module/constants/color/index.js +6 -0
- package/lib/module/constants/color/index.js.map +1 -0
- package/lib/module/constants/color/tokens/gray-10.js +176 -0
- package/lib/module/constants/color/tokens/gray-10.js.map +1 -0
- package/lib/module/constants/color/tokens/gray-100.js +176 -0
- package/lib/module/constants/color/tokens/gray-100.js.map +1 -0
- package/lib/module/constants/color/tokens/index.js +5 -0
- package/lib/module/constants/color/tokens/index.js.map +1 -0
- package/lib/module/constants/index.js +8 -0
- package/lib/module/constants/index.js.map +1 -0
- package/lib/module/constants/motion/index.js +67 -0
- package/lib/module/constants/motion/index.js.map +1 -0
- package/lib/module/constants/spacing.js +18 -0
- package/lib/module/constants/spacing.js.map +1 -0
- package/lib/module/constants/typography/font-family.js +19 -0
- package/lib/module/constants/typography/font-family.js.map +1 -0
- package/lib/module/constants/typography/index.js +5 -0
- package/lib/module/constants/typography/index.js.map +1 -0
- package/lib/module/constants/typography/type-sets.js +137 -0
- package/lib/module/constants/typography/type-sets.js.map +1 -0
- package/lib/module/contexts/global-config/context.js +8 -0
- package/lib/module/contexts/global-config/context.js.map +1 -0
- package/lib/module/contexts/global-config/provider.js +18 -0
- package/lib/module/contexts/global-config/provider.js.map +1 -0
- package/lib/module/contexts/index.js +5 -0
- package/lib/module/contexts/index.js.map +1 -0
- package/lib/module/contexts/theme/context.js +10 -0
- package/lib/module/contexts/theme/context.js.map +1 -0
- package/lib/module/contexts/theme/index.js +4 -0
- package/lib/module/contexts/theme/index.js.map +1 -0
- package/lib/module/contexts/theme/provider.js +27 -0
- package/lib/module/contexts/theme/provider.js.map +1 -0
- package/lib/module/globals/color-scheme/index.js +11 -0
- package/lib/module/globals/color-scheme/index.js.map +1 -0
- package/lib/module/globals/index.js +5 -0
- package/lib/module/globals/index.js.map +1 -0
- package/lib/module/helpers/color/get-color-scheme.js +11 -0
- package/lib/module/helpers/color/get-color-scheme.js.map +1 -0
- package/lib/module/helpers/color/get-color-token.js +10 -0
- package/lib/module/helpers/color/get-color-token.js.map +1 -0
- package/lib/module/helpers/color/hex-to-rgba.js +7 -0
- package/lib/module/helpers/color/hex-to-rgba.js.map +1 -0
- package/lib/module/helpers/color/index.js +6 -0
- package/lib/module/helpers/color/index.js.map +1 -0
- package/lib/module/helpers/index.js +5 -0
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/styles/common.js +21 -0
- package/lib/module/styles/common.js.map +1 -0
- package/lib/module/styles/flex.js +78 -0
- package/lib/module/styles/flex.js.map +1 -0
- package/lib/module/styles/index.js +6 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/styles/text.js +63 -0
- package/lib/module/styles/text.js.map +1 -0
- package/lib/module/types/@carbon/icons/index.d.js +2 -0
- package/lib/module/types/@carbon/icons/index.d.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/shared.js +2 -0
- package/lib/module/types/shared.js.map +1 -0
- package/lib/module/types/theme/color-scheme.js +2 -0
- package/lib/module/types/theme/color-scheme.js.map +1 -0
- package/lib/module/types/theme/color-token.js +2 -0
- package/lib/module/types/theme/color-token.js.map +1 -0
- package/lib/module/types/theme/index.js +2 -0
- package/lib/module/types/theme/index.js.map +1 -0
- package/lib/module/types/typography.js +4 -0
- package/lib/module/types/typography.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/_carbon-react-native/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/_carbon-react-native/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/_style-sheet/create.d.ts +6 -0
- package/lib/typescript/commonjs/src/_style-sheet/create.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/_style-sheet/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/_style-sheet/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_context.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/accordion/_context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_header-border.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/accordion/_header-border.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_header.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/accordion/_header.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_item.d.ts +23 -0
- package/lib/typescript/commonjs/src/components/accordion/_item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_motion.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/accordion/_motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/_styles.d.ts +16 -0
- package/lib/typescript/commonjs/src/components/accordion/_styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/index.d.ts +16 -0
- package/lib/typescript/commonjs/src/components/accordion/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/accordion/types.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/accordion/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/base/index.d.ts +37 -0
- package/lib/typescript/commonjs/src/components/button/base/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/base-color/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/button/base-color/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/ghost/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/ghost/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/ghost-danger/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/ghost-danger/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/ghost-icon/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/button/ghost-icon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/primary/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/primary/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/primary-danger/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/primary-danger/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/secondary/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/secondary/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/size.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/button/size.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/tertiary/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/tertiary/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/button/tertiary-danger/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/button/tertiary-danger/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/checkbox/index.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/checkbox-group/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/checkbox-group/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/checkbox-input/index.d.ts +25 -0
- package/lib/typescript/commonjs/src/components/checkbox-input/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/collapsible/index.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/collapsible/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/form-helper-text/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/form-helper-text/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/form-label/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/form-label/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/icon/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/index.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/_base.d.ts +28 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/_base.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/error/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/informational/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/success/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/warning/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification/_status-hooks/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variant-context.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/notification/_variant-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/_button-ghost.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/_button-ghost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/_button-tertiary.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/_button-tertiary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/actionable/index.d.ts +30 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/actionable/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/actionable-inline/index.d.ts +30 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/actionable-inline/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/callout/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/callout/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/callout-inline/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/callout-inline/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/toast/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/notification/_variants/toast/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/error/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/informational/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/success/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/warning/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/error/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/informational/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/success/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/warning/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/actionable-inline/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/base/index.d.ts +29 -0
- package/lib/typescript/commonjs/src/components/notification/base/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout/error/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/callout/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout/informational/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout/success/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout/warning/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/error/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/informational/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/success/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/warning/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/callout-inline/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/notification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/subtitle/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/subtitle/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/subtitle-link/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/subtitle-link/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/toast/error/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/toast/error/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/toast/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/notification/toast/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/toast/informational/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/toast/informational/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/toast/success/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/toast/success/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/toast/warning/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/notification/toast/warning/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification/types.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/notification/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button/index.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/radio-button/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_item-context.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_item-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_item.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_item.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_types/index.d.ts +27 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_types/ref-base.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/_types/ref-base.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/radio-button-group/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/radio-button-input/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/radio-button-input/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/switch/index.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/text/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/toggle/base/index.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/toggle/base/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/toggle/default/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/toggle/default/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/toggle/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/toggle/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/toggle/small/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/toggle/small/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/toggle/state.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/toggle/state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/color/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/constants/color/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/gray-10.d.ts +172 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/gray-10.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/gray-100.d.ts +172 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/gray-100.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/constants/color/tokens/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/motion/index.d.ts +63 -0
- package/lib/typescript/commonjs/src/constants/motion/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/spacing.d.ts +17 -0
- package/lib/typescript/commonjs/src/constants/spacing.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/typography/font-family.d.ts +17 -0
- package/lib/typescript/commonjs/src/constants/typography/font-family.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/typography/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/constants/typography/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/typography/type-sets.d.ts +3 -0
- package/lib/typescript/commonjs/src/constants/typography/type-sets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/global-config/context.d.ts +10 -0
- package/lib/typescript/commonjs/src/contexts/global-config/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/global-config/provider.d.ts +6 -0
- package/lib/typescript/commonjs/src/contexts/global-config/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/contexts/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/theme/context.d.ts +7 -0
- package/lib/typescript/commonjs/src/contexts/theme/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/contexts/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/theme/provider.d.ts +11 -0
- package/lib/typescript/commonjs/src/contexts/theme/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/globals/color-scheme/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/globals/color-scheme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/globals/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/globals/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/color/get-color-scheme.d.ts +4 -0
- package/lib/typescript/commonjs/src/helpers/color/get-color-scheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/color/get-color-token.d.ts +3 -0
- package/lib/typescript/commonjs/src/helpers/color/get-color-token.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/color/hex-to-rgba.d.ts +2 -0
- package/lib/typescript/commonjs/src/helpers/color/hex-to-rgba.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/color/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/helpers/color/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/styles/common.d.ts +18 -0
- package/lib/typescript/commonjs/src/styles/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/styles/flex.d.ts +75 -0
- package/lib/typescript/commonjs/src/styles/flex.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/styles/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/styles/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/styles/text.d.ts +59 -0
- package/lib/typescript/commonjs/src/styles/text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/shared.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/theme/color-scheme.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/theme/color-scheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/theme/color-token.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/theme/color-token.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/types/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/typography.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/typography.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/_carbon-react-native/index.d.ts +7 -0
- package/lib/typescript/module/src/_carbon-react-native/index.d.ts.map +1 -0
- package/lib/typescript/module/src/_style-sheet/create.d.ts +6 -0
- package/lib/typescript/module/src/_style-sheet/create.d.ts.map +1 -0
- package/lib/typescript/module/src/_style-sheet/index.d.ts +5 -0
- package/lib/typescript/module/src/_style-sheet/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_context.d.ts +9 -0
- package/lib/typescript/module/src/components/accordion/_context.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_header-border.d.ts +10 -0
- package/lib/typescript/module/src/components/accordion/_header-border.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_header.d.ts +13 -0
- package/lib/typescript/module/src/components/accordion/_header.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_item.d.ts +23 -0
- package/lib/typescript/module/src/components/accordion/_item.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_motion.d.ts +3 -0
- package/lib/typescript/module/src/components/accordion/_motion.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/_styles.d.ts +16 -0
- package/lib/typescript/module/src/components/accordion/_styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/index.d.ts +16 -0
- package/lib/typescript/module/src/components/accordion/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/accordion/types.d.ts +2 -0
- package/lib/typescript/module/src/components/accordion/types.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/base/index.d.ts +37 -0
- package/lib/typescript/module/src/components/button/base/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/base-color/index.d.ts +21 -0
- package/lib/typescript/module/src/components/button/base-color/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/ghost/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/ghost/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/ghost-danger/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/ghost-danger/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/ghost-icon/index.d.ts +8 -0
- package/lib/typescript/module/src/components/button/ghost-icon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/index.d.ts +12 -0
- package/lib/typescript/module/src/components/button/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/primary/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/primary/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/primary-danger/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/primary-danger/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/secondary/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/secondary/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/size.d.ts +2 -0
- package/lib/typescript/module/src/components/button/size.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/tertiary/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/tertiary/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/button/tertiary-danger/index.d.ts +5 -0
- package/lib/typescript/module/src/components/button/tertiary-danger/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/checkbox/index.d.ts +32 -0
- package/lib/typescript/module/src/components/checkbox/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/checkbox-group/index.d.ts +21 -0
- package/lib/typescript/module/src/components/checkbox-group/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/checkbox-input/index.d.ts +25 -0
- package/lib/typescript/module/src/components/checkbox-input/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/collapsible/index.d.ts +26 -0
- package/lib/typescript/module/src/components/collapsible/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/form-helper-text/index.d.ts +11 -0
- package/lib/typescript/module/src/components/form-helper-text/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/form-label/index.d.ts +10 -0
- package/lib/typescript/module/src/components/form-label/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/icon/index.d.ts +13 -0
- package/lib/typescript/module/src/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/index.d.ts +18 -0
- package/lib/typescript/module/src/components/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/_base.d.ts +28 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/_base.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/error/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/informational/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/success/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/warning/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification/_status-hooks/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variant-context.d.ts +10 -0
- package/lib/typescript/module/src/components/notification/_variant-context.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/_button-ghost.d.ts +7 -0
- package/lib/typescript/module/src/components/notification/_variants/_button-ghost.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/_button-tertiary.d.ts +7 -0
- package/lib/typescript/module/src/components/notification/_variants/_button-tertiary.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/actionable/index.d.ts +30 -0
- package/lib/typescript/module/src/components/notification/_variants/actionable/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/actionable-inline/index.d.ts +30 -0
- package/lib/typescript/module/src/components/notification/_variants/actionable-inline/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/callout/index.d.ts +13 -0
- package/lib/typescript/module/src/components/notification/_variants/callout/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/callout-inline/index.d.ts +13 -0
- package/lib/typescript/module/src/components/notification/_variants/callout-inline/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/index.d.ts +6 -0
- package/lib/typescript/module/src/components/notification/_variants/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/_variants/toast/index.d.ts +17 -0
- package/lib/typescript/module/src/components/notification/_variants/toast/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable/error/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/actionable/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable/informational/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable/success/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable/warning/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/error/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/informational/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/success/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/warning/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/actionable-inline/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/base/index.d.ts +29 -0
- package/lib/typescript/module/src/components/notification/base/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout/error/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/callout/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout/informational/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout/success/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout/warning/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout-inline/error/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout-inline/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout-inline/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/callout-inline/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout-inline/informational/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout-inline/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout-inline/success/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout-inline/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/callout-inline/warning/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/callout-inline/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/index.d.ts +10 -0
- package/lib/typescript/module/src/components/notification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/subtitle/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/subtitle/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/subtitle-link/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/subtitle-link/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/toast/error/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/toast/error/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/toast/index.d.ts +5 -0
- package/lib/typescript/module/src/components/notification/toast/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/toast/informational/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/toast/informational/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/toast/success/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/toast/success/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/toast/warning/index.d.ts +9 -0
- package/lib/typescript/module/src/components/notification/toast/warning/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification/types.d.ts +2 -0
- package/lib/typescript/module/src/components/notification/types.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button/index.d.ts +32 -0
- package/lib/typescript/module/src/components/radio-button/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-group/_item-context.d.ts +8 -0
- package/lib/typescript/module/src/components/radio-button-group/_item-context.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-group/_item.d.ts +3 -0
- package/lib/typescript/module/src/components/radio-button-group/_item.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-group/_types/index.d.ts +27 -0
- package/lib/typescript/module/src/components/radio-button-group/_types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-group/_types/ref-base.d.ts +9 -0
- package/lib/typescript/module/src/components/radio-button-group/_types/ref-base.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-group/index.d.ts +6 -0
- package/lib/typescript/module/src/components/radio-button-group/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/radio-button-input/index.d.ts +22 -0
- package/lib/typescript/module/src/components/radio-button-input/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/switch/index.d.ts +33 -0
- package/lib/typescript/module/src/components/switch/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/text/index.d.ts +8 -0
- package/lib/typescript/module/src/components/text/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/toggle/base/index.d.ts +33 -0
- package/lib/typescript/module/src/components/toggle/base/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/toggle/default/index.d.ts +10 -0
- package/lib/typescript/module/src/components/toggle/default/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/toggle/index.d.ts +5 -0
- package/lib/typescript/module/src/components/toggle/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/toggle/small/index.d.ts +8 -0
- package/lib/typescript/module/src/components/toggle/small/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/toggle/state.d.ts +2 -0
- package/lib/typescript/module/src/components/toggle/state.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/color/index.d.ts +4 -0
- package/lib/typescript/module/src/constants/color/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/color/tokens/gray-10.d.ts +172 -0
- package/lib/typescript/module/src/constants/color/tokens/gray-10.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/color/tokens/gray-100.d.ts +172 -0
- package/lib/typescript/module/src/constants/color/tokens/gray-100.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/color/tokens/index.d.ts +3 -0
- package/lib/typescript/module/src/constants/color/tokens/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/index.d.ts +6 -0
- package/lib/typescript/module/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/motion/index.d.ts +63 -0
- package/lib/typescript/module/src/constants/motion/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/spacing.d.ts +17 -0
- package/lib/typescript/module/src/constants/spacing.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/typography/font-family.d.ts +17 -0
- package/lib/typescript/module/src/constants/typography/font-family.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/typography/index.d.ts +3 -0
- package/lib/typescript/module/src/constants/typography/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/typography/type-sets.d.ts +3 -0
- package/lib/typescript/module/src/constants/typography/type-sets.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/global-config/context.d.ts +10 -0
- package/lib/typescript/module/src/contexts/global-config/context.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/global-config/provider.d.ts +6 -0
- package/lib/typescript/module/src/contexts/global-config/provider.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/index.d.ts +3 -0
- package/lib/typescript/module/src/contexts/index.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/theme/context.d.ts +7 -0
- package/lib/typescript/module/src/contexts/theme/context.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/theme/index.d.ts +3 -0
- package/lib/typescript/module/src/contexts/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/theme/provider.d.ts +11 -0
- package/lib/typescript/module/src/contexts/theme/provider.d.ts.map +1 -0
- package/lib/typescript/module/src/globals/color-scheme/index.d.ts +5 -0
- package/lib/typescript/module/src/globals/color-scheme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/globals/index.d.ts +3 -0
- package/lib/typescript/module/src/globals/index.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/color/get-color-scheme.d.ts +4 -0
- package/lib/typescript/module/src/helpers/color/get-color-scheme.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/color/get-color-token.d.ts +3 -0
- package/lib/typescript/module/src/helpers/color/get-color-token.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/color/hex-to-rgba.d.ts +2 -0
- package/lib/typescript/module/src/helpers/color/hex-to-rgba.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/color/index.d.ts +4 -0
- package/lib/typescript/module/src/helpers/color/index.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/index.d.ts +3 -0
- package/lib/typescript/module/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +9 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/styles/common.d.ts +18 -0
- package/lib/typescript/module/src/styles/common.d.ts.map +1 -0
- package/lib/typescript/module/src/styles/flex.d.ts +75 -0
- package/lib/typescript/module/src/styles/flex.d.ts.map +1 -0
- package/lib/typescript/module/src/styles/index.d.ts +4 -0
- package/lib/typescript/module/src/styles/index.d.ts.map +1 -0
- package/lib/typescript/module/src/styles/text.d.ts +59 -0
- package/lib/typescript/module/src/styles/text.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +5 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/shared.d.ts +2 -0
- package/lib/typescript/module/src/types/shared.d.ts.map +1 -0
- package/lib/typescript/module/src/types/theme/color-scheme.d.ts +2 -0
- package/lib/typescript/module/src/types/theme/color-scheme.d.ts.map +1 -0
- package/lib/typescript/module/src/types/theme/color-token.d.ts +2 -0
- package/lib/typescript/module/src/types/theme/color-token.d.ts.map +1 -0
- package/lib/typescript/module/src/types/theme/index.d.ts +3 -0
- package/lib/typescript/module/src/types/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/typography.d.ts +11 -0
- package/lib/typescript/module/src/types/typography.d.ts.map +1 -0
- package/package.json +73 -0
- package/src/_carbon-react-native/index.tsx +37 -0
- package/src/_style-sheet/create.ts +145 -0
- package/src/_style-sheet/index.ts +9 -0
- package/src/components/accordion/_context.tsx +19 -0
- package/src/components/accordion/_header-border.tsx +68 -0
- package/src/components/accordion/_header.tsx +269 -0
- package/src/components/accordion/_item.tsx +186 -0
- package/src/components/accordion/_motion.ts +27 -0
- package/src/components/accordion/_styles.ts +24 -0
- package/src/components/accordion/index.tsx +152 -0
- package/src/components/accordion/types.ts +4 -0
- package/src/components/button/base/index.tsx +270 -0
- package/src/components/button/base-color/index.tsx +277 -0
- package/src/components/button/ghost/index.tsx +132 -0
- package/src/components/button/ghost-danger/index.tsx +132 -0
- package/src/components/button/ghost-icon/index.tsx +125 -0
- package/src/components/button/index.tsx +11 -0
- package/src/components/button/primary/index.tsx +108 -0
- package/src/components/button/primary-danger/index.tsx +108 -0
- package/src/components/button/secondary/index.tsx +108 -0
- package/src/components/button/size.ts +7 -0
- package/src/components/button/tertiary/index.tsx +125 -0
- package/src/components/button/tertiary-danger/index.tsx +125 -0
- package/src/components/checkbox/index.tsx +239 -0
- package/src/components/checkbox-group/index.tsx +197 -0
- package/src/components/checkbox-input/index.tsx +368 -0
- package/src/components/collapsible/index.tsx +289 -0
- package/src/components/form-helper-text/index.tsx +84 -0
- package/src/components/form-label/index.tsx +66 -0
- package/src/components/icon/index.tsx +53 -0
- package/src/components/index.tsx +23 -0
- package/src/components/notification/_status-hooks/_base.tsx +97 -0
- package/src/components/notification/_status-hooks/error/index.tsx +61 -0
- package/src/components/notification/_status-hooks/index.tsx +4 -0
- package/src/components/notification/_status-hooks/informational/index.tsx +61 -0
- package/src/components/notification/_status-hooks/success/index.tsx +61 -0
- package/src/components/notification/_status-hooks/warning/index.tsx +61 -0
- package/src/components/notification/_variant-context.tsx +35 -0
- package/src/components/notification/_variants/_button-ghost.tsx +65 -0
- package/src/components/notification/_variants/_button-tertiary.tsx +65 -0
- package/src/components/notification/_variants/actionable/index.tsx +105 -0
- package/src/components/notification/_variants/actionable-inline/index.tsx +105 -0
- package/src/components/notification/_variants/callout/index.tsx +76 -0
- package/src/components/notification/_variants/callout-inline/index.tsx +76 -0
- package/src/components/notification/_variants/index.tsx +5 -0
- package/src/components/notification/_variants/toast/index.tsx +135 -0
- package/src/components/notification/actionable/error/index.tsx +86 -0
- package/src/components/notification/actionable/index.tsx +4 -0
- package/src/components/notification/actionable/informational/index.tsx +86 -0
- package/src/components/notification/actionable/success/index.tsx +86 -0
- package/src/components/notification/actionable/warning/index.tsx +86 -0
- package/src/components/notification/actionable-inline/error/index.tsx +85 -0
- package/src/components/notification/actionable-inline/index.tsx +4 -0
- package/src/components/notification/actionable-inline/informational/index.tsx +85 -0
- package/src/components/notification/actionable-inline/success/index.tsx +85 -0
- package/src/components/notification/actionable-inline/warning/index.tsx +85 -0
- package/src/components/notification/base/index.tsx +319 -0
- package/src/components/notification/callout/error/index.tsx +86 -0
- package/src/components/notification/callout/index.tsx +4 -0
- package/src/components/notification/callout/informational/index.tsx +86 -0
- package/src/components/notification/callout/success/index.tsx +86 -0
- package/src/components/notification/callout/warning/index.tsx +86 -0
- package/src/components/notification/callout-inline/error/index.tsx +85 -0
- package/src/components/notification/callout-inline/index.tsx +4 -0
- package/src/components/notification/callout-inline/informational/index.tsx +85 -0
- package/src/components/notification/callout-inline/success/index.tsx +85 -0
- package/src/components/notification/callout-inline/warning/index.tsx +85 -0
- package/src/components/notification/index.tsx +17 -0
- package/src/components/notification/subtitle/index.tsx +58 -0
- package/src/components/notification/subtitle-link/index.tsx +57 -0
- package/src/components/notification/toast/error/index.tsx +86 -0
- package/src/components/notification/toast/index.tsx +4 -0
- package/src/components/notification/toast/informational/index.tsx +86 -0
- package/src/components/notification/toast/success/index.tsx +86 -0
- package/src/components/notification/toast/warning/index.tsx +86 -0
- package/src/components/notification/types.ts +3 -0
- package/src/components/radio-button/index.tsx +238 -0
- package/src/components/radio-button-group/_item-context.tsx +15 -0
- package/src/components/radio-button-group/_item.tsx +91 -0
- package/src/components/radio-button-group/_types/index.ts +55 -0
- package/src/components/radio-button-group/_types/ref-base.ts +11 -0
- package/src/components/radio-button-group/index.tsx +251 -0
- package/src/components/radio-button-input/index.tsx +366 -0
- package/src/components/switch/index.tsx +448 -0
- package/src/components/text/index.tsx +135 -0
- package/src/components/toggle/base/index.tsx +254 -0
- package/src/components/toggle/default/index.tsx +41 -0
- package/src/components/toggle/index.tsx +4 -0
- package/src/components/toggle/small/index.tsx +39 -0
- package/src/components/toggle/state.ts +4 -0
- package/src/constants/color/code.json +273 -0
- package/src/constants/color/index.ts +7 -0
- package/src/constants/color/tokens/gray-10.ts +197 -0
- package/src/constants/color/tokens/gray-100.ts +197 -0
- package/src/constants/color/tokens/index.ts +2 -0
- package/src/constants/index.ts +11 -0
- package/src/constants/motion/index.ts +34 -0
- package/src/constants/spacing.ts +17 -0
- package/src/constants/typography/font-family.ts +16 -0
- package/src/constants/typography/index.ts +2 -0
- package/src/constants/typography/type-sets.ts +151 -0
- package/src/contexts/global-config/context.ts +20 -0
- package/src/contexts/global-config/provider.tsx +26 -0
- package/src/contexts/index.tsx +2 -0
- package/src/contexts/theme/context.ts +26 -0
- package/src/contexts/theme/index.tsx +5 -0
- package/src/contexts/theme/provider.tsx +55 -0
- package/src/globals/color-scheme/index.ts +13 -0
- package/src/globals/index.ts +5 -0
- package/src/helpers/color/get-color-scheme.ts +19 -0
- package/src/helpers/color/get-color-token.ts +14 -0
- package/src/helpers/color/hex-to-rgba.ts +11 -0
- package/src/helpers/color/index.ts +3 -0
- package/src/helpers/index.ts +5 -0
- package/src/index.tsx +9 -0
- package/src/styles/common.ts +21 -0
- package/src/styles/flex.ts +78 -0
- package/src/styles/index.ts +3 -0
- package/src/styles/text.ts +66 -0
- package/src/types/@carbon/icons/index.d.ts +1 -0
- package/src/types/index.ts +9 -0
- package/src/types/shared.ts +1 -0
- package/src/types/theme/color-scheme.ts +1 -0
- package/src/types/theme/color-token.ts +170 -0
- package/src/types/theme/index.ts +2 -0
- package/src/types/typography.ts +36 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RadioButtonInput = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../../contexts/index.js");
|
|
10
|
+
var _index2 = require("../../styles/index.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const RadioButtonInput = exports.RadioButtonInput = /*#__PURE__*/(0, _react.forwardRef)(function RadioButtonInput({
|
|
13
|
+
controlled,
|
|
14
|
+
checked: checkedProp = false,
|
|
15
|
+
value,
|
|
16
|
+
interactiveState = 'normal',
|
|
17
|
+
role = 'radio',
|
|
18
|
+
onChange,
|
|
19
|
+
onBlur,
|
|
20
|
+
onFocus,
|
|
21
|
+
onPress,
|
|
22
|
+
style,
|
|
23
|
+
...props
|
|
24
|
+
}, forwardedRef) {
|
|
25
|
+
const themeContext = (0, _react.useContext)(_index.ThemeContext),
|
|
26
|
+
viewRef = (0, _react.useRef)(null),
|
|
27
|
+
ref = (0, _react.useRef)({
|
|
28
|
+
isMounted: false,
|
|
29
|
+
checked: checkedProp
|
|
30
|
+
}),
|
|
31
|
+
[isFocused, setIsFocused] = (0, _react.useState)(false),
|
|
32
|
+
[checkedSelf, setCheckedSelf] = (0, _react.useState)(checkedProp),
|
|
33
|
+
checked = controlled ? checkedProp : checkedSelf,
|
|
34
|
+
blurHandler = (0, _react.useCallback)(event => {
|
|
35
|
+
onBlur?.(event);
|
|
36
|
+
setIsFocused(false);
|
|
37
|
+
}, [onBlur]),
|
|
38
|
+
focusHandler = (0, _react.useCallback)(event => {
|
|
39
|
+
onFocus?.(event);
|
|
40
|
+
setIsFocused(true);
|
|
41
|
+
}, [onFocus]),
|
|
42
|
+
pressHandler = (0, _react.useCallback)(event => {
|
|
43
|
+
onPress?.(event);
|
|
44
|
+
if (!controlled) {
|
|
45
|
+
setCheckedSelf(true);
|
|
46
|
+
}
|
|
47
|
+
}, [controlled, onPress]);
|
|
48
|
+
(0, _react.useEffect)(() => {
|
|
49
|
+
if (!ref.current.isMounted) {
|
|
50
|
+
ref.current.isMounted = true;
|
|
51
|
+
} else {
|
|
52
|
+
ref.current.checked = checked;
|
|
53
|
+
onChange?.(checked, value);
|
|
54
|
+
}
|
|
55
|
+
}, [checked, value, onChange]);
|
|
56
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => {
|
|
57
|
+
return Object.assign(viewRef.current ?? {}, {
|
|
58
|
+
get checked() {
|
|
59
|
+
return ref.current.checked;
|
|
60
|
+
},
|
|
61
|
+
setChecked(checked_) {
|
|
62
|
+
if (!controlled) {
|
|
63
|
+
if (typeof checked_ === 'boolean') {
|
|
64
|
+
ref.current.checked = checked_;
|
|
65
|
+
} else {
|
|
66
|
+
ref.current.checked = checked_(ref.current.checked);
|
|
67
|
+
}
|
|
68
|
+
setCheckedSelf(ref.current.checked);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}, [controlled]);
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
74
|
+
...props,
|
|
75
|
+
role: role,
|
|
76
|
+
disabled: interactiveState === 'disabled',
|
|
77
|
+
onBlur: blurHandler,
|
|
78
|
+
onFocus: focusHandler,
|
|
79
|
+
onPress: pressHandler,
|
|
80
|
+
style: [_index2.FlexStyle.items_center, _index2.FlexStyle.justify_center, _index2.CommonStyle.relative, baseStyle.radioButton, getInteractiveStateStyle('container', interactiveState, checked, themeContext.color), style],
|
|
81
|
+
ref: viewRef,
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
83
|
+
style: [_index2.CommonStyle.absolute, _index2.CommonStyle.overflow_hidden, baseStyle.focusBox, isFocused ? {
|
|
84
|
+
borderColor: themeContext.color.focus
|
|
85
|
+
} : null]
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
87
|
+
style: [_index2.FlexStyle.flex_initial, baseStyle.marker, getInteractiveStateStyle('marker', interactiveState, checked, themeContext.color)]
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
const size = 18,
|
|
92
|
+
baseStyle = _reactNative.StyleSheet.create({
|
|
93
|
+
radioButton: {
|
|
94
|
+
width: size,
|
|
95
|
+
height: size,
|
|
96
|
+
borderRadius: size,
|
|
97
|
+
borderWidth: 1
|
|
98
|
+
},
|
|
99
|
+
focusBox: {
|
|
100
|
+
width: size + 6,
|
|
101
|
+
height: size + 6,
|
|
102
|
+
borderRadius: size + 3,
|
|
103
|
+
borderWidth: 2,
|
|
104
|
+
borderColor: 'transparent'
|
|
105
|
+
},
|
|
106
|
+
marker: {
|
|
107
|
+
borderRadius: size,
|
|
108
|
+
width: size / 2,
|
|
109
|
+
height: size / 2
|
|
110
|
+
}
|
|
111
|
+
}),
|
|
112
|
+
mapInteractiveStateStyle = {
|
|
113
|
+
normal: {
|
|
114
|
+
true: {
|
|
115
|
+
container: {
|
|
116
|
+
borderColor: 'icon_primary'
|
|
117
|
+
},
|
|
118
|
+
marker: {
|
|
119
|
+
backgroundColor: 'icon_primary'
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
false: {
|
|
123
|
+
container: {
|
|
124
|
+
borderColor: 'icon_primary'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
disabled: {
|
|
129
|
+
true: {
|
|
130
|
+
container: {
|
|
131
|
+
borderColor: 'icon_disabled'
|
|
132
|
+
},
|
|
133
|
+
marker: {
|
|
134
|
+
backgroundColor: 'icon_disabled'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
false: {
|
|
138
|
+
container: {
|
|
139
|
+
borderColor: 'icon_disabled'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
error: {
|
|
144
|
+
true: {
|
|
145
|
+
container: {
|
|
146
|
+
borderColor: 'support_error'
|
|
147
|
+
},
|
|
148
|
+
marker: {
|
|
149
|
+
backgroundColor: 'icon_primary'
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
false: {
|
|
153
|
+
container: {
|
|
154
|
+
borderColor: 'support_error'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
read_only: {
|
|
159
|
+
true: {
|
|
160
|
+
container: {
|
|
161
|
+
borderColor: 'icon_disabled'
|
|
162
|
+
},
|
|
163
|
+
marker: {
|
|
164
|
+
backgroundColor: 'icon_primary'
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
false: {
|
|
168
|
+
container: {
|
|
169
|
+
borderColor: 'icon_disabled'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
warning: {
|
|
174
|
+
true: {
|
|
175
|
+
container: {
|
|
176
|
+
borderColor: 'icon_primary'
|
|
177
|
+
},
|
|
178
|
+
marker: {
|
|
179
|
+
backgroundColor: 'icon_primary'
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
false: {
|
|
183
|
+
container: {
|
|
184
|
+
borderColor: 'icon_primary'
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
function getInteractiveStateStyle(key, interactiveState, checked, color) {
|
|
190
|
+
const style = mapInteractiveStateStyle[interactiveState][`${checked}`],
|
|
191
|
+
parsedStyle = {};
|
|
192
|
+
if (style[key]?.backgroundColor) {
|
|
193
|
+
parsedStyle.backgroundColor = color[style[key].backgroundColor];
|
|
194
|
+
}
|
|
195
|
+
if (style[key]?.borderColor) {
|
|
196
|
+
parsedStyle.borderColor = color[style[key].borderColor];
|
|
197
|
+
}
|
|
198
|
+
return parsedStyle;
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_jsxRuntime","RadioButtonInput","exports","forwardRef","controlled","checked","checkedProp","value","interactiveState","role","onChange","onBlur","onFocus","onPress","style","props","forwardedRef","themeContext","useContext","ThemeContext","viewRef","useRef","ref","isMounted","isFocused","setIsFocused","useState","checkedSelf","setCheckedSelf","blurHandler","useCallback","event","focusHandler","pressHandler","useEffect","current","useImperativeHandle","Object","assign","setChecked","checked_","jsxs","Pressable","disabled","FlexStyle","items_center","justify_center","CommonStyle","relative","baseStyle","radioButton","getInteractiveStateStyle","color","children","jsx","View","absolute","overflow_hidden","focusBox","borderColor","focus","flex_initial","marker","size","StyleSheet","create","width","height","borderRadius","borderWidth","mapInteractiveStateStyle","normal","true","container","backgroundColor","false","error","read_only","warning","key","parsedStyle"],"sourceRoot":"../../../../src","sources":["components/radio-button-input/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAUA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,MAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AAGqB,IAAAI,WAAA,GAAAJ,OAAA;AAyCd,MAAMK,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,gBAAG,IAAAE,iBAAU,EACzC,SAASF,gBAAgBA,CACxB;EACCG,UAAU;EACVC,OAAO,EAAEC,WAAW,GAAG,KAAK;EAC5BC,KAAK;EACLC,gBAAgB,GAAG,QAAQ;EAC3BC,IAAI,GAAG,OAAO;EACdC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,OAAO;EACPC,KAAK;EACL,GAAGC;AACJ,CAAC,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AACtC,KAAK,CAACiE,GAAG,CAAC,CAACL,eAAe,CAAC;EAChE;EAEA,IAAG5D,KAAK,CAACiE,GAAG,CAAC,EAAEpB,WAAW,EAAE;IAC3BqB,WAAW,CAACrB,WAAW,GAAGP,KAAK,CAACtC,KAAK,CAACiE,GAAG,CAAC,CAACpB,WAAW,CAAC;EACxD;EAEA,OAAOqB,WAAW;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Switch = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _ = _interopRequireDefault(require("@carbon/icons/es/checkmark/20"));
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _index = require("../../constants/index.js");
|
|
12
|
+
var _index2 = require("../../contexts/index.js");
|
|
13
|
+
var _index3 = require("../../styles/index.js");
|
|
14
|
+
var _index4 = require("../icon/index.js");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
/**
|
|
20
|
+
* https://carbondesignsystem.com/components/toggle/style/#size
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const Switch = exports.Switch = /*#__PURE__*/(0, _react.forwardRef)(function Switch({
|
|
24
|
+
size = 'default',
|
|
25
|
+
state = 'normal',
|
|
26
|
+
controlled,
|
|
27
|
+
value: valueProp,
|
|
28
|
+
trackColor: trackColorProp,
|
|
29
|
+
thumbColor: thumbColorProp,
|
|
30
|
+
motion = {
|
|
31
|
+
false: motionDefault,
|
|
32
|
+
true: motionDefault
|
|
33
|
+
},
|
|
34
|
+
style,
|
|
35
|
+
role = 'switch',
|
|
36
|
+
'aria-checked': ariaChecked,
|
|
37
|
+
onChange,
|
|
38
|
+
onBlur,
|
|
39
|
+
onFocus,
|
|
40
|
+
onPress,
|
|
41
|
+
...props
|
|
42
|
+
}, forwardedRef) {
|
|
43
|
+
const isMounted = (0, _react.useRef)(false),
|
|
44
|
+
viewRef = (0, _react.useRef)(null),
|
|
45
|
+
ref = (0, _react.useRef)({
|
|
46
|
+
value: !!valueProp
|
|
47
|
+
}),
|
|
48
|
+
themeContext = (0, _react.useContext)(_index2.ThemeContext),
|
|
49
|
+
[isFocused, setIsFocused] = (0, _react.useState)(false),
|
|
50
|
+
[valueSelf, setValueSelf] = (0, _react.useState)(!!valueProp),
|
|
51
|
+
value = controlled ? !!valueProp : valueSelf,
|
|
52
|
+
/**
|
|
53
|
+
* 0 -> false/inactive
|
|
54
|
+
* 1 -> true/active
|
|
55
|
+
*/
|
|
56
|
+
sharedValue = (0, _reactNativeReanimated.useSharedValue)(value ? 1 : 0),
|
|
57
|
+
{
|
|
58
|
+
trackColor,
|
|
59
|
+
thumbColor
|
|
60
|
+
} = (0, _react.useMemo)(() => {
|
|
61
|
+
const trackColor_ = mapSwitchTrackColorToken[state],
|
|
62
|
+
thumbColor_ = themeContext.color[mapSwitchThumbColorToken[state]];
|
|
63
|
+
return {
|
|
64
|
+
trackColor: trackColorProp ?? {
|
|
65
|
+
false: trackColor_.false ? themeContext.color[trackColor_.false] : 'transparent',
|
|
66
|
+
true: trackColor_.true ? themeContext.color[trackColor_.true] : 'transparent'
|
|
67
|
+
},
|
|
68
|
+
thumbColor: thumbColorProp ?? {
|
|
69
|
+
false: thumbColor_,
|
|
70
|
+
true: thumbColor_
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
+
}, [state, trackColorProp, thumbColorProp]),
|
|
75
|
+
trackAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
76
|
+
return {
|
|
77
|
+
backgroundColor: (0, _reactNativeReanimated.interpolateColor)(sharedValue.value, interpolationRange, [trackColor.false, trackColor.true])
|
|
78
|
+
};
|
|
79
|
+
}),
|
|
80
|
+
thumbAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
81
|
+
return {
|
|
82
|
+
transform: [{
|
|
83
|
+
translateX: (0, _reactNativeReanimated.interpolate)(sharedValue.value, interpolationRange, [
|
|
84
|
+
/**
|
|
85
|
+
* looks like IBM didn't explicitly tell this gap between the container and the thumb/handle
|
|
86
|
+
* i have to look at the Carbon React just to find this padding (they are using inset-inline-start there)
|
|
87
|
+
*/
|
|
88
|
+
3, sizeStyle[size].width - thumbSizeStyle[size].width - 3])
|
|
89
|
+
}],
|
|
90
|
+
backgroundColor: (0, _reactNativeReanimated.interpolateColor)(sharedValue.value, interpolationRange, [thumbColor.false, thumbColor.true])
|
|
91
|
+
};
|
|
92
|
+
}),
|
|
93
|
+
iconAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
94
|
+
return {
|
|
95
|
+
opacity: (0, _reactNativeReanimated.interpolate)(sharedValue.value, interpolationRange, interpolationRange)
|
|
96
|
+
};
|
|
97
|
+
}),
|
|
98
|
+
blurHandler = (0, _react.useCallback)(event => {
|
|
99
|
+
onBlur?.(event);
|
|
100
|
+
setIsFocused(false);
|
|
101
|
+
}, [onBlur]),
|
|
102
|
+
focusHandler = (0, _react.useCallback)(event => {
|
|
103
|
+
onFocus?.(event);
|
|
104
|
+
setIsFocused(true);
|
|
105
|
+
}, [onFocus]),
|
|
106
|
+
pressHandler = (0, _react.useCallback)(event => {
|
|
107
|
+
onPress?.(event);
|
|
108
|
+
if (!controlled) {
|
|
109
|
+
ref.current.value = !ref.current.value;
|
|
110
|
+
setValueSelf(ref.current.value);
|
|
111
|
+
}
|
|
112
|
+
}, [controlled, onPress]);
|
|
113
|
+
(0, _react.useEffect)(() => {
|
|
114
|
+
if (value) {
|
|
115
|
+
sharedValue.value = (0, _reactNativeReanimated.withTiming)(1, motion.true);
|
|
116
|
+
} else {
|
|
117
|
+
sharedValue.value = (0, _reactNativeReanimated.withTiming)(0, motion.false);
|
|
118
|
+
}
|
|
119
|
+
}, [motion, sharedValue, value]);
|
|
120
|
+
(0, _react.useEffect)(() => {
|
|
121
|
+
if (!isMounted.current) {
|
|
122
|
+
isMounted.current = true;
|
|
123
|
+
} else {
|
|
124
|
+
ref.current.value = value;
|
|
125
|
+
onChange?.(value);
|
|
126
|
+
}
|
|
127
|
+
}, [value, onChange]);
|
|
128
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => {
|
|
129
|
+
return Object.assign(viewRef.current ?? {}, {
|
|
130
|
+
get value() {
|
|
131
|
+
return ref.current.value;
|
|
132
|
+
},
|
|
133
|
+
setValue(valueParam) {
|
|
134
|
+
if (!controlled) {
|
|
135
|
+
if (typeof valueParam === 'boolean') {
|
|
136
|
+
setValueSelf(valueParam);
|
|
137
|
+
} else {
|
|
138
|
+
setValueSelf(valueParam(ref.current.value));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}, [controlled]);
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(PressableAnimated, {
|
|
145
|
+
...props,
|
|
146
|
+
role: role,
|
|
147
|
+
"aria-checked": ariaChecked ?? value,
|
|
148
|
+
style: [_index3.FlexStyle.justify_center, baseStyle.container, sizeStyle[size], trackAnimatedStyle, state === 'read_only' ? [baseStyle.containerReadonly, {
|
|
149
|
+
borderColor: themeContext.color.border_subtle_00
|
|
150
|
+
}] : null, style],
|
|
151
|
+
onBlur: blurHandler,
|
|
152
|
+
onFocus: focusHandler,
|
|
153
|
+
onPress: pressHandler,
|
|
154
|
+
ref: viewRef,
|
|
155
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
156
|
+
style: [_index3.FlexStyle.items_center, _index3.FlexStyle.justify_center, baseStyle.thumb, thumbSizeStyle[size], thumbAnimatedStyle],
|
|
157
|
+
children: size === 'small' && /*#__PURE__*/(0, _jsxRuntime.jsx)(IconAnimated, {
|
|
158
|
+
src: _.default,
|
|
159
|
+
fill: themeContext.color.support_success,
|
|
160
|
+
style: iconAnimatedStyle
|
|
161
|
+
})
|
|
162
|
+
}), isFocused && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
163
|
+
style: [_index3.CommonStyle.absolute, focusBoxSizeStyle[size], baseStyle.focusBox, {
|
|
164
|
+
borderColor: themeContext.color.focus
|
|
165
|
+
}]
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
const baseStyle = _reactNative.StyleSheet.create({
|
|
170
|
+
container: {
|
|
171
|
+
borderRadius: 24
|
|
172
|
+
},
|
|
173
|
+
containerReadonly: {
|
|
174
|
+
borderWidth: 1
|
|
175
|
+
},
|
|
176
|
+
thumb: {
|
|
177
|
+
borderRadius: 18
|
|
178
|
+
},
|
|
179
|
+
focusBox: {
|
|
180
|
+
borderWidth: 2,
|
|
181
|
+
borderRadius: 24,
|
|
182
|
+
transform: [{
|
|
183
|
+
translateX: -3
|
|
184
|
+
}]
|
|
185
|
+
}
|
|
186
|
+
}),
|
|
187
|
+
sizeStyle = _reactNative.StyleSheet.create({
|
|
188
|
+
default: {
|
|
189
|
+
width: 48,
|
|
190
|
+
height: 24
|
|
191
|
+
},
|
|
192
|
+
small: {
|
|
193
|
+
width: 32,
|
|
194
|
+
height: 16
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
thumbSizeStyle = _reactNative.StyleSheet.create({
|
|
198
|
+
default: {
|
|
199
|
+
width: 18,
|
|
200
|
+
height: 18
|
|
201
|
+
},
|
|
202
|
+
small: {
|
|
203
|
+
width: 10,
|
|
204
|
+
height: 10
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
focusBoxSizeStyle = _reactNative.StyleSheet.create({
|
|
208
|
+
default: {
|
|
209
|
+
width: sizeStyle.default.width + 6,
|
|
210
|
+
height: sizeStyle.default.height + 6
|
|
211
|
+
},
|
|
212
|
+
small: {
|
|
213
|
+
width: sizeStyle.small.width + 6,
|
|
214
|
+
height: sizeStyle.small.height + 6
|
|
215
|
+
}
|
|
216
|
+
}),
|
|
217
|
+
mapSwitchTrackColorToken = {
|
|
218
|
+
normal: {
|
|
219
|
+
false: 'toggle_off',
|
|
220
|
+
true: 'support_success'
|
|
221
|
+
},
|
|
222
|
+
disabled: {
|
|
223
|
+
false: 'button_disabled',
|
|
224
|
+
true: 'button_disabled'
|
|
225
|
+
},
|
|
226
|
+
read_only: {},
|
|
227
|
+
focused: {
|
|
228
|
+
false: 'toggle_off',
|
|
229
|
+
true: 'support_success'
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
mapSwitchThumbColorToken = {
|
|
233
|
+
normal: 'icon_on_color',
|
|
234
|
+
disabled: 'icon_on_color_disabled',
|
|
235
|
+
read_only: 'icon_primary',
|
|
236
|
+
focused: 'icon_on_color'
|
|
237
|
+
},
|
|
238
|
+
interpolationRange = [0, 1],
|
|
239
|
+
motionDefault = {
|
|
240
|
+
duration: _index.MotionConstant.Durations.fast_01,
|
|
241
|
+
easing: _reactNativeReanimated.Easing.bezier(_index.MotionConstant.Easings.exit.productive.x1, _index.MotionConstant.Easings.exit.productive.y1, _index.MotionConstant.Easings.exit.productive.x2, _index.MotionConstant.Easings.exit.productive.y2)
|
|
242
|
+
},
|
|
243
|
+
PressableAnimated = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.Pressable),
|
|
244
|
+
IconAnimated = _reactNativeReanimated.default.createAnimatedComponent(_index4.Icon);
|
|
245
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_","_interopRequireDefault","_reactNativeReanimated","_interopRequireWildcard","_index","_index2","_index3","_index4","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Switch","exports","forwardRef","size","state","controlled","value","valueProp","trackColor","trackColorProp","thumbColor","thumbColorProp","motion","false","motionDefault","true","style","role","ariaChecked","onChange","onBlur","onFocus","onPress","props","forwardedRef","isMounted","useRef","viewRef","ref","themeContext","useContext","ThemeContext","isFocused","setIsFocused","useState","valueSelf","setValueSelf","sharedValue","useSharedValue","useMemo","trackColor_","mapSwitchTrackColorToken","thumbColor_","color","mapSwitchThumbColorToken","trackAnimatedStyle","useAnimatedStyle","backgroundColor","interpolateColor","interpolationRange","thumbAnimatedStyle","transform","translateX","interpolate","sizeStyle","width","thumbSizeStyle","iconAnimatedStyle","opacity","blurHandler","useCallback","event","focusHandler","pressHandler","current","useEffect","withTiming","useImperativeHandle","assign","setValue","valueParam","jsxs","PressableAnimated","FlexStyle","justify_center","baseStyle","container","containerReadonly","borderColor","border_subtle_00","children","jsx","View","items_center","thumb","IconAnimated","src","Checkmark","fill","support_success","CommonStyle","absolute","focusBoxSizeStyle","focusBox","focus","StyleSheet","create","borderRadius","borderWidth","height","small","normal","disabled","read_only","focused","duration","MotionConstant","Durations","fast_01","easing","Easing","bezier","Easings","exit","productive","x1","y1","x2","y2","Animated","createAnimatedComponent","Pressable","Icon"],"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C;IACbC,OAAO,EAAE;MACR3F,KAAK,EAAE,YAAY;MACnBE,IAAI,EAAE;IACP;EACD,CAAC;EAEF6B,wBAAsF,GACrF;IACCyD,MAAM,EAAE,eAAe;IACvBC,QAAQ,EAAE,wBAAwB;IAClCC,SAAS,EAAE,cAAc;IACzBC,OAAO,EAAE;EACV,CAAC;EAEFvD,kBAAkB,GACjB,CAAC,CAAC,EAAE,CAAC,CAAC;EAEPnC,aAA0D,GACzD;IACC2F,QAAQ,EAAEC,qBAAc,CAACC,SAAS,CAACC,OAAO;IAC1CC,MAAM,EAAEC,6BAAM,CAACC,MAAM,CACpBL,qBAAc,CAACM,OAAO,CAACC,IAAI,CAACC,UAAU,CAACC,EAAE,EACzCT,qBAAc,CAACM,OAAO,CAACC,IAAI,CAACC,UAAU,CAACE,EAAE,EACzCV,qBAAc,CAACM,OAAO,CAACC,IAAI,CAACC,UAAU,CAACG,EAAE,EACzCX,qBAAc,CAACM,OAAO,CAACC,IAAI,CAACC,UAAU,CAACI,EACxC;EACD,CAAC;EAEF9C,iBAAiB,GAChB+C,8BAAQ,CAACC,uBAAuB,CAACC,sBAAS,CAAC;EAE5CpC,YAAY,GACXkC,8BAAQ,CAACC,uBAAuB,CAACE,YAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Text = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../../constants/index.js");
|
|
10
|
+
var _index2 = require("../../contexts/index.js");
|
|
11
|
+
var _index3 = require("../../styles/index.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const Text = exports.Text = /*#__PURE__*/(0, _react.forwardRef)(function Text_({
|
|
14
|
+
type,
|
|
15
|
+
italic = false,
|
|
16
|
+
style,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) {
|
|
19
|
+
const themeContext = (0, _react.useContext)(_index2.ThemeContext);
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
21
|
+
...props,
|
|
22
|
+
style: [{
|
|
23
|
+
color: themeContext.color.text_primary
|
|
24
|
+
}, getTypeSetsStyle(type, italic), style],
|
|
25
|
+
ref: ref
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const mapFamilyStyle = {
|
|
29
|
+
'100': _index3.TextStyle.thin,
|
|
30
|
+
'100_italic': _index3.TextStyle.thin_italic,
|
|
31
|
+
'200': _index3.TextStyle.extralight,
|
|
32
|
+
'200_italic': _index3.TextStyle.extralight_italic,
|
|
33
|
+
'300': _index3.TextStyle.light,
|
|
34
|
+
'300_italic': _index3.TextStyle.light,
|
|
35
|
+
'400': _index3.TextStyle.normal,
|
|
36
|
+
'400_italic': _index3.TextStyle.normal_italic,
|
|
37
|
+
'500': _index3.TextStyle.medium,
|
|
38
|
+
'500_italic': _index3.TextStyle.medium_italic,
|
|
39
|
+
'600': _index3.TextStyle.semibold,
|
|
40
|
+
'600_italic': _index3.TextStyle.semibold_italic,
|
|
41
|
+
'700': _index3.TextStyle.bold,
|
|
42
|
+
'700_italic': _index3.TextStyle.bold_italic
|
|
43
|
+
},
|
|
44
|
+
createTypeSetsStyle = italic => {
|
|
45
|
+
return _reactNative.StyleSheet.create(Object.entries(_index.TypographyConstant.TypeSets).reduce((accumulator, [key_, val_]) => {
|
|
46
|
+
const key = key_,
|
|
47
|
+
val =
|
|
48
|
+
/**
|
|
49
|
+
* i don't know why Typescript annotate here as TypopgrahyType.TypeSets
|
|
50
|
+
*/
|
|
51
|
+
val_;
|
|
52
|
+
accumulator[key] = {
|
|
53
|
+
...val,
|
|
54
|
+
...(mapFamilyStyle[italic ? `${val.fontWeight}_italic` : val.fontWeight] ?? _index3.TextStyle.normal)
|
|
55
|
+
};
|
|
56
|
+
return accumulator;
|
|
57
|
+
}, {}));
|
|
58
|
+
},
|
|
59
|
+
typeSetsStyle = createTypeSetsStyle(),
|
|
60
|
+
typeSetsItalicStyle = createTypeSetsStyle(true);
|
|
61
|
+
function getTypeSetsStyle(type, italic) {
|
|
62
|
+
if (!type) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
if (italic) {
|
|
66
|
+
return typeSetsItalicStyle[type];
|
|
67
|
+
}
|
|
68
|
+
return typeSetsStyle[type];
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_index3","_jsxRuntime","Text","exports","forwardRef","Text_","type","italic","style","props","ref","themeContext","useContext","ThemeContext","jsx","color","text_primary","getTypeSetsStyle","mapFamilyStyle","TextStyle","thin","thin_italic","extralight","extralight_italic","light","normal","normal_italic","medium","medium_italic","semibold","semibold_italic","bold","bold_italic","createTypeSetsStyle","StyleSheet","create","Object","entries","TypographyConstant","TypeSets","reduce","accumulator","key_","val_","key","val","fontWeight","typeSetsStyle","typeSetsItalicStyle"],"sourceRoot":"../../../../src","sources":["components/text/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,MAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AAIA,IAAAI,OAAA,GAAAJ,OAAA;AAEqB,IAAAK,WAAA,GAAAL,OAAA;AAWd,MAAMM,IAAI,GAAAC,OAAA,CAAAD,IAAA,gBAAG,IAAAE,iBAAU,EAC7B,SAASC,KAAKA,CACb;EACCC,IAAI;EACJC,MAAM,GAAG,KAAK;EACdC,KAAK;EACL,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;EAED,MACCC,YAAY,GACX,IAAAC,iBAAU,EAACC,oBAAY,CAAC;EAE1B,oBACC,IAAAZ,WAAA,CAAAa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S,GAC1BD,GAAG,CAACC,UAAU,CACjB,IAAI3B,iBAAS,CAACM,MAAM;MAEvB,CAAC;MACD,OAAOgB,WAAW;IACnB,CAAC,EAAE,CAAC,CAA4B,CACjC,CAAC;EACF,CAAC;EAEDM,aAAa,GACZd,mBAAmB,CAAC,CAAC;EAEtBe,mBAAmB,GAClBf,mBAAmB,CAAC,IAAI,CAAC;AAE3B,SAAShB,gBAAgBA,CACxBX,IAAwB,EACxBC,MAAgB,EACf;EACD,IAAG,CAACD,IAAI,EAAE;IACT,OAAO,IAAI;EACZ;EAEA,IAAGC,MAAM,EAAE;IACV,OAAOyC,mBAAmB,CAAC1C,IAAI,CAAC;EACjC;EAEA,OAAOyC,aAAa,CAACzC,IAAI,CAAC;AAC3B","ignoreList":[]}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Base = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../../../constants/index.js");
|
|
10
|
+
var _index2 = require("../../../contexts/index.js");
|
|
11
|
+
var _index3 = require("../../../styles/index.js");
|
|
12
|
+
var _index4 = require("../../form-label/index.js");
|
|
13
|
+
var _index5 = require("../../text/index.js");
|
|
14
|
+
var _index6 = require("../../switch/index.js");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const Base = exports.Base = /*#__PURE__*/(0, _react.forwardRef)(function Base({
|
|
17
|
+
state = 'normal',
|
|
18
|
+
controlled,
|
|
19
|
+
value,
|
|
20
|
+
label,
|
|
21
|
+
actionText,
|
|
22
|
+
onChange,
|
|
23
|
+
formLabelProps,
|
|
24
|
+
actionTextProps,
|
|
25
|
+
pressableProps,
|
|
26
|
+
switchProps,
|
|
27
|
+
style,
|
|
28
|
+
...viewProps
|
|
29
|
+
}, forwardedRef) {
|
|
30
|
+
const themeContext = (0, _react.useContext)(_index2.ThemeContext),
|
|
31
|
+
viewRef = (0, _react.useRef)(null),
|
|
32
|
+
switchRef = (0, _react.useRef)(null),
|
|
33
|
+
pressHandler = (0, _react.useCallback)(event => {
|
|
34
|
+
pressableProps?.onPress?.(event);
|
|
35
|
+
switchRef.current?.setValue(currentValue => !currentValue);
|
|
36
|
+
}, [pressableProps]);
|
|
37
|
+
(0, _react.useImperativeHandle)(forwardedRef, () => {
|
|
38
|
+
return Object.assign(viewRef.current ?? {}, {
|
|
39
|
+
get value() {
|
|
40
|
+
return !!switchRef.current?.value;
|
|
41
|
+
},
|
|
42
|
+
setValue(val) {
|
|
43
|
+
switchRef.current?.setValue(val);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}, []);
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
48
|
+
...viewProps,
|
|
49
|
+
style: [_index3.FlexStyle.flex_row, _index3.FlexStyle.flex_wrap, _index3.FlexStyle.items_center, style],
|
|
50
|
+
ref: viewRef,
|
|
51
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
52
|
+
...pressableProps,
|
|
53
|
+
role: "switch",
|
|
54
|
+
disabled: state !== 'normal',
|
|
55
|
+
"aria-checked": value,
|
|
56
|
+
"aria-label": pressableProps?.['aria-label'] || label,
|
|
57
|
+
onPress: pressHandler,
|
|
58
|
+
style: [_index3.CommonStyle.absolute, _index3.CommonStyle.w_full, _index3.CommonStyle.h_full, baseStyle.pressable, pressableProps?.style]
|
|
59
|
+
}), !!label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.FormLabel, {
|
|
60
|
+
...formLabelProps,
|
|
61
|
+
label: label,
|
|
62
|
+
textProps: {
|
|
63
|
+
...formLabelProps?.textProps,
|
|
64
|
+
style: [{
|
|
65
|
+
color: themeContext.color[mapLabelColorToken[state]]
|
|
66
|
+
}, formLabelProps?.textProps?.style]
|
|
67
|
+
},
|
|
68
|
+
style: [_index3.CommonStyle.w_full, baseStyle.label, formLabelProps?.style]
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index6.Switch, {
|
|
70
|
+
...switchProps,
|
|
71
|
+
"aria-label": switchProps?.['aria-label'] || label,
|
|
72
|
+
state: state,
|
|
73
|
+
disabled: state !== 'normal',
|
|
74
|
+
role: "none",
|
|
75
|
+
controlled: controlled,
|
|
76
|
+
value: value,
|
|
77
|
+
onChange: onChange,
|
|
78
|
+
onPress: switchProps?.onPress ?? pressableProps?.onPress,
|
|
79
|
+
style: [baseStyle.switch, switchProps?.style],
|
|
80
|
+
ref: switchRef
|
|
81
|
+
}), !!actionText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index5.Text, {
|
|
82
|
+
...actionTextProps,
|
|
83
|
+
type: actionTextProps?.type || 'body_compact_01',
|
|
84
|
+
style: [baseStyle.actionText, {
|
|
85
|
+
color: themeContext.color[mapActionTextColorToken[state]]
|
|
86
|
+
}, actionTextProps?.style],
|
|
87
|
+
children: actionText
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
const baseStyle = _reactNative.StyleSheet.create({
|
|
92
|
+
pressable: {
|
|
93
|
+
zIndex: 1
|
|
94
|
+
},
|
|
95
|
+
switch: {
|
|
96
|
+
zIndex: 2
|
|
97
|
+
},
|
|
98
|
+
label: {
|
|
99
|
+
marginBottom: _index.SpacingConstant.spacing_05
|
|
100
|
+
},
|
|
101
|
+
actionText: {
|
|
102
|
+
marginLeft: _index.SpacingConstant.spacing_03 // same for both size
|
|
103
|
+
}
|
|
104
|
+
}),
|
|
105
|
+
mapLabelColorToken = {
|
|
106
|
+
normal: 'text_secondary',
|
|
107
|
+
disabled: 'text_disabled',
|
|
108
|
+
read_only: 'text_secondary'
|
|
109
|
+
},
|
|
110
|
+
mapActionTextColorToken = {
|
|
111
|
+
normal: 'text_primary',
|
|
112
|
+
disabled: 'text_disabled',
|
|
113
|
+
read_only: 'text_primary'
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=index.js.map
|