@gobolt/genesis 0.0.11 → 0.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.
- package/README.md +6 -0
- package/dist/ClockCircleOutlined-BaXQuLIn.js +13 -0
- package/dist/{Compact-DBh6nSYB.js → Compact-Du9689ax.js} +8 -8
- package/dist/{ContextIsolator-CwuJooYf.js → ContextIsolator-BmfhJgG0.js} +2 -2
- package/dist/{DownOutlined-5-15jS0h.js → DownOutlined-Dcq69ZKM.js} +9 -9
- package/dist/{EllipsisOutlined-CJ2pgE2d.js → EllipsisOutlined-DGMph0Bj.js} +110 -110
- package/dist/{Keyframes-sPZXYuXt.js → Keyframes-C9_aCDvn.js} +1 -1
- package/dist/{Overflow-DdNKJLQh.js → Overflow-DWf4XIal.js} +31 -31
- package/dist/{Skeleton-B3vg9CbL.js → Skeleton-BVN4pcVe.js} +2 -2
- package/dist/TextArea-Bkf9hh7l.js +708 -0
- package/dist/{Typography-DqI7RslA.js → Typography-CoZ5qD-t.js} +3 -3
- package/dist/{button-B2Rgggx2.js → button-BwqpCxVM.js} +5 -5
- package/dist/components/Avatar/Avatar.js +3 -3
- package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
- package/dist/components/Avatar/styles.js +42 -42
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/__tests__/Badge.test.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
- package/dist/components/Breadcrumb/styles.js +4 -4
- package/dist/components/Button/__tests__/Button.test.js +1 -1
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/Card/__tests__/Card.test.js +1 -1
- package/dist/components/Card/styles.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
- package/dist/components/Checkbox/styles.js +1 -1
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +8 -8
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +4 -4
- package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.js +5 -0
- package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +4 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +1 -1
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +3 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/__stories__/FormStory.js +4 -4
- package/dist/components/Form/__tests__/form.test.js +2 -2
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/__tests__/Input.test.js +1 -1
- package/dist/components/Input/styles.js +1 -1
- package/dist/components/Layout/Content/ResponsiveContent.js +3 -3
- package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
- package/dist/components/Layout/__tests__/Layout.test.js +1 -1
- package/dist/components/Message/Message.js +3 -3
- package/dist/components/Message/__tests__/Message.test.js +1 -1
- package/dist/components/Notification/Notification.js +3 -3
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +1 -1
- package/dist/components/Notification/__tests__/Notification.test.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/__tests__/Popover.test.js +1 -1
- package/dist/components/Popover/styles.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Progress/Progress.util.js +3 -3
- package/dist/components/Progress/ProgressText.js +3 -3
- package/dist/components/Progress/__tests__/Progress.test.js +1 -1
- package/dist/components/Progress/styles.js +3 -3
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/RowActions/RowActions.js +3 -3
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +3 -3
- package/dist/components/Row/RowLabelValue/styles.js +1 -1
- package/dist/components/Row/__tests__/Row.test.js +1 -1
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
- package/dist/components/SegmentedControls/styles.js +27 -27
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/__tests__/Select.test.js +1 -1
- package/dist/components/Select/styles.js +1 -1
- package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
- package/dist/components/Switch/__tests__/Switch.test.js +1 -1
- package/dist/components/Switch/styles.js +15 -15
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/__mocks__/table-mocks.js +3 -3
- package/dist/components/Table/__tests__/Table.test.js +1 -1
- package/dist/components/Table/styles.js +1 -1
- package/dist/components/Tabs/__tests__/Tabs.test.js +1 -1
- package/dist/components/Tabs/styles.js +1 -1
- package/dist/components/Tile/__tests__/Tile.test.js +1 -1
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/__tests__/Toast.test.js +2 -2
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/__tests__/Typography.test.js +2 -2
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/Typography/styles.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +46 -42
- package/dist/{context-Cx7GtZpz.js → context-DIFtNa4d.js} +70 -70
- package/dist/{dropdown-zGGFIyJ_.js → dropdown-Dp_PTQ2u.js} +60 -59
- package/dist/genesis/GenesisThemeBreakdown.js +86 -44
- package/dist/genesis/labs/Lab.stories.d.ts +6 -0
- package/dist/genesis/styles.js +2 -2
- package/dist/{index-CdiHBmVe.js → index-BPVue1Yd.js} +44 -44
- package/dist/{index-CRotrkWm.js → index-BQM5OniU.js} +7 -7
- package/dist/{index-BTGF--50.js → index-B_1Ge8na.js} +20 -19
- package/dist/{index-ByspLxrB.js → index-BbTV2Cw5.js} +32 -31
- package/dist/index-BeGv28kJ.js +5173 -0
- package/dist/{index-Dyl-ddV6.js → index-BpZSuIUV.js} +16 -16
- package/dist/{index-CodMmNWv.js → index-BvOLXELm.js} +3 -3
- package/dist/{index-hoPiccJv.js → index-CLSrpQRW.js} +9 -8
- package/dist/{index-D0P16DlX.js → index-CbVOl2U6.js} +26 -24
- package/dist/{index-DWUXwgXK.js → index-D0U6r5O7.js} +265 -294
- package/dist/{index-BW_7pvTr.js → index-DEu2PVzQ.js} +4 -4
- package/dist/{index-DmZOkMjs.js → index-DNQ-jnBx.js} +1207 -1514
- package/dist/index-DOsPeIWJ.js +1000 -0
- package/dist/{index-CSPlXIlA.js → index-DRGX1Wem.js} +7 -7
- package/dist/index-DWjq9XYj.js +899 -0
- package/dist/index.js +53 -49
- package/dist/motion-CUN72xsH.js +33 -0
- package/dist/providers/GenesisProvider.js +1 -1
- package/dist/providers/ToastProvider.js +3 -3
- package/dist/providers/index.js +1 -1
- package/dist/providers/useGenesis.js +1 -1
- package/dist/{responsiveObserver-O1kw80RG.js → responsiveObserver-dCkpy7Cb.js} +1 -1
- package/dist/roundedArrow-DI_Q-xdU.js +65 -0
- package/dist/{setup-CKu7-AfI.js → setup-CUbCc8fQ.js} +2 -2
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +7 -7
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +3 -3
- package/dist/styles/theme/genesis-theme.js +211 -349
- package/dist/styles/theme/theme-tree/ThemeTree.js +114 -113
- package/dist/{styles-BSD221S5.js → styles-CWdUpZom.js} +12 -12
- package/dist/{styles-BDbHpHsc.js → styles-D1vKDy9V.js} +9 -9
- package/dist/{styles-D9iYILpv.js → styles-qerRs7Rn.js} +493 -492
- package/dist/test/setup.js +2 -2
- package/dist/{toArray-DGvPoJP_.js → toArray-U3Az44CO.js} +1 -1
- package/dist/{useBreakpoint-CAMzKscx.js → useBreakpoint-TkMv121M.js} +2 -2
- package/dist/{useCSSVarCls-C-MlZC6a.js → useCSSVarCls-Dau77fzS.js} +1 -1
- package/dist/useIcons-Ck4JP1m9.js +321 -0
- package/dist/{useLocale-DWRfeMSS.js → useLocale-CTfNpakL.js} +1 -1
- package/dist/{useMergedState-BoELfaU9.js → useMergedState-D6toxSxh.js} +1 -1
- package/dist/{useSize-CPo2bUE3.js → useSize-DSq4r6zy.js} +1 -1
- package/dist/{useVariants-Cin23jEC.js → useVariants-DrLzUVLU.js} +2 -2
- package/dist/{useZIndex-D81lkWy4.js → useZIndex-DhyHuZTN.js} +1 -1
- package/dist/utils/icon-util.js +38 -44
- package/package.json +2 -1
- package/dist/TextArea-CKWbFr0u.js +0 -1698
- package/dist/index-CqqwGTME.js +0 -956
package/dist/test/setup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { j as i, q as B, c as u, k as o, t as n, a as T, u as d, x as g, y as A, z as x, A as f, B as q, C as p, D as m, E as c, F as b, G as R, H as h, I as D, J as E, K as Q, L as I, f as w, M as F, N as L, O as P, P as V, Q as k, R as S, S as v, T as M, U as z, V as H, W as N, X as O, Y as W, Z as j, _ as C, $ as G, m as J, a0 as K, a1 as U, a2 as X, a3 as Y, a4 as Z, a5 as _, a6 as $, a7 as ee, a8 as ae, a9 as le, aa as se, ab as te, ac as ye, ad as re, o as ie, ae as Be, af as ue, ag as oe, ah as ne, ai as Te, aj as de, ak as ge, al as Ae, am as xe, an as fe, ao as qe, ap as pe, aq as me, ar as ce, as as be, at as Re, au as he, av as De, aw as Ee, ax as Qe, r as Ie, n as we, s as Fe, w as Le, ay as Pe, a4 as Ve, az as ke, aA as Se } from "../setup-
|
|
2
|
+
import { j as i, q as B, c as u, k as o, t as n, a as T, u as d, x as g, y as A, z as x, A as f, B as q, C as p, D as m, E as c, F as b, G as R, H as h, I as D, J as E, K as Q, L as I, f as w, M as F, N as L, O as P, P as V, Q as k, R as S, S as v, T as M, U as z, V as H, W as N, X as O, Y as W, Z as j, _ as C, $ as G, m as J, a0 as K, a1 as U, a2 as X, a3 as Y, a4 as Z, a5 as _, a6 as $, a7 as ee, a8 as ae, a9 as le, aa as se, ab as te, ac as ye, ad as re, o as ie, ae as Be, af as ue, ag as oe, ah as ne, ai as Te, aj as de, ak as ge, al as Ae, am as xe, an as fe, ao as qe, ap as pe, aq as me, ar as ce, as as be, at as Re, au as he, av as De, aw as Ee, ax as Qe, r as Ie, n as we, s as Fe, w as Le, ay as Pe, a4 as Ve, az as ke, aA as Se } from "../setup-CUbCc8fQ.js";
|
|
3
3
|
import "../providers/GenesisProvider.js";
|
|
4
4
|
import "../providers/BreakpointThemeProvider.js";
|
|
5
|
-
import "../Typography-
|
|
5
|
+
import "../Typography-CoZ5qD-t.js";
|
|
6
6
|
import "../setup.types-dBtAXXGp.js";
|
|
7
7
|
export {
|
|
8
8
|
i as act,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
2
|
import { useRef as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as f } from "./responsiveObserver-
|
|
3
|
+
import { h as a } from "./index-BbTV2Cw5.js";
|
|
4
|
+
import { u as f } from "./responsiveObserver-dCkpy7Cb.js";
|
|
5
5
|
function i() {
|
|
6
6
|
const [, r] = o.useReducer((e) => e + 1, 0);
|
|
7
7
|
return r;
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { m as $, r as E, f as c, g as y } from "./index-BbTV2Cw5.js";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import "./presets-Djh_L_6R.js";
|
|
4
|
+
import "./index-DLdU7Tpd.js";
|
|
5
|
+
import { R as C } from "./CheckOutlined-cEBrx_Ag.js";
|
|
6
|
+
import { R as z } from "./CloseCircleFilled-B9e7yFwo.js";
|
|
7
|
+
import { R as N } from "./CloseOutlined-ogxnm7Oy.js";
|
|
8
|
+
import { R as M } from "./DownOutlined-Dcq69ZKM.js";
|
|
9
|
+
import { R as P } from "./LoadingOutlined-C1qu6ymP.js";
|
|
10
|
+
import { R as D } from "./SearchOutlined-DNj-7b_h.js";
|
|
11
|
+
const q = (e) => {
|
|
12
|
+
const {
|
|
13
|
+
multipleSelectItemHeight: l,
|
|
14
|
+
paddingXXS: i,
|
|
15
|
+
lineWidth: t,
|
|
16
|
+
INTERNAL_FIXED_ITEM_MARGIN: n
|
|
17
|
+
} = e, r = e.max(e.calc(i).sub(t).equal(), 0), s = e.max(e.calc(r).sub(n).equal(), 0);
|
|
18
|
+
return {
|
|
19
|
+
basePadding: r,
|
|
20
|
+
containerPadding: s,
|
|
21
|
+
itemHeight: c(l),
|
|
22
|
+
itemLineHeight: c(e.calc(l).sub(e.calc(e.lineWidth).mul(2)).equal())
|
|
23
|
+
};
|
|
24
|
+
}, W = (e) => {
|
|
25
|
+
const {
|
|
26
|
+
multipleSelectItemHeight: l,
|
|
27
|
+
selectHeight: i,
|
|
28
|
+
lineWidth: t
|
|
29
|
+
} = e;
|
|
30
|
+
return e.calc(i).sub(l).div(2).sub(t).equal();
|
|
31
|
+
}, B = (e) => {
|
|
32
|
+
const {
|
|
33
|
+
componentCls: l,
|
|
34
|
+
iconCls: i,
|
|
35
|
+
borderRadiusSM: t,
|
|
36
|
+
motionDurationSlow: n,
|
|
37
|
+
paddingXS: r,
|
|
38
|
+
multipleItemColorDisabled: s,
|
|
39
|
+
multipleItemBorderColorDisabled: d,
|
|
40
|
+
colorIcon: o,
|
|
41
|
+
colorIconHover: I,
|
|
42
|
+
INTERNAL_FIXED_ITEM_MARGIN: u
|
|
43
|
+
} = e;
|
|
44
|
+
return {
|
|
45
|
+
/**
|
|
46
|
+
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
|
|
47
|
+
* may update to redesign with its align logic.
|
|
48
|
+
*/
|
|
49
|
+
// =========================== Overflow ===========================
|
|
50
|
+
[`${l}-selection-overflow`]: {
|
|
51
|
+
position: "relative",
|
|
52
|
+
display: "flex",
|
|
53
|
+
flex: "auto",
|
|
54
|
+
flexWrap: "wrap",
|
|
55
|
+
maxWidth: "100%",
|
|
56
|
+
"&-item": {
|
|
57
|
+
flex: "none",
|
|
58
|
+
alignSelf: "center",
|
|
59
|
+
maxWidth: "100%",
|
|
60
|
+
display: "inline-flex"
|
|
61
|
+
},
|
|
62
|
+
// ======================== Selections ==========================
|
|
63
|
+
[`${l}-selection-item`]: {
|
|
64
|
+
display: "flex",
|
|
65
|
+
alignSelf: "center",
|
|
66
|
+
flex: "none",
|
|
67
|
+
boxSizing: "border-box",
|
|
68
|
+
maxWidth: "100%",
|
|
69
|
+
marginBlock: u,
|
|
70
|
+
borderRadius: t,
|
|
71
|
+
cursor: "default",
|
|
72
|
+
transition: `font-size ${n}, line-height ${n}, height ${n}`,
|
|
73
|
+
marginInlineEnd: e.calc(u).mul(2).equal(),
|
|
74
|
+
paddingInlineStart: r,
|
|
75
|
+
paddingInlineEnd: e.calc(r).div(2).equal(),
|
|
76
|
+
[`${l}-disabled&`]: {
|
|
77
|
+
color: s,
|
|
78
|
+
borderColor: d,
|
|
79
|
+
cursor: "not-allowed"
|
|
80
|
+
},
|
|
81
|
+
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
|
|
82
|
+
"&-content": {
|
|
83
|
+
display: "inline-block",
|
|
84
|
+
marginInlineEnd: e.calc(r).div(2).equal(),
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
whiteSpace: "pre",
|
|
87
|
+
// fix whitespace wrapping. custom tags display all whitespace within.
|
|
88
|
+
textOverflow: "ellipsis"
|
|
89
|
+
},
|
|
90
|
+
"&-remove": Object.assign(Object.assign({}, E()), {
|
|
91
|
+
display: "inline-flex",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
color: o,
|
|
94
|
+
fontWeight: "bold",
|
|
95
|
+
fontSize: 10,
|
|
96
|
+
lineHeight: "inherit",
|
|
97
|
+
cursor: "pointer",
|
|
98
|
+
[`> ${i}`]: {
|
|
99
|
+
verticalAlign: "-0.2em"
|
|
100
|
+
},
|
|
101
|
+
"&:hover": {
|
|
102
|
+
color: I
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}, O = (e, l) => {
|
|
109
|
+
const {
|
|
110
|
+
componentCls: i,
|
|
111
|
+
INTERNAL_FIXED_ITEM_MARGIN: t
|
|
112
|
+
} = e, n = `${i}-selection-overflow`, r = e.multipleSelectItemHeight, s = W(e), d = l ? `${i}-${l}` : "", o = q(e);
|
|
113
|
+
return {
|
|
114
|
+
[`${i}-multiple${d}`]: Object.assign(Object.assign({}, B(e)), {
|
|
115
|
+
// ========================= Selector =========================
|
|
116
|
+
[`${i}-selector`]: {
|
|
117
|
+
display: "flex",
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
width: "100%",
|
|
120
|
+
height: "100%",
|
|
121
|
+
// Multiple is little different that horizontal is follow the vertical
|
|
122
|
+
paddingInline: o.basePadding,
|
|
123
|
+
paddingBlock: o.containerPadding,
|
|
124
|
+
borderRadius: e.borderRadius,
|
|
125
|
+
[`${i}-disabled&`]: {
|
|
126
|
+
background: e.multipleSelectorBgDisabled,
|
|
127
|
+
cursor: "not-allowed"
|
|
128
|
+
},
|
|
129
|
+
"&:after": {
|
|
130
|
+
display: "inline-block",
|
|
131
|
+
width: 0,
|
|
132
|
+
margin: `${c(t)} 0`,
|
|
133
|
+
lineHeight: c(r),
|
|
134
|
+
visibility: "hidden",
|
|
135
|
+
content: '"\\a0"'
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
// ======================== Selections ========================
|
|
139
|
+
[`${i}-selection-item`]: {
|
|
140
|
+
height: o.itemHeight,
|
|
141
|
+
lineHeight: c(o.itemLineHeight)
|
|
142
|
+
},
|
|
143
|
+
// ========================== Wrap ===========================
|
|
144
|
+
[`${i}-selection-wrap`]: {
|
|
145
|
+
alignSelf: "flex-start",
|
|
146
|
+
"&:after": {
|
|
147
|
+
lineHeight: c(r),
|
|
148
|
+
marginBlock: t
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
// ========================== Input ==========================
|
|
152
|
+
[`${i}-prefix`]: {
|
|
153
|
+
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(o.basePadding).equal()
|
|
154
|
+
},
|
|
155
|
+
[`${n}-item + ${n}-item,
|
|
156
|
+
${i}-prefix + ${i}-selection-wrap
|
|
157
|
+
`]: {
|
|
158
|
+
[`${i}-selection-search`]: {
|
|
159
|
+
marginInlineStart: 0
|
|
160
|
+
},
|
|
161
|
+
[`${i}-selection-placeholder`]: {
|
|
162
|
+
insetInlineStart: 0
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
// https://github.com/ant-design/ant-design/issues/44754
|
|
166
|
+
// Same as `wrap:after`
|
|
167
|
+
[`${n}-item-suffix`]: {
|
|
168
|
+
minHeight: o.itemHeight,
|
|
169
|
+
marginBlock: t
|
|
170
|
+
},
|
|
171
|
+
[`${i}-selection-search`]: {
|
|
172
|
+
display: "inline-flex",
|
|
173
|
+
position: "relative",
|
|
174
|
+
maxWidth: "100%",
|
|
175
|
+
marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(s).equal(),
|
|
176
|
+
"\n &-input,\n &-mirror\n ": {
|
|
177
|
+
height: r,
|
|
178
|
+
fontFamily: e.fontFamily,
|
|
179
|
+
lineHeight: c(r),
|
|
180
|
+
transition: `all ${e.motionDurationSlow}`
|
|
181
|
+
},
|
|
182
|
+
"&-input": {
|
|
183
|
+
width: "100%",
|
|
184
|
+
minWidth: 4.1
|
|
185
|
+
// fix search cursor missing
|
|
186
|
+
},
|
|
187
|
+
"&-mirror": {
|
|
188
|
+
position: "absolute",
|
|
189
|
+
top: 0,
|
|
190
|
+
insetInlineStart: 0,
|
|
191
|
+
insetInlineEnd: "auto",
|
|
192
|
+
zIndex: 999,
|
|
193
|
+
whiteSpace: "pre",
|
|
194
|
+
// fix whitespace wrapping caused width calculation bug
|
|
195
|
+
visibility: "hidden"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
// ======================= Placeholder =======================
|
|
199
|
+
[`${i}-selection-placeholder`]: {
|
|
200
|
+
position: "absolute",
|
|
201
|
+
top: "50%",
|
|
202
|
+
insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(o.basePadding).equal(),
|
|
203
|
+
insetInlineEnd: e.inputPaddingHorizontalBase,
|
|
204
|
+
transform: "translateY(-50%)",
|
|
205
|
+
transition: `all ${e.motionDurationSlow}`
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
function S(e, l) {
|
|
211
|
+
const {
|
|
212
|
+
componentCls: i
|
|
213
|
+
} = e, t = l ? `${i}-${l}` : "", n = {
|
|
214
|
+
[`${i}-multiple${t}`]: {
|
|
215
|
+
fontSize: e.fontSize,
|
|
216
|
+
// ========================= Selector =========================
|
|
217
|
+
[`${i}-selector`]: {
|
|
218
|
+
[`${i}-show-search&`]: {
|
|
219
|
+
cursor: "text"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
[`
|
|
223
|
+
&${i}-show-arrow ${i}-selector,
|
|
224
|
+
&${i}-allow-clear ${i}-selector
|
|
225
|
+
`]: {
|
|
226
|
+
paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
return [O(e, l), n];
|
|
231
|
+
}
|
|
232
|
+
const V = (e) => {
|
|
233
|
+
const {
|
|
234
|
+
componentCls: l
|
|
235
|
+
} = e, i = $(e, {
|
|
236
|
+
selectHeight: e.controlHeightSM,
|
|
237
|
+
multipleSelectItemHeight: e.multipleItemHeightSM,
|
|
238
|
+
borderRadius: e.borderRadiusSM,
|
|
239
|
+
borderRadiusSM: e.borderRadiusXS
|
|
240
|
+
}), t = $(e, {
|
|
241
|
+
fontSize: e.fontSizeLG,
|
|
242
|
+
selectHeight: e.controlHeightLG,
|
|
243
|
+
multipleSelectItemHeight: e.multipleItemHeightLG,
|
|
244
|
+
borderRadius: e.borderRadiusLG,
|
|
245
|
+
borderRadiusSM: e.borderRadius
|
|
246
|
+
});
|
|
247
|
+
return [
|
|
248
|
+
S(e),
|
|
249
|
+
// ======================== Small ========================
|
|
250
|
+
S(i, "sm"),
|
|
251
|
+
// Padding
|
|
252
|
+
{
|
|
253
|
+
[`${l}-multiple${l}-sm`]: {
|
|
254
|
+
[`${l}-selection-placeholder`]: {
|
|
255
|
+
insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
|
|
256
|
+
},
|
|
257
|
+
// https://github.com/ant-design/ant-design/issues/29559
|
|
258
|
+
[`${l}-selection-search`]: {
|
|
259
|
+
marginInlineStart: 2
|
|
260
|
+
// Magic Number
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
// ======================== Large ========================
|
|
265
|
+
S(t, "lg")
|
|
266
|
+
];
|
|
267
|
+
};
|
|
268
|
+
function Y(e) {
|
|
269
|
+
let {
|
|
270
|
+
suffixIcon: l,
|
|
271
|
+
clearIcon: i,
|
|
272
|
+
menuItemSelectedIcon: t,
|
|
273
|
+
removeIcon: n,
|
|
274
|
+
loading: r,
|
|
275
|
+
multiple: s,
|
|
276
|
+
hasFeedback: d,
|
|
277
|
+
prefixCls: o,
|
|
278
|
+
showSuffixIcon: I,
|
|
279
|
+
feedbackIcon: u,
|
|
280
|
+
showArrow: b,
|
|
281
|
+
componentName: x
|
|
282
|
+
} = e;
|
|
283
|
+
process.env.NODE_ENV !== "production" && y(x).deprecated(!i, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
284
|
+
const R = i ?? /* @__PURE__ */ a.createElement(z, null), g = (m) => l === null && !d && !b ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, I !== !1 && m, d && u);
|
|
285
|
+
let f = null;
|
|
286
|
+
if (l !== void 0)
|
|
287
|
+
f = g(l);
|
|
288
|
+
else if (r)
|
|
289
|
+
f = g(/* @__PURE__ */ a.createElement(P, {
|
|
290
|
+
spin: !0
|
|
291
|
+
}));
|
|
292
|
+
else {
|
|
293
|
+
const m = `${o}-suffix`;
|
|
294
|
+
f = (w) => {
|
|
295
|
+
let {
|
|
296
|
+
open: H,
|
|
297
|
+
showSearch: v
|
|
298
|
+
} = w;
|
|
299
|
+
return g(H && v ? /* @__PURE__ */ a.createElement(D, {
|
|
300
|
+
className: m
|
|
301
|
+
}) : /* @__PURE__ */ a.createElement(M, {
|
|
302
|
+
className: m
|
|
303
|
+
}));
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
let p = null;
|
|
307
|
+
t !== void 0 ? p = t : s ? p = /* @__PURE__ */ a.createElement(C, null) : p = null;
|
|
308
|
+
let h = null;
|
|
309
|
+
return n !== void 0 ? h = n : h = /* @__PURE__ */ a.createElement(N, null), {
|
|
310
|
+
clearIcon: R,
|
|
311
|
+
suffixIcon: f,
|
|
312
|
+
itemIcon: p,
|
|
313
|
+
removeIcon: h
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
export {
|
|
317
|
+
B as a,
|
|
318
|
+
q as b,
|
|
319
|
+
V as g,
|
|
320
|
+
Y as u
|
|
321
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import r from "react";
|
|
2
|
-
import { S as t } from "./index-
|
|
2
|
+
import { S as t } from "./index-BbTV2Cw5.js";
|
|
3
3
|
const u = (e) => {
|
|
4
4
|
const n = r.useContext(t);
|
|
5
5
|
return r.useMemo(() => e ? typeof e == "string" ? e ?? n : e instanceof Function ? e(n) : n : n, [e, n]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as f } from "./presets-Djh_L_6R.js";
|
|
2
2
|
import * as u from "react";
|
|
3
|
-
import { V as g } from "./context-
|
|
4
|
-
import { C as m, V } from "./index-
|
|
3
|
+
import { V as g } from "./context-DIFtNa4d.js";
|
|
4
|
+
import { C as m, V } from "./index-BbTV2Cw5.js";
|
|
5
5
|
function p(n, e, a) {
|
|
6
6
|
return f({
|
|
7
7
|
[`${n}-status-success`]: e === "success",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import d from "react";
|
|
2
|
-
import { c as I,
|
|
2
|
+
import { c as I, g as N } from "./index-BbTV2Cw5.js";
|
|
3
3
|
const a = /* @__PURE__ */ d.createContext(void 0);
|
|
4
4
|
process.env.NODE_ENV !== "production" && (a.displayName = "zIndexContext");
|
|
5
5
|
const e = 100, x = 10, E = e * x, _ = E + e, u = {
|
package/dist/utils/icon-util.js
CHANGED
|
@@ -1,42 +1,36 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { STATE as r } from "../constants/index.js";
|
|
3
|
-
import { G as
|
|
4
|
-
import { a as
|
|
5
|
-
import { R as
|
|
3
|
+
import { G as i } from "../iconBase-LROS5hdG.js";
|
|
4
|
+
import { a as d } from "../index-BRUI9igj.js";
|
|
5
|
+
import { R as m, a as p, b as v, c as g } from "../MinusCircleOutlined-Shz0RRQV.js";
|
|
6
|
+
import { R as z } from "../ClockCircleOutlined-BaXQuLIn.js";
|
|
6
7
|
import { d as l } from "../presets-Djh_L_6R.js";
|
|
7
8
|
import * as n from "react";
|
|
8
|
-
import { I as
|
|
9
|
-
import { R as
|
|
10
|
-
import { R as
|
|
11
|
-
var
|
|
12
|
-
return /* @__PURE__ */ n.createElement(
|
|
9
|
+
import { I as o } from "../AntdIcon-nCNB0J1E.js";
|
|
10
|
+
import { R as C } from "../CloseCircleFilled-B9e7yFwo.js";
|
|
11
|
+
import { R as S } from "../ExclamationCircleFilled-BHELVsTg.js";
|
|
12
|
+
var h = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z" } }] }, name: "clock-circle", theme: "filled" }, R = function(e, a) {
|
|
13
|
+
return /* @__PURE__ */ n.createElement(o, l({}, e, {
|
|
13
14
|
ref: a,
|
|
14
|
-
icon:
|
|
15
|
+
icon: h
|
|
15
16
|
}));
|
|
16
17
|
}, f = /* @__PURE__ */ n.forwardRef(R);
|
|
17
|
-
process.env.NODE_ENV !== "production" && (f.displayName = "
|
|
18
|
-
var
|
|
19
|
-
return /* @__PURE__ */ n.createElement(
|
|
20
|
-
ref: a,
|
|
21
|
-
icon: w
|
|
22
|
-
}));
|
|
23
|
-
}, u = /* @__PURE__ */ n.forwardRef(y);
|
|
24
|
-
process.env.NODE_ENV !== "production" && (u.displayName = "ClockCircleFilled");
|
|
25
|
-
var I = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z" } }] }, name: "minus-circle", theme: "filled" }, k = function(e, a) {
|
|
26
|
-
return /* @__PURE__ */ n.createElement(i, l({}, e, {
|
|
18
|
+
process.env.NODE_ENV !== "production" && (f.displayName = "ClockCircleFilled");
|
|
19
|
+
var I = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm192 472c0 4.4-3.6 8-8 8H328c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h368c4.4 0 8 3.6 8 8v48z" } }] }, name: "minus-circle", theme: "filled" }, y = function(e, a) {
|
|
20
|
+
return /* @__PURE__ */ n.createElement(o, l({}, e, {
|
|
27
21
|
ref: a,
|
|
28
22
|
icon: I
|
|
29
23
|
}));
|
|
30
|
-
},
|
|
31
|
-
process.env.NODE_ENV !== "production" && (
|
|
32
|
-
function
|
|
33
|
-
return
|
|
24
|
+
}, u = /* @__PURE__ */ n.forwardRef(y);
|
|
25
|
+
process.env.NODE_ENV !== "production" && (u.displayName = "MinusCircleFilled");
|
|
26
|
+
function w(c) {
|
|
27
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" }, child: [] }] })(c);
|
|
34
28
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
29
|
+
function F(c) {
|
|
30
|
+
return i({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z" }, child: [] }] })(c);
|
|
37
31
|
}
|
|
38
|
-
const
|
|
39
|
-
switch (
|
|
32
|
+
const s = 14, T = (c, e) => {
|
|
33
|
+
switch (c) {
|
|
40
34
|
case r.error:
|
|
41
35
|
return e.colors.status.error.onsurface;
|
|
42
36
|
case r.success:
|
|
@@ -51,45 +45,45 @@ const c = 14, _ = (s, e) => {
|
|
|
51
45
|
default:
|
|
52
46
|
return e.colors.status.info.onsurface;
|
|
53
47
|
}
|
|
54
|
-
},
|
|
48
|
+
}, V = (c, e, a = !0) => {
|
|
55
49
|
if (!a)
|
|
56
|
-
switch (
|
|
50
|
+
switch (c) {
|
|
57
51
|
case r.warning:
|
|
58
52
|
return /* @__PURE__ */ t(
|
|
59
53
|
g,
|
|
60
54
|
{
|
|
61
|
-
style: { color: e, fontSize:
|
|
55
|
+
style: { color: e, fontSize: s }
|
|
62
56
|
}
|
|
63
57
|
);
|
|
64
58
|
case r.error:
|
|
65
|
-
return /* @__PURE__ */ t(
|
|
59
|
+
return /* @__PURE__ */ t(v, { style: { color: e, fontSize: s } });
|
|
66
60
|
case r.success:
|
|
67
|
-
return /* @__PURE__ */ t(
|
|
61
|
+
return /* @__PURE__ */ t(d, { style: { color: e, fontSize: s } });
|
|
68
62
|
case r.progress:
|
|
69
|
-
return /* @__PURE__ */ t(
|
|
63
|
+
return /* @__PURE__ */ t(z, { style: { color: e, fontSize: s } });
|
|
70
64
|
case r.removed:
|
|
71
|
-
return /* @__PURE__ */ t(
|
|
65
|
+
return /* @__PURE__ */ t(p, { style: { color: e, fontSize: s } });
|
|
72
66
|
case r.info:
|
|
73
67
|
default:
|
|
74
|
-
return /* @__PURE__ */ t(
|
|
68
|
+
return /* @__PURE__ */ t(m, { style: { color: e, fontSize: s } });
|
|
75
69
|
}
|
|
76
|
-
switch (
|
|
70
|
+
switch (c) {
|
|
77
71
|
case r.warning:
|
|
78
|
-
return /* @__PURE__ */ t(
|
|
72
|
+
return /* @__PURE__ */ t(S, { style: { color: e, fontSize: s } });
|
|
79
73
|
case r.error:
|
|
80
|
-
return /* @__PURE__ */ t(
|
|
74
|
+
return /* @__PURE__ */ t(C, { style: { color: e, fontSize: s } });
|
|
81
75
|
case r.success:
|
|
82
|
-
return /* @__PURE__ */ t(
|
|
76
|
+
return /* @__PURE__ */ t(w, { style: { color: e, fontSize: s } });
|
|
83
77
|
case r.progress:
|
|
84
|
-
return /* @__PURE__ */ t(
|
|
78
|
+
return /* @__PURE__ */ t(f, { style: { color: e, fontSize: s } });
|
|
85
79
|
case r.removed:
|
|
86
|
-
return /* @__PURE__ */ t(
|
|
80
|
+
return /* @__PURE__ */ t(u, { style: { color: e, fontSize: s } });
|
|
87
81
|
case r.info:
|
|
88
82
|
default:
|
|
89
|
-
return /* @__PURE__ */ t(
|
|
83
|
+
return /* @__PURE__ */ t(F, { style: { color: e, fontSize: s + 8 } });
|
|
90
84
|
}
|
|
91
85
|
};
|
|
92
86
|
export {
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
V as getBadgeStateIcon,
|
|
88
|
+
T as getIconColor
|
|
95
89
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobolt/genesis",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "genesis design system",
|
|
5
5
|
"author": "gobolt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"antd": "^5.23.1",
|
|
99
99
|
"clsx": "^1.2.1",
|
|
100
100
|
"date-fns": "^3.6.0",
|
|
101
|
+
"dayjs": "^1.11.13",
|
|
101
102
|
"msw": "^2.7.1",
|
|
102
103
|
"msw-storybook-addon": "^2.0.4",
|
|
103
104
|
"react-error-boundary": "^4.0.11",
|