@causw/core 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/assets/avatar/default.cjs +11 -0
- package/dist/assets/avatar/default.mjs +6 -0
- package/dist/assets/avatar/default.mjs.map +1 -0
- package/dist/components/Avatar/Avatar.cjs +46 -0
- package/dist/components/Avatar/Avatar.d.cts +25 -0
- package/dist/components/Avatar/Avatar.d.cts.map +1 -0
- package/dist/components/Avatar/Avatar.d.mts +26 -0
- package/dist/components/Avatar/Avatar.d.mts.map +1 -0
- package/dist/components/Avatar/Avatar.mjs +45 -0
- package/dist/components/Avatar/Avatar.mjs.map +1 -0
- package/dist/components/Avatar/Avatar.styles.cjs +22 -0
- package/dist/components/Avatar/Avatar.styles.d.cts +75 -0
- package/dist/components/Avatar/Avatar.styles.d.cts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.d.mts +75 -0
- package/dist/components/Avatar/Avatar.styles.d.mts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.mjs +22 -0
- package/dist/components/Avatar/Avatar.styles.mjs.map +1 -0
- package/dist/components/Avatar/index.d.mts +2 -0
- package/dist/components/Box/Box.cjs +24 -0
- package/dist/components/Box/Box.d.cts +22 -0
- package/dist/components/Box/Box.d.cts.map +1 -0
- package/dist/components/Box/Box.d.mts +23 -0
- package/dist/components/Box/Box.d.mts.map +1 -0
- package/dist/components/Box/Box.mjs +23 -0
- package/dist/components/Box/Box.mjs.map +1 -0
- package/dist/components/Box/Box.styles.cjs +48 -0
- package/dist/components/Box/Box.styles.d.cts +105 -0
- package/dist/components/Box/Box.styles.d.cts.map +1 -0
- package/dist/components/Box/Box.styles.d.mts +105 -0
- package/dist/components/Box/Box.styles.d.mts.map +1 -0
- package/dist/components/Box/Box.styles.mjs +48 -0
- package/dist/components/Box/Box.styles.mjs.map +1 -0
- package/dist/components/Box/index.d.mts +2 -0
- package/dist/components/Button/Button.cjs +23 -0
- package/dist/components/Button/Button.d.cts +19 -0
- package/dist/components/Button/Button.d.cts.map +1 -0
- package/dist/components/Button/Button.d.mts +20 -0
- package/dist/components/Button/Button.d.mts.map +1 -0
- package/dist/components/Button/Button.mjs +23 -0
- package/dist/components/Button/Button.mjs.map +1 -0
- package/dist/components/Button/Button.styles.cjs +35 -0
- package/dist/components/Button/Button.styles.d.cts +63 -0
- package/dist/components/Button/Button.styles.d.cts.map +1 -0
- package/dist/components/Button/Button.styles.d.mts +63 -0
- package/dist/components/Button/Button.styles.d.mts.map +1 -0
- package/dist/components/Button/Button.styles.mjs +35 -0
- package/dist/components/Button/Button.styles.mjs.map +1 -0
- package/dist/components/Button/index.d.mts +1 -0
- package/dist/components/CTAButton/CTAButton.cjs +22 -0
- package/dist/components/CTAButton/CTAButton.d.cts +18 -0
- package/dist/components/CTAButton/CTAButton.d.cts.map +1 -0
- package/dist/components/CTAButton/CTAButton.d.mts +19 -0
- package/dist/components/CTAButton/CTAButton.d.mts.map +1 -0
- package/dist/components/CTAButton/CTAButton.mjs +22 -0
- package/dist/components/CTAButton/CTAButton.mjs.map +1 -0
- package/dist/components/CTAButton/CTAButton.styles.cjs +32 -0
- package/dist/components/CTAButton/CTAButton.styles.d.cts +57 -0
- package/dist/components/CTAButton/CTAButton.styles.d.cts.map +1 -0
- package/dist/components/CTAButton/CTAButton.styles.d.mts +57 -0
- package/dist/components/CTAButton/CTAButton.styles.d.mts.map +1 -0
- package/dist/components/CTAButton/CTAButton.styles.mjs +32 -0
- package/dist/components/CTAButton/CTAButton.styles.mjs.map +1 -0
- package/dist/components/CTAButton/index.d.mts +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +83 -0
- package/dist/components/Checkbox/Checkbox.d.cts +44 -0
- package/dist/components/Checkbox/Checkbox.d.cts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.mts +46 -0
- package/dist/components/Checkbox/Checkbox.d.mts.map +1 -0
- package/dist/components/Checkbox/Checkbox.mjs +82 -0
- package/dist/components/Checkbox/Checkbox.mjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.styles.cjs +31 -0
- package/dist/components/Checkbox/Checkbox.styles.d.cts +75 -0
- package/dist/components/Checkbox/Checkbox.styles.d.cts.map +1 -0
- package/dist/components/Checkbox/Checkbox.styles.d.mts +75 -0
- package/dist/components/Checkbox/Checkbox.styles.d.mts.map +1 -0
- package/dist/components/Checkbox/Checkbox.styles.mjs +31 -0
- package/dist/components/Checkbox/Checkbox.styles.mjs.map +1 -0
- package/dist/components/Checkbox/index.d.mts +1 -0
- package/dist/components/Chip/Chip.cjs +29 -0
- package/dist/components/Chip/Chip.d.cts +22 -0
- package/dist/components/Chip/Chip.d.cts.map +1 -0
- package/dist/components/Chip/Chip.d.mts +23 -0
- package/dist/components/Chip/Chip.d.mts.map +1 -0
- package/dist/components/Chip/Chip.mjs +28 -0
- package/dist/components/Chip/Chip.mjs.map +1 -0
- package/dist/components/Chip/Chip.styles.cjs +30 -0
- package/dist/components/Chip/Chip.styles.d.cts +51 -0
- package/dist/components/Chip/Chip.styles.d.cts.map +1 -0
- package/dist/components/Chip/Chip.styles.d.mts +51 -0
- package/dist/components/Chip/Chip.styles.d.mts.map +1 -0
- package/dist/components/Chip/Chip.styles.mjs +30 -0
- package/dist/components/Chip/Chip.styles.mjs.map +1 -0
- package/dist/components/Chip/index.d.mts +2 -0
- package/dist/components/Dialog/Dialog.cjs +59 -0
- package/dist/components/Dialog/Dialog.d.cts +57 -0
- package/dist/components/Dialog/Dialog.d.cts.map +1 -0
- package/dist/components/Dialog/Dialog.d.mts +58 -0
- package/dist/components/Dialog/Dialog.d.mts.map +1 -0
- package/dist/components/Dialog/Dialog.mjs +58 -0
- package/dist/components/Dialog/Dialog.mjs.map +1 -0
- package/dist/components/Dialog/Dialog.styles.cjs +35 -0
- package/dist/components/Dialog/Dialog.styles.d.cts +46 -0
- package/dist/components/Dialog/Dialog.styles.d.cts.map +1 -0
- package/dist/components/Dialog/Dialog.styles.d.mts +46 -0
- package/dist/components/Dialog/Dialog.styles.d.mts.map +1 -0
- package/dist/components/Dialog/Dialog.styles.mjs +33 -0
- package/dist/components/Dialog/Dialog.styles.mjs.map +1 -0
- package/dist/components/Dialog/index.d.mts +2 -0
- package/dist/components/Dropdown/Dropdown.cjs +39 -0
- package/dist/components/Dropdown/Dropdown.d.cts +36 -0
- package/dist/components/Dropdown/Dropdown.d.cts.map +1 -0
- package/dist/components/Dropdown/Dropdown.d.mts +36 -0
- package/dist/components/Dropdown/Dropdown.d.mts.map +1 -0
- package/dist/components/Dropdown/Dropdown.mjs +37 -0
- package/dist/components/Dropdown/Dropdown.mjs.map +1 -0
- package/dist/components/Dropdown/Dropdown.styles.cjs +19 -0
- package/dist/components/Dropdown/Dropdown.styles.d.cts +54 -0
- package/dist/components/Dropdown/Dropdown.styles.d.cts.map +1 -0
- package/dist/components/Dropdown/Dropdown.styles.d.mts +54 -0
- package/dist/components/Dropdown/Dropdown.styles.d.mts.map +1 -0
- package/dist/components/Dropdown/Dropdown.styles.mjs +19 -0
- package/dist/components/Dropdown/Dropdown.styles.mjs.map +1 -0
- package/dist/components/Dropdown/index.d.mts +2 -0
- package/dist/components/Field/Field.cjs +80 -0
- package/dist/components/Field/Field.d.cts +59 -0
- package/dist/components/Field/Field.d.cts.map +1 -0
- package/dist/components/Field/Field.d.mts +60 -0
- package/dist/components/Field/Field.d.mts.map +1 -0
- package/dist/components/Field/Field.mjs +79 -0
- package/dist/components/Field/Field.mjs.map +1 -0
- package/dist/components/Field/Field.styles.cjs +13 -0
- package/dist/components/Field/Field.styles.mjs +13 -0
- package/dist/components/Field/Field.styles.mjs.map +1 -0
- package/dist/components/Field/index.d.mts +1 -0
- package/dist/components/Flex/Flex.cjs +25 -0
- package/dist/components/Flex/Flex.d.cts +24 -0
- package/dist/components/Flex/Flex.d.cts.map +1 -0
- package/dist/components/Flex/Flex.d.mts +25 -0
- package/dist/components/Flex/Flex.d.mts.map +1 -0
- package/dist/components/Flex/Flex.mjs +24 -0
- package/dist/components/Flex/Flex.mjs.map +1 -0
- package/dist/components/Flex/Flex.styles.cjs +50 -0
- package/dist/components/Flex/Flex.styles.d.cts +16 -0
- package/dist/components/Flex/Flex.styles.d.cts.map +1 -0
- package/dist/components/Flex/Flex.styles.d.mts +16 -0
- package/dist/components/Flex/Flex.styles.d.mts.map +1 -0
- package/dist/components/Flex/Flex.styles.mjs +51 -0
- package/dist/components/Flex/Flex.styles.mjs.map +1 -0
- package/dist/components/Flex/index.d.mts +2 -0
- package/dist/components/Float/Float.cjs +32 -0
- package/dist/components/Float/Float.d.cts +25 -0
- package/dist/components/Float/Float.d.cts.map +1 -0
- package/dist/components/Float/Float.d.mts +26 -0
- package/dist/components/Float/Float.d.mts.map +1 -0
- package/dist/components/Float/Float.mjs +31 -0
- package/dist/components/Float/Float.mjs.map +1 -0
- package/dist/components/Float/Float.styles.cjs +39 -0
- package/dist/components/Float/Float.styles.d.cts +58 -0
- package/dist/components/Float/Float.styles.d.cts.map +1 -0
- package/dist/components/Float/Float.styles.d.mts +58 -0
- package/dist/components/Float/Float.styles.d.mts.map +1 -0
- package/dist/components/Float/Float.styles.mjs +38 -0
- package/dist/components/Float/Float.styles.mjs.map +1 -0
- package/dist/components/Float/index.d.mts +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.cjs +18 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.d.cts +16 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.d.cts.map +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.d.mts +17 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.d.mts.map +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.mjs +18 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.mjs.map +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.cjs +15 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts +24 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts.map +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.mts +24 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.mts.map +1 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.mjs +15 -0
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.mjs.map +1 -0
- package/dist/components/FloatingActionButton/index.d.mts +1 -0
- package/dist/components/Grid/Grid.cjs +24 -0
- package/dist/components/Grid/Grid.d.cts +22 -0
- package/dist/components/Grid/Grid.d.cts.map +1 -0
- package/dist/components/Grid/Grid.d.mts +23 -0
- package/dist/components/Grid/Grid.d.mts.map +1 -0
- package/dist/components/Grid/Grid.mjs +23 -0
- package/dist/components/Grid/Grid.mjs.map +1 -0
- package/dist/components/Grid/Grid.styles.cjs +56 -0
- package/dist/components/Grid/Grid.styles.d.cts +126 -0
- package/dist/components/Grid/Grid.styles.d.cts.map +1 -0
- package/dist/components/Grid/Grid.styles.d.mts +126 -0
- package/dist/components/Grid/Grid.styles.d.mts.map +1 -0
- package/dist/components/Grid/Grid.styles.mjs +56 -0
- package/dist/components/Grid/Grid.styles.mjs.map +1 -0
- package/dist/components/Grid/index.d.mts +1 -0
- package/dist/components/HStack/HStack.cjs +17 -0
- package/dist/components/HStack/HStack.d.cts +15 -0
- package/dist/components/HStack/HStack.d.cts.map +1 -0
- package/dist/components/HStack/HStack.d.mts +16 -0
- package/dist/components/HStack/HStack.d.mts.map +1 -0
- package/dist/components/HStack/HStack.mjs +16 -0
- package/dist/components/HStack/HStack.mjs.map +1 -0
- package/dist/components/HStack/index.d.mts +1 -0
- package/dist/components/Modal/Modal.cjs +81 -0
- package/dist/components/Modal/Modal.d.cts +64 -0
- package/dist/components/Modal/Modal.d.cts.map +1 -0
- package/dist/components/Modal/Modal.d.mts +65 -0
- package/dist/components/Modal/Modal.d.mts.map +1 -0
- package/dist/components/Modal/Modal.mjs +80 -0
- package/dist/components/Modal/Modal.mjs.map +1 -0
- package/dist/components/Modal/Modal.styles.cjs +49 -0
- package/dist/components/Modal/Modal.styles.d.cts +108 -0
- package/dist/components/Modal/Modal.styles.d.cts.map +1 -0
- package/dist/components/Modal/Modal.styles.d.mts +108 -0
- package/dist/components/Modal/Modal.styles.d.mts.map +1 -0
- package/dist/components/Modal/Modal.styles.mjs +49 -0
- package/dist/components/Modal/Modal.styles.mjs.map +1 -0
- package/dist/components/Modal/index.d.mts +2 -0
- package/dist/components/Primitive/Primitive.cjs +35 -0
- package/dist/components/Primitive/Primitive.d.cts +77 -0
- package/dist/components/Primitive/Primitive.d.cts.map +1 -0
- package/dist/components/Primitive/Primitive.d.mts +77 -0
- package/dist/components/Primitive/Primitive.d.mts.map +1 -0
- package/dist/components/Primitive/Primitive.mjs +34 -0
- package/dist/components/Primitive/Primitive.mjs.map +1 -0
- package/dist/components/Primitive/index.d.mts +1 -0
- package/dist/components/Radio/Radio.cjs +97 -0
- package/dist/components/Radio/Radio.d.cts +48 -0
- package/dist/components/Radio/Radio.d.cts.map +1 -0
- package/dist/components/Radio/Radio.d.mts +49 -0
- package/dist/components/Radio/Radio.d.mts.map +1 -0
- package/dist/components/Radio/Radio.mjs +94 -0
- package/dist/components/Radio/Radio.mjs.map +1 -0
- package/dist/components/Radio/Radio.styles.cjs +32 -0
- package/dist/components/Radio/Radio.styles.mjs +32 -0
- package/dist/components/Radio/Radio.styles.mjs.map +1 -0
- package/dist/components/Radio/index.d.mts +1 -0
- package/dist/components/RatioChart/RatioChart.cjs +182 -0
- package/dist/components/RatioChart/RatioChart.d.cts +66 -0
- package/dist/components/RatioChart/RatioChart.d.cts.map +1 -0
- package/dist/components/RatioChart/RatioChart.d.mts +66 -0
- package/dist/components/RatioChart/RatioChart.d.mts.map +1 -0
- package/dist/components/RatioChart/RatioChart.mjs +181 -0
- package/dist/components/RatioChart/RatioChart.mjs.map +1 -0
- package/dist/components/RatioChart/RatioChart.styles.cjs +42 -0
- package/dist/components/RatioChart/RatioChart.styles.mjs +42 -0
- package/dist/components/RatioChart/RatioChart.styles.mjs.map +1 -0
- package/dist/components/RatioChart/RatioChartEditor.cjs +121 -0
- package/dist/components/RatioChart/RatioChartEditor.d.cts +44 -0
- package/dist/components/RatioChart/RatioChartEditor.d.cts.map +1 -0
- package/dist/components/RatioChart/RatioChartEditor.d.mts +44 -0
- package/dist/components/RatioChart/RatioChartEditor.d.mts.map +1 -0
- package/dist/components/RatioChart/RatioChartEditor.mjs +120 -0
- package/dist/components/RatioChart/RatioChartEditor.mjs.map +1 -0
- package/dist/components/RatioChart/RatioChartEditor.styles.cjs +23 -0
- package/dist/components/RatioChart/RatioChartEditor.styles.mjs +23 -0
- package/dist/components/RatioChart/RatioChartEditor.styles.mjs.map +1 -0
- package/dist/components/RatioChart/index.d.mts +2 -0
- package/dist/components/Select/Select.cjs +84 -0
- package/dist/components/Select/Select.d.cts +60 -0
- package/dist/components/Select/Select.d.cts.map +1 -0
- package/dist/components/Select/Select.d.mts +60 -0
- package/dist/components/Select/Select.d.mts.map +1 -0
- package/dist/components/Select/Select.mjs +82 -0
- package/dist/components/Select/Select.mjs.map +1 -0
- package/dist/components/Select/Select.styles.cjs +44 -0
- package/dist/components/Select/Select.styles.d.cts +72 -0
- package/dist/components/Select/Select.styles.d.cts.map +1 -0
- package/dist/components/Select/Select.styles.d.mts +72 -0
- package/dist/components/Select/Select.styles.d.mts.map +1 -0
- package/dist/components/Select/Select.styles.mjs +44 -0
- package/dist/components/Select/Select.styles.mjs.map +1 -0
- package/dist/components/Select/index.d.mts +2 -0
- package/dist/components/Separator/Separator.cjs +21 -0
- package/dist/components/Separator/Separator.d.cts +18 -0
- package/dist/components/Separator/Separator.d.cts.map +1 -0
- package/dist/components/Separator/Separator.d.mts +19 -0
- package/dist/components/Separator/Separator.d.mts.map +1 -0
- package/dist/components/Separator/Separator.mjs +20 -0
- package/dist/components/Separator/Separator.mjs.map +1 -0
- package/dist/components/Separator/Separator.styles.cjs +15 -0
- package/dist/components/Separator/Separator.styles.d.cts +24 -0
- package/dist/components/Separator/Separator.styles.d.cts.map +1 -0
- package/dist/components/Separator/Separator.styles.d.mts +24 -0
- package/dist/components/Separator/Separator.styles.d.mts.map +1 -0
- package/dist/components/Separator/Separator.styles.mjs +15 -0
- package/dist/components/Separator/Separator.styles.mjs.map +1 -0
- package/dist/components/Separator/index.d.mts +2 -0
- package/dist/components/Spacer/Spacer.cjs +20 -0
- package/dist/components/Spacer/Spacer.d.cts +18 -0
- package/dist/components/Spacer/Spacer.d.cts.map +1 -0
- package/dist/components/Spacer/Spacer.d.mts +19 -0
- package/dist/components/Spacer/Spacer.d.mts.map +1 -0
- package/dist/components/Spacer/Spacer.mjs +19 -0
- package/dist/components/Spacer/Spacer.mjs.map +1 -0
- package/dist/components/Spacer/Spacer.styles.cjs +24 -0
- package/dist/components/Spacer/Spacer.styles.d.cts +51 -0
- package/dist/components/Spacer/Spacer.styles.d.cts.map +1 -0
- package/dist/components/Spacer/Spacer.styles.d.mts +51 -0
- package/dist/components/Spacer/Spacer.styles.d.mts.map +1 -0
- package/dist/components/Spacer/Spacer.styles.mjs +24 -0
- package/dist/components/Spacer/Spacer.styles.mjs.map +1 -0
- package/dist/components/Spacer/index.d.mts +2 -0
- package/dist/components/Stack/Stack.cjs +28 -0
- package/dist/components/Stack/Stack.d.cts +26 -0
- package/dist/components/Stack/Stack.d.cts.map +1 -0
- package/dist/components/Stack/Stack.d.mts +27 -0
- package/dist/components/Stack/Stack.d.mts.map +1 -0
- package/dist/components/Stack/Stack.mjs +27 -0
- package/dist/components/Stack/Stack.mjs.map +1 -0
- package/dist/components/Stack/Stack.styles.cjs +42 -0
- package/dist/components/Stack/Stack.styles.d.cts +84 -0
- package/dist/components/Stack/Stack.styles.d.cts.map +1 -0
- package/dist/components/Stack/Stack.styles.d.mts +84 -0
- package/dist/components/Stack/Stack.styles.d.mts.map +1 -0
- package/dist/components/Stack/Stack.styles.mjs +42 -0
- package/dist/components/Stack/Stack.styles.mjs.map +1 -0
- package/dist/components/Stack/index.d.mts +2 -0
- package/dist/components/Tab/Tab.cjs +103 -0
- package/dist/components/Tab/Tab.d.cts +84 -0
- package/dist/components/Tab/Tab.d.cts.map +1 -0
- package/dist/components/Tab/Tab.d.mts +85 -0
- package/dist/components/Tab/Tab.d.mts.map +1 -0
- package/dist/components/Tab/Tab.mjs +102 -0
- package/dist/components/Tab/Tab.mjs.map +1 -0
- package/dist/components/Tab/Tab.styles.cjs +35 -0
- package/dist/components/Tab/Tab.styles.d.cts +51 -0
- package/dist/components/Tab/Tab.styles.d.cts.map +1 -0
- package/dist/components/Tab/Tab.styles.d.mts +51 -0
- package/dist/components/Tab/Tab.styles.d.mts.map +1 -0
- package/dist/components/Tab/Tab.styles.mjs +35 -0
- package/dist/components/Tab/Tab.styles.mjs.map +1 -0
- package/dist/components/Tab/index.d.mts +2 -0
- package/dist/components/Text/Text.cjs +20 -0
- package/dist/components/Text/Text.d.cts +24 -0
- package/dist/components/Text/Text.d.cts.map +1 -0
- package/dist/components/Text/Text.d.mts +25 -0
- package/dist/components/Text/Text.d.mts.map +1 -0
- package/dist/components/Text/Text.mjs +20 -0
- package/dist/components/Text/Text.mjs.map +1 -0
- package/dist/components/Text/Text.styles.cjs +58 -0
- package/dist/components/Text/Text.styles.d.cts +150 -0
- package/dist/components/Text/Text.styles.d.cts.map +1 -0
- package/dist/components/Text/Text.styles.d.mts +150 -0
- package/dist/components/Text/Text.styles.d.mts.map +1 -0
- package/dist/components/Text/Text.styles.mjs +58 -0
- package/dist/components/Text/Text.styles.mjs.map +1 -0
- package/dist/components/Text/index.d.mts +2 -0
- package/dist/components/TextArea/TextArea.cjs +52 -0
- package/dist/components/TextArea/TextArea.d.cts +42 -0
- package/dist/components/TextArea/TextArea.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.d.mts +43 -0
- package/dist/components/TextArea/TextArea.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.mjs +51 -0
- package/dist/components/TextArea/TextArea.mjs.map +1 -0
- package/dist/components/TextArea/TextArea.styles.cjs +33 -0
- package/dist/components/TextArea/TextArea.styles.d.cts +84 -0
- package/dist/components/TextArea/TextArea.styles.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.styles.d.mts +84 -0
- package/dist/components/TextArea/TextArea.styles.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.styles.mjs +33 -0
- package/dist/components/TextArea/TextArea.styles.mjs.map +1 -0
- package/dist/components/TextArea/index.d.mts +1 -0
- package/dist/components/TextInput/TextInput.cjs +48 -0
- package/dist/components/TextInput/TextInput.d.cts +32 -0
- package/dist/components/TextInput/TextInput.d.cts.map +1 -0
- package/dist/components/TextInput/TextInput.d.mts +33 -0
- package/dist/components/TextInput/TextInput.d.mts.map +1 -0
- package/dist/components/TextInput/TextInput.mjs +47 -0
- package/dist/components/TextInput/TextInput.mjs.map +1 -0
- package/dist/components/TextInput/TextInput.styles.cjs +43 -0
- package/dist/components/TextInput/TextInput.styles.d.cts +81 -0
- package/dist/components/TextInput/TextInput.styles.d.cts.map +1 -0
- package/dist/components/TextInput/TextInput.styles.d.mts +81 -0
- package/dist/components/TextInput/TextInput.styles.d.mts.map +1 -0
- package/dist/components/TextInput/TextInput.styles.mjs +43 -0
- package/dist/components/TextInput/TextInput.styles.mjs.map +1 -0
- package/dist/components/TextInput/index.d.mts +2 -0
- package/dist/components/Toast/Toast.cjs +42 -0
- package/dist/components/Toast/Toast.d.cts +27 -0
- package/dist/components/Toast/Toast.d.cts.map +1 -0
- package/dist/components/Toast/Toast.d.mts +27 -0
- package/dist/components/Toast/Toast.d.mts.map +1 -0
- package/dist/components/Toast/Toast.mjs +39 -0
- package/dist/components/Toast/Toast.mjs.map +1 -0
- package/dist/components/Toast/Toast.styles.cjs +20 -0
- package/dist/components/Toast/Toast.styles.d.cts +36 -0
- package/dist/components/Toast/Toast.styles.d.cts.map +1 -0
- package/dist/components/Toast/Toast.styles.d.mts +36 -0
- package/dist/components/Toast/Toast.styles.d.mts.map +1 -0
- package/dist/components/Toast/Toast.styles.mjs +20 -0
- package/dist/components/Toast/Toast.styles.mjs.map +1 -0
- package/dist/components/Toast/index.d.mts +2 -0
- package/dist/components/Toggle/Toggle.cjs +71 -0
- package/dist/components/Toggle/Toggle.d.cts +44 -0
- package/dist/components/Toggle/Toggle.d.cts.map +1 -0
- package/dist/components/Toggle/Toggle.d.mts +46 -0
- package/dist/components/Toggle/Toggle.d.mts.map +1 -0
- package/dist/components/Toggle/Toggle.mjs +70 -0
- package/dist/components/Toggle/Toggle.mjs.map +1 -0
- package/dist/components/Toggle/Toggle.styles.cjs +31 -0
- package/dist/components/Toggle/Toggle.styles.d.cts +75 -0
- package/dist/components/Toggle/Toggle.styles.d.cts.map +1 -0
- package/dist/components/Toggle/Toggle.styles.d.mts +75 -0
- package/dist/components/Toggle/Toggle.styles.d.mts.map +1 -0
- package/dist/components/Toggle/Toggle.styles.mjs +31 -0
- package/dist/components/Toggle/Toggle.styles.mjs.map +1 -0
- package/dist/components/Toggle/index.d.mts +1 -0
- package/dist/components/VStack/VStack.cjs +17 -0
- package/dist/components/VStack/VStack.d.cts +15 -0
- package/dist/components/VStack/VStack.d.cts.map +1 -0
- package/dist/components/VStack/VStack.d.mts +16 -0
- package/dist/components/VStack/VStack.d.mts.map +1 -0
- package/dist/components/VStack/VStack.mjs +16 -0
- package/dist/components/VStack/VStack.mjs.map +1 -0
- package/dist/components/VStack/index.d.mts +1 -0
- package/dist/components/index.d.mts +74 -0
- package/dist/hooks/field/useFieldContext.cjs +18 -0
- package/dist/hooks/field/useFieldContext.mjs +17 -0
- package/dist/hooks/field/useFieldContext.mjs.map +1 -0
- package/dist/hooks/ratioChart/useRatioChartContext.cjs +14 -0
- package/dist/hooks/ratioChart/useRatioChartContext.mjs +13 -0
- package/dist/hooks/ratioChart/useRatioChartContext.mjs.map +1 -0
- package/dist/index.cjs +73 -0
- package/dist/index.d.cts +50 -0
- package/dist/index.d.mts +52 -207
- package/dist/index.mjs +35 -658
- package/dist/utils/converter/converter.cjs +9 -0
- package/dist/utils/converter/converter.d.cts +5 -0
- package/dist/utils/converter/converter.d.cts.map +1 -0
- package/dist/utils/converter/converter.d.mts +5 -0
- package/dist/utils/converter/converter.d.mts.map +1 -0
- package/dist/utils/converter/converter.mjs +9 -0
- package/dist/utils/converter/converter.mjs.map +1 -0
- package/dist/utils/index.d.mts +6 -0
- package/dist/utils/mergeStyles/index.d.mts +1 -0
- package/dist/utils/mergeStyles/mergeStyles.cjs +18 -0
- package/dist/utils/mergeStyles/mergeStyles.d.cts +14 -0
- package/dist/utils/mergeStyles/mergeStyles.d.cts.map +1 -0
- package/dist/utils/mergeStyles/mergeStyles.d.mts +14 -0
- package/dist/utils/mergeStyles/mergeStyles.d.mts.map +1 -0
- package/dist/utils/mergeStyles/mergeStyles.mjs +18 -0
- package/dist/utils/mergeStyles/mergeStyles.mjs.map +1 -0
- package/dist/utils/polymorphic/index.d.mts +1 -0
- package/dist/utils/polymorphic/polymorphic.d.cts +24 -0
- package/dist/utils/polymorphic/polymorphic.d.cts.map +1 -0
- package/dist/utils/polymorphic/polymorphic.d.mts +24 -0
- package/dist/utils/polymorphic/polymorphic.d.mts.map +1 -0
- package/dist/utils/splitter/splitter.cjs +12 -0
- package/dist/utils/splitter/splitter.d.cts +5 -0
- package/dist/utils/splitter/splitter.d.cts.map +1 -0
- package/dist/utils/splitter/splitter.d.mts +5 -0
- package/dist/utils/splitter/splitter.d.mts.map +1 -0
- package/dist/utils/splitter/splitter.mjs +12 -0
- package/dist/utils/splitter/splitter.mjs.map +1 -0
- package/package.json +22 -10
- package/src/styles/global.css +162 -79
- package/dist/index.d.ts +0 -207
- package/dist/index.js +0 -674
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_Text = require('../Text/Text.cjs');
|
|
3
|
+
const require_Primitive = require('../Primitive/Primitive.cjs');
|
|
4
|
+
const require_Radio_styles = require('./Radio.styles.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
|
|
9
|
+
//#region src/components/Radio/Radio.tsx
|
|
10
|
+
const RadioGroupContext = (0, react.createContext)(null);
|
|
11
|
+
const useRadioGroupContext = () => {
|
|
12
|
+
return (0, react.useContext)(RadioGroupContext);
|
|
13
|
+
};
|
|
14
|
+
const RadioGroup = ({ name, value, defaultValue, onValueChange, className, children, ...props }) => {
|
|
15
|
+
const [internalValue, setInternalValue] = react.default.useState(defaultValue);
|
|
16
|
+
const currentValue = value ?? internalValue;
|
|
17
|
+
const { group } = require_Radio_styles.radio();
|
|
18
|
+
const handleChange = (newValue) => {
|
|
19
|
+
if (value === void 0) setInternalValue(newValue);
|
|
20
|
+
onValueChange?.(newValue);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioGroupContext.Provider, {
|
|
23
|
+
value: {
|
|
24
|
+
name,
|
|
25
|
+
value: currentValue,
|
|
26
|
+
onChange: handleChange
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Primitive.Primitive.div, {
|
|
29
|
+
role: "radiogroup",
|
|
30
|
+
className: group({ className }),
|
|
31
|
+
...props,
|
|
32
|
+
children
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const RadioIcon = ({ checked, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
width: "20",
|
|
39
|
+
height: "20",
|
|
40
|
+
viewBox: "0 0 20 20",
|
|
41
|
+
fill: "none",
|
|
42
|
+
className,
|
|
43
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
44
|
+
cx: "10",
|
|
45
|
+
cy: "10",
|
|
46
|
+
r: checked ? 7 : 7.5,
|
|
47
|
+
stroke: "currentColor",
|
|
48
|
+
strokeWidth: checked ? 6 : 5,
|
|
49
|
+
className: "transition-all duration-150 ease-in-out"
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
const Radio = ({ value, children, className, checked: checkedProp, onChange, ...props }) => {
|
|
53
|
+
const group = useRadioGroupContext();
|
|
54
|
+
const isChecked = group ? group.value === value : checkedProp;
|
|
55
|
+
const name = group?.name ?? props.name;
|
|
56
|
+
const handleChange = (e) => {
|
|
57
|
+
group?.onChange?.(value);
|
|
58
|
+
onChange?.(e);
|
|
59
|
+
};
|
|
60
|
+
const { item, indicatorWrapper, indicatorIcon } = require_Radio_styles.radio({
|
|
61
|
+
checked: !!isChecked,
|
|
62
|
+
disabled: props.disabled
|
|
63
|
+
});
|
|
64
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
65
|
+
className: item({ className }),
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
68
|
+
type: "radio",
|
|
69
|
+
name,
|
|
70
|
+
value,
|
|
71
|
+
checked: isChecked,
|
|
72
|
+
onChange: handleChange,
|
|
73
|
+
className: "sr-only",
|
|
74
|
+
...props
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
77
|
+
className: indicatorWrapper(),
|
|
78
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioIcon, {
|
|
79
|
+
checked: !!isChecked,
|
|
80
|
+
className: indicatorIcon()
|
|
81
|
+
})
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
84
|
+
typography: "body-16-regular",
|
|
85
|
+
textColor: "gray-800",
|
|
86
|
+
children
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
RadioGroup.displayName = "RadioGroup";
|
|
92
|
+
Radio.displayName = "Radio";
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.Radio = Radio;
|
|
96
|
+
exports.RadioGroup = RadioGroup;
|
|
97
|
+
exports.useRadioGroupContext = useRadioGroupContext;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PrimitiveProps } from "../Primitive/Primitive.cjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Radio/Radio.d.ts
|
|
6
|
+
interface RadioGroupContextValue {
|
|
7
|
+
name: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const useRadioGroupContext: () => RadioGroupContextValue | null;
|
|
12
|
+
interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement>, PrimitiveProps {
|
|
13
|
+
name: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onValueChange?: (value: string) => void;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare const RadioGroup: {
|
|
20
|
+
({
|
|
21
|
+
name,
|
|
22
|
+
value,
|
|
23
|
+
defaultValue,
|
|
24
|
+
onValueChange,
|
|
25
|
+
className,
|
|
26
|
+
children,
|
|
27
|
+
...props
|
|
28
|
+
}: RadioGroupProps): react_jsx_runtime5.JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
interface RadioProps extends Omit<React.ComponentProps<'input'>, 'type'> {
|
|
32
|
+
value: string;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const Radio: {
|
|
36
|
+
({
|
|
37
|
+
value,
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
checked: checkedProp,
|
|
41
|
+
onChange,
|
|
42
|
+
...props
|
|
43
|
+
}: RadioProps): react_jsx_runtime5.JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Radio, RadioGroup, RadioGroupProps, RadioProps, useRadioGroupContext };
|
|
48
|
+
//# sourceMappingURL=Radio.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.cts","names":[],"sources":["../../../src/components/Radio/Radio.tsx"],"mappings":";;;;;UAMU,sBAAA;EACR,IAAA;EACA,KAAA;EACA,QAAA,IAAY,KAAA;AAAA;AAAA,cAKR,oBAAA,QAAoB,sBAAA;AAAA,UAKT,eAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,IAAA;EACA,KAAA;EACA,YAAA;EACA,aAAA,IAAiB,KAAA;EACjB,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGL,UAAA;EAAA;;;;;;;;KAQV,eAAA,GAAe,kBAAA,CAAA,GAAA,CAAA,OAAA;;;UAuDD,UAAA,SAAmB,IAAA,CAClC,KAAA,CAAM,cAAA;EAGN,KAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGL,KAAA;EAAA;;;;;;;KAOV,UAAA,GAAU,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PrimitiveProps } from "../Primitive/Primitive.mjs";
|
|
2
|
+
import "../Primitive/index.mjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Radio/Radio.d.ts
|
|
7
|
+
interface RadioGroupContextValue {
|
|
8
|
+
name: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const useRadioGroupContext: () => RadioGroupContextValue | null;
|
|
13
|
+
interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement>, PrimitiveProps {
|
|
14
|
+
name: string;
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
declare const RadioGroup: {
|
|
21
|
+
({
|
|
22
|
+
name,
|
|
23
|
+
value,
|
|
24
|
+
defaultValue,
|
|
25
|
+
onValueChange,
|
|
26
|
+
className,
|
|
27
|
+
children,
|
|
28
|
+
...props
|
|
29
|
+
}: RadioGroupProps): react_jsx_runtime10.JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
interface RadioProps extends Omit<React.ComponentProps<'input'>, 'type'> {
|
|
33
|
+
value: string;
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const Radio: {
|
|
37
|
+
({
|
|
38
|
+
value,
|
|
39
|
+
children,
|
|
40
|
+
className,
|
|
41
|
+
checked: checkedProp,
|
|
42
|
+
onChange,
|
|
43
|
+
...props
|
|
44
|
+
}: RadioProps): react_jsx_runtime10.JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { Radio, RadioGroup, RadioGroupProps, RadioProps, useRadioGroupContext };
|
|
49
|
+
//# sourceMappingURL=Radio.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.mts","names":[],"sources":["../../../src/components/Radio/Radio.tsx"],"mappings":";;;;;;UAMU,sBAAA;EACR,IAAA;EACA,KAAA;EACA,QAAA,IAAY,KAAA;AAAA;AAAA,cAKR,oBAAA,QAAoB,sBAAA;AAAA,UAKT,eAAA,SACP,KAAA,CAAM,cAAA,CAAe,cAAA,GAAiB,cAAA;EAC9C,IAAA;EACA,KAAA;EACA,YAAA;EACA,aAAA,IAAiB,KAAA;EACjB,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGL,UAAA;EAAA;;;;;;;;KAQV,eAAA,GAAe,mBAAA,CAAA,GAAA,CAAA,OAAA;;;UAuDD,UAAA,SAAmB,IAAA,CAClC,KAAA,CAAM,cAAA;EAGN,KAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGL,KAAA;EAAA;;;;;;;KAOV,UAAA,GAAU,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Text } from "../Text/Text.mjs";
|
|
2
|
+
import { Primitive } from "../Primitive/Primitive.mjs";
|
|
3
|
+
import { radio } from "./Radio.styles.mjs";
|
|
4
|
+
import React, { createContext, useContext } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Radio/Radio.tsx
|
|
8
|
+
const RadioGroupContext = createContext(null);
|
|
9
|
+
const useRadioGroupContext = () => {
|
|
10
|
+
return useContext(RadioGroupContext);
|
|
11
|
+
};
|
|
12
|
+
const RadioGroup = ({ name, value, defaultValue, onValueChange, className, children, ...props }) => {
|
|
13
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
14
|
+
const currentValue = value ?? internalValue;
|
|
15
|
+
const { group } = radio();
|
|
16
|
+
const handleChange = (newValue) => {
|
|
17
|
+
if (value === void 0) setInternalValue(newValue);
|
|
18
|
+
onValueChange?.(newValue);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
|
|
21
|
+
value: {
|
|
22
|
+
name,
|
|
23
|
+
value: currentValue,
|
|
24
|
+
onChange: handleChange
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
27
|
+
role: "radiogroup",
|
|
28
|
+
className: group({ className }),
|
|
29
|
+
...props,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const RadioIcon = ({ checked, className }) => /* @__PURE__ */ jsx("svg", {
|
|
35
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36
|
+
width: "20",
|
|
37
|
+
height: "20",
|
|
38
|
+
viewBox: "0 0 20 20",
|
|
39
|
+
fill: "none",
|
|
40
|
+
className,
|
|
41
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
42
|
+
cx: "10",
|
|
43
|
+
cy: "10",
|
|
44
|
+
r: checked ? 7 : 7.5,
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
strokeWidth: checked ? 6 : 5,
|
|
47
|
+
className: "transition-all duration-150 ease-in-out"
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
const Radio = ({ value, children, className, checked: checkedProp, onChange, ...props }) => {
|
|
51
|
+
const group = useRadioGroupContext();
|
|
52
|
+
const isChecked = group ? group.value === value : checkedProp;
|
|
53
|
+
const name = group?.name ?? props.name;
|
|
54
|
+
const handleChange = (e) => {
|
|
55
|
+
group?.onChange?.(value);
|
|
56
|
+
onChange?.(e);
|
|
57
|
+
};
|
|
58
|
+
const { item, indicatorWrapper, indicatorIcon } = radio({
|
|
59
|
+
checked: !!isChecked,
|
|
60
|
+
disabled: props.disabled
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
63
|
+
className: item({ className }),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx("input", {
|
|
66
|
+
type: "radio",
|
|
67
|
+
name,
|
|
68
|
+
value,
|
|
69
|
+
checked: isChecked,
|
|
70
|
+
onChange: handleChange,
|
|
71
|
+
className: "sr-only",
|
|
72
|
+
...props
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsx("span", {
|
|
75
|
+
className: indicatorWrapper(),
|
|
76
|
+
children: /* @__PURE__ */ jsx(RadioIcon, {
|
|
77
|
+
checked: !!isChecked,
|
|
78
|
+
className: indicatorIcon()
|
|
79
|
+
})
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsx(Text, {
|
|
82
|
+
typography: "body-16-regular",
|
|
83
|
+
textColor: "gray-800",
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
RadioGroup.displayName = "RadioGroup";
|
|
90
|
+
Radio.displayName = "Radio";
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Radio, RadioGroup, useRadioGroupContext };
|
|
94
|
+
//# sourceMappingURL=Radio.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.mjs","names":[],"sources":["../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import React, { createContext, useContext } from 'react';\nimport { Primitive, PrimitiveProps } from '../Primitive';\nimport { Text } from '../Text';\nimport { radio } from './Radio.styles';\n\n// RadioGroup Context\ninterface RadioGroupContextValue {\n name: string;\n value?: string;\n onChange?: (value: string) => void;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n\nconst useRadioGroupContext = () => {\n return useContext(RadioGroupContext);\n};\n\n// RadioGroup\nexport interface RadioGroupProps\n extends React.HTMLAttributes<HTMLDivElement>, PrimitiveProps {\n name: string;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n children: React.ReactNode;\n}\n\nexport const RadioGroup = ({\n name,\n value,\n defaultValue,\n onValueChange,\n className,\n children,\n ...props\n}: RadioGroupProps) => {\n const [internalValue, setInternalValue] = React.useState(defaultValue);\n const currentValue = value ?? internalValue;\n const { group } = radio();\n\n const handleChange = (newValue: string) => {\n if (value === undefined) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n };\n\n return (\n <RadioGroupContext.Provider\n value={{ name, value: currentValue, onChange: handleChange }}\n >\n <Primitive.div\n role=\"radiogroup\"\n className={group({ className })}\n {...props}\n >\n {children}\n </Primitive.div>\n </RadioGroupContext.Provider>\n );\n};\n\n// Radio icons ( icons 구현 전까지 임시 )\nconst RadioIcon = ({\n checked,\n className,\n}: {\n checked: boolean;\n className?: string;\n}) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n className={className}\n >\n <circle\n cx=\"10\"\n cy=\"10\"\n r={checked ? 7 : 7.5}\n stroke=\"currentColor\"\n strokeWidth={checked ? 6 : 5}\n className=\"transition-all duration-150 ease-in-out\"\n />\n </svg>\n);\n\n// Radio\nexport interface RadioProps extends Omit<\n React.ComponentProps<'input'>,\n 'type'\n> {\n value: string;\n children: React.ReactNode;\n}\n\nexport const Radio = ({\n value,\n children,\n className,\n checked: checkedProp,\n onChange,\n ...props\n}: RadioProps) => {\n const group = useRadioGroupContext();\n\n const isChecked = group ? group.value === value : checkedProp;\n const name = group?.name ?? props.name;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n group?.onChange?.(value);\n onChange?.(e);\n };\n\n const { item, indicatorWrapper, indicatorIcon } = radio({\n checked: !!isChecked,\n disabled: props.disabled,\n });\n\n return (\n <label className={item({ className })}>\n <input\n type=\"radio\"\n name={name}\n value={value}\n checked={isChecked}\n onChange={handleChange}\n className=\"sr-only\"\n {...props}\n />\n <span className={indicatorWrapper()}>\n <RadioIcon checked={!!isChecked} className={indicatorIcon()} />\n </span>\n <Text typography=\"body-16-regular\" textColor=\"gray-800\">\n {children}\n </Text>\n </label>\n );\n};\n\nRadioGroup.displayName = 'RadioGroup';\nRadio.displayName = 'Radio';\n\nexport { useRadioGroupContext };\n"],"mappings":";;;;;;;AAYA,MAAM,oBAAoB,cAA6C,KAAK;AAE5E,MAAM,6BAA6B;AACjC,QAAO,WAAW,kBAAkB;;AAatC,MAAa,cAAc,EACzB,MACA,OACA,cACA,eACA,WACA,UACA,GAAG,YACkB;CACrB,MAAM,CAAC,eAAe,oBAAoB,MAAM,SAAS,aAAa;CACtE,MAAM,eAAe,SAAS;CAC9B,MAAM,EAAE,UAAU,OAAO;CAEzB,MAAM,gBAAgB,aAAqB;AACzC,MAAI,UAAU,OACZ,kBAAiB,SAAS;AAE5B,kBAAgB,SAAS;;AAG3B,QACE,oBAAC,kBAAkB;EACjB,OAAO;GAAE;GAAM,OAAO;GAAc,UAAU;GAAc;YAE5D,oBAAC,UAAU;GACT,MAAK;GACL,WAAW,MAAM,EAAE,WAAW,CAAC;GAC/B,GAAI;GAEH;IACa;GACW;;AAKjC,MAAM,aAAa,EACjB,SACA,gBAKA,oBAAC;CACC,OAAM;CACN,OAAM;CACN,QAAO;CACP,SAAQ;CACR,MAAK;CACM;WAEX,oBAAC;EACC,IAAG;EACH,IAAG;EACH,GAAG,UAAU,IAAI;EACjB,QAAO;EACP,aAAa,UAAU,IAAI;EAC3B,WAAU;GACV;EACE;AAYR,MAAa,SAAS,EACpB,OACA,UACA,WACA,SAAS,aACT,UACA,GAAG,YACa;CAChB,MAAM,QAAQ,sBAAsB;CAEpC,MAAM,YAAY,QAAQ,MAAM,UAAU,QAAQ;CAClD,MAAM,OAAO,OAAO,QAAQ,MAAM;CAElC,MAAM,gBAAgB,MAA2C;AAC/D,SAAO,WAAW,MAAM;AACxB,aAAW,EAAE;;CAGf,MAAM,EAAE,MAAM,kBAAkB,kBAAkB,MAAM;EACtD,SAAS,CAAC,CAAC;EACX,UAAU,MAAM;EACjB,CAAC;AAEF,QACE,qBAAC;EAAM,WAAW,KAAK,EAAE,WAAW,CAAC;;GACnC,oBAAC;IACC,MAAK;IACC;IACC;IACP,SAAS;IACT,UAAU;IACV,WAAU;IACV,GAAI;KACJ;GACF,oBAAC;IAAK,WAAW,kBAAkB;cACjC,oBAAC;KAAU,SAAS,CAAC,CAAC;KAAW,WAAW,eAAe;MAAI;KAC1D;GACP,oBAAC;IAAK,YAAW;IAAkB,WAAU;IAC1C;KACI;;GACD;;AAIZ,WAAW,cAAc;AACzB,MAAM,cAAc"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let tailwind_variants = require("tailwind-variants");
|
|
3
|
+
|
|
4
|
+
//#region src/components/Radio/Radio.styles.ts
|
|
5
|
+
const radio = (0, tailwind_variants.tv)({
|
|
6
|
+
slots: {
|
|
7
|
+
group: "flex flex-col gap-5",
|
|
8
|
+
item: "flex cursor-pointer items-center gap-2 transition-opacity duration-150",
|
|
9
|
+
indicatorWrapper: "flex-shrink-0 transition-colors duration-150",
|
|
10
|
+
indicatorIcon: "transition-all duration-150 ease-in-out",
|
|
11
|
+
label: ""
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
checked: {
|
|
15
|
+
true: {
|
|
16
|
+
indicatorWrapper: "text-gray-800 hover:text-gray-800",
|
|
17
|
+
indicatorIcon: "text-gray-800"
|
|
18
|
+
},
|
|
19
|
+
false: {
|
|
20
|
+
indicatorWrapper: "text-gray-200 hover:text-gray-400",
|
|
21
|
+
indicatorIcon: "text-current"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
true: { item: "opacity-50 cursor-not-allowed" },
|
|
26
|
+
false: { item: "hover:opacity-80" }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.radio = radio;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Radio/Radio.styles.ts
|
|
4
|
+
const radio = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
group: "flex flex-col gap-5",
|
|
7
|
+
item: "flex cursor-pointer items-center gap-2 transition-opacity duration-150",
|
|
8
|
+
indicatorWrapper: "flex-shrink-0 transition-colors duration-150",
|
|
9
|
+
indicatorIcon: "transition-all duration-150 ease-in-out",
|
|
10
|
+
label: ""
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
checked: {
|
|
14
|
+
true: {
|
|
15
|
+
indicatorWrapper: "text-gray-800 hover:text-gray-800",
|
|
16
|
+
indicatorIcon: "text-gray-800"
|
|
17
|
+
},
|
|
18
|
+
false: {
|
|
19
|
+
indicatorWrapper: "text-gray-200 hover:text-gray-400",
|
|
20
|
+
indicatorIcon: "text-current"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
disabled: {
|
|
24
|
+
true: { item: "opacity-50 cursor-not-allowed" },
|
|
25
|
+
false: { item: "hover:opacity-80" }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { radio };
|
|
32
|
+
//# sourceMappingURL=Radio.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.styles.mjs","names":[],"sources":["../../../src/components/Radio/Radio.styles.ts"],"sourcesContent":["import { tv, VariantProps } from 'tailwind-variants';\n\nexport const radio = tv({\n slots: {\n group: 'flex flex-col gap-5',\n item: 'flex cursor-pointer items-center gap-2 transition-opacity duration-150',\n indicatorWrapper: 'flex-shrink-0 transition-colors duration-150',\n indicatorIcon: 'transition-all duration-150 ease-in-out',\n label: '',\n },\n variants: {\n checked: {\n true: {\n indicatorWrapper: 'text-gray-800 hover:text-gray-800',\n indicatorIcon: 'text-gray-800',\n },\n false: {\n indicatorWrapper: 'text-gray-200 hover:text-gray-400',\n indicatorIcon: 'text-current',\n },\n },\n disabled: {\n true: {\n item: 'opacity-50 cursor-not-allowed',\n },\n false: {\n item: 'hover:opacity-80',\n },\n },\n },\n});\n\nexport type RadioVariants = VariantProps<typeof radio>;\n"],"mappings":";;;AAEA,MAAa,QAAQ,GAAG;CACtB,OAAO;EACL,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,eAAe;EACf,OAAO;EACR;CACD,UAAU;EACR,SAAS;GACP,MAAM;IACJ,kBAAkB;IAClB,eAAe;IAChB;GACD,OAAO;IACL,kBAAkB;IAClB,eAAe;IAChB;GACF;EACD,UAAU;GACR,MAAM,EACJ,MAAM,iCACP;GACD,OAAO,EACL,MAAM,oBACP;GACF;EACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Radio, RadioGroup, RadioGroupProps, RadioProps, useRadioGroupContext } from "./Radio.mjs";
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_useRatioChartContext = require('../../hooks/ratioChart/useRatioChartContext.cjs');
|
|
3
|
+
const require_mergeStyles = require('../../utils/mergeStyles/mergeStyles.cjs');
|
|
4
|
+
const require_RatioChart_styles = require('./RatioChart.styles.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
|
|
9
|
+
//#region src/components/RatioChart/RatioChart.tsx
|
|
10
|
+
const RatioChartRoot = (props) => {
|
|
11
|
+
const { mode = "single", value: valueProp, defaultValue, onValueChange, disabled, children, className, ...rest } = props;
|
|
12
|
+
const [internalSingleValue, setInternalSingleValue] = (0, react.useState)(() => mode === "single" && typeof defaultValue === "string" ? defaultValue : "");
|
|
13
|
+
const [internalMultipleValue, setInternalMultipleValue] = (0, react.useState)(() => mode === "multiple" && Array.isArray(defaultValue) ? defaultValue : []);
|
|
14
|
+
const [counts, setCounts] = (0, react.useState)(/* @__PURE__ */ new Map());
|
|
15
|
+
const isControlled = valueProp !== void 0;
|
|
16
|
+
const currentValue = mode === "single" ? isControlled ? valueProp : internalSingleValue : isControlled ? valueProp : internalMultipleValue;
|
|
17
|
+
const isSelected = (0, react.useCallback)((itemValue) => {
|
|
18
|
+
if (mode === "single") return currentValue === itemValue;
|
|
19
|
+
return currentValue.includes(itemValue);
|
|
20
|
+
}, [mode, currentValue]);
|
|
21
|
+
const onSelect = (0, react.useCallback)((itemValue) => {
|
|
22
|
+
if (disabled) return;
|
|
23
|
+
if (mode === "single") {
|
|
24
|
+
if (!isControlled) setInternalSingleValue(itemValue);
|
|
25
|
+
onValueChange?.(itemValue);
|
|
26
|
+
} else {
|
|
27
|
+
const currentArray = currentValue;
|
|
28
|
+
const newValue = currentArray.includes(itemValue) ? currentArray.filter((v) => v !== itemValue) : [...currentArray, itemValue];
|
|
29
|
+
if (!isControlled) setInternalMultipleValue(newValue);
|
|
30
|
+
onValueChange?.(newValue);
|
|
31
|
+
}
|
|
32
|
+
}, [
|
|
33
|
+
mode,
|
|
34
|
+
disabled,
|
|
35
|
+
isControlled,
|
|
36
|
+
currentValue,
|
|
37
|
+
onValueChange
|
|
38
|
+
]);
|
|
39
|
+
const registerCount = (0, react.useCallback)((itemValue, count) => {
|
|
40
|
+
setCounts((prev) => new Map(prev).set(itemValue, count));
|
|
41
|
+
}, []);
|
|
42
|
+
const unregisterCount = (0, react.useCallback)((itemValue) => {
|
|
43
|
+
setCounts((prev) => {
|
|
44
|
+
const next = new Map(prev);
|
|
45
|
+
next.delete(itemValue);
|
|
46
|
+
return next;
|
|
47
|
+
});
|
|
48
|
+
}, []);
|
|
49
|
+
const totalCount = (0, react.useMemo)(() => {
|
|
50
|
+
let total = 0;
|
|
51
|
+
counts.forEach((c) => total += c);
|
|
52
|
+
return total;
|
|
53
|
+
}, [counts]);
|
|
54
|
+
const getRatio = (0, react.useCallback)((itemValue) => {
|
|
55
|
+
const count = counts.get(itemValue) ?? 0;
|
|
56
|
+
return totalCount > 0 ? Math.round(count / totalCount * 100) : 0;
|
|
57
|
+
}, [counts, totalCount]);
|
|
58
|
+
const styles = require_RatioChart_styles.ratioChart({ disabled });
|
|
59
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useRatioChartContext.RatioChartContext.Provider, {
|
|
60
|
+
value: {
|
|
61
|
+
value: currentValue,
|
|
62
|
+
mode,
|
|
63
|
+
disabled,
|
|
64
|
+
onSelect,
|
|
65
|
+
isSelected,
|
|
66
|
+
counts,
|
|
67
|
+
registerCount,
|
|
68
|
+
unregisterCount,
|
|
69
|
+
totalCount,
|
|
70
|
+
getRatio
|
|
71
|
+
},
|
|
72
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
73
|
+
role: "group",
|
|
74
|
+
className: require_mergeStyles.mergeStyles(styles.root(), className),
|
|
75
|
+
...rest,
|
|
76
|
+
children
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const RatioChartItem = ({ value, label, count, ratio, disabled: itemDisabled, className, ...props }) => {
|
|
81
|
+
const { disabled: rootDisabled, onSelect, isSelected, registerCount, unregisterCount, getRatio } = require_useRatioChartContext.useRatioChartContext();
|
|
82
|
+
const disabled = itemDisabled || rootDisabled;
|
|
83
|
+
const selected = isSelected(value);
|
|
84
|
+
(0, react.useEffect)(() => {
|
|
85
|
+
if (count !== void 0) {
|
|
86
|
+
registerCount(value, count);
|
|
87
|
+
return () => unregisterCount(value);
|
|
88
|
+
}
|
|
89
|
+
}, [
|
|
90
|
+
count,
|
|
91
|
+
value,
|
|
92
|
+
registerCount,
|
|
93
|
+
unregisterCount
|
|
94
|
+
]);
|
|
95
|
+
const handleClick = () => {
|
|
96
|
+
if (!disabled) onSelect(value);
|
|
97
|
+
};
|
|
98
|
+
const handleKeyDown = (e) => {
|
|
99
|
+
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
onSelect(value);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const displayRatio = count !== void 0 ? getRatio(value) : ratio ?? 0;
|
|
105
|
+
const showRatio = count !== void 0 || ratio !== void 0;
|
|
106
|
+
const styles = require_RatioChart_styles.ratioChart({
|
|
107
|
+
disabled,
|
|
108
|
+
selected
|
|
109
|
+
});
|
|
110
|
+
const lightContent = require_RatioChart_styles.ratioChart({ contentVariant: "light" });
|
|
111
|
+
const darkContent = require_RatioChart_styles.ratioChart({ contentVariant: "dark" });
|
|
112
|
+
const contentElement = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
113
|
+
className: styles.label(),
|
|
114
|
+
children: label
|
|
115
|
+
}), showRatio && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
116
|
+
className: styles.ratio(),
|
|
117
|
+
children: [displayRatio, "%"]
|
|
118
|
+
})] });
|
|
119
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
120
|
+
type: "button",
|
|
121
|
+
role: "option",
|
|
122
|
+
"aria-selected": selected,
|
|
123
|
+
disabled,
|
|
124
|
+
onClick: handleClick,
|
|
125
|
+
onKeyDown: handleKeyDown,
|
|
126
|
+
className: require_mergeStyles.mergeStyles(styles.item(), className),
|
|
127
|
+
style: { minWidth: 0 },
|
|
128
|
+
...props,
|
|
129
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
130
|
+
className: styles.fill(),
|
|
131
|
+
style: { width: `${displayRatio}%` }
|
|
132
|
+
}), selected ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
133
|
+
className: lightContent.content(),
|
|
134
|
+
style: { clipPath: `inset(0 ${100 - displayRatio}% 0 0)` },
|
|
135
|
+
children: contentElement
|
|
136
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
137
|
+
className: darkContent.content(),
|
|
138
|
+
style: { clipPath: `inset(0 0 0 ${displayRatio}%)` },
|
|
139
|
+
children: contentElement
|
|
140
|
+
})] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
141
|
+
className: darkContent.content(),
|
|
142
|
+
children: contentElement
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
function formatTimeRemaining(endDate) {
|
|
147
|
+
const now = /* @__PURE__ */ new Date();
|
|
148
|
+
const diff = endDate.getTime() - now.getTime();
|
|
149
|
+
if (diff <= 0) return "종료됨";
|
|
150
|
+
const totalHours = diff / (1e3 * 60 * 60);
|
|
151
|
+
const totalMinutes = diff / (1e3 * 60);
|
|
152
|
+
if (totalHours >= 24) return `${Math.round(totalHours / 24)}일 후 종료`;
|
|
153
|
+
if (totalHours >= 1) return `${Math.floor(totalHours)}시간 후 종료`;
|
|
154
|
+
return `${Math.floor(totalMinutes)}분 후 종료`;
|
|
155
|
+
}
|
|
156
|
+
const RatioChartFooter = ({ endDate, endTime, hideParticipantCount, className, children, ...props }) => {
|
|
157
|
+
const { totalCount } = require_useRatioChartContext.useRatioChartContext();
|
|
158
|
+
const displayEndTime = endDate ? formatTimeRemaining(endDate) : endTime;
|
|
159
|
+
const styles = require_RatioChart_styles.ratioChart();
|
|
160
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
161
|
+
className: require_mergeStyles.mergeStyles(styles.footer(), className),
|
|
162
|
+
...props,
|
|
163
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [!hideParticipantCount && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
164
|
+
className: styles.footerText(),
|
|
165
|
+
children: [totalCount, "명 참여"]
|
|
166
|
+
}), displayEndTime && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
167
|
+
className: styles.footerText(),
|
|
168
|
+
children: displayEndTime
|
|
169
|
+
})] })
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
RatioChartRoot.displayName = "RatioChart.Root";
|
|
173
|
+
RatioChartItem.displayName = "RatioChart.Item";
|
|
174
|
+
RatioChartFooter.displayName = "RatioChart.Footer";
|
|
175
|
+
const RatioChart = Object.assign(RatioChartRoot, {
|
|
176
|
+
Root: RatioChartRoot,
|
|
177
|
+
Item: RatioChartItem,
|
|
178
|
+
Footer: RatioChartFooter
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
exports.RatioChart = RatioChart;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime37 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/RatioChart/RatioChart.d.ts
|
|
5
|
+
interface RatioChartRootSingleProps extends Omit<React.ComponentProps<'div'>, 'defaultValue'> {
|
|
6
|
+
mode?: 'single';
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface RatioChartRootMultipleProps extends Omit<React.ComponentProps<'div'>, 'defaultValue'> {
|
|
13
|
+
mode: 'multiple';
|
|
14
|
+
value?: string[];
|
|
15
|
+
defaultValue?: string[];
|
|
16
|
+
onValueChange?: (value: string[]) => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
type RatioChartRootProps = RatioChartRootSingleProps | RatioChartRootMultipleProps;
|
|
20
|
+
interface RatioChartItemProps extends Omit<React.ComponentProps<'button'>, 'value'> {
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
count?: number;
|
|
24
|
+
ratio?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface RatioChartFooterProps extends React.ComponentProps<'div'> {
|
|
28
|
+
endDate?: Date;
|
|
29
|
+
endTime?: string;
|
|
30
|
+
hideParticipantCount?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const RatioChart: {
|
|
33
|
+
(props: RatioChartRootProps): react_jsx_runtime37.JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
} & {
|
|
36
|
+
Root: {
|
|
37
|
+
(props: RatioChartRootProps): react_jsx_runtime37.JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
Item: {
|
|
41
|
+
({
|
|
42
|
+
value,
|
|
43
|
+
label,
|
|
44
|
+
count,
|
|
45
|
+
ratio,
|
|
46
|
+
disabled: itemDisabled,
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: RatioChartItemProps): react_jsx_runtime37.JSX.Element;
|
|
50
|
+
displayName: string;
|
|
51
|
+
};
|
|
52
|
+
Footer: {
|
|
53
|
+
({
|
|
54
|
+
endDate,
|
|
55
|
+
endTime,
|
|
56
|
+
hideParticipantCount,
|
|
57
|
+
className,
|
|
58
|
+
children,
|
|
59
|
+
...props
|
|
60
|
+
}: RatioChartFooterProps): react_jsx_runtime37.JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { RatioChart, RatioChartFooterProps, RatioChartItemProps, RatioChartRootProps };
|
|
66
|
+
//# sourceMappingURL=RatioChart.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatioChart.d.cts","names":[],"sources":["../../../src/components/RatioChart/RatioChart.tsx"],"mappings":";;;;UAUU,yBAAA,SAAkC,IAAA,CAC1C,KAAA,CAAM,cAAA;EAGN,IAAA;EACA,KAAA;EACA,YAAA;EACA,aAAA,IAAiB,KAAA;EACjB,QAAA;AAAA;AAAA,UAIQ,2BAAA,SAAoC,IAAA,CAC5C,KAAA,CAAM,cAAA;EAGN,IAAA;EACA,KAAA;EACA,YAAA;EACA,aAAA,IAAiB,KAAA;EACjB,QAAA;AAAA;AAAA,KAGU,mBAAA,GACR,yBAAA,GACA,2BAAA;AAAA,UAmIa,mBAAA,SAA4B,IAAA,CAC3C,KAAA,CAAM,cAAA;EAGN,KAAA;EACA,KAAA;EACA,KAAA;EACA,KAAA;EACA,QAAA;AAAA;AAAA,UAuGe,qBAAA,SAA8B,KAAA,CAAM,cAAA;EACnD,OAAA,GAAU,IAAA;EACV,OAAA;EACA,oBAAA;AAAA;AAAA,cA8DW,UAAA;EAAA,QAjTkB,mBAAA,GAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;YAAnB,mBAAA,GAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;;;;OAoJ/C,mBAAA,GAAmB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;;;OAiInB,qBAAA,GAAqB,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|