@gobolt/genesis 0.0.7

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 (142) hide show
  1. package/README.md +86 -0
  2. package/dist/AntdIcon-Bsnbyy6g.js +200 -0
  3. package/dist/CheckOutlined-DAynWe12.js +527 -0
  4. package/dist/CloseCircleFilled-ZIY-u-27.js +13 -0
  5. package/dist/Compact-CJBo3f0u.js +185 -0
  6. package/dist/ContextIsolator-CGkdKtc3.js +20 -0
  7. package/dist/ExclamationCircleFilled-BICVVQIg.js +21 -0
  8. package/dist/Form-Cylpi4M4.js +1815 -0
  9. package/dist/Overflow-CP1M4Z0s.js +369 -0
  10. package/dist/SearchOutlined-DuzJkIiQ.js +52 -0
  11. package/dist/TextArea-3MOYYuAQ.js +1680 -0
  12. package/dist/bundle.css +1 -0
  13. package/dist/button-BNV2qdrP.js +1392 -0
  14. package/dist/compact-item-DH13cl8A.js +61 -0
  15. package/dist/components/atoms/button/Button.d.ts +12 -0
  16. package/dist/components/atoms/button/Button.js +27 -0
  17. package/dist/components/atoms/button/__stories__/Button.stories.d.ts +13 -0
  18. package/dist/components/atoms/button/index.d.ts +2 -0
  19. package/dist/components/atoms/button/index.js +4 -0
  20. package/dist/components/atoms/button/styles.d.ts +12 -0
  21. package/dist/components/atoms/button/styles.js +71 -0
  22. package/dist/components/atoms/checkbox/Checkbox.d.ts +10 -0
  23. package/dist/components/atoms/checkbox/Checkbox.js +13 -0
  24. package/dist/components/atoms/checkbox/__stories__/Checkbox.stories.d.ts +8 -0
  25. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  26. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +18 -0
  27. package/dist/components/atoms/checkbox/index.d.ts +2 -0
  28. package/dist/components/atoms/checkbox/index.js +4 -0
  29. package/dist/components/atoms/checkbox/styles.d.ts +11 -0
  30. package/dist/components/atoms/checkbox/styles.js +582 -0
  31. package/dist/components/atoms/index.d.ts +1 -0
  32. package/dist/components/atoms/index.js +3 -0
  33. package/dist/components/atoms/input/Input.d.ts +11 -0
  34. package/dist/components/atoms/input/Input.js +12 -0
  35. package/dist/components/atoms/input/__stories__/Input.stories.d.ts +10 -0
  36. package/dist/components/atoms/input/__tests__/Input.test.d.ts +1 -0
  37. package/dist/components/atoms/input/__tests__/Input.test.js +28 -0
  38. package/dist/components/atoms/input/index.d.ts +2 -0
  39. package/dist/components/atoms/input/index.js +4 -0
  40. package/dist/components/atoms/input/styles.d.ts +14 -0
  41. package/dist/components/atoms/input/styles.js +415 -0
  42. package/dist/components/atoms/select/Select.d.ts +11 -0
  43. package/dist/components/atoms/select/Select.js +24 -0
  44. package/dist/components/atoms/select/__stories__/Select.stories.d.ts +8 -0
  45. package/dist/components/atoms/select/__tests__/Select.test.d.ts +1 -0
  46. package/dist/components/atoms/select/__tests__/Select.test.js +10735 -0
  47. package/dist/components/atoms/select/index.d.ts +2 -0
  48. package/dist/components/atoms/select/index.js +4 -0
  49. package/dist/components/atoms/select/styles.d.ts +15 -0
  50. package/dist/components/atoms/select/styles.js +3868 -0
  51. package/dist/components/atoms/typography/Typography.d.ts +11 -0
  52. package/dist/components/atoms/typography/Typography.js +44 -0
  53. package/dist/components/atoms/typography/__stories__/Typography.stories.d.ts +12 -0
  54. package/dist/components/atoms/typography/__tests__/Typography.test.d.ts +1 -0
  55. package/dist/components/atoms/typography/__tests__/Typography.test.js +16 -0
  56. package/dist/components/atoms/typography/index.d.ts +2 -0
  57. package/dist/components/atoms/typography/index.js +4 -0
  58. package/dist/components/atoms/typography/styles.d.ts +11 -0
  59. package/dist/components/atoms/typography/styles.js +28 -0
  60. package/dist/components/index.d.js +1 -0
  61. package/dist/components/index.d.ts +14 -0
  62. package/dist/components/index.js +16 -0
  63. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +10 -0
  64. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +35 -0
  65. package/dist/components/molecules/error-boundary-fallback/__stories__/ErrorBoundaryFallback.stories.d.ts +8 -0
  66. package/dist/components/molecules/error-boundary-fallback/index.d.ts +1 -0
  67. package/dist/components/molecules/error-boundary-fallback/index.js +4 -0
  68. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +1 -0
  69. package/dist/components/molecules/error-boundary-fallback/styles.js +930 -0
  70. package/dist/components/molecules/form/Form.d.ts +15 -0
  71. package/dist/components/molecules/form/Form.js +7 -0
  72. package/dist/components/molecules/form/__stories__/Form.stories.d.ts +7 -0
  73. package/dist/components/molecules/form/__stories__/FormStory.d.ts +1 -0
  74. package/dist/components/molecules/form/__stories__/FormStory.js +90 -0
  75. package/dist/components/molecules/form/index.d.ts +2 -0
  76. package/dist/components/molecules/form/index.js +4 -0
  77. package/dist/constants/index.d.ts +51 -0
  78. package/dist/constants/index.js +54 -0
  79. package/dist/context-CZsFJmh6.js +2093 -0
  80. package/dist/declaration.d.js +1 -0
  81. package/dist/genesis/GenesisThemeBreakdown.d.ts +4 -0
  82. package/dist/genesis/GenesisThemeBreakdown.js +56 -0
  83. package/dist/genesis/GenesisThemeDemo.d.ts +8 -0
  84. package/dist/genesis/GenesisThemeDemo.js +8 -0
  85. package/dist/genesis/GenesisThemeDemo.stories.d.ts +7 -0
  86. package/dist/genesis/styles.d.ts +12 -0
  87. package/dist/genesis/styles.js +4038 -0
  88. package/dist/index-3MWkSVA1.js +96 -0
  89. package/dist/index-BPtFqhcp.js +19110 -0
  90. package/dist/index-BQO27mgE.js +402 -0
  91. package/dist/index-BWys7dkb.js +4462 -0
  92. package/dist/index-C7kFNqp2.js +276 -0
  93. package/dist/index-D1v_7IIx.js +1057 -0
  94. package/dist/index-SAAXFt-P.js +946 -0
  95. package/dist/index-VDH3iLaC.js +884 -0
  96. package/dist/index.d.ts +2 -0
  97. package/dist/index.js +20 -0
  98. package/dist/isVisible-CNQjrJPN.js +366 -0
  99. package/dist/magic-string.es-BkUFmFT4.js +858 -0
  100. package/dist/presetColors-Cl8UP3Nw.js +4 -0
  101. package/dist/providers/GenesisProvider.d.ts +8 -0
  102. package/dist/providers/GenesisProvider.js +7 -0
  103. package/dist/providers/ThemeProvider.d.ts +9 -0
  104. package/dist/providers/ThemeProvider.js +18 -0
  105. package/dist/providers/index.d.ts +2 -0
  106. package/dist/providers/index.js +6 -0
  107. package/dist/reactNode-sKPeiqPL.js +12 -0
  108. package/dist/setup-CMYVZCPF.js +33883 -0
  109. package/dist/styled-components.browser.esm-CZ1XM4o4.js +1144 -0
  110. package/dist/styles/design-tokens/border-tokens/BorderTokenList.d.ts +1 -0
  111. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +37 -0
  112. package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +6 -0
  113. package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +7 -0
  114. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +3 -0
  115. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +36 -0
  116. package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +7 -0
  117. package/dist/styles/design-tokens/typography/TypographyTokens.stories.d.ts +7 -0
  118. package/dist/styles/design-tokens/variables.d.ts +704 -0
  119. package/dist/styles/design-tokens/variables.js +697 -0
  120. package/dist/styles/global-styles.d.ts +1 -0
  121. package/dist/styles/global-styles.js +35 -0
  122. package/dist/styles/theme/genesis-theme.d.ts +75 -0
  123. package/dist/styles/theme/genesis-theme.js +896 -0
  124. package/dist/styles/theme/genesis-theme.types.d.ts +162 -0
  125. package/dist/styles/theme/genesis-theme.types.js +4 -0
  126. package/dist/styles/theme/global-styles.d.ts +1 -0
  127. package/dist/styles/theme/global-styles.js +35 -0
  128. package/dist/styles/theme/index.d.ts +1 -0
  129. package/dist/styles/theme/index.js +9 -0
  130. package/dist/test/setup.d.ts +5 -0
  131. package/dist/test/setup.js +7 -0
  132. package/dist/useVariants-CEpw6Ww6.js +29 -0
  133. package/dist/utils/getAppointmentColor.d.ts +4 -0
  134. package/dist/utils/getAppointmentColor.js +91 -0
  135. package/dist/utils/isAllEnglishString.d.ts +1 -0
  136. package/dist/utils/isAllEnglishString.js +8 -0
  137. package/dist/utils/isAllEnglishString.test.d.ts +1 -0
  138. package/dist/utils/isAllEnglishString.test.js +8 -0
  139. package/dist/utils/parseAddress.d.ts +3 -0
  140. package/dist/utils/parseAddress.js +19 -0
  141. package/dist/vite-env.d.js +1 -0
  142. package/package.json +115 -0
