@uxf/ui 1.0.0-beta.6 → 1.0.0-beta.61
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/_private-utils/get-provider-config.d.ts +2 -0
- package/_private-utils/get-provider-config.js +8 -0
- package/avatar/avatar.d.ts +5 -0
- package/avatar/avatar.js +14 -0
- package/avatar/avatar.stories.d.ts +7 -0
- package/avatar/avatar.stories.js +21 -0
- package/avatar/index.d.ts +1 -0
- package/avatar/index.js +5 -0
- package/avatar-file-input/avatar-file-input.d.ts +32 -0
- package/avatar-file-input/avatar-file-input.js +69 -0
- package/avatar-file-input/avatar-file-input.stories.d.ts +7 -0
- package/avatar-file-input/avatar-file-input.stories.js +30 -0
- package/avatar-file-input/index.d.ts +1 -0
- package/{theme → avatar-file-input}/index.js +1 -3
- package/badge/badge.d.ts +7 -0
- package/badge/badge.js +15 -0
- package/badge/badge.stories.d.ts +7 -0
- package/badge/badge.stories.js +39 -0
- package/badge/index.d.ts +1 -0
- package/badge/index.js +5 -0
- package/badge/theme.d.ts +5 -0
- package/badge/theme.js +2 -0
- package/button/button.d.ts +13 -13
- package/button/button.js +16 -14
- package/button/button.stories.d.ts +7 -0
- package/button/button.stories.js +59 -0
- package/button/index.d.ts +1 -2
- package/button/index.js +1 -8
- package/button/theme.d.ts +8 -4
- package/button/theme.js +0 -1
- package/checkbox/checkbox.d.ts +9 -0
- package/checkbox/checkbox.js +23 -0
- package/checkbox/checkbox.stories.d.ts +7 -0
- package/checkbox/checkbox.stories.js +57 -0
- package/checkbox/index.d.ts +1 -0
- package/checkbox/index.js +17 -0
- package/checkbox-button/checkbox-button.d.ts +8 -0
- package/checkbox-button/checkbox-button.js +21 -0
- package/checkbox-button/checkbox-button.stories.d.ts +7 -0
- package/checkbox-button/checkbox-button.stories.js +57 -0
- package/checkbox-button/index.d.ts +1 -0
- package/checkbox-button/index.js +17 -0
- package/checkbox-input/checkbox-input.d.ts +2 -0
- package/checkbox-input/checkbox-input.js +12 -0
- package/checkbox-input/checkbox-input.stories.d.ts +7 -0
- package/checkbox-input/checkbox-input.stories.js +17 -0
- package/checkbox-input/index.d.ts +1 -0
- package/checkbox-input/index.js +17 -0
- package/chip/chip.d.ts +7 -0
- package/chip/chip.js +14 -0
- package/chip/chip.stories.d.ts +7 -0
- package/chip/chip.stories.js +22 -0
- package/chip/index.d.ts +1 -0
- package/chip/index.js +5 -0
- package/chip/theme.d.ts +5 -0
- package/chip/theme.js +2 -0
- package/color-radio-group/color-radio-group.d.ts +17 -0
- package/color-radio-group/color-radio-group.js +47 -0
- package/color-radio-group/color-radio-group.stories.d.ts +7 -0
- package/color-radio-group/color-radio-group.stories.js +79 -0
- package/color-radio-group/color-radio.d.ts +8 -0
- package/color-radio-group/color-radio.js +28 -0
- package/color-radio-group/index.d.ts +1 -0
- package/color-radio-group/index.js +5 -0
- package/combobox/combobox.d.ts +24 -0
- package/combobox/combobox.js +63 -0
- package/combobox/combobox.stories.d.ts +9 -0
- package/combobox/combobox.stories.js +67 -0
- package/combobox/index.d.ts +1 -0
- package/combobox/index.js +17 -0
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +57 -0
- package/config/icons.js +16 -0
- package/content/content-schema.d.ts +3 -0
- package/content/content-schema.js +2 -0
- package/content/types.d.ts +27 -0
- package/content/types.js +2 -0
- package/context/context.d.ts +12 -0
- package/context/context.js +5 -0
- package/context/index.d.ts +3 -0
- package/context/index.js +19 -0
- package/context/provider.d.ts +8 -0
- package/context/provider.js +10 -0
- package/context/use-component-context.d.ts +3 -0
- package/context/use-component-context.js +13 -0
- package/css/avatar-file-input.css +9 -0
- package/css/avatar.css +15 -0
- package/css/badge.css +23 -0
- package/css/button.css +223 -0
- package/css/checkbox-button.css +99 -0
- package/css/checkbox-input.css +4 -0
- package/css/checkbox.css +103 -0
- package/css/chip.css +37 -0
- package/css/color-radio-group.css +26 -0
- package/css/color-radio.css +21 -0
- package/css/combobox.css +73 -0
- package/css/component-structure-analyzer.css +31 -0
- package/css/date-picker-input.css +123 -0
- package/css/date-picker.css +34 -0
- package/css/dropdown.css +19 -0
- package/css/error-message.css +3 -0
- package/css/flash-messages.css +20 -0
- package/css/form-control.css +7 -0
- package/css/icon.css +8 -0
- package/css/input-basic.css +18 -0
- package/css/input.css +162 -0
- package/css/label.css +14 -0
- package/css/list-item.css +24 -0
- package/css/radio-group.css +143 -0
- package/css/radio.css +90 -0
- package/css/raster-image.css +16 -0
- package/css/select.css +54 -0
- package/css/tabs.css +104 -0
- package/css/text-link.css +12 -0
- package/css/textarea.css +98 -0
- package/css/toggle.css +60 -0
- package/date-picker-input/date-picker-day.d.ts +8 -0
- package/date-picker-input/date-picker-day.js +63 -0
- package/date-picker-input/date-picker-decade.d.ts +6 -0
- package/date-picker-input/date-picker-decade.js +68 -0
- package/date-picker-input/date-picker-input.d.ts +20 -0
- package/date-picker-input/date-picker-input.js +60 -0
- package/date-picker-input/date-picker-input.stories.d.ts +7 -0
- package/date-picker-input/date-picker-input.stories.js +45 -0
- package/date-picker-input/date-picker-month.d.ts +7 -0
- package/date-picker-input/date-picker-month.js +63 -0
- package/date-picker-input/date-picker-provider.d.ts +8 -0
- package/date-picker-input/date-picker-provider.js +26 -0
- package/date-picker-input/date-picker-year.d.ts +7 -0
- package/date-picker-input/date-picker-year.js +73 -0
- package/date-picker-input/date-picker.d.ts +3 -0
- package/date-picker-input/date-picker.js +53 -0
- package/date-picker-input/index.d.ts +3 -0
- package/date-picker-input/index.js +19 -0
- package/date-picker-input/types.d.ts +5 -0
- package/date-picker-input/types.js +2 -0
- package/dropdown/dropdown.d.ts +10 -0
- package/dropdown/dropdown.js +27 -0
- package/dropdown/index.d.ts +1 -0
- package/dropdown/index.js +17 -0
- package/error-message/error-message.d.ts +7 -0
- package/error-message/error-message.js +11 -0
- package/error-message/error-message.stories.d.ts +8 -0
- package/error-message/error-message.stories.js +17 -0
- package/error-message/index.d.ts +1 -0
- package/error-message/index.js +17 -0
- package/flash-messages/flash-message.d.ts +16 -0
- package/flash-messages/flash-message.js +46 -0
- package/flash-messages/flash-messages-service.d.ts +5 -0
- package/flash-messages/flash-messages-service.js +15 -0
- package/flash-messages/flash-messages.d.ts +8 -0
- package/flash-messages/flash-messages.js +55 -0
- package/flash-messages/flash-messages.stories.d.ts +7 -0
- package/flash-messages/flash-messages.stories.js +31 -0
- package/flash-messages/theme.d.ts +4 -0
- package/flash-messages/theme.js +2 -0
- package/form-control/form-control.d.ts +12 -0
- package/form-control/form-control.js +19 -0
- package/form-control/form-control.stories.d.ts +12 -0
- package/form-control/form-control.stories.js +23 -0
- package/form-control/index.d.ts +1 -0
- package/form-control/index.js +17 -0
- package/hooks/use-dropdown.d.ts +2 -0
- package/hooks/use-dropdown.js +28 -0
- package/hooks/use-input-submit.d.ts +4 -0
- package/hooks/use-input-submit.js +40 -0
- package/icon/icon.d.ts +17 -0
- package/icon/icon.js +31 -0
- package/icon/icon.stories.d.ts +7 -0
- package/icon/icon.stories.js +74 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.js +17 -0
- package/icon/theme.d.ts +2 -0
- package/icon/theme.js +2 -0
- package/icon/types.d.ts +2 -0
- package/icon/types.js +2 -0
- package/image-gallery/components/close-button.d.ts +6 -0
- package/image-gallery/components/close-button.js +12 -0
- package/image-gallery/components/dot.d.ts +6 -0
- package/image-gallery/components/dot.js +12 -0
- package/image-gallery/components/gallery.d.ts +11 -0
- package/image-gallery/components/gallery.js +71 -0
- package/image-gallery/components/next-button.d.ts +6 -0
- package/image-gallery/components/next-button.js +12 -0
- package/image-gallery/components/previous-button.d.ts +6 -0
- package/image-gallery/components/previous-button.js +12 -0
- package/image-gallery/context.d.ts +10 -0
- package/image-gallery/context.js +12 -0
- package/image-gallery/image-gallery.d.ts +6 -0
- package/image-gallery/image-gallery.js +55 -0
- package/image-gallery/image-gallery.stories.d.ts +13 -0
- package/image-gallery/image-gallery.stories.js +26 -0
- package/image-gallery/image.d.ts +4 -0
- package/image-gallery/image.js +14 -0
- package/image-gallery/index.d.ts +4 -0
- package/image-gallery/index.js +26 -0
- package/image-gallery/types.d.ts +7 -0
- package/image-gallery/types.js +2 -0
- package/image-gallery/use-image.d.ts +2 -0
- package/image-gallery/use-image.js +16 -0
- package/input/index.d.ts +12 -0
- package/input/index.js +16 -0
- package/input/input-element.d.ts +21 -0
- package/input/input-element.js +11 -0
- package/input/input-left-addon.d.ts +9 -0
- package/input/input-left-addon.js +12 -0
- package/input/input-left-element.d.ts +9 -0
- package/input/input-left-element.js +12 -0
- package/input/input-right-addon.d.ts +8 -0
- package/input/input-right-addon.js +12 -0
- package/input/input-right-element.d.ts +9 -0
- package/input/input-right-element.js +12 -0
- package/input/input.d.ts +8 -0
- package/input/input.js +64 -0
- package/input/input.stories.d.ts +14 -0
- package/input/input.stories.js +81 -0
- package/input/theme.d.ts +6 -0
- package/input/theme.js +2 -0
- package/label/index.d.ts +1 -0
- package/label/index.js +17 -0
- package/label/label.d.ts +11 -0
- package/label/label.js +14 -0
- package/label/label.stories.d.ts +7 -0
- package/label/label.stories.js +17 -0
- package/list-item/index.d.ts +1 -0
- package/list-item/index.js +5 -0
- package/list-item/list-item.d.ts +7 -0
- package/list-item/list-item.js +23 -0
- package/list-item/list-item.stories.d.ts +7 -0
- package/list-item/list-item.stories.js +28 -0
- package/package.json +17 -34
- package/radio/index.d.ts +1 -0
- package/radio/index.js +17 -0
- package/radio/radio.d.ts +6 -0
- package/radio/radio.js +15 -0
- package/radio/radio.stories.d.ts +7 -0
- package/radio/radio.stories.js +42 -0
- package/radio-group/index.d.ts +1 -0
- package/radio-group/index.js +17 -0
- package/radio-group/radio-group.d.ts +20 -0
- package/radio-group/radio-group.js +49 -0
- package/radio-group/radio-group.stories.d.ts +7 -0
- package/radio-group/radio-group.stories.js +61 -0
- package/raster-image/index.d.ts +1 -0
- package/raster-image/index.js +17 -0
- package/raster-image/raster-image.d.ts +16 -0
- package/raster-image/raster-image.js +21 -0
- package/raster-image/raster-image.stories.d.ts +7 -0
- package/raster-image/raster-image.stories.js +17 -0
- package/select/index.d.ts +1 -0
- package/select/index.js +17 -0
- package/select/select.d.ts +24 -0
- package/select/select.js +60 -0
- package/select/select.stories.d.ts +9 -0
- package/select/select.stories.js +71 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/index.js +5 -0
- package/tabs/tabs.d.ts +7 -0
- package/tabs/tabs.js +64 -0
- package/tabs/tabs.stories.d.ts +7 -0
- package/tabs/tabs.stories.js +33 -0
- package/text-input/index.d.ts +1 -0
- package/text-input/index.js +17 -0
- package/text-input/text-input.d.ts +30 -0
- package/text-input/text-input.js +57 -0
- package/text-input/text-input.stories.d.ts +8 -0
- package/text-input/text-input.stories.js +54 -0
- package/text-link/index.d.ts +1 -0
- package/text-link/index.js +5 -0
- package/text-link/text-link.d.ts +5 -0
- package/text-link/text-link.js +19 -0
- package/text-link/text-link.stories.d.ts +7 -0
- package/text-link/text-link.stories.js +24 -0
- package/textarea/index.d.ts +1 -0
- package/textarea/index.js +17 -0
- package/textarea/textarea.d.ts +17 -0
- package/textarea/textarea.js +81 -0
- package/textarea/textarea.stories.d.ts +7 -0
- package/textarea/textarea.stories.js +44 -0
- package/toggle/index.d.ts +1 -0
- package/toggle/index.js +17 -0
- package/toggle/toggle.d.ts +8 -0
- package/toggle/toggle.js +16 -0
- package/toggle/toggle.stories.d.ts +7 -0
- package/toggle/toggle.stories.js +51 -0
- package/types/form-control-props.d.ts +24 -0
- package/types/form-control-props.js +2 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +17 -0
- package/utils/action.d.ts +2 -0
- package/utils/action.js +11 -0
- package/utils/component-structure-analyzer.d.ts +6 -0
- package/utils/component-structure-analyzer.js +10 -0
- package/utils/icons-config.js +53 -0
- package/utils/image.d.ts +9 -0
- package/utils/image.js +30 -0
- package/utils/localized-dayjs.d.ts +2 -0
- package/utils/localized-dayjs.js +34 -0
- package/utils/storybook-config.d.ts +19 -0
- package/utils/storybook-config.js +47 -0
- package/utils/tailwind-config.js +152 -0
- package/stories/button.stories.tsx +0 -29
- package/theme/index.d.ts +0 -2
- package/theme/theme-context.d.ts +0 -9
- package/theme/theme-context.js +0 -59
- package/theme/theme.d.ts +0 -14
- package/theme/theme.js +0 -3
- package/types.d.ts +0 -3
- package/types.js +0 -3
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
const plugin = require("tailwindcss/plugin");
|
|
2
|
+
const { em } = require("@uxf/styles/units/em");
|
|
3
|
+
const { rem } = require("@uxf/styles/units/rem");
|
|
4
|
+
|
|
5
|
+
/** @type {Record<string, string>} */
|
|
6
|
+
const CONTAINERS = {
|
|
7
|
+
xs: rem(540),
|
|
8
|
+
sm: rem(720),
|
|
9
|
+
md: rem(928),
|
|
10
|
+
lg: rem(1024),
|
|
11
|
+
xl: rem(1216),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @type {Record<string, string>} */
|
|
15
|
+
const SCREENS = {
|
|
16
|
+
xs: em(576),
|
|
17
|
+
sm: em(768),
|
|
18
|
+
md: em(992),
|
|
19
|
+
lg: em(1200),
|
|
20
|
+
xl: em(1440),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @type {import('tailwindcss').Config} */
|
|
24
|
+
module.exports = {
|
|
25
|
+
content: [],
|
|
26
|
+
theme: {
|
|
27
|
+
containers: CONTAINERS,
|
|
28
|
+
screens: SCREENS,
|
|
29
|
+
extend: {
|
|
30
|
+
borderRadius: {
|
|
31
|
+
inherit: "inherit",
|
|
32
|
+
},
|
|
33
|
+
colors: {
|
|
34
|
+
inherit: "inherit",
|
|
35
|
+
primary: {
|
|
36
|
+
50: "#eff6ff",
|
|
37
|
+
100: "#dbeafe",
|
|
38
|
+
200: "#bfdbfe",
|
|
39
|
+
300: "#93c5fd",
|
|
40
|
+
400: "#60a5fa",
|
|
41
|
+
500: "#3b82f6",
|
|
42
|
+
600: "#2563eb",
|
|
43
|
+
700: "#1d4ed8",
|
|
44
|
+
800: "#1e40af",
|
|
45
|
+
900: "#1e3a8a",
|
|
46
|
+
},
|
|
47
|
+
success: {
|
|
48
|
+
50: "#f0fdf4",
|
|
49
|
+
100: "#dcfce7",
|
|
50
|
+
200: "#bbf7d0",
|
|
51
|
+
300: "#86efac",
|
|
52
|
+
400: "#4ade80",
|
|
53
|
+
500: "#22c55e",
|
|
54
|
+
600: "#16a34a",
|
|
55
|
+
700: "#15803d",
|
|
56
|
+
800: "#166534",
|
|
57
|
+
900: "#14532d",
|
|
58
|
+
},
|
|
59
|
+
warning: {
|
|
60
|
+
50: "#fff7ed",
|
|
61
|
+
100: "#ffedd5",
|
|
62
|
+
200: "#fed7aa",
|
|
63
|
+
300: "#fdba74",
|
|
64
|
+
400: "#fb923c",
|
|
65
|
+
500: "#f97316",
|
|
66
|
+
600: "#ea580c",
|
|
67
|
+
700: "#c2410c",
|
|
68
|
+
800: "#9a3412",
|
|
69
|
+
900: "#7c2d12",
|
|
70
|
+
},
|
|
71
|
+
error: {
|
|
72
|
+
50: "#fef2f2",
|
|
73
|
+
100: "#fee2e2",
|
|
74
|
+
200: "#fecaca",
|
|
75
|
+
300: "#fca5a5",
|
|
76
|
+
400: "#f87171",
|
|
77
|
+
500: "#ef4444",
|
|
78
|
+
600: "#dc2626",
|
|
79
|
+
700: "#b91c1c",
|
|
80
|
+
800: "#991b1b",
|
|
81
|
+
900: "#7f1d1d",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
zIndex: {
|
|
85
|
+
1: "1",
|
|
86
|
+
focus: "5",
|
|
87
|
+
fixed: "10",
|
|
88
|
+
menu: "25",
|
|
89
|
+
header: "50",
|
|
90
|
+
modal: "100",
|
|
91
|
+
dropdown: "200",
|
|
92
|
+
flashMessage: "250",
|
|
93
|
+
tooltip: "300",
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
corePlugins: {
|
|
98
|
+
aspectRatio: false,
|
|
99
|
+
container: false,
|
|
100
|
+
},
|
|
101
|
+
plugins: [
|
|
102
|
+
require("@tailwindcss/aspect-ratio"),
|
|
103
|
+
require("@tailwindcss/line-clamp"),
|
|
104
|
+
plugin(
|
|
105
|
+
({ addComponents, theme }) => {
|
|
106
|
+
const screens = theme("screens", SCREENS);
|
|
107
|
+
const containers = theme("containers", CONTAINERS);
|
|
108
|
+
|
|
109
|
+
const mqs = Object.entries(screens);
|
|
110
|
+
const widths = mqs
|
|
111
|
+
.map((item) => {
|
|
112
|
+
const key = item[0];
|
|
113
|
+
const value = item[1];
|
|
114
|
+
const width = containers[key];
|
|
115
|
+
if (width) {
|
|
116
|
+
return { [`@media (min-width: ${value})`]: { ".container": { "max-width": width } } };
|
|
117
|
+
}
|
|
118
|
+
})
|
|
119
|
+
.filter((i) => i);
|
|
120
|
+
|
|
121
|
+
addComponents([
|
|
122
|
+
{
|
|
123
|
+
".container": {
|
|
124
|
+
"margin-left": "auto",
|
|
125
|
+
"margin-right": "auto",
|
|
126
|
+
width: "100%",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
...widths,
|
|
130
|
+
]);
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
content: [],
|
|
134
|
+
theme: {
|
|
135
|
+
containers: CONTAINERS,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
),
|
|
139
|
+
plugin(({ addVariant }) => {
|
|
140
|
+
addVariant("is-active", "&.is-active");
|
|
141
|
+
addVariant("is-selected", "&.is-selected");
|
|
142
|
+
addVariant("is-hoverable", ["&.is-hoverable:active", "&.is-hoverable:hover"]);
|
|
143
|
+
addVariant("is-focused", "&.is-focused");
|
|
144
|
+
addVariant("is-required", ["&.is-required", "&:required"]);
|
|
145
|
+
addVariant("is-invalid", "&.is-invalid");
|
|
146
|
+
addVariant("is-loading", ["&.is-loading"]);
|
|
147
|
+
addVariant("is-readonly", ["&.is-readonly", "&:readonly"]);
|
|
148
|
+
addVariant("is-disabled", ["&.is-disabled", "&:disabled"]);
|
|
149
|
+
addVariant("is-empty", ["&.is-empty"]);
|
|
150
|
+
}),
|
|
151
|
+
],
|
|
152
|
+
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import Button from "./button";
|
|
2
|
-
import { useTheme } from "@uxf/ui/theme";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "UI/Button",
|
|
6
|
-
component: Button,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export function Default() {
|
|
10
|
-
const theme = useTheme().Button;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<div className="space-y-2">
|
|
14
|
-
{Object.keys(theme.variant).map((variant: any) => (
|
|
15
|
-
<>
|
|
16
|
-
{Object.keys(theme.color).map((color: any) => (
|
|
17
|
-
<div className="space-x-2">
|
|
18
|
-
{Object.keys(theme.size).map((size: any) => (
|
|
19
|
-
<Button variant={variant} color={color} size={size}>
|
|
20
|
-
Button
|
|
21
|
-
</Button>
|
|
22
|
-
))}
|
|
23
|
-
</div>
|
|
24
|
-
))}
|
|
25
|
-
</>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
}
|
package/theme/index.d.ts
DELETED
package/theme/theme-context.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Theme } from "./theme";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
interface ThemeProviderProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
theme: Theme;
|
|
6
|
-
}
|
|
7
|
-
export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
|
|
8
|
-
export declare const useTheme: () => Theme;
|
|
9
|
-
export {};
|
package/theme/theme-context.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useTheme = exports.ThemeProvider = void 0;
|
|
27
|
-
var React = __importStar(require("react"));
|
|
28
|
-
var react_1 = require("react");
|
|
29
|
-
var theme = {
|
|
30
|
-
Button: {
|
|
31
|
-
size: {
|
|
32
|
-
xs: "button--xs",
|
|
33
|
-
sm: "button--sm",
|
|
34
|
-
md: "button--md",
|
|
35
|
-
lg: "button--lg",
|
|
36
|
-
xl: "button--xl",
|
|
37
|
-
},
|
|
38
|
-
color: {
|
|
39
|
-
primary: "button--primary",
|
|
40
|
-
secondary: "button--secondary",
|
|
41
|
-
},
|
|
42
|
-
variant: {
|
|
43
|
-
outlined: "button--outlined",
|
|
44
|
-
contained: "button--contained",
|
|
45
|
-
},
|
|
46
|
-
disabled: "button--disabled",
|
|
47
|
-
defaultColor: "primary",
|
|
48
|
-
defaultSize: "md",
|
|
49
|
-
defaultVariant: "outlined",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
var ThemeContext = React.createContext(theme);
|
|
53
|
-
function ThemeProvider(props) {
|
|
54
|
-
return (React.createElement(ThemeContext.Provider, { value: props.theme }, props.children));
|
|
55
|
-
}
|
|
56
|
-
exports.ThemeProvider = ThemeProvider;
|
|
57
|
-
var useTheme = function () { return (0, react_1.useContext)(ThemeContext); };
|
|
58
|
-
exports.useTheme = useTheme;
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUtY29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90aGVtZS90aGVtZS1jb250ZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUErQjtBQUUvQiwrQkFBOEM7QUFFOUMsSUFBTSxLQUFLLEdBQVU7SUFDbkIsTUFBTSxFQUFFO1FBQ04sSUFBSSxFQUFFO1lBQ0osRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7WUFDaEIsRUFBRSxFQUFFLFlBQVk7U0FDakI7UUFDRCxLQUFLLEVBQUU7WUFDTCxPQUFPLEVBQUUsaUJBQWlCO1lBQzFCLFNBQVMsRUFBRSxtQkFBbUI7U0FDL0I7UUFDRCxPQUFPLEVBQUU7WUFDUCxRQUFRLEVBQUUsa0JBQWtCO1lBQzVCLFNBQVMsRUFBRSxtQkFBbUI7U0FDL0I7UUFDRCxRQUFRLEVBQUUsa0JBQWtCO1FBQzVCLFlBQVksRUFBRSxTQUFTO1FBQ3ZCLFdBQVcsRUFBRSxJQUFJO1FBQ2pCLGNBQWMsRUFBRSxVQUFVO0tBQzNCO0NBQ0YsQ0FBQztBQUVGLElBQU0sWUFBWSxHQUFHLEtBQUssQ0FBQyxhQUFhLENBQVEsS0FBSyxDQUFDLENBQUM7QUFNdkQsU0FBZ0IsYUFBYSxDQUFDLEtBQXlCO0lBQ3JELE9BQU8sQ0FDTCxvQkFBQyxZQUFZLENBQUMsUUFBUSxJQUFDLEtBQUssRUFBRSxLQUFLLENBQUMsS0FBSyxJQUN0QyxLQUFLLENBQUMsUUFBUSxDQUNPLENBQ3pCLENBQUM7QUFDSixDQUFDO0FBTkQsc0NBTUM7QUFFTSxJQUFNLFFBQVEsR0FBRyxjQUFNLE9BQUEsSUFBQSxrQkFBVSxFQUFDLFlBQVksQ0FBQyxFQUF4QixDQUF3QixDQUFDO0FBQTFDLFFBQUEsUUFBUSxZQUFrQyJ9
|
package/theme/theme.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ButtonColors, ButtonSizes, ButtonVariants } from "@uxf/ui/button";
|
|
2
|
-
import { Classes } from "@uxf/ui/types";
|
|
3
|
-
export declare type ButtonTheme = {
|
|
4
|
-
disabled: string;
|
|
5
|
-
size: Classes<keyof ButtonSizes>;
|
|
6
|
-
color: Classes<keyof ButtonColors>;
|
|
7
|
-
variant: Classes<keyof ButtonVariants>;
|
|
8
|
-
defaultSize: keyof ButtonSizes;
|
|
9
|
-
defaultColor: keyof ButtonColors;
|
|
10
|
-
defaultVariant: keyof ButtonVariants;
|
|
11
|
-
};
|
|
12
|
-
export interface Theme {
|
|
13
|
-
Button: ButtonTheme;
|
|
14
|
-
}
|
package/theme/theme.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGhlbWUvdGhlbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/types.d.ts
DELETED
package/types.js
DELETED