@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,55 +1,8 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
-
function step(op) {
|
|
26
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
-
switch (op[0]) {
|
|
31
|
-
case 0: case 1: t = op; break;
|
|
32
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
-
default:
|
|
36
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
-
if (t[2]) _.ops.pop();
|
|
41
|
-
_.trys.pop(); continue;
|
|
42
|
-
}
|
|
43
|
-
op = body.call(thisArg, _);
|
|
44
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
2
|
// src/Form.tsx
|
|
50
3
|
import { useState } from "react";
|
|
51
4
|
import * as yup from "yup";
|
|
52
|
-
|
|
5
|
+
const schema = yup.object().shape({
|
|
53
6
|
name: yup.string().required("Name is required"),
|
|
54
7
|
email: yup.string().email("Invalid email").required("Email is required"),
|
|
55
8
|
password: yup
|
|
@@ -57,50 +10,36 @@ var schema = yup.object().shape({
|
|
|
57
10
|
.min(6, "Password must be at least 6 characters")
|
|
58
11
|
.required("Password is required"),
|
|
59
12
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var _c = useState({
|
|
13
|
+
const Form = ({ onSubmit, className = "" }) => {
|
|
14
|
+
const [values, setValues] = useState({
|
|
63
15
|
name: "",
|
|
64
16
|
email: "",
|
|
65
17
|
password: "",
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
setValues(__assign(__assign({}, values), (_a = {}, _a[name] = value, _a)));
|
|
18
|
+
});
|
|
19
|
+
const [errors, setErrors] = useState({});
|
|
20
|
+
const handleChange = (e) => {
|
|
21
|
+
const { name, value } = e.target;
|
|
22
|
+
setValues(Object.assign(Object.assign({}, values), { [name]: value }));
|
|
72
23
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onSubmit(values);
|
|
87
|
-
return [3 /*break*/, 4];
|
|
88
|
-
case 3:
|
|
89
|
-
err_1 = _a.sent();
|
|
90
|
-
if (err_1 instanceof yup.ValidationError) {
|
|
91
|
-
validationErrors_1 = {};
|
|
92
|
-
err_1.inner.forEach(function (error) {
|
|
93
|
-
if (error.path) {
|
|
94
|
-
validationErrors_1[error.path] = error.message;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
setErrors(validationErrors_1);
|
|
24
|
+
const handleSubmit = async (e) => {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
try {
|
|
27
|
+
await schema.validate(values, { abortEarly: false });
|
|
28
|
+
setErrors({});
|
|
29
|
+
onSubmit(values);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
if (err instanceof yup.ValidationError) {
|
|
33
|
+
const validationErrors = {};
|
|
34
|
+
err.inner.forEach((error) => {
|
|
35
|
+
if (error.path) {
|
|
36
|
+
validationErrors[error.path] = error.message;
|
|
98
37
|
}
|
|
99
|
-
|
|
100
|
-
|
|
38
|
+
});
|
|
39
|
+
setErrors(validationErrors);
|
|
101
40
|
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return (_jsxs("form", { className:
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return (_jsxs("form", { className: `form ${className}`, onSubmit: handleSubmit, children: [_jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "name", children: "Name" }), _jsx("input", { id: "name", name: "name", type: "text", value: values.name, onChange: handleChange }), errors.name && _jsx("span", { className: "error", children: errors.name })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "email", children: "Email" }), _jsx("input", { id: "email", name: "email", type: "email", value: values.email, onChange: handleChange }), errors.email && _jsx("span", { className: "error", children: errors.email })] }), _jsxs("div", { className: "form-group", children: [_jsx("label", { htmlFor: "password", children: "Password" }), _jsx("input", { id: "password", name: "password", type: "password", value: values.password, onChange: handleChange }), errors.password && _jsx("span", { className: "error", children: errors.password })] }), _jsx("button", { type: "submit", children: "Submit" })] }));
|
|
105
44
|
};
|
|
106
45
|
export default Form;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return (_jsx("span", { className: "text ".concat(size, " ").concat(className), style: { color: color }, children: children }));
|
|
2
|
+
const Text = ({ children, size = "medium", color = "black", className = "", }) => {
|
|
3
|
+
return (_jsx("span", { className: `text ${size} ${className}`, style: { color }, children: children }));
|
|
5
4
|
};
|
|
6
5
|
export default Text;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return (_jsx("input", { className: "text-input ".concat(className), type: type, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled }));
|
|
2
|
+
const TextInput = ({ value, onChange, placeholder = '', type = 'text', disabled = false, className = '', }) => {
|
|
3
|
+
return (_jsx("input", { className: `text-input ${className}`, type: type, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled }));
|
|
5
4
|
};
|
|
6
5
|
export default TextInput;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
14
|
+
import { getIcon } from "@/icons";
|
|
15
|
+
import { cn } from "@/utils/cn";
|
|
16
|
+
import React from "react";
|
|
17
|
+
import { iconVariants } from "./Icon.styles";
|
|
18
|
+
const Icon = (_a) => {
|
|
19
|
+
var { name, type = "heroicons", color = "inherit", variant = "solid", size = "md", className } = _a, props = __rest(_a, ["name", "type", "color", "variant", "size", "className"]);
|
|
20
|
+
const [IconComponent, setIconComponent] = React.useState(null);
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
const loadIcon = async () => {
|
|
23
|
+
const icon = getIcon(type, name, variant);
|
|
24
|
+
if (icon) {
|
|
25
|
+
setIconComponent(() => icon);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
console.warn(`Icon "${name}" from "${type}" not found.`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
loadIcon();
|
|
32
|
+
}, [name, type, variant]);
|
|
33
|
+
if (!IconComponent)
|
|
34
|
+
return (_jsx("svg", Object.assign({ className: cn(iconVariants({ color, size }), className) }, props)));
|
|
35
|
+
return (_jsx(IconComponent, Object.assign({ className: cn(iconVariants({ color, size }), className) }, props)));
|
|
36
|
+
};
|
|
37
|
+
export default Icon;
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Icon from "./Icon";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Components/Icon",
|
|
5
|
+
component: Icon,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
decorators: [
|
|
11
|
+
(Story) => (_jsx("div", { className: "p-5 flex w-full h-full", children: _jsx(Story, {}) })),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export const Default = {
|
|
16
|
+
args: {
|
|
17
|
+
variant: "outline",
|
|
18
|
+
name: "home",
|
|
19
|
+
},
|
|
20
|
+
render: (args) => {
|
|
21
|
+
const props = Object.assign({}, args);
|
|
22
|
+
return (_jsx("div", { className: "flex flex-row gap-4 w-full", children: _jsx(Icon, Object.assign({ name: "home" }, props)) }));
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export const PreviewHeroIcon = {
|
|
26
|
+
args: {
|
|
27
|
+
// variant: "outline",
|
|
28
|
+
},
|
|
29
|
+
render: (args) => {
|
|
30
|
+
const props = Object.assign({}, args);
|
|
31
|
+
const heroIcons = [
|
|
32
|
+
"arrow-left",
|
|
33
|
+
"arrow-small-left",
|
|
34
|
+
"academic-cap",
|
|
35
|
+
"adjustments-horizontal",
|
|
36
|
+
"adjustments-vertical",
|
|
37
|
+
"archive-box-arrow-down",
|
|
38
|
+
"archive-box",
|
|
39
|
+
"archive-box-xmark",
|
|
40
|
+
"arrow-down-circle",
|
|
41
|
+
"arrow-down",
|
|
42
|
+
"arrow-down-left",
|
|
43
|
+
"arrow-down-on-square",
|
|
44
|
+
"arrow-down-on-square-stack",
|
|
45
|
+
"arrow-down-right",
|
|
46
|
+
"arrow-down-tray",
|
|
47
|
+
"arrow-left-circle",
|
|
48
|
+
"arrow-left-end-on-rectangle",
|
|
49
|
+
"arrow-left",
|
|
50
|
+
"arrow-left-on-rectangle",
|
|
51
|
+
"arrow-left-start-on-rectangle",
|
|
52
|
+
"arrow-long-down",
|
|
53
|
+
"arrow-long-left",
|
|
54
|
+
"arrow-long-right",
|
|
55
|
+
"arrow-long-up",
|
|
56
|
+
"arrow-path",
|
|
57
|
+
"arrow-path-rounded-square",
|
|
58
|
+
"arrow-right-circle",
|
|
59
|
+
"arrow-right-end-on-rectangle",
|
|
60
|
+
"arrow-right",
|
|
61
|
+
"arrow-right-on-rectangle",
|
|
62
|
+
"arrow-right-start-on-rectangle",
|
|
63
|
+
"arrow-small-down",
|
|
64
|
+
"arrow-small-left",
|
|
65
|
+
"arrow-small-right",
|
|
66
|
+
"arrow-small-up",
|
|
67
|
+
"arrow-top-right-on-square",
|
|
68
|
+
"arrow-trending-down",
|
|
69
|
+
"arrow-trending-up",
|
|
70
|
+
"arrow-up-circle",
|
|
71
|
+
"arrow-up",
|
|
72
|
+
"arrow-up-left",
|
|
73
|
+
"arrow-up-on-square",
|
|
74
|
+
"arrow-up-on-square-stack",
|
|
75
|
+
"arrow-up-right",
|
|
76
|
+
"arrow-up-tray",
|
|
77
|
+
"arrow-uturn-down",
|
|
78
|
+
"arrow-uturn-left",
|
|
79
|
+
"arrow-uturn-right",
|
|
80
|
+
"arrow-uturn-up",
|
|
81
|
+
"arrows-pointing-in",
|
|
82
|
+
"arrows-pointing-out",
|
|
83
|
+
"arrows-right-left",
|
|
84
|
+
"arrows-up-down",
|
|
85
|
+
"at-symbol",
|
|
86
|
+
"backspace",
|
|
87
|
+
"backward",
|
|
88
|
+
"banknotes",
|
|
89
|
+
"bars2",
|
|
90
|
+
"bars3-bottom-left",
|
|
91
|
+
"bars3-bottom-right",
|
|
92
|
+
"bars3-center-left",
|
|
93
|
+
"bars3",
|
|
94
|
+
"bars4",
|
|
95
|
+
"bars-arrow-down",
|
|
96
|
+
"bars-arrow-up",
|
|
97
|
+
"battery0",
|
|
98
|
+
"battery100",
|
|
99
|
+
"battery50",
|
|
100
|
+
"beaker",
|
|
101
|
+
"bell-alert",
|
|
102
|
+
"bell",
|
|
103
|
+
"bell-slash",
|
|
104
|
+
"bell-snooze",
|
|
105
|
+
"bolt",
|
|
106
|
+
"bolt-slash",
|
|
107
|
+
"book-open",
|
|
108
|
+
"bookmark",
|
|
109
|
+
"bookmark-slash",
|
|
110
|
+
"bookmark-square",
|
|
111
|
+
"briefcase",
|
|
112
|
+
"bug-ant",
|
|
113
|
+
"building-library",
|
|
114
|
+
"building-office2",
|
|
115
|
+
"building-office",
|
|
116
|
+
"building-storefront",
|
|
117
|
+
"cake",
|
|
118
|
+
"calculator",
|
|
119
|
+
"calendar-days",
|
|
120
|
+
"calendar",
|
|
121
|
+
"camera",
|
|
122
|
+
"chart-bar",
|
|
123
|
+
"chart-bar-square",
|
|
124
|
+
"chart-pie",
|
|
125
|
+
"chat-bubble-bottom-center",
|
|
126
|
+
"chat-bubble-bottom-center-text",
|
|
127
|
+
"chat-bubble-left-ellipsis",
|
|
128
|
+
"chat-bubble-left",
|
|
129
|
+
"chat-bubble-left-right",
|
|
130
|
+
"chat-bubble-oval-left-ellipsis",
|
|
131
|
+
"chat-bubble-oval-left",
|
|
132
|
+
"check-badge",
|
|
133
|
+
"check-circle",
|
|
134
|
+
"check",
|
|
135
|
+
"chevron-double-down",
|
|
136
|
+
"chevron-double-left",
|
|
137
|
+
"chevron-double-right",
|
|
138
|
+
"chevron-double-up",
|
|
139
|
+
"chevron-down",
|
|
140
|
+
"chevron-left",
|
|
141
|
+
"chevron-right",
|
|
142
|
+
"chevron-up-down",
|
|
143
|
+
"chevron-up",
|
|
144
|
+
"circle-stack",
|
|
145
|
+
"clipboard-document-check",
|
|
146
|
+
"clipboard-document",
|
|
147
|
+
"clipboard-document-list",
|
|
148
|
+
"clipboard",
|
|
149
|
+
"clock",
|
|
150
|
+
"cloud-arrow-down",
|
|
151
|
+
"cloud-arrow-up",
|
|
152
|
+
"cloud",
|
|
153
|
+
"code-bracket",
|
|
154
|
+
"code-bracket-square",
|
|
155
|
+
"cog6-tooth",
|
|
156
|
+
"cog8-tooth",
|
|
157
|
+
"cog",
|
|
158
|
+
"command-line",
|
|
159
|
+
"computer-desktop",
|
|
160
|
+
"cpu-chip",
|
|
161
|
+
"credit-card",
|
|
162
|
+
"cube",
|
|
163
|
+
"cube-transparent",
|
|
164
|
+
"currency-bangladeshi",
|
|
165
|
+
"currency-dollar",
|
|
166
|
+
"currency-euro",
|
|
167
|
+
"currency-pound",
|
|
168
|
+
"currency-rupee",
|
|
169
|
+
"currency-yen",
|
|
170
|
+
"cursor-arrow-rays",
|
|
171
|
+
"cursor-arrow-ripple",
|
|
172
|
+
"device-phone-mobile",
|
|
173
|
+
"device-tablet",
|
|
174
|
+
"document-arrow-down",
|
|
175
|
+
"document-arrow-up",
|
|
176
|
+
"document-chart-bar",
|
|
177
|
+
"document-check",
|
|
178
|
+
"document-duplicate",
|
|
179
|
+
"document",
|
|
180
|
+
"document-magnifying-glass",
|
|
181
|
+
"document-minus",
|
|
182
|
+
"document-plus",
|
|
183
|
+
"document-text",
|
|
184
|
+
"ellipsis-horizontal-circle",
|
|
185
|
+
"ellipsis-horizontal",
|
|
186
|
+
"ellipsis-vertical",
|
|
187
|
+
"envelope",
|
|
188
|
+
"envelope-open",
|
|
189
|
+
"exclamation-circle",
|
|
190
|
+
"exclamation-triangle",
|
|
191
|
+
"eye-dropper",
|
|
192
|
+
"eye",
|
|
193
|
+
"eye-slash",
|
|
194
|
+
"face-frown",
|
|
195
|
+
"face-smile",
|
|
196
|
+
"film",
|
|
197
|
+
"finger-print",
|
|
198
|
+
"fire",
|
|
199
|
+
"flag",
|
|
200
|
+
"folder-arrow-down",
|
|
201
|
+
"folder",
|
|
202
|
+
"folder-minus",
|
|
203
|
+
"folder-open",
|
|
204
|
+
"folder-plus",
|
|
205
|
+
"forward",
|
|
206
|
+
"funnel",
|
|
207
|
+
"gif",
|
|
208
|
+
"gift",
|
|
209
|
+
"gift-top",
|
|
210
|
+
"globe-alt",
|
|
211
|
+
"globe-americas",
|
|
212
|
+
"globe-asia-australia",
|
|
213
|
+
"globe-europe-africa",
|
|
214
|
+
"hand-raised",
|
|
215
|
+
"hand-thumb-down",
|
|
216
|
+
"hand-thumb-up",
|
|
217
|
+
"hashtag",
|
|
218
|
+
"heart",
|
|
219
|
+
"home",
|
|
220
|
+
"home-modern",
|
|
221
|
+
"identification",
|
|
222
|
+
"inbox-arrow-down",
|
|
223
|
+
"inbox",
|
|
224
|
+
"inbox-stack",
|
|
225
|
+
"information-circle",
|
|
226
|
+
"key",
|
|
227
|
+
"language",
|
|
228
|
+
"lifebuoy",
|
|
229
|
+
"light-bulb",
|
|
230
|
+
"link",
|
|
231
|
+
"list-bullet",
|
|
232
|
+
"lock-closed",
|
|
233
|
+
"lock-open",
|
|
234
|
+
"magnifying-glass-circle",
|
|
235
|
+
"magnifying-glass",
|
|
236
|
+
"magnifying-glass-minus",
|
|
237
|
+
"magnifying-glass-plus",
|
|
238
|
+
"map",
|
|
239
|
+
"map-pin",
|
|
240
|
+
"megaphone",
|
|
241
|
+
"microphone",
|
|
242
|
+
"minus-circle",
|
|
243
|
+
"minus",
|
|
244
|
+
"minus-small",
|
|
245
|
+
"moon",
|
|
246
|
+
"musical-note",
|
|
247
|
+
"newspaper",
|
|
248
|
+
"no-symbol",
|
|
249
|
+
"paint-brush",
|
|
250
|
+
"paper-airplane",
|
|
251
|
+
"paper-clip",
|
|
252
|
+
"pause-circle",
|
|
253
|
+
"pause",
|
|
254
|
+
"pencil",
|
|
255
|
+
"pencil-square",
|
|
256
|
+
"phone-arrow-down-left",
|
|
257
|
+
"phone-arrow-up-right",
|
|
258
|
+
"phone",
|
|
259
|
+
"phone-xmark",
|
|
260
|
+
"photo",
|
|
261
|
+
"play-circle",
|
|
262
|
+
"play",
|
|
263
|
+
"play-pause",
|
|
264
|
+
"plus-circle",
|
|
265
|
+
"plus",
|
|
266
|
+
"plus-small",
|
|
267
|
+
"power",
|
|
268
|
+
"presentation-chart-bar",
|
|
269
|
+
"presentation-chart-line",
|
|
270
|
+
"printer",
|
|
271
|
+
"puzzle-piece",
|
|
272
|
+
"qr-code",
|
|
273
|
+
"question-mark-circle",
|
|
274
|
+
"queue-list",
|
|
275
|
+
"radio",
|
|
276
|
+
"receipt-percent",
|
|
277
|
+
"receipt-refund",
|
|
278
|
+
"rectangle-group",
|
|
279
|
+
"rectangle-stack",
|
|
280
|
+
"rocket-launch",
|
|
281
|
+
"rss",
|
|
282
|
+
"scale",
|
|
283
|
+
"scissors",
|
|
284
|
+
"server",
|
|
285
|
+
"server-stack",
|
|
286
|
+
"share",
|
|
287
|
+
"shield-check",
|
|
288
|
+
"shield-exclamation",
|
|
289
|
+
"shopping-bag",
|
|
290
|
+
"shopping-cart",
|
|
291
|
+
"signal",
|
|
292
|
+
"signal-slash",
|
|
293
|
+
"sparkles",
|
|
294
|
+
"speaker-wave",
|
|
295
|
+
"speaker-xmark",
|
|
296
|
+
"square2-stack",
|
|
297
|
+
"square3-stack3-dicon",
|
|
298
|
+
"squares2-x2",
|
|
299
|
+
"squares-plus",
|
|
300
|
+
"star",
|
|
301
|
+
"stop-circle",
|
|
302
|
+
"stop",
|
|
303
|
+
"sun",
|
|
304
|
+
"swatch",
|
|
305
|
+
"table-cells",
|
|
306
|
+
"tag",
|
|
307
|
+
"ticket",
|
|
308
|
+
"trash",
|
|
309
|
+
"trophy",
|
|
310
|
+
"truck",
|
|
311
|
+
"tv",
|
|
312
|
+
"user-circle",
|
|
313
|
+
"user-group",
|
|
314
|
+
"user",
|
|
315
|
+
"user-minus",
|
|
316
|
+
"user-plus",
|
|
317
|
+
"users",
|
|
318
|
+
"variable",
|
|
319
|
+
"video-camera",
|
|
320
|
+
"video-camera-slash",
|
|
321
|
+
"view-columns",
|
|
322
|
+
"viewfinder-circle",
|
|
323
|
+
"wallet",
|
|
324
|
+
"wifi",
|
|
325
|
+
"window",
|
|
326
|
+
"wrench",
|
|
327
|
+
"wrench-screwdriver",
|
|
328
|
+
"xcircle",
|
|
329
|
+
"xmark",
|
|
330
|
+
];
|
|
331
|
+
return (_jsx("div", { className: "grid grid-cols-1 gap-4 w-full h-full", children: _jsxs("div", { className: "flex flex-col justify-start gap-4 w-full h-full", children: [_jsx("h4", { children: "Hero icons" }), heroIcons.map((iconName) => (_jsxs("div", { className: "flex flex-row gap-6 items-center", children: [_jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "sm" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "sm" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "md" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "md" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "outline", size: "lg" })), _jsx(Icon, Object.assign({}, props, { name: iconName, variant: "solid", size: "lg" })), _jsx("p", { className: "ml-4", children: iconName })] }, iconName)))] }) }));
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
export const PreviewMaterialIcon = {
|
|
335
|
+
args: {
|
|
336
|
+
// variant: "outline",
|
|
337
|
+
},
|
|
338
|
+
render: (args) => {
|
|
339
|
+
const props = Object.assign({}, args);
|
|
340
|
+
const materialIcon = [
|
|
341
|
+
"chevron-down",
|
|
342
|
+
"save",
|
|
343
|
+
"data-table",
|
|
344
|
+
"table-chart",
|
|
345
|
+
"interests",
|
|
346
|
+
"collapse-content",
|
|
347
|
+
"expand-content",
|
|
348
|
+
"expand-circle-right",
|
|
349
|
+
"expand-circle-down",
|
|
350
|
+
"expand-circle-up",
|
|
351
|
+
"content-copy",
|
|
352
|
+
"content-paste",
|
|
353
|
+
];
|
|
354
|
+
return (_jsx("div", { className: "grid grid-cols-1 gap-4 w-full h-full", children: _jsxs("div", { className: "flex flex-col justify-start gap-4 w-full h-full", children: [_jsx("h4", { children: "Material icons" }), materialIcon.map((iconName) => (_jsxs("div", { className: "flex flex-row gap-6 items-center", children: [_jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "sm" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "sm" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "md" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "md" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "outline", size: "lg" })), _jsx(Icon, Object.assign({}, props, { type: "material", name: iconName, variant: "solid", size: "lg" })), _jsx("p", { className: "ml-4", children: iconName })] }, iconName)))] }) }));
|
|
355
|
+
},
|
|
356
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
export const iconVariants = cva(["text-inherit"], {
|
|
3
|
+
variants: {
|
|
4
|
+
color: {
|
|
5
|
+
primary: "text-primary",
|
|
6
|
+
secondary: "text-secondary",
|
|
7
|
+
tertiary: "text-tertiary",
|
|
8
|
+
success: "text-success",
|
|
9
|
+
info: "text-info",
|
|
10
|
+
warning: "text-warning",
|
|
11
|
+
error: "text-error",
|
|
12
|
+
inherit: "text-inherit",
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
sm: "size-4",
|
|
16
|
+
md: "size-6",
|
|
17
|
+
lg: "size-8",
|
|
18
|
+
inherit: "",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
size: "inherit",
|
|
23
|
+
color: "inherit",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -1,14 +1,3 @@
|
|
|
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
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -24,15 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
13
|
import { forwardRef } from "react";
|
|
25
14
|
import { cn } from "@/utils/cn";
|
|
26
15
|
import { inputVariants } from "./Input.styles";
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
return (_jsx("input",
|
|
30
|
-
size
|
|
31
|
-
variant
|
|
32
|
-
fullwidth
|
|
33
|
-
error
|
|
34
|
-
hiddenPlaceholder
|
|
35
|
-
disabled
|
|
16
|
+
const Input = forwardRef((_a, ref) => {
|
|
17
|
+
var { className, type = "text", size = "md", variant = "outline", fullwidth = false, disabled = false, error = false, required = false, hiddenPlaceholder = false } = _a, props = __rest(_a, ["className", "type", "size", "variant", "fullwidth", "disabled", "error", "required", "hiddenPlaceholder"]);
|
|
18
|
+
return (_jsx("input", Object.assign({ type: type, className: cn(inputVariants({
|
|
19
|
+
size,
|
|
20
|
+
variant,
|
|
21
|
+
fullwidth,
|
|
22
|
+
error,
|
|
23
|
+
hiddenPlaceholder,
|
|
24
|
+
disabled,
|
|
36
25
|
}), className), ref: ref, disabled: disabled }, props)));
|
|
37
26
|
});
|
|
38
27
|
Input.displayName = "Input";
|
|
@@ -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 { Input } from "./Input";
|
|
14
|
-
|
|
3
|
+
const meta = {
|
|
15
4
|
title: "Components/Input",
|
|
16
5
|
component: Input,
|
|
17
6
|
tags: ["autodocs"],
|
|
@@ -19,18 +8,18 @@ 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
|
// disabled: true,
|
|
29
18
|
// value: "Aaaaa",
|
|
30
19
|
},
|
|
31
|
-
render:
|
|
20
|
+
render: (args) => {
|
|
32
21
|
console.log("args ", args);
|
|
33
|
-
|
|
34
|
-
return (_jsxs("div", { className: "flex flex-row gap-4", children: [_jsx(Input,
|
|
22
|
+
const props = Object.assign({}, args);
|
|
23
|
+
return (_jsxs("div", { className: "flex flex-row gap-4", children: [_jsx(Input, Object.assign({ id: "1", size: "lg", placeholder: "Email" }, args)), _jsx(Input, Object.assign({ id: "2", size: "md", placeholder: "Email" }, args)), _jsx(Input, Object.assign({ id: "3", size: "sm", placeholder: "Email" }, args))] }));
|
|
35
24
|
},
|
|
36
25
|
};
|