@@ -0,0 +1,61 @@
1
+ function m(e, t, i) {
2
+ const {
3
+ focusElCls: n,
4
+ focus: o,
5
+ borderElCls: c
6
+ } = i, s = c ? "> *" : "", r = ["hover", o ? "focus" : null, "active"].filter(Boolean).map((a) => `&:${a} ${s}`).join(",");
7
+ return {
8
+ [`&-item:not(${t}-last-item)`]: {
9
+ marginInlineEnd: e.calc(e.lineWidth).mul(-1).equal()
10
+ },
11
+ "&-item": Object.assign(Object.assign({
12
+ [r]: {
13
+ zIndex: 2
14
+ }
15
+ }, n ? {
16
+ [`&${n}`]: {
17
+ zIndex: 2
18
+ }
19
+ } : {}), {
20
+ [`&[disabled] ${s}`]: {
21
+ zIndex: 0
22
+ }
23
+ })
24
+ };
25
+ }
26
+ function d(e, t, i) {
27
+ const {
28
+ borderElCls: n
29
+ } = i, o = n ? `> ${n}` : "";
30
+ return {
31
+ [`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]: {
32
+ borderRadius: 0
33
+ },
34
+ [`&-item:not(${t}-last-item)${t}-first-item`]: {
35
+ [`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]: {
36
+ borderStartEndRadius: 0,
37
+ borderEndEndRadius: 0
38
+ }
39
+ },
40
+ [`&-item:not(${t}-first-item)${t}-last-item`]: {
41
+ [`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]: {
42
+ borderStartStartRadius: 0,
43
+ borderEndStartRadius: 0
44
+ }
45
+ }
46
+ };
47
+ }
48
+ function u(e) {
49
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
50
+ focus: !0
51
+ };
52
+ const {
53
+ componentCls: i
54
+ } = e, n = `${i}-compact`;
55
+ return {
56
+ [n]: Object.assign(Object.assign({}, m(e, n, t)), d(i, n, t))
57
+ };
58
+ }
59
+ export {
60
+ u as g
61
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps as AntButtonProps } from 'antd/es/button';
3
+
4
+ export interface ButtonProps extends AntButtonProps {
5
+ onClick: () => void;
6
+ children?: React.ReactNode;
7
+ type?: "primary" | "secondary" | "tertiary";
8
+ state?: keyof typeof STATE;
9
+ isIconButton?: boolean;
10
+ }
11
+ declare const Button: React.FC<Props>;
12
+ export default Button;
@@ -0,0 +1,27 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { Button as m } from "./styles.js";
3
+ import { useBreakpoint as p } from "../../../providers/ThemeProvider.js";
4
+ const f = ({
5
+ children: o,
6
+ onClick: r,
7
+ type: i = "primary",
8
+ state: t = "active",
9
+ ...a
10
+ }) => {
11
+ const e = p();
12
+ return /* @__PURE__ */ n(
13
+ m,
14
+ {
15
+ onClick: r,
16
+ type: i,
17
+ state: t,
18
+ breakpoint: e,
19
+ disabled: t === "disabled",
20
+ ...a,
21
+ children: o
22
+ }
23
+ );
24
+ };
25
+ export {
26
+ f as default
27
+ };
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Button } from '../Button';
3
+
4
+ declare const meta: Meta<typeof Button>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Button>;
7
+ export declare const Focussed: Story;
8
+ export declare const Primary: Story;
9
+ export declare const Secondary: Story;
10
+ export declare const Tertiary: Story;
11
+ export declare const LeftIcon: Story;
12
+ export declare const RightIcon: Story;
13
+ export declare const Icon: Story;
@@ -0,0 +1,2 @@
1
+ export { default } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./Button.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,12 @@
1
+ import { ButtonProps as AntButtonProps } from 'antd/es/button';
2
+ import { GenesisTheme } from '@styles/theme/genesis-theme.types';
3
+ import { ButtonType } from './Button';
4
+
5
+ interface StyledButtonProps extends AntButtonProps {
6
+ theme?: GenesisTheme;
7
+ type?: ButtonType;
8
+ state?: "active" | "hover" | "pressed" | "focus" | "disabled";
9
+ children?: React.ReactNode;
10
+ }
11
+ export declare const Button: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components/dist/types').BaseObject, never>> & string & Omit<StyledButtonProps, keyof import('react').Component<any, {}, any>>;
12
+ export {};
@@ -0,0 +1,71 @@
1
+ import { d as t } from "../../../styled-components.browser.esm-CZ1XM4o4.js";
2
+ import { B as g } from "../../../button-BNV2qdrP.js";
3
+ const l = ({ colors: o, sizing: d, typography: i, borderRadius: n, components: a }, r, e, b) => `
4
+ &.ant-btn {
5
+
6
+ color: ${o[r][e].color};
7
+ font-size: ${d.Size4}px;
8
+ line-height: ${d.Size6}px;
9
+ letter-spacing: 0;
10
+ font-weight: 400;
11
+ border-width: 1px;
12
+
13
+ min-width: ${b ? "auto" : "40px"};
14
+ height: 40px;
15
+
16
+ background-color: ${o[r][e].backgroundColor};
17
+ padding-top: ${a.button.padding.verPadding}px;
18
+ padding-bottom: ${a.button.padding.verPadding}px;
19
+ padding-left: ${a.button.padding.horPadding}px;
20
+ padding-right: ${a.button.padding.horPadding}px;
21
+
22
+ border-radius: ${n.BorderRadiusMd}px;
23
+ gap: ${a.button.gap}px;
24
+
25
+ border-width: 1px;
26
+ border-style: solid;
27
+ border-color: ${o[r][e].borderColor};
28
+
29
+ transition: all 0.2s ease-in-out;
30
+
31
+ &:hover {
32
+ color: ${o[r].hover.color};
33
+ background-color: ${o[r].hover.backgroundColor};
34
+ border-color: ${o[r].hover.borderColor};
35
+ }
36
+
37
+ &:active {
38
+ color: ${o[r].pressed.color};
39
+ background-color: ${o[r].pressed.backgroundColor};
40
+ border-color: ${o[r].pressed.borderColor};
41
+ }
42
+
43
+ &:focus-visible {
44
+ outline: none;
45
+ color: ${o[r].focussed.color};
46
+ background-color: ${o[r].focussed.backgroundColor};
47
+ box-shadow: 0 0 0 1px #fff, 0 0 0 4px ${o[r].focussed.ringColor};
48
+ border-radius: ${n.BorderRadiusMd}px;
49
+ border-color: ${o[r].focussed.borderColor};
50
+ transition: box-shadow 0.2s ease-in-out;
51
+ }
52
+
53
+ &:disabled {
54
+ color: ${o[r].disabled.color};
55
+ background-color: ${o[r].disabled.backgroundColor};
56
+ border-color: ${o[r].disabled.borderColor};
57
+ cursor: not-allowed;
58
+ }
59
+ }
60
+ `, u = (o, d, i, n) => `
61
+ &.ant-btn {
62
+ font-family: 'Inter', sans-serif;
63
+
64
+ ${l(o, d, i, n)}
65
+ }
66
+ `, c = t(g)`
67
+ ${({ theme: o, type: d, state: i, children: n }) => u(o, d, i, n)}
68
+ `;
69
+ export {
70
+ c as Button
71
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { CheckboxProps as AntCheckboxProps } from 'antd';
3
+ import { TYPE, STATE } from '../../../constants';
4
+
5
+ export type GenesisCheckboxType = keyof typeof TYPE;
6
+ export interface CheckboxProps extends AntCheckboxProps {
7
+ state?: keyof typeof STATE;
8
+ }
9
+ declare const Checkbox: React.FC<CheckboxProps>;
10
+ export default Checkbox;
@@ -0,0 +1,13 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { StyledCheckbox as t } from "./styles.js";
3
+ import { useBreakpoint as d } from "../../../providers/ThemeProvider.js";
4
+ const s = ({ state: o = "active", ...e }) => (d(), /* @__PURE__ */ r(
5
+ t,
6
+ {
7
+ ...e,
8
+ disabled: o === "disabled" || e.disabled
9
+ }
10
+ ));
11
+ export {
12
+ s as default
13
+ };
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Checkbox } from '../Checkbox';
3
+
4
+ declare const meta: Meta<typeof Checkbox>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof Checkbox>;
7
+ export declare const Default: Story;
8
+ export declare const WithLabel: Story;
@@ -0,0 +1,18 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { d as a, i as o, a as t, s, g as r } from "../../../../setup-CMYVZCPF.js";
3
+ import d from "../Checkbox.js";
4
+ a("Checkbox", () => {
5
+ o("renders checkbox component", () => {
6
+ t(/* @__PURE__ */ c(d, {}));
7
+ const e = s.getByRole("checkbox");
8
+ r(e).toBeInTheDocument();
9
+ }), o("renders with default checked state", () => {
10
+ t(/* @__PURE__ */ c(d, { defaultChecked: !0 }));
11
+ const e = s.getByRole("checkbox");
12
+ r(e).toBeChecked();
13
+ }), o("renders in disabled state", () => {
14
+ t(/* @__PURE__ */ c(d, { disabled: !0 }));
15
+ const e = s.getByRole("checkbox");
16
+ r(e).toBeDisabled();
17
+ });
18
+ });
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./Checkbox.js";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,11 @@
1
+ import { CheckboxProps } from './Checkbox';
2
+
3
+ export declare const getGenesisClass: ({ colors, borderRadius }: {
4
+ colors: any;
5
+ borderRadius: any;
6
+ }, type?: string, state?: string) => string;
7
+ export declare const StyledCheckbox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd').CheckboxProps & import('react').RefAttributes<import('antd').CheckboxRef>, "ref"> & {
8
+ ref?: import('react').Ref<import('antd').CheckboxRef>;
9
+ }, CheckboxProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd').CheckboxProps & import('react').RefAttributes<import('antd').CheckboxRef>> & {
10
+ Group: <T = any>(props: import('antd/es/checkbox').CheckboxGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
11
+ }, keyof import('react').Component<any, {}, any>>;