oolib 2.240.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/components/Accordion/index.js +1 -1
  2. package/dist/components/ActionMenu/index.d.ts +1 -1
  3. package/dist/components/ActionMenu/index.js +2 -2
  4. package/dist/components/DatePicker/index.js +3 -3
  5. package/dist/components/HomeCover/index.js +1 -1
  6. package/dist/components/ImageInput/comps/ImageEditor/comps/EditToolbar/index.js +6 -6
  7. package/dist/components/Modals/Modal/index.d.ts +2 -0
  8. package/dist/components/Modals/Modal/index.js +4 -3
  9. package/dist/components/Modals/Modal/styled.d.ts +3 -1
  10. package/dist/components/Modals/Modal/styled.js +4 -1
  11. package/dist/components/Modals/ModalConfirm/index.js +2 -2
  12. package/dist/components/PDFInput/index.js +2 -2
  13. package/dist/components/TabBar/index.js +3 -3
  14. package/dist/components/VideoInput/comps/EmbedLinkModal.js +1 -1
  15. package/dist/components/VideoInput/index.js +3 -3
  16. package/dist/index.d.ts +1 -3
  17. package/dist/index.js +5 -7
  18. package/dist/stories/Oolib/components/HomeCover.stories.js +1 -1
  19. package/dist/stories/Oolib/components/ModalConfirmAction.stories.js +1 -1
  20. package/dist/stories/Oolib/components/Tooltip.stories.js +0 -1
  21. package/dist/v2/components/Hints/index.js +1 -1
  22. package/dist/v2/components/TabBar/index.js +3 -3
  23. package/package.json +1 -1
  24. package/dist/components/Buttons/index.d.ts +0 -75
  25. package/dist/components/Buttons/index.js +0 -107
  26. package/dist/components/Buttons/styled.d.ts +0 -33
  27. package/dist/components/Buttons/styled.js +0 -231
  28. package/dist/stories/Oolib/components/Button.stories.d.ts +0 -197
  29. package/dist/stories/Oolib/components/Button.stories.js +0 -161
@@ -1,161 +0,0 @@
1
- "use strict";
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
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Google_Login = exports.Button_Custom = exports.Button_Ghost = exports.Button_Secondary = exports.Button_Primary = void 0;
27
- var react_1 = __importDefault(require("react"));
28
- var Buttons_1 = require("../../../components/Buttons");
29
- var Buttons_mdx_1 = __importDefault(require("./Buttons.mdx"));
30
- var icons_1 = require("../../../icons");
31
- var themes_1 = require("../../../themes");
32
- var availableIcons = __spreadArray([undefined], Object.keys(icons_1.icons).sort(), true);
33
- var availableColors = __spreadArray([undefined], Object.keys(themes_1.colors).sort(), true);
34
- exports.default = {
35
- title: "Components/Buttons",
36
- argTypes: {
37
- size: {
38
- name: "Button Size",
39
- options: ["Small", "Medium"],
40
- mapping: {
41
- Small: "S",
42
- Medium: "M",
43
- },
44
- control: { type: "inline-radio" },
45
- },
46
- icon: {
47
- name: "Icon Before",
48
- options: availableIcons,
49
- control: { type: "select" },
50
- defaultValue: "PencilSimple",
51
- },
52
- iconAfter: {
53
- name: "Icon After",
54
- options: availableIcons,
55
- control: { type: "select" },
56
- },
57
- iconSize: {
58
- name: "Icon Size",
59
- options: ["Small", "Medium"],
60
- mapping: {
61
- Small: "S",
62
- Medium: "M",
63
- },
64
- control: { type: "inline-radio" },
65
- },
66
- iconColor: {
67
- name: "Icon Color",
68
- options: availableColors,
69
- control: { type: "select" },
70
- },
71
- composition: {
72
- name: "Button Compostion",
73
- options: ["Default", "Text-only", "Icon-only"],
74
- control: { type: "select" },
75
- defaultValue: "Default",
76
- },
77
- variant: {
78
- name: "Button Type",
79
- control: { type: "select" },
80
- options: ["secondary", "primary", "ghost", "custom"],
81
- defaultValue: "secondary",
82
- },
83
- children: {
84
- name: "Text",
85
- },
86
- invert: {
87
- name: "Invert",
88
- },
89
- disabled: {
90
- name: "Disabled",
91
- },
92
- },
93
- args: {
94
- size: "Small",
95
- variant: "secondary",
96
- composition: "Default",
97
- children: "Text",
98
- icon: "PencilSimple",
99
- iconAfter: undefined,
100
- iconSize: "Small",
101
- iconColor: undefined,
102
- disabled: false,
103
- invert: false,
104
- },
105
- parameters: {
106
- docs: {
107
- page: Buttons_mdx_1.default,
108
- },
109
- },
110
- };
111
- var GenButtonStory = function (_a) {
112
- var args = _a.args, Comp = _a.Comp;
113
- console.log(args.composition);
114
- args[args["size"]] = true;
115
- args[args["state"]] = true;
116
- args.iconColor = themes_1.colors[args.iconColor];
117
- args["onClick"] = function () { return console.log("clicked"); };
118
- if (args.composition === "Text-only") {
119
- delete args.icon;
120
- delete args.iconAfter;
121
- }
122
- if (args.composition === "Icon-only") {
123
- delete args["children"];
124
- }
125
- args["theme"] = {
126
- colors: {
127
- primaryColor40: "#addbff",
128
- primaryColor100: "#33a4ff",
129
- primaryColor10: "#EBF6FF",
130
- primaryColorText: "#0071CC",
131
- },
132
- };
133
- return (react_1.default.createElement("div", { style: {
134
- backgroundColor: args.invert ? "#383838" : "",
135
- padding: "20px",
136
- } },
137
- react_1.default.createElement(Comp, __assign({}, args))));
138
- };
139
- var Button_Primary = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonPrimary })); };
140
- exports.Button_Primary = Button_Primary;
141
- exports.Button_Primary.parameters = { controls: { exclude: ["variant", "color"] } };
142
- var Button_Secondary = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonSecondary })); };
143
- exports.Button_Secondary = Button_Secondary;
144
- exports.Button_Secondary.parameters = { controls: { exclude: ["variant", "color"] } };
145
- exports.Button_Secondary.args = {
146
- active: false,
147
- };
148
- var Button_Ghost = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonGhost })); };
149
- exports.Button_Ghost = Button_Ghost;
150
- exports.Button_Ghost.args = {
151
- active: false,
152
- };
153
- exports.Button_Ghost.parameters = { controls: { exclude: ["variant"] } };
154
- var Button_Custom = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonCustom })); };
155
- exports.Button_Custom = Button_Custom;
156
- exports.Button_Custom.parameters = { controls: { exclude: ["variant", "color"] } };
157
- var Google_Login = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.GoogleLogin })); };
158
- exports.Google_Login = Google_Login;
159
- exports.Google_Login.parameters = {
160
- controls: { exclude: ["variant", "color", "iconOnly", "icon + text"] },
161
- };