@rovula/ui 0.0.21 → 0.0.23
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/cjs/bundle.css +185 -495
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +7 -7
- package/dist/cjs/types/components/Button/Button.d.ts +1 -1
- package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -1
- package/dist/cjs/types/components/Button/Buttons.stories.d.ts +13 -13
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +60 -60
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +64 -64
- package/dist/cjs/types/components/Icon/Icon.d.ts +11 -0
- package/dist/cjs/types/components/Icon/Icon.stories.d.ts +508 -0
- package/dist/cjs/types/components/Icon/Icon.styles.d.ts +4 -0
- package/dist/cjs/types/components/Input/Input.stories.d.ts +115 -115
- package/dist/cjs/types/components/Label/Label.stories.d.ts +51 -51
- package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +54 -54
- package/dist/cjs/types/components/Search/Search.stories.d.ts +64 -64
- package/dist/cjs/types/components/Slider/Slider.d.ts +5 -0
- package/dist/cjs/types/components/Slider/Slider.stories.d.ts +303 -0
- package/dist/cjs/types/components/Switch/Switch.d.ts +4 -0
- package/dist/cjs/types/components/Switch/Switch.stories.d.ts +305 -0
- package/dist/cjs/types/components/Table/Table.stories.d.ts +7 -7
- package/dist/cjs/types/components/Tabs/Tabs.d.ts +12 -3
- package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +18 -0
- package/dist/cjs/types/components/Text/Text.d.ts +6 -5
- package/dist/cjs/types/components/Text/Text.stories.d.ts +2 -10
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +62 -62
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +1 -1
- package/dist/cjs/types/icons/heroIconConfig.d.ts +1 -0
- package/dist/cjs/types/icons/iconConfig.d.ts +2 -0
- package/dist/cjs/types/icons/iconRegistry.d.ts +19 -0
- package/dist/cjs/types/icons/index.d.ts +1 -0
- package/dist/cjs/types/icons/material-icon/outline/ChevronDownIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/CollapseContentIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ContentCopyIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ContentPasteIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/DataTableIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ExpandCircleDownIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ExpandCircleRightIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ExpandCircleUpIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/ExpandContentIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/InterestsIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/SaveIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/TableChartIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/outline/index.d.ts +12 -0
- package/dist/cjs/types/icons/material-icon/solid/ChevronDownIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/CollapseContentIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ContentCopyIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ContentPasteIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/DataTableIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ExpandCircleDownIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ExpandCircleRightIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ExpandCircleUpIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/ExpandContentIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/InterestsIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/SaveIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/TableChartIcon.d.ts +3 -0
- package/dist/cjs/types/icons/material-icon/solid/index.d.ts +12 -0
- package/dist/cjs/types/icons/materialIconConfig.d.ts +1 -0
- package/dist/cjs/types/icons/type.d.ts +8 -0
- package/dist/cjs/types/icons/utils.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/components/ActionButton/ActionButton.js +8 -19
- package/dist/components/ActionButton/ActionButton.stories.js +12 -22
- package/dist/components/ActionButton/ActionButton.styles.js +33 -8
- package/dist/components/AlertDialog/Alert.stories.js +5 -16
- package/dist/components/AlertDialog/AlertDialog.js +27 -38
- package/dist/components/Avatar/Avatar.js +7 -8
- package/dist/components/Avatar/Avatar.stories.js +11 -22
- package/dist/components/Avatar/Avatar.styles.js +1 -1
- package/dist/components/Avatar/AvatarBase.js +9 -20
- package/dist/components/Avatar/AvatarGroup.js +9 -10
- package/dist/components/Avatar/AvatarGroup.stories.js +9 -20
- package/dist/components/Button/Button.js +4 -15
- package/dist/components/Button/Button.styles.js +1 -1
- package/dist/components/Button/Buttons.stories.js +18 -29
- package/dist/components/Calendar/Calendar.js +3 -14
- package/dist/components/Calendar/Calendar.stories.js +6 -17
- package/dist/components/Checkbox/Checkbox.js +3 -14
- package/dist/components/Checkbox/Checkbox.stories.js +12 -23
- package/dist/components/Collapsible/Collapsible.js +14 -17
- package/dist/components/Collapsible/Collapsible.stories.js +9 -20
- package/dist/components/Collapsible/Collapsible.styles.js +4 -4
- package/dist/components/Collapsible/CollapsibleContext.js +9 -10
- package/dist/components/DataTable/DataTable.js +25 -26
- package/dist/components/DataTable/DataTable.stories.js +10 -21
- package/dist/components/DatePicker/DatePicker.js +4 -20
- package/dist/components/DatePicker/DatePicker.stories.js +6 -17
- package/dist/components/Dialog/Dialog.js +22 -33
- package/dist/components/Dialog/Dialog.stories.js +8 -19
- package/dist/components/Dropdown/Dropdown.js +26 -37
- package/dist/components/Dropdown/Dropdown.stories.js +36 -55
- package/dist/components/Dropdown/Dropdown.styles.js +3 -3
- package/dist/components/Form/Form.js +26 -87
- package/dist/components/Form/Text.js +2 -3
- package/dist/components/Form/TextInput.js +2 -3
- package/dist/components/Icon/Icon.js +37 -0
- package/dist/components/Icon/Icon.stories.js +356 -0
- package/dist/components/Icon/Icon.styles.js +25 -0
- package/dist/components/Input/Input.js +9 -20
- package/dist/components/Input/Input.stories.js +6 -17
- package/dist/components/Input/Input.styles.js +1 -1
- package/dist/components/Label/Label.js +3 -14
- package/dist/components/Label/Label.stories.js +5 -16
- package/dist/components/Label/Label.styles.js +1 -1
- package/dist/components/Loading/Loading.js +5 -17
- package/dist/components/Loading/Loading.stories.js +6 -17
- package/dist/components/Navbar/Navbar.js +3 -4
- package/dist/components/Navbar/Navbar.stories.js +8 -19
- package/dist/components/Popover/Popover.js +5 -16
- package/dist/components/Popover/Popover.stories.js +5 -16
- package/dist/components/ProgressBar/ProgressBar.js +8 -9
- package/dist/components/ProgressBar/ProgressBar.stories.js +14 -27
- package/dist/components/RadioGroup/RadioGroup.js +6 -17
- package/dist/components/RadioGroup/RadioGroup.stories.js +9 -20
- package/dist/components/Search/Search.js +2 -13
- package/dist/components/Search/Search.stories.js +10 -21
- package/dist/components/Slider/Slider.js +22 -0
- package/dist/components/Slider/Slider.stories.js +33 -0
- package/dist/components/Switch/Switch.js +22 -0
- package/dist/components/Switch/Switch.stories.js +32 -0
- package/dist/components/Table/Datagrid.js +2 -3
- package/dist/components/Table/Table.js +24 -35
- package/dist/components/Table/Table.stories.js +5 -16
- package/dist/components/Tabs/Tabs.js +57 -10
- package/dist/components/Tabs/Tabs.stories.js +13 -24
- package/dist/components/Text/Text.js +19 -6
- package/dist/components/Text/Text.stories.js +12 -23
- package/dist/components/TextInput/TextInput.js +30 -41
- package/dist/components/TextInput/TextInput.stories.js +17 -28
- package/dist/components/TextInput/TextInput.styles.js +7 -7
- package/dist/components/ThemeToggle.js +3 -3
- package/dist/esm/bundle.css +185 -495
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +7 -7
- package/dist/esm/types/components/Button/Button.d.ts +1 -1
- package/dist/esm/types/components/Button/Button.styles.d.ts +1 -1
- package/dist/esm/types/components/Button/Buttons.stories.d.ts +13 -13
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +60 -60
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +64 -64
- package/dist/esm/types/components/Icon/Icon.d.ts +11 -0
- package/dist/esm/types/components/Icon/Icon.stories.d.ts +508 -0
- package/dist/esm/types/components/Icon/Icon.styles.d.ts +4 -0
- package/dist/esm/types/components/Input/Input.stories.d.ts +115 -115
- package/dist/esm/types/components/Label/Label.stories.d.ts +51 -51
- package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +54 -54
- package/dist/esm/types/components/Search/Search.stories.d.ts +64 -64
- package/dist/esm/types/components/Slider/Slider.d.ts +5 -0
- package/dist/esm/types/components/Slider/Slider.stories.d.ts +303 -0
- package/dist/esm/types/components/Switch/Switch.d.ts +4 -0
- package/dist/esm/types/components/Switch/Switch.stories.d.ts +305 -0
- package/dist/esm/types/components/Table/Table.stories.d.ts +7 -7
- package/dist/esm/types/components/Tabs/Tabs.d.ts +12 -3
- package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +18 -0
- package/dist/esm/types/components/Text/Text.d.ts +6 -5
- package/dist/esm/types/components/Text/Text.stories.d.ts +2 -10
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +62 -62
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +1 -1
- package/dist/esm/types/icons/heroIconConfig.d.ts +1 -0
- package/dist/esm/types/icons/iconConfig.d.ts +2 -0
- package/dist/esm/types/icons/iconRegistry.d.ts +19 -0
- package/dist/esm/types/icons/index.d.ts +1 -0
- package/dist/esm/types/icons/material-icon/outline/ChevronDownIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/CollapseContentIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ContentCopyIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ContentPasteIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/DataTableIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ExpandCircleDownIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ExpandCircleRightIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ExpandCircleUpIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/ExpandContentIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/InterestsIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/SaveIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/TableChartIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/outline/index.d.ts +12 -0
- package/dist/esm/types/icons/material-icon/solid/ChevronDownIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/CollapseContentIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ContentCopyIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ContentPasteIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/DataTableIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ExpandCircleDownIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ExpandCircleRightIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ExpandCircleUpIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/ExpandContentIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/InterestsIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/SaveIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/TableChartIcon.d.ts +3 -0
- package/dist/esm/types/icons/material-icon/solid/index.d.ts +12 -0
- package/dist/esm/types/icons/materialIconConfig.d.ts +1 -0
- package/dist/esm/types/icons/type.d.ts +8 -0
- package/dist/esm/types/icons/utils.d.ts +1 -0
- package/dist/esm/types/index.d.ts +4 -0
- package/dist/icons/heroIconConfig.js +13 -0
- package/dist/icons/iconConfig.js +2 -0
- package/dist/icons/iconRegistry.js +47 -0
- package/dist/icons/index.js +1 -0
- package/dist/icons/material-icon/outline/ChevronDownIcon.js +3 -0
- package/dist/icons/material-icon/outline/CollapseContentIcon.js +3 -0
- package/dist/icons/material-icon/outline/ContentCopyIcon.js +3 -0
- package/dist/icons/material-icon/outline/ContentPasteIcon.js +3 -0
- package/dist/icons/material-icon/outline/DataTableIcon.js +3 -0
- package/dist/icons/material-icon/outline/ExpandCircleDownIcon.js +3 -0
- package/dist/icons/material-icon/outline/ExpandCircleRightIcon.js +3 -0
- package/dist/icons/material-icon/outline/ExpandCircleUpIcon.js +3 -0
- package/dist/icons/material-icon/outline/ExpandContentIcon.js +3 -0
- package/dist/icons/material-icon/outline/InterestsIcon.js +3 -0
- package/dist/icons/material-icon/outline/SaveIcon.js +3 -0
- package/dist/icons/material-icon/outline/TableChartIcon.js +3 -0
- package/dist/icons/material-icon/outline/index.js +12 -0
- package/dist/icons/material-icon/solid/ChevronDownIcon.js +3 -0
- package/dist/icons/material-icon/solid/CollapseContentIcon.js +3 -0
- package/dist/icons/material-icon/solid/ContentCopyIcon.js +3 -0
- package/dist/icons/material-icon/solid/ContentPasteIcon.js +3 -0
- package/dist/icons/material-icon/solid/DataTableIcon.js +3 -0
- package/dist/icons/material-icon/solid/ExpandCircleDownIcon.js +3 -0
- package/dist/icons/material-icon/solid/ExpandCircleRightIcon.js +3 -0
- package/dist/icons/material-icon/solid/ExpandCircleUpIcon.js +3 -0
- package/dist/icons/material-icon/solid/ExpandContentIcon.js +3 -0
- package/dist/icons/material-icon/solid/InterestsIcon.js +3 -0
- package/dist/icons/material-icon/solid/SaveIcon.js +3 -0
- package/dist/icons/material-icon/solid/TableChartIcon.js +3 -0
- package/dist/icons/material-icon/solid/index.js +12 -0
- package/dist/icons/materialIconConfig.js +13 -0
- package/dist/icons/type.js +1 -0
- package/dist/icons/utils.js +6 -0
- package/dist/index.d.ts +35 -8
- package/dist/index.js +4 -0
- package/dist/src/theme/global.css +245 -619
- package/dist/stories/ColorGroupPreview.js +6 -9
- package/dist/stories/ColorPreview.js +1 -2
- package/dist/theme/main-preset.js +24 -0
- package/dist/theme/plugins/utilities/typography.js +9 -0
- package/dist/theme/presets/colors.js +8 -1
- package/dist/theme/tokens/color.css +1 -0
- package/dist/theme/tokens/typography.css +21 -0
- package/dist/utils/cn.js +1 -5
- package/dist/utils/datetime.js +12 -12
- package/package.json +3 -1
- package/src/components/ActionButton/ActionButton.stories.tsx +32 -13
- package/src/components/ActionButton/ActionButton.styles.ts +33 -8
- package/src/components/Button/Button.tsx +1 -4
- package/src/components/Collapsible/Collapsible.tsx +1 -1
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/Icon/Icon.stories.tsx +450 -0
- package/src/components/Icon/Icon.styles.ts +26 -0
- package/src/components/Icon/Icon.tsx +67 -0
- package/src/components/Slider/Slider.stories.tsx +47 -0
- package/src/components/Slider/Slider.tsx +31 -0
- package/src/components/Switch/Switch.stories.tsx +46 -0
- package/src/components/Switch/Switch.tsx +32 -0
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +100 -13
- package/src/components/Text/Text.tsx +35 -22
- package/src/icons/heroIconConfig.ts +23 -0
- package/src/icons/iconConfig.ts +2 -0
- package/src/icons/iconRegistry.ts +76 -0
- package/src/icons/index.ts +1 -0
- package/src/icons/material-icon/outline/ChevronDownIcon.tsx +22 -0
- package/src/icons/material-icon/outline/CollapseContentIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ContentCopyIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ContentPasteIcon.tsx +20 -0
- package/src/icons/material-icon/outline/DataTableIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ExpandCircleDownIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ExpandCircleRightIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ExpandCircleUpIcon.tsx +20 -0
- package/src/icons/material-icon/outline/ExpandContentIcon.tsx +20 -0
- package/src/icons/material-icon/outline/InterestsIcon.tsx +20 -0
- package/src/icons/material-icon/outline/SaveIcon.tsx +20 -0
- package/src/icons/material-icon/outline/TableChartIcon.tsx +20 -0
- package/src/icons/material-icon/outline/index.ts +12 -0
- package/src/icons/material-icon/solid/ChevronDownIcon.tsx +22 -0
- package/src/icons/material-icon/solid/CollapseContentIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ContentCopyIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ContentPasteIcon.tsx +20 -0
- package/src/icons/material-icon/solid/DataTableIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ExpandCircleDownIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ExpandCircleRightIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ExpandCircleUpIcon.tsx +20 -0
- package/src/icons/material-icon/solid/ExpandContentIcon.tsx +20 -0
- package/src/icons/material-icon/solid/InterestsIcon.tsx +20 -0
- package/src/icons/material-icon/solid/SaveIcon.tsx +20 -0
- package/src/icons/material-icon/solid/TableChartIcon.tsx +20 -0
- package/src/icons/material-icon/solid/index.ts +12 -0
- package/src/icons/materialIconConfig.tsx +23 -0
- package/src/icons/type.ts +11 -0
- package/src/icons/utils.ts +6 -0
- package/src/index.ts +5 -0
- package/src/theme/main-preset.js +24 -0
- package/src/theme/plugins/utilities/typography.js +9 -0
- package/src/theme/presets/colors.js +8 -1
- package/src/theme/tokens/color.css +1 -0
- package/src/theme/tokens/typography.css +21 -0
- package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +0 -6
- package/dist/cjs/types/components/Button/Button.styles copy.d.ts +0 -7
- package/dist/components/ActionButton/ActionButton.styles copy.js +0 -90
- package/dist/components/Button/Button.styles copy.js +0 -210
- package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +0 -6
- package/dist/esm/types/components/Button/Button.styles copy.d.ts +0 -7
- package/src/_theme/global copy.css +0 -761
- package/src/_theme/global.css +0 -39
- package/src/_theme/main-preset.js +0 -239
- package/src/_theme/plugins/utilities/typography.js +0 -81
- package/src/_theme/presets/colors copy 2.js +0 -319
- package/src/_theme/presets/colors copy.js +0 -229
- package/src/_theme/presets/colors.js +0 -94
- package/src/_theme/theme.d.ts +0 -69
- package/src/_theme/variables/base/button.css +0 -334
- package/src/_theme/variables/base/components copy.css +0 -19
- package/src/_theme/variables/default/colors.css +0 -292
- package/src/_theme/variables/default/typography.css +0 -178
- package/src/_theme/variables/xspector/colors.css +0 -468
- package/src/_theme/variables/xspector/typography.css +0 -178
- package/src/components/ActionButton/ActionButton.styles copy.ts +0 -95
- package/src/components/Button/Button.styles copy.ts +0 -214
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
export
|
|
2
|
+
export const inputVariants = cva([
|
|
3
3
|
"border-0 outline-none",
|
|
4
4
|
"p-1 flex w-auto h-fit box-border",
|
|
5
5
|
"peer text-input-filled-text placeholder:text-input-default-text bg-transparent caret-primary",
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -26,9 +15,9 @@ import * as React from "react";
|
|
|
26
15
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
27
16
|
import { cn } from "@/utils/cn";
|
|
28
17
|
import { labelVariant } from "./Label.styles";
|
|
29
|
-
|
|
30
|
-
var className = _a
|
|
31
|
-
return (_jsx(LabelPrimitive.Root,
|
|
18
|
+
const Label = React.forwardRef((_a, ref) => {
|
|
19
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
20
|
+
return (_jsx(LabelPrimitive.Root, Object.assign({ ref: ref, className: cn(labelVariant({
|
|
32
21
|
size: props.size,
|
|
33
22
|
disabled: props.disabled,
|
|
34
23
|
error: props.error,
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Checkbox } from "../Checkbox/Checkbox";
|
|
14
3
|
import { Label } from "./Label";
|
|
15
|
-
|
|
4
|
+
const meta = {
|
|
16
5
|
title: "Components/Label",
|
|
17
6
|
component: Label,
|
|
18
7
|
tags: ["autodocs"],
|
|
@@ -20,19 +9,19 @@ var meta = {
|
|
|
20
9
|
layout: "fullscreen",
|
|
21
10
|
},
|
|
22
11
|
decorators: [
|
|
23
|
-
|
|
12
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
24
13
|
],
|
|
25
14
|
};
|
|
26
15
|
export default meta;
|
|
27
|
-
export
|
|
16
|
+
export const Default = {
|
|
28
17
|
args: {
|
|
29
18
|
// label: "Lorem Ipsum",
|
|
30
19
|
// value: "Lorem Ipsum",
|
|
31
20
|
// fullwidth: true,
|
|
32
21
|
},
|
|
33
|
-
render:
|
|
22
|
+
render: (args) => {
|
|
34
23
|
console.log("args ", args);
|
|
35
|
-
|
|
24
|
+
const props = Object.assign({}, args);
|
|
36
25
|
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(Checkbox, { id: "terms" }), _jsx(Label, { htmlFor: "terms", children: "Accept terms and conditions" })] }) }));
|
|
37
26
|
},
|
|
38
27
|
};
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { cn } from "@/utils/cn";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var offset = circumference - (percentage / 100) * circumference;
|
|
3
|
+
const Loading = ({ size = 16, color = "", trackColor = "", strokeWidth = 2, percentage = 75, animate = true, className, progressClassName, trackClassName, }) => {
|
|
4
|
+
const radius = (size - strokeWidth * 2) / 2;
|
|
5
|
+
const circumference = 2 * Math.PI * radius;
|
|
6
|
+
const offset = circumference - (percentage / 100) * circumference;
|
|
19
7
|
return (_jsxs("svg", { className: cn({
|
|
20
8
|
"animate-spin": animate,
|
|
21
|
-
}, className), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox:
|
|
9
|
+
}, className), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: `0 0 ${size} ${size}`, width: size, height: size, role: "status", "aria-live": "polite", children: [_jsx("circle", { className: cn("text-[var(--loading-track-color)]", trackClassName), style: Object.assign({}, (trackColor ? { color: trackColor } : {})), cx: size / 2, cy: size / 2, r: radius, stroke: "currentColor", strokeWidth: strokeWidth }), _jsx("circle", { className: cn("text-[var(--loading-process-color)]", progressClassName), style: Object.assign({}, (color ? { color: color } : {})), cx: size / 2, cy: size / 2, r: radius, stroke: "currentColor", strokeWidth: strokeWidth, strokeDasharray: circumference, strokeDashoffset: offset, strokeLinecap: "round" })] }));
|
|
22
10
|
};
|
|
23
11
|
export default Loading;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import Loading from "./Loading";
|
|
14
|
-
|
|
3
|
+
const meta = {
|
|
15
4
|
title: "Components/Loading",
|
|
16
5
|
component: Loading,
|
|
17
6
|
tags: ["autodocs"],
|
|
@@ -19,19 +8,19 @@ var meta = {
|
|
|
19
8
|
layout: "fullscreen",
|
|
20
9
|
},
|
|
21
10
|
decorators: [
|
|
22
|
-
|
|
11
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
23
12
|
],
|
|
24
13
|
};
|
|
25
14
|
export default meta;
|
|
26
|
-
export
|
|
15
|
+
export const Default = {
|
|
27
16
|
args: {
|
|
28
17
|
// Loading: "Lorem Ipsum",
|
|
29
18
|
// value: "Lorem Ipsum",
|
|
30
19
|
// fullwidth: true,
|
|
31
20
|
},
|
|
32
|
-
render:
|
|
21
|
+
render: (args) => {
|
|
33
22
|
console.log("args ", args);
|
|
34
|
-
|
|
35
|
-
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx("div", { className: "flex items-center space-x-2", children: _jsx(Loading,
|
|
23
|
+
const props = Object.assign({}, args);
|
|
24
|
+
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx("div", { className: "flex items-center space-x-2", children: _jsx(Loading, Object.assign({}, props)) }) }));
|
|
36
25
|
},
|
|
37
26
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@/utils/cn";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
container: container,
|
|
3
|
+
const Navbar = ({ children, className, center, leftNav, rightNav, position, container = false, }) => {
|
|
4
|
+
return (_jsx("header", { className: cn("w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-subtitile2 border-solid border-b-2 bg-[rgb(var(--navbar-bg-color))] text-[rgb(var(--navbar-text-color))] border-b-[rgb(var(--navbar-border-color))]", { position }, className), children: _jsx("div", { className: cn("mx-auto flex h-full justify-between items-center", {
|
|
5
|
+
container,
|
|
7
6
|
}), children: children || (_jsxs(_Fragment, { children: [_jsx("nav", { className: "flex w-1/2 gap-x-[var(--navbar-gap)] text-xl", children: leftNav }), _jsx("div", { className: "flex flex-shrink-0 flex-wrap justify-center", children: center }), _jsx("nav", { className: "flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl", children: rightNav })] })) }) }));
|
|
8
7
|
};
|
|
9
8
|
export default Navbar;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
2
|
import Navbar from "./Navbar";
|
|
14
|
-
|
|
3
|
+
const meta = {
|
|
15
4
|
title: "Components/Navbar",
|
|
16
5
|
component: Navbar,
|
|
17
6
|
tags: ["autodocs"],
|
|
@@ -19,23 +8,23 @@ var meta = {
|
|
|
19
8
|
layout: "fullscreen",
|
|
20
9
|
},
|
|
21
10
|
decorators: [
|
|
22
|
-
|
|
11
|
+
(Story) => (_jsx("div", { className: "p-5 w-full h-screen", children: _jsx(Story, {}) })),
|
|
23
12
|
],
|
|
24
13
|
};
|
|
25
14
|
export default meta;
|
|
26
|
-
export
|
|
15
|
+
export const Default = {
|
|
27
16
|
args: {},
|
|
28
|
-
render:
|
|
17
|
+
render: (args) => {
|
|
29
18
|
console.log("args ", args);
|
|
30
|
-
|
|
19
|
+
const props = Object.assign({}, args);
|
|
31
20
|
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx(Navbar, { leftNav: _jsxs("ul", { className: "flex gap-2", children: [_jsx("li", { children: "link 1" }), _jsx("li", { children: "link 2" }), _jsx("li", { children: "link 3" })] }), center: _jsx(_Fragment, { children: "Center text" }), rightNav: _jsxs("ul", { className: "flex gap-2", children: [_jsx("li", { children: "sss 1" }), _jsx("li", { children: "ddd 2" }), _jsx("li", { children: "vvvv 3" })] }) }) }));
|
|
32
21
|
},
|
|
33
22
|
};
|
|
34
|
-
export
|
|
23
|
+
export const Custom = {
|
|
35
24
|
args: {},
|
|
36
|
-
render:
|
|
25
|
+
render: (args) => {
|
|
37
26
|
console.log("args ", args);
|
|
38
|
-
|
|
27
|
+
const props = Object.assign({}, args);
|
|
39
28
|
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx(Navbar, { className: "px-8", leftNav: _jsxs("ul", { className: "flex gap-2", children: [_jsx("li", { children: "link 1" }), _jsx("li", { children: "link 2" }), _jsx("li", { children: "link 3" })] }), center: _jsx(_Fragment, { children: "Center text" }), rightNav: _jsxs("ul", { className: "flex gap-2", children: [_jsx("li", { children: "sss 1" }), _jsx("li", { children: "ddd 2" }), _jsx("li", { children: "vvvv 3" })] }) }) }));
|
|
40
29
|
},
|
|
41
30
|
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -25,11 +14,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
25
14
|
import * as React from "react";
|
|
26
15
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
27
16
|
import { cn } from "@/utils/cn";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content,
|
|
17
|
+
const Popover = PopoverPrimitive.Root;
|
|
18
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
19
|
+
const PopoverContent = React.forwardRef((_a, ref) => {
|
|
20
|
+
var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
21
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 min-w-72 rounded-md border bg-base-popup-highlight border-none overflow-hidden p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className) }, props)) }));
|
|
33
22
|
});
|
|
34
23
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
35
24
|
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
|
|
14
|
-
|
|
3
|
+
const meta = {
|
|
15
4
|
title: "Components/Popver",
|
|
16
5
|
component: Popover,
|
|
17
6
|
tags: ["autodocs"],
|
|
@@ -19,15 +8,15 @@ var meta = {
|
|
|
19
8
|
layout: "fullscreen",
|
|
20
9
|
},
|
|
21
10
|
decorators: [
|
|
22
|
-
|
|
11
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
23
12
|
],
|
|
24
13
|
};
|
|
25
14
|
export default meta;
|
|
26
|
-
export
|
|
15
|
+
export const Default = {
|
|
27
16
|
args: {},
|
|
28
|
-
render:
|
|
17
|
+
render: (args) => {
|
|
29
18
|
console.log("args ", args);
|
|
30
|
-
|
|
19
|
+
const props = Object.assign({}, args);
|
|
31
20
|
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsxs(Popover, { children: [_jsx(PopoverTrigger, { children: "Open" }), _jsx(PopoverContent, { children: "Place content for the popover here." })] }) }));
|
|
32
21
|
},
|
|
33
22
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@/utils/cn";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
useEffect(function () {
|
|
4
|
+
const ProgressBar = ({ progress = 0, color, gradientStart, gradientEnd, animationDuration = 0.5, height = 8, trackClassName, progressClassName, }) => {
|
|
5
|
+
const [width, setWidth] = useState(0);
|
|
6
|
+
useEffect(() => {
|
|
8
7
|
setWidth(progress);
|
|
9
8
|
}, [progress]);
|
|
10
|
-
|
|
9
|
+
const getBackgroundStyle = () => {
|
|
11
10
|
if (gradientStart && gradientEnd) {
|
|
12
|
-
return
|
|
11
|
+
return `linear-gradient(to right, ${gradientStart}, ${gradientEnd})`;
|
|
13
12
|
}
|
|
14
13
|
return color;
|
|
15
14
|
};
|
|
16
|
-
return (_jsx("div", { className: cn("w-full bg-grey2-transparent-16 rounded-full overflow-hidden", trackClassName), style: { height:
|
|
17
|
-
width:
|
|
15
|
+
return (_jsx("div", { className: cn("w-full bg-grey2-transparent-16 rounded-full overflow-hidden", trackClassName), style: { height: `${height}px` }, children: _jsx("div", { className: cn("h-full rounded-full transition-all ease-out bg-primary", progressClassName), style: {
|
|
16
|
+
width: `${width}%`,
|
|
18
17
|
background: getBackgroundStyle(),
|
|
19
|
-
transition:
|
|
18
|
+
transition: `width ${animationDuration}s ease-out`,
|
|
20
19
|
} }) }));
|
|
21
20
|
};
|
|
22
21
|
export default ProgressBar;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { useEffect, useState } from "react";
|
|
14
3
|
import ProgressBar from "./ProgressBar";
|
|
15
|
-
|
|
4
|
+
const meta = {
|
|
16
5
|
title: "Components/ProgressBar",
|
|
17
6
|
component: ProgressBar,
|
|
18
7
|
tags: ["autodocs"],
|
|
@@ -20,33 +9,31 @@ var meta = {
|
|
|
20
9
|
layout: "fullscreen",
|
|
21
10
|
},
|
|
22
11
|
decorators: [
|
|
23
|
-
|
|
12
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
24
13
|
],
|
|
25
14
|
};
|
|
26
15
|
export default meta;
|
|
27
|
-
export
|
|
16
|
+
export const Default = {
|
|
28
17
|
args: {},
|
|
29
|
-
render:
|
|
30
|
-
|
|
31
|
-
return (_jsx("div", { className: "p-4 space-y-4 w-full", children: _jsx(ProgressBar,
|
|
18
|
+
render: (args) => {
|
|
19
|
+
const props = Object.assign({}, args);
|
|
20
|
+
return (_jsx("div", { className: "p-4 space-y-4 w-full", children: _jsx(ProgressBar, Object.assign({}, props)) }));
|
|
32
21
|
},
|
|
33
22
|
};
|
|
34
|
-
export
|
|
23
|
+
export const Preview = {
|
|
35
24
|
args: {},
|
|
36
|
-
render:
|
|
25
|
+
render: (args) => {
|
|
37
26
|
console.log("args ", args);
|
|
38
|
-
|
|
39
|
-
useEffect(
|
|
40
|
-
|
|
41
|
-
setProgress(
|
|
42
|
-
return prevProgress >= 100 ? 0 : prevProgress + 10;
|
|
43
|
-
});
|
|
27
|
+
const [progress, setProgress] = useState(0);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const timer = setInterval(() => {
|
|
30
|
+
setProgress((prevProgress) => prevProgress >= 100 ? 0 : prevProgress + 10);
|
|
44
31
|
}, 1000);
|
|
45
|
-
return
|
|
32
|
+
return () => {
|
|
46
33
|
clearInterval(timer);
|
|
47
34
|
};
|
|
48
35
|
}, []);
|
|
49
|
-
|
|
36
|
+
const props = Object.assign({}, args);
|
|
50
37
|
return (_jsxs("div", { className: "p-4 space-y-4 w-full", children: [_jsx(ProgressBar, { progress: progress, color: "#3b82f6", animationDuration: 0.7 }), _jsx(ProgressBar, { progress: progress, gradientStart: "#8a8a8a", gradientEnd: "#c0c0c0", animationDuration: 0.7 })] }));
|
|
51
38
|
},
|
|
52
39
|
};
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -25,14 +14,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
25
14
|
import * as React from "react";
|
|
26
15
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
27
16
|
import { cn } from "@/utils/cn";
|
|
28
|
-
|
|
29
|
-
var className = _a
|
|
30
|
-
return (_jsx(RadioGroupPrimitive.Root,
|
|
17
|
+
const RadioGroup = React.forwardRef((_a, ref) => {
|
|
18
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
19
|
+
return (_jsx(RadioGroupPrimitive.Root, Object.assign({ className: cn("grid gap-2", className) }, props, { ref: ref })));
|
|
31
20
|
});
|
|
32
21
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
33
|
-
|
|
34
|
-
var className = _a
|
|
35
|
-
return (_jsx(RadioGroupPrimitive.Item,
|
|
22
|
+
const RadioGroupItem = React.forwardRef((_a, ref) => {
|
|
23
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
24
|
+
return (_jsx(RadioGroupPrimitive.Item, Object.assign({ ref: ref, className: cn("aspect-square h-4 w-4 rounded-full border text-primary disabled:fill-state-disable-solid ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:state-disable-solid", {
|
|
36
25
|
"border-primary-30 data-[state=checked]:border-primary": !props.disabled,
|
|
37
26
|
"border-state-disable-solid data-disabled:border-state-disable-solid text-state-disable-solid fill-state-disable-solid": props.disabled,
|
|
38
27
|
}, className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "fill-current text-current", children: _jsx("circle", { cx: "5", cy: "5", r: "5", fill: "current" }) }) }) })));
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { RadioGroup, RadioGroupItem } from "./RadioGroup";
|
|
14
3
|
import { Label } from "../Label/Label";
|
|
15
|
-
|
|
4
|
+
const meta = {
|
|
16
5
|
title: "Components/RadioGroup",
|
|
17
6
|
component: RadioGroup,
|
|
18
7
|
tags: ["autodocs"],
|
|
@@ -20,25 +9,25 @@ var meta = {
|
|
|
20
9
|
layout: "fullscreen",
|
|
21
10
|
},
|
|
22
11
|
decorators: [
|
|
23
|
-
|
|
12
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
24
13
|
],
|
|
25
14
|
};
|
|
26
15
|
export default meta;
|
|
27
|
-
export
|
|
16
|
+
export const Default = {
|
|
28
17
|
args: {
|
|
29
18
|
disabled: false,
|
|
30
19
|
},
|
|
31
|
-
render:
|
|
32
|
-
|
|
33
|
-
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsxs(RadioGroup,
|
|
20
|
+
render: (args) => {
|
|
21
|
+
const props = Object.assign({}, args);
|
|
22
|
+
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsxs(RadioGroup, Object.assign({ defaultValue: "option-one" }, props, { children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(RadioGroupItem, { value: "option-one", id: "option-one" }), _jsx(Label, { htmlFor: "option-one", children: "Option One" })] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(RadioGroupItem, { value: "option-two", id: "option-two" }), _jsx(Label, { htmlFor: "option-two", children: "Option Two" })] })] })) }));
|
|
34
23
|
},
|
|
35
24
|
};
|
|
36
|
-
export
|
|
25
|
+
export const Diabled = {
|
|
37
26
|
args: {
|
|
38
27
|
disabled: true,
|
|
39
28
|
},
|
|
40
|
-
render:
|
|
41
|
-
|
|
29
|
+
render: (args) => {
|
|
30
|
+
const props = Object.assign({}, args);
|
|
42
31
|
return (_jsx("div", { className: "flex items-center space-x-2", children: _jsxs(RadioGroup, { defaultValue: "option-one", disabled: true, children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(RadioGroupItem, { value: "option-one", id: "option-one" }), _jsx(Label, { htmlFor: "option-one", children: "Option One" })] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsx(RadioGroupItem, { value: "option-two", id: "option-two" }), _jsx(Label, { htmlFor: "option-two", children: "Option Two" })] })] }) }));
|
|
43
32
|
},
|
|
44
33
|
};
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { forwardRef } from "react";
|
|
14
3
|
import Dropdown from "../Dropdown/Dropdown";
|
|
15
|
-
|
|
16
|
-
return (_jsx(Dropdown,
|
|
4
|
+
const Search = forwardRef((props, ref) => {
|
|
5
|
+
return (_jsx(Dropdown, Object.assign({}, props, { ref: ref, hasClearIcon: true, hasSearchIcon: true, label: "Search", endIcon: null, filterMode: true })));
|
|
17
6
|
});
|
|
18
7
|
export { Search };
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Search } from "./Search";
|
|
14
|
-
|
|
3
|
+
const meta = {
|
|
15
4
|
title: "Components/Search",
|
|
16
5
|
component: Search,
|
|
17
6
|
tags: ["autodocs"],
|
|
@@ -19,21 +8,21 @@ var meta = {
|
|
|
19
8
|
layout: "fullscreen",
|
|
20
9
|
},
|
|
21
10
|
decorators: [
|
|
22
|
-
|
|
11
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
23
12
|
],
|
|
24
13
|
};
|
|
25
14
|
export default meta;
|
|
26
|
-
|
|
27
|
-
value:
|
|
28
|
-
label:
|
|
29
|
-
})
|
|
30
|
-
export
|
|
15
|
+
const options = new Array(100).fill("").map((__, index) => ({
|
|
16
|
+
value: `option${index + 1}`,
|
|
17
|
+
label: `Option ${index + 1}`,
|
|
18
|
+
}));
|
|
19
|
+
export const Default = {
|
|
31
20
|
args: {
|
|
32
21
|
label: "Choose an option:",
|
|
33
22
|
fullwidth: true,
|
|
34
|
-
options
|
|
23
|
+
options,
|
|
35
24
|
},
|
|
36
|
-
render:
|
|
37
|
-
return (_jsxs("div", { className: "flex flex-row gap-4 w-full", children: [_jsx(Search,
|
|
25
|
+
render: (args) => {
|
|
26
|
+
return (_jsxs("div", { className: "flex flex-row gap-4 w-full", children: [_jsx(Search, Object.assign({ id: "1", size: "lg", options: options }, args)), _jsx(Search, Object.assign({ id: "2", size: "md", options: options }, args)), _jsx(Search, Object.assign({ id: "3", size: "sm", options: options }, args))] }));
|
|
38
27
|
},
|
|
39
28
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
16
|
+
import { cn } from "@/utils/cn";
|
|
17
|
+
const Slider = React.forwardRef((_a, ref) => {
|
|
18
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
19
|
+
return (_jsxs(SliderPrimitive.Root, Object.assign({ ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className) }, props, { children: [_jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-grey-50", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }), _jsx(SliderPrimitive.Thumb, { className: "block cursor-pointer h-5 w-5 rounded-full border-[3px] border-primary bg-background ring-0 outline-none disabled:pointer-events-none disabled:opacity-50" })] })));
|
|
20
|
+
});
|
|
21
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
22
|
+
export { Slider };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slider } from "./Slider";
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Slider",
|
|
6
|
+
component: Slider,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
},
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full", children: _jsx(Story, {}) })),
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
args: {
|
|
19
|
+
defaultValue: [50],
|
|
20
|
+
max: 100,
|
|
21
|
+
step: 1,
|
|
22
|
+
name: "test",
|
|
23
|
+
minStepsBetweenThumbs: 1,
|
|
24
|
+
// orientation: "horizontal", // "horizontal" | "vertical" | undefined,
|
|
25
|
+
disabled: false,
|
|
26
|
+
inverted: false,
|
|
27
|
+
},
|
|
28
|
+
render: (args) => {
|
|
29
|
+
console.log("args ", args);
|
|
30
|
+
const props = Object.assign({}, args);
|
|
31
|
+
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx(Slider, Object.assign({ defaultValue: [50], max: 100, step: 1 }, props)) }));
|
|
32
|
+
},
|
|
33
|
+
};
|