@nobak/design-system 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +73 -0
- package/README.md +142 -0
- package/lib/assets/icons.js +67 -0
- package/lib/components/AccountOverview/AccountOverview.js +122 -0
- package/lib/components/AdminPanel.js +58 -0
- package/lib/components/AssetExchange/AssetExchange.js +189 -0
- package/lib/components/AuthenticationFlow.js +216 -0
- package/lib/components/ConversationInterface/ConversationInterface.js +232 -0
- package/lib/components/DevFooter.js +38 -0
- package/lib/components/DevMenu.js +35 -0
- package/lib/components/DevSidebar.js +28 -0
- package/lib/components/DigitalDisplay.js +83 -0
- package/lib/components/Footer.js +45 -0
- package/lib/components/HeroContainer.js +10 -0
- package/lib/components/IntentRecognition/IntentRecognition.js +174 -0
- package/lib/components/Logo.js +259 -0
- package/lib/components/MenuBar.js +56 -0
- package/lib/components/NetworkSettings.js +223 -0
- package/lib/components/RecoverySetup/RecoverySetup.js +354 -0
- package/lib/components/RisingSun.js +122 -0
- package/lib/components/Symbol.js +226 -0
- package/lib/components/TransactionComposer/TransactionComposer.js +258 -0
- package/lib/components/TransactionConfirmation.js +184 -0
- package/lib/components/WalletMenu.js +33 -0
- package/lib/components/console/code/CodeBlock.js +150 -0
- package/lib/components/console/code/index.js +9 -0
- package/lib/components/console/data/DataTable.js +245 -0
- package/lib/components/console/data/MetricCard.js +79 -0
- package/lib/components/console/data/index.js +11 -0
- package/lib/components/console/documentation/index.js +10 -0
- package/lib/components/console/forms/APIKeyGenerator.js +261 -0
- package/lib/components/console/forms/SearchBar.js +210 -0
- package/lib/components/console/forms/index.js +10 -0
- package/lib/components/console/index.js +29 -0
- package/lib/components/console/layout/ConsoleCard.js +82 -0
- package/lib/components/console/layout/ConsoleLayout.js +86 -0
- package/lib/components/console/layout/index.js +10 -0
- package/lib/components/console/monitoring/StatusIndicator.js +128 -0
- package/lib/components/console/monitoring/index.js +9 -0
- package/lib/components/console/navigation/DevFooter.js +38 -0
- package/lib/components/console/navigation/DevMenu.js +35 -0
- package/lib/components/console/navigation/DevSidebar.js +28 -0
- package/lib/components/console/navigation/index.js +11 -0
- package/lib/components/console/settings/index.js +10 -0
- package/lib/components/index.js +12 -0
- package/lib/design/ColorPicker.stories.js +9 -0
- package/lib/design/HSLTool-V1.js +345 -0
- package/lib/design/HSLTool-V2.js +475 -0
- package/lib/design/HSLTool-V3.js +543 -0
- package/lib/design/HSLTool-V4.js +1139 -0
- package/lib/design/HSLTool.js +374 -0
- package/lib/design/OKLCHColorPicker.stories.js +24 -0
- package/lib/design/OKLCHTool.js +1014 -0
- package/lib/index.js +4 -0
- package/lib/shared/components/Avatar/Avatar.js +18 -0
- package/lib/shared/components/Avatar/index.js +1 -0
- package/lib/shared/components/Badge/Badge.js +34 -0
- package/lib/shared/components/Badge/index.js +1 -0
- package/lib/shared/components/Breadcrumb/Breadcrumb.js +13 -0
- package/lib/shared/components/Breadcrumb/index.js +1 -0
- package/lib/shared/components/Button/Button.js +184 -0
- package/lib/shared/components/Button/index.js +1 -0
- package/lib/shared/components/Calendar/Calendar.js +155 -0
- package/lib/shared/components/Calendar/CalendarDay.js +251 -0
- package/lib/shared/components/Calendar/CalendarHeader.js +88 -0
- package/lib/shared/components/Calendar/CalendarMonth.js +106 -0
- package/lib/shared/components/Calendar/CalendarWeek.js +267 -0
- package/lib/shared/components/Calendar/constants.js +73 -0
- package/lib/shared/components/Calendar/index.js +3 -0
- package/lib/shared/components/Calendar/types.d.js +0 -0
- package/lib/shared/components/Cartel/Cartel.js +44 -0
- package/lib/shared/components/Cartel/index.js +1 -0
- package/lib/shared/components/Cell/Cell.js +105 -0
- package/lib/shared/components/Cell/index.js +1 -0
- package/lib/shared/components/Checkbox/Checkbox.js +27 -0
- package/lib/shared/components/Checkbox/index.js +1 -0
- package/lib/shared/components/Clock/Clock.js +6 -0
- package/lib/shared/components/Clock/index.js +1 -0
- package/lib/shared/components/ColorChecker/ColorChecker.js +89 -0
- package/lib/shared/components/ColorChecker/index.js +2 -0
- package/lib/shared/components/ColorChecker/utils.js +159 -0
- package/lib/shared/components/Command/Command.js +95 -0
- package/lib/shared/components/Command/index.js +1 -0
- package/lib/shared/components/Container/Container.js +18 -0
- package/lib/shared/components/Container/index.js +1 -0
- package/lib/shared/components/Cover/Cover.js +17 -0
- package/lib/shared/components/Cover/index.js +1 -0
- package/lib/shared/components/DatePicker/DatePicker.js +52 -0
- package/lib/shared/components/DatePicker/components/Calendar.js +125 -0
- package/lib/shared/components/DatePicker/components/CalendarDay.js +23 -0
- package/lib/shared/components/DatePicker/components/DateWrapper.js +15 -0
- package/lib/shared/components/DatePicker/components/index.js +2 -0
- package/lib/shared/components/DatePicker/index.js +1 -0
- package/lib/shared/components/DateTime/DateTime.js +51 -0
- package/lib/shared/components/DateTime/index.js +1 -0
- package/lib/shared/components/Debug/Debug.js +12 -0
- package/lib/shared/components/Debug/index.js +1 -0
- package/lib/shared/components/Disclosure/Disclosure.js +31 -0
- package/lib/shared/components/Disclosure/index.js +1 -0
- package/lib/shared/components/Dropdown/Dropdown.js +91 -0
- package/lib/shared/components/Dropdown/index.js +1 -0
- package/lib/shared/components/EmptyState/EmptyState.js +40 -0
- package/lib/shared/components/EmptyState/index.js +1 -0
- package/lib/shared/components/Form/Form.js +41 -0
- package/lib/shared/components/Form/components/DynamicForm.js +66 -0
- package/lib/shared/components/Form/components/StepperForm.js +266 -0
- package/lib/shared/components/Form/components/index.js +2 -0
- package/lib/shared/components/Form/context/Form.js +164 -0
- package/lib/shared/components/Form/context/index.js +1 -0
- package/lib/shared/components/Form/index.js +1 -0
- package/lib/shared/components/Form/types.d.js +1 -0
- package/lib/shared/components/Form/utils/index.js +31 -0
- package/lib/shared/components/GroupItems/GroupItems.js +17 -0
- package/lib/shared/components/GroupItems/index.js +1 -0
- package/lib/shared/components/Header/Header.js +26 -0
- package/lib/shared/components/Header/index.js +1 -0
- package/lib/shared/components/Heading/Heading.js +5 -0
- package/lib/shared/components/Heading/index.js +1 -0
- package/lib/shared/components/Icon/Icon.js +28 -0
- package/lib/shared/components/Icon/index.js +1 -0
- package/lib/shared/components/Identicons/Identicons.js +6 -0
- package/lib/shared/components/Identicons/index.d.js +0 -0
- package/lib/shared/components/Identicons/index.js +1 -0
- package/lib/shared/components/Image/Image.js +22 -0
- package/lib/shared/components/Image/index.js +1 -0
- package/lib/shared/components/Input/Input.js +201 -0
- package/lib/shared/components/Input/components/CheckBoxInput.js +81 -0
- package/lib/shared/components/Input/components/DateInput.js +89 -0
- package/lib/shared/components/Input/components/DefaultInput.js +102 -0
- package/lib/shared/components/Input/components/FileReaderInput.js +88 -0
- package/lib/shared/components/Input/components/NumberInput.js +141 -0
- package/lib/shared/components/Input/components/PickerInput.js +122 -0
- package/lib/shared/components/Input/components/RCInput.js +112 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxBasic.js +56 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxCard.js +27 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxFull.js +44 -0
- package/lib/shared/components/Input/components/Radiobox/index.js +3 -0
- package/lib/shared/components/Input/components/RadioboxInput.js +102 -0
- package/lib/shared/components/Input/components/SelectInput.js +70 -0
- package/lib/shared/components/Input/components/TextAreaInput.js +67 -0
- package/lib/shared/components/Input/components/TextInput.js +139 -0
- package/lib/shared/components/Input/components/TimeInput.js +37 -0
- package/lib/shared/components/Input/components/UploadFileInput.js +123 -0
- package/lib/shared/components/Input/components/index.js +13 -0
- package/lib/shared/components/Input/components/types.d.js +0 -0
- package/lib/shared/components/Input/index.js +1 -0
- package/lib/shared/components/Input/types.d.js +0 -0
- package/lib/shared/components/Layout/Layout.js +13 -0
- package/lib/shared/components/Layout/index.js +1 -0
- package/lib/shared/components/List/List.js +30 -0
- package/lib/shared/components/List/index.js +1 -0
- package/lib/shared/components/Loader/Loader.js +27 -0
- package/lib/shared/components/Loader/index.js +1 -0
- package/lib/shared/components/Modal/Modal.js +102 -0
- package/lib/shared/components/Modal/index.js +1 -0
- package/lib/shared/components/Notification/Notification.js +39 -0
- package/lib/shared/components/Notification/index.js +1 -0
- package/lib/shared/components/Person/Person.js +81 -0
- package/lib/shared/components/Person/index.js +1 -0
- package/lib/shared/components/Popover/Popover.js +39 -0
- package/lib/shared/components/Popover/index.js +1 -0
- package/lib/shared/components/QRCode/QRCode.js +329 -0
- package/lib/shared/components/QRCode/index.js +1 -0
- package/lib/shared/components/RadioGroup/RadioGroup.js +35 -0
- package/lib/shared/components/RadioGroup/components/DefaultGroup.js +71 -0
- package/lib/shared/components/RadioGroup/components/VerticalGroup.js +83 -0
- package/lib/shared/components/RadioGroup/components/index.js +2 -0
- package/lib/shared/components/RadioGroup/index.js +1 -0
- package/lib/shared/components/Search/Search.js +12 -0
- package/lib/shared/components/Search/index.js +1 -0
- package/lib/shared/components/Select/Select.js +90 -0
- package/lib/shared/components/Select/index.js +1 -0
- package/lib/shared/components/Sidebar/Sidebar.js +42 -0
- package/lib/shared/components/Sidebar/index.js +1 -0
- package/lib/shared/components/SlideOver/SlideOver.js +81 -0
- package/lib/shared/components/SlideOver/index.js +1 -0
- package/lib/shared/components/Slider/Slider.js +80 -0
- package/lib/shared/components/Slider/index.js +1 -0
- package/lib/shared/components/Stepper/Stepper.js +32 -0
- package/lib/shared/components/Stepper/index.js +1 -0
- package/lib/shared/components/Steps/Steps.js +53 -0
- package/lib/shared/components/Steps/index.js +1 -0
- package/lib/shared/components/Switch/Switch.js +26 -0
- package/lib/shared/components/Switch/index.js +1 -0
- package/lib/shared/components/Tab/Tab.js +59 -0
- package/lib/shared/components/Tab/index.js +1 -0
- package/lib/shared/components/Table/Table.js +47 -0
- package/lib/shared/components/Table/index.js +1 -0
- package/lib/shared/components/Text/Text.js +11 -0
- package/lib/shared/components/Text/index.js +1 -0
- package/lib/shared/components/TextList/TextList.js +15 -0
- package/lib/shared/components/TextList/index.js +1 -0
- package/lib/shared/components/TimePicker/TimePicker.js +161 -0
- package/lib/shared/components/TimePicker/index.js +1 -0
- package/lib/shared/components/Tooltip/Tooltip.js +13 -0
- package/lib/shared/components/Tooltip/index.js +1 -0
- package/lib/shared/components/Uploader/Uploader.js +63 -0
- package/lib/shared/components/Uploader/index.js +1 -0
- package/lib/shared/components/Video/Video.js +20 -0
- package/lib/shared/components/Video/index.js +1 -0
- package/lib/shared/components/index.d.js +0 -0
- package/lib/shared/components/index.js +50 -0
- package/lib/shared/elements/Color/ColorPallet.js +20 -0
- package/lib/shared/elements/Color/index.js +1 -0
- package/lib/shared/elements/Text.js +37 -0
- package/lib/shared/elements/index.js +1 -0
- package/lib/shared/helpers/FakeLink.js +8 -0
- package/lib/shared/helpers/constants.js +359 -0
- package/lib/shared/helpers/index.js +2 -0
- package/lib/shared/helpers/isEqual.js +56 -0
- package/lib/shared/index.d.js +0 -0
- package/lib/shared/index.js +1 -0
- package/lib/shared/stories/components/Avatar.stories.js +17 -0
- package/lib/shared/stories/components/Badge.stories.dev.js +37 -0
- package/lib/shared/stories/components/Button.stories.js +553 -0
- package/lib/shared/stories/components/Calendar.stories.js +62 -0
- package/lib/shared/stories/components/Cartel.stories.js +32 -0
- package/lib/shared/stories/components/Checkbox.stories.js +15 -0
- package/lib/shared/stories/components/ColorChecker.stories.dev.js +16 -0
- package/lib/shared/stories/components/DateTime.stories.js +27 -0
- package/lib/shared/stories/components/Disclosure.stories.js +30 -0
- package/lib/shared/stories/components/Dropdown.stories.js +39 -0
- package/lib/shared/stories/components/Form/Default.stories.js +201 -0
- package/lib/shared/stories/components/Form/DummyForm.stories.js +48 -0
- package/lib/shared/stories/components/Form/DynamicForm.stories.js +155 -0
- package/lib/shared/stories/components/Form/StepperForm.stories.js +138 -0
- package/lib/shared/stories/components/Form/ValidateForm.stories.js +70 -0
- package/lib/shared/stories/components/Form/Validation.stories.js +184 -0
- package/lib/shared/stories/components/GroupItems.stories.js +23 -0
- package/lib/shared/stories/components/Header.stories.js +29 -0
- package/lib/shared/stories/components/Heading.stories.js +27 -0
- package/lib/shared/stories/components/Icon.stories.js +22 -0
- package/lib/shared/stories/components/Image.stories.js +23 -0
- package/lib/shared/stories/components/Input/Checkbox.stories.js +45 -0
- package/lib/shared/stories/components/Input/DatePicker.stories.js +23 -0
- package/lib/shared/stories/components/Input/Defaut.stories.js +24 -0
- package/lib/shared/stories/components/Input/Number.stories.js +24 -0
- package/lib/shared/stories/components/Input/RCI.stories.js +59 -0
- package/lib/shared/stories/components/Input/Radiobox.stories.dev.js +28 -0
- package/lib/shared/stories/components/Input/Select.stories.dev.js +27 -0
- package/lib/shared/stories/components/Input/SelectMultiple.stories.dev.js +510 -0
- package/lib/shared/stories/components/Input/Textarea.stories.js +24 -0
- package/lib/shared/stories/components/List.stories.js +34 -0
- package/lib/shared/stories/components/Loader.stories.js +15 -0
- package/lib/shared/stories/components/Modal.stories.js +50 -0
- package/lib/shared/stories/components/Notification.stories.js +22 -0
- package/lib/shared/stories/components/Person.stories.js +41 -0
- package/lib/shared/stories/components/Picker.stories.js +15 -0
- package/lib/shared/stories/components/Popover.stories.js +36 -0
- package/lib/shared/stories/components/QRCode.stories.js +20 -0
- package/lib/shared/stories/components/RadioGroup.stories.js +56 -0
- package/lib/shared/stories/components/Select.stories.js +50 -0
- package/lib/shared/stories/components/Sidebar.stories.js +35 -0
- package/lib/shared/stories/components/Slider.stories.dev.js +48 -0
- package/lib/shared/stories/components/Stepper/Stepper.stories.js +38 -0
- package/lib/shared/stories/components/Steps.stories.js +15 -0
- package/lib/shared/stories/components/Switch.stories.js +15 -0
- package/lib/shared/stories/components/Tab.stories.js +15 -0
- package/lib/shared/stories/components/Table.stories.js +95 -0
- package/lib/shared/stories/components/TextList.stories.js +23 -0
- package/lib/shared/stories/components/Tooltip.stories.dev.js +40 -0
- package/lib/shared/stories/elements/Color.stories.js +269 -0
- package/lib/shared/stories/elements/Text.stories.js +45 -0
- package/lib/shared/types/index.js +1 -0
- package/lib/stories/Foundation/BrandIdentity.prod.stories.js +510 -0
- package/lib/stories/Foundation/Logo.stories.js +19 -0
- package/lib/stories/Foundation/RisingSun.stories.js +16 -0
- package/lib/stories/Foundation/Shadows.stories.js +601 -0
- package/lib/stories/Foundation/Symbol.stories.js +18 -0
- package/lib/stories/HeroContainer.stories.js +18 -0
- package/lib/styles/accessibilityTokens.js +72 -0
- package/lib/styles/borderWidth.js +10 -0
- package/lib/styles/colors.js +303 -0
- package/lib/styles/elevation.js +240 -0
- package/lib/styles/icons.js +218 -0
- package/lib/styles/index.js +29 -0
- package/lib/styles/motion.js +668 -0
- package/lib/styles/opacity.js +10 -0
- package/lib/styles/radius.js +11 -0
- package/lib/styles/sizing.js +35 -0
- package/lib/styles/space.js +24 -0
- package/lib/styles/theme/darkTheme.js +471 -0
- package/lib/styles/theme/index.js +44 -0
- package/lib/styles/theme/lightTheme.js +480 -0
- package/lib/styles/theme/themeTypes.js +1 -0
- package/lib/styles/theme/themeUtils.js +63 -0
- package/lib/styles/typography-advanced.js +510 -0
- package/lib/styles/typography.js +1419 -0
- package/lib/styles/zIndex.js +19 -0
- package/lib/tokens/borders.js +161 -0
- package/lib/tokens/colors.js +426 -0
- package/lib/tokens/components.js +499 -0
- package/lib/tokens/index.js +84 -0
- package/lib/tokens/lighting.js +384 -0
- package/lib/tokens/motion.js +284 -0
- package/lib/tokens/semantic.js +367 -0
- package/lib/tokens/shadows.js +114 -0
- package/lib/tokens/spacing.js +189 -0
- package/lib/tokens/typography.js +268 -0
- package/package.json +176 -0
- package/styles/generated-tokens.css +677 -0
- package/styles/index.css +2 -0
- package/styles/main.css +610 -0
- package/tailwind.config.js +64 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import { RadioGroup } from '@headlessui/react';
|
|
10
|
+
var hoursOptions = [{
|
|
11
|
+
name: '00',
|
|
12
|
+
value: 0
|
|
13
|
+
}, {
|
|
14
|
+
name: '01',
|
|
15
|
+
value: 3600
|
|
16
|
+
}, {
|
|
17
|
+
name: '02',
|
|
18
|
+
value: 7200
|
|
19
|
+
}, {
|
|
20
|
+
name: '03',
|
|
21
|
+
value: 10800
|
|
22
|
+
}, {
|
|
23
|
+
name: '04',
|
|
24
|
+
value: 14400
|
|
25
|
+
}, {
|
|
26
|
+
name: '05',
|
|
27
|
+
value: 18000
|
|
28
|
+
}, {
|
|
29
|
+
name: '06',
|
|
30
|
+
value: 21600
|
|
31
|
+
}, {
|
|
32
|
+
name: '07',
|
|
33
|
+
value: 25200
|
|
34
|
+
}, {
|
|
35
|
+
name: '08',
|
|
36
|
+
value: 28800
|
|
37
|
+
}, {
|
|
38
|
+
name: '09',
|
|
39
|
+
value: 32400
|
|
40
|
+
}, {
|
|
41
|
+
name: '10',
|
|
42
|
+
value: 36000
|
|
43
|
+
}, {
|
|
44
|
+
name: '11',
|
|
45
|
+
value: 39600
|
|
46
|
+
}];
|
|
47
|
+
var minutesOptions = [{
|
|
48
|
+
name: '00',
|
|
49
|
+
value: 0
|
|
50
|
+
}, {
|
|
51
|
+
name: '15',
|
|
52
|
+
value: 900
|
|
53
|
+
}, {
|
|
54
|
+
name: '30',
|
|
55
|
+
value: 1800
|
|
56
|
+
}, {
|
|
57
|
+
name: '45',
|
|
58
|
+
value: 2700
|
|
59
|
+
}];
|
|
60
|
+
export var TimePicker = function TimePicker(_ref) {
|
|
61
|
+
var value = _ref.value,
|
|
62
|
+
handleChange = _ref.handleChange;
|
|
63
|
+
if (!!value) {
|
|
64
|
+
var minutes = value % 3600 / 60;
|
|
65
|
+
var hours = Math.floor(value / 3600);
|
|
66
|
+
console.log("Time ".concat(('0' + hours).slice(-2), ":").concat(('0' + minutes).slice(-2)));
|
|
67
|
+
}
|
|
68
|
+
var _React$useState = React.useState(hoursOptions[0]),
|
|
69
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
70
|
+
hour = _React$useState2[0],
|
|
71
|
+
setHour = _React$useState2[1];
|
|
72
|
+
var _React$useState3 = React.useState(minutesOptions[0]),
|
|
73
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
74
|
+
minute = _React$useState4[0],
|
|
75
|
+
setMinute = _React$useState4[1];
|
|
76
|
+
var updateData = function updateData(e, type) {
|
|
77
|
+
if (type === 'hour') {
|
|
78
|
+
setHour(e);
|
|
79
|
+
var _value = e.value + minute.value === 0 ? String(0) : e.value + minute.value;
|
|
80
|
+
handleChange({
|
|
81
|
+
name: "".concat(e.name, " - ").concat(minute.name),
|
|
82
|
+
value: _value
|
|
83
|
+
});
|
|
84
|
+
} else if (type === 'minute') {
|
|
85
|
+
setMinute(e);
|
|
86
|
+
var _value2 = e.value + hour.value === 0 ? String(0) : e.value + hour.value;
|
|
87
|
+
handleChange({
|
|
88
|
+
name: "".concat(hour.name, " - ").concat(e.name),
|
|
89
|
+
value: _value2
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var getStyles = function getStyles(_ref2) {
|
|
94
|
+
var active = _ref2.active,
|
|
95
|
+
checked = _ref2.checked,
|
|
96
|
+
disabled = _ref2.disabled;
|
|
97
|
+
return clsx(active ? 'ring-2 ring-offset-2 ring-secondary-400' : '', checked ? 'bg-secondary-400 border-transparent text-white hover:bg-secondary-300' : 'bg-neutral-50 border-neutral-200 text-neutral-900 hover:bg-neutral-50', 'border rounded-md py-3 px-3 flex items-center justify-center text-sm font-medium uppercase sm:flex-1');
|
|
98
|
+
};
|
|
99
|
+
// console.log('value', value)
|
|
100
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
101
|
+
className: "text-neutral-800 text-p2"
|
|
102
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "flex flex-row space-x-[16px]"
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: "grow"
|
|
106
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "flex items-center justify-between"
|
|
108
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
109
|
+
className: "text-sm font-medium text-neutral-900"
|
|
110
|
+
}, "Hours")), /*#__PURE__*/React.createElement(RadioGroup
|
|
111
|
+
// value={hour}
|
|
112
|
+
, {
|
|
113
|
+
onChange: function onChange(e) {
|
|
114
|
+
return updateData(e, 'hour');
|
|
115
|
+
},
|
|
116
|
+
value: hour
|
|
117
|
+
// onChange={setHour}
|
|
118
|
+
,
|
|
119
|
+
className: "mt-2"
|
|
120
|
+
}, /*#__PURE__*/React.createElement(RadioGroup.Label, {
|
|
121
|
+
className: "sr-only"
|
|
122
|
+
}, "Choose a memory option"), /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: "grid grid-cols-3 gap-3 sm:grid-cols-3"
|
|
124
|
+
}, hoursOptions.map(function (option) {
|
|
125
|
+
return /*#__PURE__*/React.createElement(RadioGroup.Option, {
|
|
126
|
+
key: option.name,
|
|
127
|
+
value: option,
|
|
128
|
+
className: function className(e) {
|
|
129
|
+
return getStyles(e);
|
|
130
|
+
}
|
|
131
|
+
}, /*#__PURE__*/React.createElement(RadioGroup.Label, {
|
|
132
|
+
as: "span"
|
|
133
|
+
}, option.name));
|
|
134
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "w-4/12"
|
|
136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "flex items-center justify-between"
|
|
138
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
139
|
+
className: "text-sm font-medium text-neutral-900"
|
|
140
|
+
}, "Minutes")), /*#__PURE__*/React.createElement(RadioGroup, {
|
|
141
|
+
value: minute,
|
|
142
|
+
onChange: function onChange(e) {
|
|
143
|
+
return updateData(e, 'minute');
|
|
144
|
+
},
|
|
145
|
+
className: "mt-2"
|
|
146
|
+
}, /*#__PURE__*/React.createElement(RadioGroup.Label, {
|
|
147
|
+
className: "sr-only"
|
|
148
|
+
}, "Choose a memory option"), /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: "grid grid-cols-3 gap-3 sm:grid-cols-1"
|
|
150
|
+
}, minutesOptions.map(function (option) {
|
|
151
|
+
return /*#__PURE__*/React.createElement(RadioGroup.Option, {
|
|
152
|
+
key: option.name,
|
|
153
|
+
value: option,
|
|
154
|
+
className: function className(e) {
|
|
155
|
+
return getStyles(e);
|
|
156
|
+
}
|
|
157
|
+
}, /*#__PURE__*/React.createElement(RadioGroup.Label, {
|
|
158
|
+
as: "span"
|
|
159
|
+
}, option.name));
|
|
160
|
+
})))))));
|
|
161
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TimePicker } from "./TimePicker";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Popover as TooltipComponent } from '@headlessui/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
// import { Float } from '@headlessui-float/react'
|
|
5
|
+
|
|
6
|
+
export var Tooltip = function Tooltip(_ref) {
|
|
7
|
+
var children = _ref.children,
|
|
8
|
+
button = _ref.button;
|
|
9
|
+
var icon = button.icon,
|
|
10
|
+
size = button.size,
|
|
11
|
+
name = button.name;
|
|
12
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TooltipComponent, null));
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from "./Tooltip";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
|
|
3
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
4
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { Button } from "../Button";
|
|
7
|
+
export var Uploader = function Uploader(_ref) {
|
|
8
|
+
var text = _ref.text,
|
|
9
|
+
submit = _ref.submit,
|
|
10
|
+
to = _ref.to,
|
|
11
|
+
variant = _ref.variant,
|
|
12
|
+
size = _ref.size,
|
|
13
|
+
icon = _ref.icon,
|
|
14
|
+
customCss = _ref.customCss;
|
|
15
|
+
var startUpload = /*#__PURE__*/function () {
|
|
16
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
|
|
17
|
+
var file, formData;
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
if (!event) {
|
|
22
|
+
_context.next = 13;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
file = event.target.files[0];
|
|
26
|
+
formData = new FormData();
|
|
27
|
+
_context.t0 = formData;
|
|
28
|
+
_context.t1 = Blob;
|
|
29
|
+
_context.next = 7;
|
|
30
|
+
return file.arrayBuffer();
|
|
31
|
+
case 7:
|
|
32
|
+
_context.t2 = _context.sent;
|
|
33
|
+
_context.t3 = [_context.t2];
|
|
34
|
+
_context.t4 = {
|
|
35
|
+
type: 'image/png'
|
|
36
|
+
};
|
|
37
|
+
_context.t5 = new _context.t1(_context.t3, _context.t4);
|
|
38
|
+
_context.t0.append.call(_context.t0, 'file', _context.t5, 'file.png');
|
|
39
|
+
submit(formData, {
|
|
40
|
+
method: 'post',
|
|
41
|
+
action: to,
|
|
42
|
+
encType: 'multipart/form-data'
|
|
43
|
+
});
|
|
44
|
+
case 13:
|
|
45
|
+
case "end":
|
|
46
|
+
return _context.stop();
|
|
47
|
+
}
|
|
48
|
+
}, _callee);
|
|
49
|
+
}));
|
|
50
|
+
return function startUpload(_x) {
|
|
51
|
+
return _ref2.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
}();
|
|
54
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
55
|
+
type: "upload",
|
|
56
|
+
text: text,
|
|
57
|
+
startUpload: startUpload,
|
|
58
|
+
variant: variant,
|
|
59
|
+
size: size,
|
|
60
|
+
icon: icon,
|
|
61
|
+
customCss: customCss
|
|
62
|
+
});
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Uploader } from "./Uploader";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var _excluded = ["srcObject"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export var Video = function Video(_ref) {
|
|
7
|
+
var srcObject = _ref.srcObject,
|
|
8
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
9
|
+
var refVideo = React.useRef(null);
|
|
10
|
+
React.useEffect(function () {
|
|
11
|
+
if (!refVideo.current) return;
|
|
12
|
+
refVideo.current.srcObject = srcObject;
|
|
13
|
+
}, [srcObject]);
|
|
14
|
+
return /*#__PURE__*/React.createElement("video", _extends({
|
|
15
|
+
ref: refVideo
|
|
16
|
+
}, props, {
|
|
17
|
+
autoPlay: true,
|
|
18
|
+
className: "w-full aspect-video bg-neutral-50 border border-neutral-150 rounded-[20px]"
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Video } from "./Video";
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export { Avatar } from "./Avatar";
|
|
2
|
+
export { Badge } from "./Badge";
|
|
3
|
+
export { Button } from "./Button";
|
|
4
|
+
export { Breadcrumb } from "./Breadcrumb";
|
|
5
|
+
export { Cartel } from "./Cartel";
|
|
6
|
+
export { Container } from "./Container";
|
|
7
|
+
export { Cover } from "./Cover";
|
|
8
|
+
export { Command } from "./Command";
|
|
9
|
+
export { Calendar } from "./Calendar";
|
|
10
|
+
export { CalendarDay } from "./Calendar/CalendarDay";
|
|
11
|
+
export { CalendarWeek } from "./Calendar/CalendarWeek";
|
|
12
|
+
export { DateTime } from "./DateTime";
|
|
13
|
+
export { Disclosure } from "./Disclosure";
|
|
14
|
+
export { Dropdown } from "./Dropdown";
|
|
15
|
+
export { GroupItems } from "./GroupItems";
|
|
16
|
+
export { Form } from "./Form";
|
|
17
|
+
export { Header } from "./Header";
|
|
18
|
+
export { Heading } from "./Heading";
|
|
19
|
+
export { Icon } from "./Icon";
|
|
20
|
+
export { Image } from "./Image";
|
|
21
|
+
export { Input } from "./Input";
|
|
22
|
+
export { Layout } from "./Layout";
|
|
23
|
+
export { Loader } from "./Loader";
|
|
24
|
+
export { List } from "./List";
|
|
25
|
+
export { Modal } from "./Modal";
|
|
26
|
+
export { Notification } from "./Notification";
|
|
27
|
+
export { Popover } from "./Popover";
|
|
28
|
+
export { Person } from "./Person";
|
|
29
|
+
export { RadioGroup } from "./RadioGroup";
|
|
30
|
+
export { Search } from "./Search";
|
|
31
|
+
export { Select } from "./Select";
|
|
32
|
+
export { SlideOver } from "./SlideOver";
|
|
33
|
+
export { Sidebar } from "./Sidebar";
|
|
34
|
+
export { Steps } from "./Steps";
|
|
35
|
+
export { Stepper } from "./Stepper";
|
|
36
|
+
export { Switch } from "./Switch";
|
|
37
|
+
export { Tab } from "./Tab";
|
|
38
|
+
export { Table } from "./Table";
|
|
39
|
+
export { Video } from "./Video";
|
|
40
|
+
export { Uploader } from "./Uploader";
|
|
41
|
+
export { Slider } from "./Slider";
|
|
42
|
+
export { TimePicker } from "./TimePicker";
|
|
43
|
+
export { DatePicker } from "./DatePicker";
|
|
44
|
+
export { Tooltip } from "./Tooltip";
|
|
45
|
+
export { Text } from "./Text";
|
|
46
|
+
export { Debug } from "./Debug";
|
|
47
|
+
export { QRCode } from "./QRCode";
|
|
48
|
+
export { TextList } from "./TextList";
|
|
49
|
+
export { ColorChecker } from "./ColorChecker";
|
|
50
|
+
export { Checkbox } from "./Checkbox";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export var ColorPallet = function ColorPallet(_ref) {
|
|
3
|
+
var colors = _ref.colors,
|
|
4
|
+
theme = _ref.theme;
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: theme === 'light' ? 'theme-light' : 'theme-midnight'
|
|
7
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: "flex flex-col"
|
|
9
|
+
}, colors.map(function (_ref2) {
|
|
10
|
+
var name = _ref2.name,
|
|
11
|
+
style = _ref2.style;
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "flex flex-1"
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "w-24"
|
|
16
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "".concat(style, " w-full h-8")
|
|
18
|
+
}));
|
|
19
|
+
})));
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ColorPallet } from "./ColorPallet";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Text.tsx
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import "../../../styles/index.css";
|
|
5
|
+
var sizeToWeights = {
|
|
6
|
+
display: ['bold', 'semi-bold', 'extra-bold'],
|
|
7
|
+
h1: ['bold', 'semi-bold', 'extra-bold'],
|
|
8
|
+
h2: ['bold', 'semi-bold', 'extra-bold'],
|
|
9
|
+
h3: ['bold', 'semi-bold', 'extra-bold'],
|
|
10
|
+
h4: ['bold', 'semi-bold', 'extra-bold'],
|
|
11
|
+
subheading: ['light', 'medium', 'semi-bold', 'bold', 'extra-bold', 'underlined'],
|
|
12
|
+
p1: ['light', 'medium', 'bold', 'underlined'],
|
|
13
|
+
p2: ['light', 'medium', 'bold', 'underlined'],
|
|
14
|
+
p3: ['light', 'medium', 'bold', 'underlined'],
|
|
15
|
+
caption: ['light', 'medium', 'bold', 'underlined', 'bold-underlined'],
|
|
16
|
+
footer: ['light', 'medium', 'bold', 'underlined', 'bold-underlined']
|
|
17
|
+
};
|
|
18
|
+
var Text = function Text(_ref) {
|
|
19
|
+
var _sizeToWeights$size;
|
|
20
|
+
var size = _ref.size,
|
|
21
|
+
weight = _ref.weight,
|
|
22
|
+
_ref$display = _ref.display,
|
|
23
|
+
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
24
|
+
className = _ref.className,
|
|
25
|
+
children = _ref.children;
|
|
26
|
+
var textClassName = clsx("text-".concat(size, "-").concat(weight), className);
|
|
27
|
+
var Element = display === 'inline' ? 'span' : 'div';
|
|
28
|
+
|
|
29
|
+
// Optional runtime validation
|
|
30
|
+
if (!((_sizeToWeights$size = sizeToWeights[size]) !== null && _sizeToWeights$size !== void 0 && _sizeToWeights$size.includes(weight))) {
|
|
31
|
+
console.warn("Invalid combination of size \"".concat(size, "\" and weight \"").concat(weight, "\"."));
|
|
32
|
+
}
|
|
33
|
+
return /*#__PURE__*/React.createElement(Element, {
|
|
34
|
+
className: textClassName
|
|
35
|
+
}, children);
|
|
36
|
+
};
|
|
37
|
+
export { Text };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ColorPallet } from "./Color";
|