@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,367 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* Nobak Design System - Semantic Tokens
|
|
9
|
+
*
|
|
10
|
+
* Semantic color tokens map raw color scales to meaningful, context-aware names.
|
|
11
|
+
*
|
|
12
|
+
* Instead of: bg-primary-500, text-gray-900
|
|
13
|
+
* Use: bg-interactive-primary, text-content-primary
|
|
14
|
+
*
|
|
15
|
+
* Benefits:
|
|
16
|
+
* - Clear intent and meaning
|
|
17
|
+
* - Easy to change globally
|
|
18
|
+
* - Theme-switching support
|
|
19
|
+
* - Better developer experience
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { colors } from "./colors";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Semantic Color System
|
|
26
|
+
* Following a contextual naming convention based on usage, not appearance
|
|
27
|
+
*/
|
|
28
|
+
export var semantic = {
|
|
29
|
+
/**
|
|
30
|
+
* Background Colors
|
|
31
|
+
* Used for page backgrounds and large surface areas
|
|
32
|
+
*/
|
|
33
|
+
background: {
|
|
34
|
+
"default": colors.gray[50],
|
|
35
|
+
// Main page background
|
|
36
|
+
subtle: colors.gray[100],
|
|
37
|
+
// Subtle backgrounds (cards, sections)
|
|
38
|
+
elevated: '#FFFFFF',
|
|
39
|
+
// Raised surfaces (modals, popovers)
|
|
40
|
+
inverse: colors.gray[900] // Dark backgrounds for contrast
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Surface Colors
|
|
44
|
+
* Used for component backgrounds (cards, panels, containers)
|
|
45
|
+
*/
|
|
46
|
+
surface: {
|
|
47
|
+
"default": '#FFFFFF',
|
|
48
|
+
// Default surface (white cards)
|
|
49
|
+
subtle: colors.gray[50],
|
|
50
|
+
// Subtle surface variation
|
|
51
|
+
hover: colors.gray[100],
|
|
52
|
+
// Hover state for interactive surfaces
|
|
53
|
+
pressed: colors.gray[200],
|
|
54
|
+
// Active/pressed state
|
|
55
|
+
disabled: colors.gray[100],
|
|
56
|
+
// Disabled surface
|
|
57
|
+
inverse: colors.gray[900] // Dark surface for contrast
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Content/Text Colors
|
|
61
|
+
* Used for all text content
|
|
62
|
+
*/
|
|
63
|
+
content: {
|
|
64
|
+
primary: colors.gray[900],
|
|
65
|
+
// Primary text (headings, body)
|
|
66
|
+
secondary: colors.gray[600],
|
|
67
|
+
// Secondary text (subheadings, labels)
|
|
68
|
+
tertiary: colors.gray[500],
|
|
69
|
+
// Tertiary text (metadata, captions)
|
|
70
|
+
disabled: colors.gray[400],
|
|
71
|
+
// Disabled text
|
|
72
|
+
inverse: '#FFFFFF',
|
|
73
|
+
// Text on dark backgrounds
|
|
74
|
+
placeholder: colors.gray[400] // Input placeholders
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Border Colors
|
|
78
|
+
* Used for component borders and dividers
|
|
79
|
+
*/
|
|
80
|
+
border: {
|
|
81
|
+
"default": colors.gray[200],
|
|
82
|
+
// Default borders
|
|
83
|
+
subtle: colors.gray[100],
|
|
84
|
+
// Subtle dividers
|
|
85
|
+
strong: colors.gray[300],
|
|
86
|
+
// Emphasized borders
|
|
87
|
+
disabled: colors.gray[200],
|
|
88
|
+
// Disabled borders
|
|
89
|
+
focus: colors.blue[500],
|
|
90
|
+
// Focus rings
|
|
91
|
+
error: colors.red[500],
|
|
92
|
+
// Error states
|
|
93
|
+
success: colors.green[500],
|
|
94
|
+
// Success states
|
|
95
|
+
warning: colors.orange[500] // Warning states
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Interactive Colors
|
|
99
|
+
* Used for buttons, links, and interactive elements
|
|
100
|
+
*/
|
|
101
|
+
interactive: {
|
|
102
|
+
// Primary actions (main brand color)
|
|
103
|
+
primary: colors.primary[500],
|
|
104
|
+
// #FF3B2D - Rebellion Red
|
|
105
|
+
primaryHover: colors.primary[600],
|
|
106
|
+
// Hover state
|
|
107
|
+
primaryActive: colors.primary[700],
|
|
108
|
+
// Active/pressed state
|
|
109
|
+
primaryDisabled: colors.primary[200],
|
|
110
|
+
// Disabled state
|
|
111
|
+
primarySubtle: colors.primary[50],
|
|
112
|
+
// Subtle backgrounds
|
|
113
|
+
|
|
114
|
+
// Secondary actions (neutral)
|
|
115
|
+
secondary: colors.gray[900],
|
|
116
|
+
// Secondary button
|
|
117
|
+
secondaryHover: colors.gray[800],
|
|
118
|
+
// Hover state
|
|
119
|
+
secondaryActive: colors.gray[700],
|
|
120
|
+
// Active state
|
|
121
|
+
secondaryDisabled: colors.gray[300],
|
|
122
|
+
// Disabled state
|
|
123
|
+
secondarySubtle: colors.gray[100],
|
|
124
|
+
// Subtle backgrounds
|
|
125
|
+
|
|
126
|
+
// Tertiary actions (minimal)
|
|
127
|
+
tertiary: 'transparent',
|
|
128
|
+
// Ghost buttons
|
|
129
|
+
tertiaryHover: colors.gray[100],
|
|
130
|
+
// Hover state
|
|
131
|
+
tertiaryActive: colors.gray[200],
|
|
132
|
+
// Active state
|
|
133
|
+
|
|
134
|
+
// Links
|
|
135
|
+
link: colors.blue[500],
|
|
136
|
+
// Link color
|
|
137
|
+
linkHover: colors.blue[600],
|
|
138
|
+
// Link hover
|
|
139
|
+
linkVisited: colors.blue[700],
|
|
140
|
+
// Visited links
|
|
141
|
+
|
|
142
|
+
// Focus
|
|
143
|
+
focus: colors.blue[500],
|
|
144
|
+
// Focus indicator
|
|
145
|
+
focusRing: 'rgba(59, 130, 246, 0.5)' // Focus ring with opacity
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* Feedback Colors
|
|
149
|
+
* Used for status messages, alerts, and validation states
|
|
150
|
+
*/
|
|
151
|
+
feedback: {
|
|
152
|
+
// Success
|
|
153
|
+
success: colors.green[500],
|
|
154
|
+
// Success state
|
|
155
|
+
successHover: colors.green[600],
|
|
156
|
+
// Success hover
|
|
157
|
+
successSubtle: colors.green[50],
|
|
158
|
+
// Success background
|
|
159
|
+
successBorder: colors.green[200],
|
|
160
|
+
// Success border
|
|
161
|
+
|
|
162
|
+
// Warning
|
|
163
|
+
warning: colors.orange[500],
|
|
164
|
+
// Warning state
|
|
165
|
+
warningHover: colors.orange[600],
|
|
166
|
+
// Warning hover
|
|
167
|
+
warningSubtle: colors.orange[50],
|
|
168
|
+
// Warning background
|
|
169
|
+
warningBorder: colors.orange[200],
|
|
170
|
+
// Warning border
|
|
171
|
+
|
|
172
|
+
// Error
|
|
173
|
+
error: colors.red[500],
|
|
174
|
+
// Error state
|
|
175
|
+
errorHover: colors.red[600],
|
|
176
|
+
// Error hover
|
|
177
|
+
errorSubtle: colors.red[50],
|
|
178
|
+
// Error background
|
|
179
|
+
errorBorder: colors.red[200],
|
|
180
|
+
// Error border
|
|
181
|
+
|
|
182
|
+
// Info
|
|
183
|
+
info: colors.blue[500],
|
|
184
|
+
// Info state
|
|
185
|
+
infoHover: colors.blue[600],
|
|
186
|
+
// Info hover
|
|
187
|
+
infoSubtle: colors.blue[50],
|
|
188
|
+
// Info background
|
|
189
|
+
infoBorder: colors.blue[200] // Info border
|
|
190
|
+
},
|
|
191
|
+
/**
|
|
192
|
+
* Brand Colors
|
|
193
|
+
* Direct brand color usage (use sparingly, prefer semantic colors)
|
|
194
|
+
*/
|
|
195
|
+
brand: {
|
|
196
|
+
rebellion: colors.primary[500],
|
|
197
|
+
// #ff95a9 - Rebellion Red
|
|
198
|
+
concrete: colors.gray[950],
|
|
199
|
+
// #3d3d3d - Concrete Gray
|
|
200
|
+
blockchain: colors.blue[500],
|
|
201
|
+
// #64bdf9 - Blockchain Blue
|
|
202
|
+
growth: colors.green[500],
|
|
203
|
+
// #71d98b - Growth Green
|
|
204
|
+
caution: colors.orange[500],
|
|
205
|
+
// #ffa675 - Caution Orange
|
|
206
|
+
earth: colors.beige[500] // #c8bda9 - Earth Beige
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Overlay Colors
|
|
210
|
+
* Used for modals, dropdowns, tooltips
|
|
211
|
+
*/
|
|
212
|
+
overlay: {
|
|
213
|
+
backdrop: 'rgba(0, 0, 0, 0.5)',
|
|
214
|
+
// Modal backdrop
|
|
215
|
+
backdropLight: 'rgba(0, 0, 0, 0.25)',
|
|
216
|
+
// Light backdrop
|
|
217
|
+
backdropHeavy: 'rgba(0, 0, 0, 0.75)',
|
|
218
|
+
// Heavy backdrop
|
|
219
|
+
scrim: 'rgba(0, 0, 0, 0.1)' // Light overlay
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* Special Colors
|
|
223
|
+
* Context-specific colors
|
|
224
|
+
*/
|
|
225
|
+
special: {
|
|
226
|
+
// Blockchain/Crypto specific
|
|
227
|
+
profit: colors.green[500],
|
|
228
|
+
// Positive price movement
|
|
229
|
+
loss: colors.red[500],
|
|
230
|
+
// Negative price movement
|
|
231
|
+
|
|
232
|
+
// Highlights
|
|
233
|
+
highlight: colors.orange[200],
|
|
234
|
+
// Text highlighting
|
|
235
|
+
selection: colors.blue[100],
|
|
236
|
+
// Text selection background
|
|
237
|
+
|
|
238
|
+
// Skeleton loaders
|
|
239
|
+
skeleton: colors.gray[200],
|
|
240
|
+
// Skeleton background
|
|
241
|
+
skeletonShimmer: colors.gray[100] // Skeleton shimmer effect
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Type Exports
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* CSS Custom Properties Generator
|
|
251
|
+
* Generates CSS variables from semantic tokens
|
|
252
|
+
*/
|
|
253
|
+
export var generateSemanticCSSVariables = function generateSemanticCSSVariables() {
|
|
254
|
+
var vars = {};
|
|
255
|
+
|
|
256
|
+
// Background colors
|
|
257
|
+
Object.entries(semantic.background).forEach(function (_ref) {
|
|
258
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
259
|
+
key = _ref2[0],
|
|
260
|
+
value = _ref2[1];
|
|
261
|
+
vars["--color-background-".concat(key)] = value;
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// Surface colors
|
|
265
|
+
Object.entries(semantic.surface).forEach(function (_ref3) {
|
|
266
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
267
|
+
key = _ref4[0],
|
|
268
|
+
value = _ref4[1];
|
|
269
|
+
vars["--color-surface-".concat(key)] = value;
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Content colors
|
|
273
|
+
Object.entries(semantic.content).forEach(function (_ref5) {
|
|
274
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
275
|
+
key = _ref6[0],
|
|
276
|
+
value = _ref6[1];
|
|
277
|
+
vars["--color-content-".concat(key)] = value;
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// Border colors
|
|
281
|
+
Object.entries(semantic.border).forEach(function (_ref7) {
|
|
282
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
283
|
+
key = _ref8[0],
|
|
284
|
+
value = _ref8[1];
|
|
285
|
+
vars["--color-border-".concat(key)] = value;
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// Interactive colors
|
|
289
|
+
Object.entries(semantic.interactive).forEach(function (_ref9) {
|
|
290
|
+
var _ref0 = _slicedToArray(_ref9, 2),
|
|
291
|
+
key = _ref0[0],
|
|
292
|
+
value = _ref0[1];
|
|
293
|
+
vars["--color-interactive-".concat(key)] = value;
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
// Feedback colors
|
|
297
|
+
Object.entries(semantic.feedback).forEach(function (_ref1) {
|
|
298
|
+
var _ref10 = _slicedToArray(_ref1, 2),
|
|
299
|
+
key = _ref10[0],
|
|
300
|
+
value = _ref10[1];
|
|
301
|
+
vars["--color-feedback-".concat(key)] = value;
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
// Brand colors
|
|
305
|
+
Object.entries(semantic.brand).forEach(function (_ref11) {
|
|
306
|
+
var _ref12 = _slicedToArray(_ref11, 2),
|
|
307
|
+
key = _ref12[0],
|
|
308
|
+
value = _ref12[1];
|
|
309
|
+
vars["--color-brand-".concat(key)] = value;
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
// Overlay colors
|
|
313
|
+
Object.entries(semantic.overlay).forEach(function (_ref13) {
|
|
314
|
+
var _ref14 = _slicedToArray(_ref13, 2),
|
|
315
|
+
key = _ref14[0],
|
|
316
|
+
value = _ref14[1];
|
|
317
|
+
vars["--color-overlay-".concat(key)] = value;
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// Special colors
|
|
321
|
+
Object.entries(semantic.special).forEach(function (_ref15) {
|
|
322
|
+
var _ref16 = _slicedToArray(_ref15, 2),
|
|
323
|
+
key = _ref16[0],
|
|
324
|
+
value = _ref16[1];
|
|
325
|
+
vars["--color-special-".concat(key)] = value;
|
|
326
|
+
});
|
|
327
|
+
return vars;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Tailwind Config Export
|
|
332
|
+
* Exports semantic colors for Tailwind configuration
|
|
333
|
+
*/
|
|
334
|
+
export var tailwindSemantic = {
|
|
335
|
+
// Background
|
|
336
|
+
'background-default': semantic.background["default"],
|
|
337
|
+
'background-subtle': semantic.background.subtle,
|
|
338
|
+
'background-elevated': semantic.background.elevated,
|
|
339
|
+
'background-inverse': semantic.background.inverse,
|
|
340
|
+
// Surface
|
|
341
|
+
'surface-default': semantic.surface["default"],
|
|
342
|
+
'surface-subtle': semantic.surface.subtle,
|
|
343
|
+
'surface-hover': semantic.surface.hover,
|
|
344
|
+
'surface-pressed': semantic.surface.pressed,
|
|
345
|
+
'surface-disabled': semantic.surface.disabled,
|
|
346
|
+
'surface-inverse': semantic.surface.inverse,
|
|
347
|
+
// Content
|
|
348
|
+
'content-primary': semantic.content.primary,
|
|
349
|
+
'content-secondary': semantic.content.secondary,
|
|
350
|
+
'content-tertiary': semantic.content.tertiary,
|
|
351
|
+
'content-disabled': semantic.content.disabled,
|
|
352
|
+
'content-inverse': semantic.content.inverse,
|
|
353
|
+
// Interactive
|
|
354
|
+
'interactive-primary': semantic.interactive.primary,
|
|
355
|
+
'interactive-primary-hover': semantic.interactive.primaryHover,
|
|
356
|
+
'interactive-secondary': semantic.interactive.secondary,
|
|
357
|
+
'interactive-link': semantic.interactive.link,
|
|
358
|
+
// Feedback
|
|
359
|
+
'feedback-success': semantic.feedback.success,
|
|
360
|
+
'feedback-warning': semantic.feedback.warning,
|
|
361
|
+
'feedback-error': semantic.feedback.error,
|
|
362
|
+
'feedback-info': semantic.feedback.info,
|
|
363
|
+
// Brand
|
|
364
|
+
'brand-rebellion': semantic.brand.rebellion,
|
|
365
|
+
'brand-concrete': semantic.brand.concrete,
|
|
366
|
+
'brand-blockchain': semantic.brand.blockchain
|
|
367
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
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); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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; } }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
/**
|
|
14
|
+
* Nobak Design System - Shadow Tokens
|
|
15
|
+
*
|
|
16
|
+
* Minimal, sharp shadows
|
|
17
|
+
* Punk rock edge with Japanese restraint
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export var shadows = {
|
|
21
|
+
// No shadow
|
|
22
|
+
none: 'none',
|
|
23
|
+
// Subtle shadows (minimal elevation)
|
|
24
|
+
xs: '0 1px 2px rgba(0, 0, 0, 0.05)',
|
|
25
|
+
sm: '0 2px 4px rgba(0, 0, 0, 0.1)',
|
|
26
|
+
// Standard shadows
|
|
27
|
+
md: '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
28
|
+
lg: '0 8px 16px rgba(0, 0, 0, 0.15)',
|
|
29
|
+
xl: '0 12px 24px rgba(0, 0, 0, 0.2)',
|
|
30
|
+
// Dramatic shadows (punk rock energy)
|
|
31
|
+
'2xl': '0 16px 32px rgba(0, 0, 0, 0.25)',
|
|
32
|
+
'3xl': '0 24px 48px rgba(0, 0, 0, 0.3)',
|
|
33
|
+
// Inner shadows
|
|
34
|
+
inner: 'inset 0 2px 4px rgba(0, 0, 0, 0.1)',
|
|
35
|
+
innerLg: 'inset 0 4px 8px rgba(0, 0, 0, 0.15)',
|
|
36
|
+
// Colored shadows (for emphasis)
|
|
37
|
+
primarySm: '0 2px 4px rgba(255, 59, 45, 0.2)',
|
|
38
|
+
primaryMd: '0 4px 8px rgba(255, 59, 45, 0.25)',
|
|
39
|
+
primaryLg: '0 8px 16px rgba(255, 59, 45, 0.3)',
|
|
40
|
+
blueSm: '0 2px 4px rgba(59, 130, 246, 0.2)',
|
|
41
|
+
blueMd: '0 4px 8px rgba(59, 130, 246, 0.25)',
|
|
42
|
+
blueLg: '0 8px 16px rgba(59, 130, 246, 0.3)'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Semantic Shadows
|
|
46
|
+
export var semanticShadows = {
|
|
47
|
+
// Component shadows
|
|
48
|
+
card: shadows.sm,
|
|
49
|
+
cardHover: shadows.md,
|
|
50
|
+
// Interactive shadows
|
|
51
|
+
button: shadows.none,
|
|
52
|
+
buttonHover: shadows.sm,
|
|
53
|
+
buttonActive: shadows.inner,
|
|
54
|
+
// Overlay shadows
|
|
55
|
+
modal: shadows['2xl'],
|
|
56
|
+
popover: shadows.lg,
|
|
57
|
+
dropdown: shadows.md,
|
|
58
|
+
tooltip: shadows.sm,
|
|
59
|
+
// Input shadows
|
|
60
|
+
input: shadows.none,
|
|
61
|
+
inputFocus: shadows.primarySm,
|
|
62
|
+
inputError: '0 0 0 3px rgba(239, 68, 68, 0.1)',
|
|
63
|
+
// Navigation shadows
|
|
64
|
+
navbar: shadows.sm,
|
|
65
|
+
sidebar: shadows.md,
|
|
66
|
+
// Elevation levels
|
|
67
|
+
elevation: {
|
|
68
|
+
0: shadows.none,
|
|
69
|
+
1: shadows.xs,
|
|
70
|
+
2: shadows.sm,
|
|
71
|
+
3: shadows.md,
|
|
72
|
+
4: shadows.lg,
|
|
73
|
+
5: shadows.xl,
|
|
74
|
+
6: shadows['2xl'],
|
|
75
|
+
7: shadows['3xl']
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Type exports
|
|
80
|
+
|
|
81
|
+
// CSS Custom Properties Generator
|
|
82
|
+
export var generateShadowVariables = function generateShadowVariables() {
|
|
83
|
+
var vars = {};
|
|
84
|
+
|
|
85
|
+
// Base shadows
|
|
86
|
+
Object.entries(shadows).forEach(function (_ref) {
|
|
87
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
88
|
+
key = _ref2[0],
|
|
89
|
+
value = _ref2[1];
|
|
90
|
+
vars["--shadow-".concat(key)] = value;
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// Semantic shadows (flatten nested objects)
|
|
94
|
+
var _flattenObject = function flattenObject(obj) {
|
|
95
|
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
96
|
+
Object.entries(obj).forEach(function (_ref3) {
|
|
97
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
98
|
+
key = _ref4[0],
|
|
99
|
+
value = _ref4[1];
|
|
100
|
+
if (_typeof(value) === 'object' && !Array.isArray(value)) {
|
|
101
|
+
_flattenObject(value, "".concat(prefix).concat(key, "-"));
|
|
102
|
+
} else {
|
|
103
|
+
vars["--shadow-".concat(prefix).concat(key)] = String(value);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
_flattenObject(semanticShadows);
|
|
108
|
+
return vars;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// Tailwind Config Export
|
|
112
|
+
export var tailwindShadows = _objectSpread(_objectSpread({}, shadows), {}, {
|
|
113
|
+
DEFAULT: shadows.md
|
|
114
|
+
});
|
|
@@ -0,0 +1,189 @@
|
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
|
+
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."); }
|
|
4
|
+
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; } }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
+
/**
|
|
9
|
+
* Nobak Design System - Spacing Tokens
|
|
10
|
+
*
|
|
11
|
+
* 8px Base Grid System
|
|
12
|
+
* Japanese Ma (間) - Negative space as a design element
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export var spacing = {
|
|
16
|
+
// Base unit: 8px
|
|
17
|
+
0: '0px',
|
|
18
|
+
px: '1px',
|
|
19
|
+
0.5: '2px',
|
|
20
|
+
// 0.25 * 8
|
|
21
|
+
1: '4px',
|
|
22
|
+
// 0.5 * 8
|
|
23
|
+
2: '8px',
|
|
24
|
+
// 1 * 8 (base)
|
|
25
|
+
3: '12px',
|
|
26
|
+
// 1.5 * 8
|
|
27
|
+
4: '16px',
|
|
28
|
+
// 2 * 8
|
|
29
|
+
5: '20px',
|
|
30
|
+
// 2.5 * 8
|
|
31
|
+
6: '24px',
|
|
32
|
+
// 3 * 8
|
|
33
|
+
7: '28px',
|
|
34
|
+
// 3.5 * 8
|
|
35
|
+
8: '32px',
|
|
36
|
+
// 4 * 8
|
|
37
|
+
9: '36px',
|
|
38
|
+
// 4.5 * 8
|
|
39
|
+
10: '40px',
|
|
40
|
+
// 5 * 8
|
|
41
|
+
11: '44px',
|
|
42
|
+
// 5.5 * 8
|
|
43
|
+
12: '48px',
|
|
44
|
+
// 6 * 8
|
|
45
|
+
14: '56px',
|
|
46
|
+
// 7 * 8
|
|
47
|
+
16: '64px',
|
|
48
|
+
// 8 * 8
|
|
49
|
+
20: '80px',
|
|
50
|
+
// 10 * 8
|
|
51
|
+
24: '96px',
|
|
52
|
+
// 12 * 8
|
|
53
|
+
28: '112px',
|
|
54
|
+
// 14 * 8
|
|
55
|
+
32: '128px',
|
|
56
|
+
// 16 * 8
|
|
57
|
+
36: '144px',
|
|
58
|
+
// 18 * 8
|
|
59
|
+
40: '160px',
|
|
60
|
+
// 20 * 8
|
|
61
|
+
44: '176px',
|
|
62
|
+
// 22 * 8
|
|
63
|
+
48: '192px',
|
|
64
|
+
// 24 * 8
|
|
65
|
+
52: '208px',
|
|
66
|
+
// 26 * 8
|
|
67
|
+
56: '224px',
|
|
68
|
+
// 28 * 8
|
|
69
|
+
60: '240px',
|
|
70
|
+
// 30 * 8
|
|
71
|
+
64: '256px',
|
|
72
|
+
// 32 * 8
|
|
73
|
+
72: '288px',
|
|
74
|
+
// 36 * 8
|
|
75
|
+
80: '320px',
|
|
76
|
+
// 40 * 8
|
|
77
|
+
96: '384px' // 48 * 8
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Semantic Spacing
|
|
81
|
+
export var semanticSpacing = {
|
|
82
|
+
// Component spacing
|
|
83
|
+
componentGap: spacing[4],
|
|
84
|
+
// 16px - Gap between components
|
|
85
|
+
componentPadding: spacing[6],
|
|
86
|
+
// 24px - Internal component padding
|
|
87
|
+
|
|
88
|
+
// Layout spacing
|
|
89
|
+
sectionGap: spacing[12],
|
|
90
|
+
// 48px - Gap between sections
|
|
91
|
+
sectionPadding: spacing[16],
|
|
92
|
+
// 64px - Section padding
|
|
93
|
+
|
|
94
|
+
// Container spacing
|
|
95
|
+
containerPadding: spacing[6],
|
|
96
|
+
// 24px - Container horizontal padding
|
|
97
|
+
containerGap: spacing[8],
|
|
98
|
+
// 32px - Gap between containers
|
|
99
|
+
|
|
100
|
+
// Card spacing
|
|
101
|
+
cardPadding: spacing[6],
|
|
102
|
+
// 24px - Card internal padding
|
|
103
|
+
cardGap: spacing[4],
|
|
104
|
+
// 16px - Gap between cards
|
|
105
|
+
|
|
106
|
+
// Form spacing
|
|
107
|
+
formFieldGap: spacing[4],
|
|
108
|
+
// 16px - Gap between form fields
|
|
109
|
+
formSectionGap: spacing[8],
|
|
110
|
+
// 32px - Gap between form sections
|
|
111
|
+
|
|
112
|
+
// List spacing
|
|
113
|
+
listItemGap: spacing[2],
|
|
114
|
+
// 8px - Gap between list items
|
|
115
|
+
listSectionGap: spacing[6],
|
|
116
|
+
// 24px - Gap between list sections
|
|
117
|
+
|
|
118
|
+
// Button spacing
|
|
119
|
+
buttonPaddingX: spacing[6],
|
|
120
|
+
// 24px - Horizontal button padding
|
|
121
|
+
buttonPaddingY: spacing[3],
|
|
122
|
+
// 12px - Vertical button padding
|
|
123
|
+
buttonGap: spacing[2],
|
|
124
|
+
// 8px - Gap between buttons
|
|
125
|
+
|
|
126
|
+
// Input spacing
|
|
127
|
+
inputPaddingX: spacing[4],
|
|
128
|
+
// 16px - Horizontal input padding
|
|
129
|
+
inputPaddingY: spacing[3],
|
|
130
|
+
// 12px - Vertical input padding
|
|
131
|
+
|
|
132
|
+
// Modal spacing
|
|
133
|
+
modalPadding: spacing[8],
|
|
134
|
+
// 32px - Modal internal padding
|
|
135
|
+
modalGap: spacing[6],
|
|
136
|
+
// 24px - Gap between modal sections
|
|
137
|
+
|
|
138
|
+
// Navigation spacing
|
|
139
|
+
navItemGap: spacing[2],
|
|
140
|
+
// 8px - Gap between nav items
|
|
141
|
+
navSectionGap: spacing[6],
|
|
142
|
+
// 24px - Gap between nav sections
|
|
143
|
+
|
|
144
|
+
// Ma (間) - Japanese negative space
|
|
145
|
+
ma: {
|
|
146
|
+
tight: spacing[2],
|
|
147
|
+
// 8px - Minimal breathing room
|
|
148
|
+
comfortable: spacing[4],
|
|
149
|
+
// 16px - Standard breathing room
|
|
150
|
+
spacious: spacing[8],
|
|
151
|
+
// 32px - Generous breathing room
|
|
152
|
+
dramatic: spacing[16] // 64px - Dramatic negative space
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Type exports
|
|
157
|
+
|
|
158
|
+
// CSS Custom Properties Generator
|
|
159
|
+
export var generateSpacingVariables = function generateSpacingVariables() {
|
|
160
|
+
var vars = {};
|
|
161
|
+
|
|
162
|
+
// Base spacing
|
|
163
|
+
Object.entries(spacing).forEach(function (_ref) {
|
|
164
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
165
|
+
key = _ref2[0],
|
|
166
|
+
value = _ref2[1];
|
|
167
|
+
vars["--spacing-".concat(key)] = value;
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// Semantic spacing (flatten nested objects)
|
|
171
|
+
var _flattenObject = function flattenObject(obj) {
|
|
172
|
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
173
|
+
Object.entries(obj).forEach(function (_ref3) {
|
|
174
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
175
|
+
key = _ref4[0],
|
|
176
|
+
value = _ref4[1];
|
|
177
|
+
if (_typeof(value) === 'object' && !Array.isArray(value)) {
|
|
178
|
+
_flattenObject(value, "".concat(prefix).concat(key, "-"));
|
|
179
|
+
} else {
|
|
180
|
+
vars["--spacing-".concat(prefix).concat(key)] = String(value);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
_flattenObject(semanticSpacing);
|
|
185
|
+
return vars;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// Tailwind Config Export
|
|
189
|
+
export var tailwindSpacing = spacing;
|