@itilite/lumina-ui 0.0.321 → 0.0.322

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 (130) hide show
  1. package/README.md +106 -0
  2. package/dist/{cjs/types/components/Button/types.d.ts → Button.d.mts} +10 -1
  3. package/dist/{esm/types/components/Button/types.d.ts → Button.d.ts} +10 -1
  4. package/dist/Button.js +111 -0
  5. package/dist/Button.mjs +9 -0
  6. package/dist/{esm/types/components/Checkbox/types.d.ts → Checkbox.d.mts} +10 -1
  7. package/dist/{types/components/Checkbox/types.d.ts → Checkbox.d.ts} +10 -1
  8. package/dist/Checkbox.js +121 -0
  9. package/dist/Checkbox.mjs +9 -0
  10. package/dist/chunk-FUJQIYOF.mjs +37 -0
  11. package/dist/chunk-ME35H7QC.mjs +77 -0
  12. package/dist/chunk-OMYHSSPQ.mjs +64 -0
  13. package/dist/index.d.mts +4 -0
  14. package/dist/index.d.ts +4 -0
  15. package/dist/index.js +197 -0
  16. package/dist/index.mjs +11 -0
  17. package/dist/styles.css +1162 -0
  18. package/package.json +72 -80
  19. package/babel.config.js +0 -7
  20. package/dist/cjs/index.css +0 -1
  21. package/dist/cjs/index.js +0 -23219
  22. package/dist/cjs/index.js.map +0 -1
  23. package/dist/cjs/types/components/Button/Button.d.ts +0 -4
  24. package/dist/cjs/types/components/Button/index.d.ts +0 -1
  25. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +0 -4
  26. package/dist/cjs/types/components/Checkbox/index.d.ts +0 -1
  27. package/dist/cjs/types/components/Checkbox/types.d.ts +0 -11
  28. package/dist/cjs/types/components/Modal/Modal.d.ts +0 -3
  29. package/dist/cjs/types/components/Modal/index.d.ts +0 -1
  30. package/dist/cjs/types/components/Modal/types.d.ts +0 -21
  31. package/dist/cjs/types/components/Radio/Radio.d.ts +0 -4
  32. package/dist/cjs/types/components/Radio/index.d.ts +0 -1
  33. package/dist/cjs/types/components/Radio/types.d.ts +0 -11
  34. package/dist/cjs/types/components/Switch/Switch.d.ts +0 -4
  35. package/dist/cjs/types/components/Switch/index.d.ts +0 -1
  36. package/dist/cjs/types/components/Switch/types.d.ts +0 -7
  37. package/dist/cjs/types/components/Tag/Tag.d.ts +0 -4
  38. package/dist/cjs/types/components/Tag/index.d.ts +0 -1
  39. package/dist/cjs/types/components/Tag/type.d.ts +0 -7
  40. package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +0 -3
  41. package/dist/cjs/types/components/Tooltip/index.d.ts +0 -1
  42. package/dist/cjs/types/components/Tooltip/types.d.ts +0 -8
  43. package/dist/cjs/types/components/index.d.ts +0 -7
  44. package/dist/cjs/types/index.d.ts +0 -1
  45. package/dist/esm/index.css +0 -1
  46. package/dist/esm/index.js +0 -23193
  47. package/dist/esm/index.js.map +0 -1
  48. package/dist/esm/types/components/Button/Button.d.ts +0 -4
  49. package/dist/esm/types/components/Button/index.d.ts +0 -1
  50. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -4
  51. package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
  52. package/dist/esm/types/components/Modal/Modal.d.ts +0 -3
  53. package/dist/esm/types/components/Modal/index.d.ts +0 -1
  54. package/dist/esm/types/components/Modal/types.d.ts +0 -21
  55. package/dist/esm/types/components/Radio/Radio.d.ts +0 -4
  56. package/dist/esm/types/components/Radio/index.d.ts +0 -1
  57. package/dist/esm/types/components/Radio/types.d.ts +0 -11
  58. package/dist/esm/types/components/Switch/Switch.d.ts +0 -4
  59. package/dist/esm/types/components/Switch/index.d.ts +0 -1
  60. package/dist/esm/types/components/Switch/types.d.ts +0 -7
  61. package/dist/esm/types/components/Tag/Tag.d.ts +0 -4
  62. package/dist/esm/types/components/Tag/index.d.ts +0 -1
  63. package/dist/esm/types/components/Tag/type.d.ts +0 -7
  64. package/dist/esm/types/components/Tooltip/Tooltip.d.ts +0 -3
  65. package/dist/esm/types/components/Tooltip/index.d.ts +0 -1
  66. package/dist/esm/types/components/Tooltip/types.d.ts +0 -8
  67. package/dist/esm/types/components/index.d.ts +0 -7
  68. package/dist/esm/types/index.d.ts +0 -1
  69. package/dist/types/components/Button/Button.d.ts +0 -4
  70. package/dist/types/components/Button/Button.test.d.ts +0 -1
  71. package/dist/types/components/Button/index.d.ts +0 -1
  72. package/dist/types/components/Button/types.d.ts +0 -16
  73. package/dist/types/components/Checkbox/Checkbox.d.ts +0 -4
  74. package/dist/types/components/Checkbox/index.d.ts +0 -1
  75. package/dist/types/components/Modal/Modal.d.ts +0 -3
  76. package/dist/types/components/Modal/index.d.ts +0 -1
  77. package/dist/types/components/Modal/types.d.ts +0 -21
  78. package/dist/types/components/Radio/Radio.d.ts +0 -4
  79. package/dist/types/components/Radio/index.d.ts +0 -1
  80. package/dist/types/components/Radio/types.d.ts +0 -11
  81. package/dist/types/components/Switch/Switch.d.ts +0 -4
  82. package/dist/types/components/Switch/index.d.ts +0 -1
  83. package/dist/types/components/Switch/types.d.ts +0 -7
  84. package/dist/types/components/Tag/Tag.d.ts +0 -4
  85. package/dist/types/components/Tag/index.d.ts +0 -1
  86. package/dist/types/components/Tag/type.d.ts +0 -7
  87. package/dist/types/components/Tooltip/Tooltip.d.ts +0 -3
  88. package/dist/types/components/Tooltip/index.d.ts +0 -1
  89. package/dist/types/components/Tooltip/types.d.ts +0 -8
  90. package/dist/types/components/index.d.ts +0 -7
  91. package/dist/types/index.d.ts +0 -1
  92. package/eslint.config.mjs +0 -55
  93. package/jest.config.js +0 -12
  94. package/rollup.config.mjs +0 -58
  95. package/setupTests.ts +0 -1
  96. package/src/components/Button/Button.module.scss +0 -199
  97. package/src/components/Button/Button.test.tsx +0 -90
  98. package/src/components/Button/Button.tsx +0 -91
  99. package/src/components/Button/index.ts +0 -1
  100. package/src/components/Button/types.ts +0 -16
  101. package/src/components/Checkbox/Checkbox.module.scss +0 -141
  102. package/src/components/Checkbox/Checkbox.tsx +0 -56
  103. package/src/components/Checkbox/index.ts +0 -1
  104. package/src/components/Checkbox/types.ts +0 -12
  105. package/src/components/Modal/Modal.module.scss +0 -61
  106. package/src/components/Modal/Modal.tsx +0 -103
  107. package/src/components/Modal/index.ts +0 -1
  108. package/src/components/Modal/types.ts +0 -21
  109. package/src/components/Radio/Radio.module.scss +0 -103
  110. package/src/components/Radio/Radio.tsx +0 -54
  111. package/src/components/Radio/index.ts +0 -1
  112. package/src/components/Radio/types.ts +0 -12
  113. package/src/components/Switch/Switch.module.scss +0 -17
  114. package/src/components/Switch/Switch.tsx +0 -37
  115. package/src/components/Switch/index.ts +0 -1
  116. package/src/components/Switch/types.ts +0 -12
  117. package/src/components/Tag/Tag.module.scss +0 -61
  118. package/src/components/Tag/Tag.tsx +0 -34
  119. package/src/components/Tag/index.ts +0 -1
  120. package/src/components/Tag/type.ts +0 -7
  121. package/src/components/Tooltip/Tooltip.module.scss +0 -12
  122. package/src/components/Tooltip/Tooltip.tsx +0 -29
  123. package/src/components/Tooltip/index.ts +0 -1
  124. package/src/components/Tooltip/types.ts +0 -21
  125. package/src/components/index.ts +0 -8
  126. package/src/global.d.ts +0 -6
  127. package/src/index.ts +0 -1
  128. package/src/types/jest.d.ts +0 -10
  129. package/src/types/scss.d.ts +0 -1
  130. package/tsconfig.json +0 -41
@@ -1,54 +0,0 @@
1
- import React from "react";
2
- import { Radio as AntRadio } from "antd";
3
- import clsx from "clsx";
4
- import PropTypes from "prop-types";
5
-
6
- import classes from "./Radio.module.scss";
7
- import { RadioProps } from "./types";
8
-
9
- const Radio: React.FC<RadioProps> = ({
10
- checked = true,
11
- className = "",
12
- size = "small",
13
- variant = "normal",
14
- children,
15
- onChange = () => {},
16
- disabled = false,
17
- extra = null,
18
- ...rest
19
- }) => (
20
- <>
21
- <AntRadio
22
- className={clsx(
23
- classes.radio,
24
- classes[`size_${size}`],
25
- classes[`variant_${variant}`],
26
- checked ? classes.type_checked : classes.type_unchecked,
27
- disabled && classes.disabled,
28
- className
29
- )}
30
- onChange={onChange}
31
- checked={checked}
32
- disabled={disabled}
33
- {...rest}
34
- >
35
- {children}
36
- </AntRadio>
37
- {checked && extra}
38
- </>
39
- );
40
-
41
- Radio.propTypes = {
42
- checked: PropTypes.bool,
43
- className: PropTypes.string,
44
- size: PropTypes.oneOf(["large", "small", "medium"]),
45
- variant: PropTypes.oneOf(["normal", "emphasized"]),
46
- onChange: PropTypes.func,
47
- children: PropTypes.element,
48
- disabled: PropTypes.bool,
49
- extra: PropTypes.element,
50
- };
51
-
52
- Radio.displayName = "Radio";
53
-
54
- export default Radio;
@@ -1 +0,0 @@
1
- export { default as Radio } from "./Radio";
@@ -1,12 +0,0 @@
1
- import { RadioChangeEvent } from "antd/lib/radio";
2
-
3
- export interface RadioProps {
4
- checked?: boolean;
5
- className?: string;
6
- onChange?: (event: RadioChangeEvent) => void;
7
- children?: React.ReactNode;
8
- size?: "large" | "small" | "medium";
9
- variant?: "normal" | "emphasized";
10
- disabled?: boolean;
11
- extra?: React.ReactNode;
12
- }
@@ -1,17 +0,0 @@
1
- .switch {
2
- &:global(.ant-switch.ant-switch-small) {
3
- @apply tw-h-3 tw-min-w-6;
4
- :global(.ant-switch-handle) {
5
- @apply tw-h-2 tw-w-2;
6
- }
7
- }
8
- &:global(.ant-switch) {
9
- &:global(.ant-switch-checked) {
10
- @apply tw-bg-color-action-primary;
11
-
12
- }
13
- &:global(.ant-switch-checked):hover{
14
- @apply tw-bg-color-action-primary;
15
- }
16
- }
17
- }
@@ -1,37 +0,0 @@
1
- import * as React from "react";
2
- import { Switch as AntSwitch } from "antd";
3
- import clsx from "clsx";
4
- import PropTypes from "prop-types";
5
-
6
- import classes from "./Switch.module.scss";
7
- import { SwitchProps } from "./types";
8
-
9
- const Switch: React.FC<SwitchProps> = ({
10
- className,
11
- onChange = () => {},
12
- size = "default",
13
- disabled = false,
14
- checked = false,
15
- ...rest
16
- }) => {
17
- return (
18
- <AntSwitch
19
- className={clsx(className, classes.switch, classes[size])}
20
- onChange={onChange}
21
- size={size}
22
- disabled={disabled}
23
- checked={checked}
24
- {...rest}
25
- />
26
- );
27
- };
28
-
29
- Switch.propTypes = {
30
- onChange: PropTypes.func,
31
- size: PropTypes.oneOf(["small", "default"]),
32
- disabled: PropTypes.bool,
33
- checked: PropTypes.bool,
34
- };
35
-
36
- export default Switch;
37
- Switch.displayName = "Switch";
@@ -1 +0,0 @@
1
- export { default as Switch } from "./Switch";
@@ -1,12 +0,0 @@
1
- export interface SwitchProps {
2
- size?: "default" | "small";
3
- className?: string | undefined;
4
- onChange?: (
5
- checked: boolean,
6
- event:
7
- | React.MouseEvent<HTMLButtonElement>
8
- | React.KeyboardEvent<HTMLButtonElement>
9
- ) => void;
10
- disabled?: boolean;
11
- checked?: boolean;
12
- }
@@ -1,61 +0,0 @@
1
- .tag {
2
- @apply tw-rounded;
3
- @apply tw-p-1;
4
- @apply tw-font-medium;
5
- @apply tw-text-font-size-10;
6
- @apply tw-leading-3;
7
- @apply tw-bg-white;
8
- @apply tw-h-max;
9
- @apply tw-border-solid;
10
- border-width: 0.5px;
11
- &.small {
12
- @apply tw-py-[2px] tw-px-1;
13
- @apply tw-text-font-size-10;
14
- @apply tw-leading-3;
15
- }
16
- &.success {
17
- @apply tw-text-color-green-500;
18
- @apply tw-bg-color-surface-success;
19
- @apply tw-border-color-green-200;
20
- }
21
- &.blue {
22
- @apply tw-text-color-blue-500;
23
- @apply tw-bg-color-blue-50;
24
- @apply tw-border-color-blue-200;
25
- }
26
- &.warning {
27
- @apply tw-text-color-orange-600;
28
- @apply tw-bg-color-orange-50;
29
- @apply tw-border-color-orange-200;
30
- }
31
- &.processing {
32
- @apply tw-text-color-text-weak;
33
- @apply tw-bg-color-surface-default-hover;
34
- @apply tw-border-color-gray-200;
35
- }
36
- &.bookingConfirmed {
37
- @apply tw-text-color-text-success;
38
- @apply tw-bg-color-surface-success;
39
- @apply tw-border-color-green-200;
40
- }
41
- &.bookingRescheduled {
42
- @apply tw-text-color-text-info;
43
- @apply tw-bg-color-surface-info;
44
- @apply tw-border-color-infoSubtle;
45
- }
46
- &.bookingRescheduledPending {
47
- @apply tw-text-color-text-warning;
48
- @apply tw-bg-color-surface-warning;
49
- @apply tw-border-color-warningSubtle;
50
- }
51
- &.failed {
52
- @apply tw-text-color-text-critical;
53
- @apply tw-bg-color-surface-critical;
54
- @apply tw-border-color-red-200;
55
- }
56
- &.bookingPending {
57
- @apply tw-text-color-text-weak;
58
- @apply tw-bg-color-surface-default-hover;
59
- @apply tw-border-color-text-weak;
60
- }
61
- }
@@ -1,34 +0,0 @@
1
- import * as React from "react";
2
- import { Tag as AntTag } from "antd";
3
- import clsx from "clsx";
4
-
5
- import classes from "./Tag.module.scss";
6
- import { TagProps } from "./type";
7
-
8
- const Tag: React.FC<TagProps> = (props) => {
9
- const {
10
- type = "success",
11
- className = "",
12
- title = "",
13
- icon = null,
14
- size = "",
15
- ...rest
16
- } = props;
17
- return (
18
- <AntTag
19
- className={clsx(
20
- classes.tag,
21
- size === "small" && classes.small,
22
- classes[type],
23
- className
24
- )}
25
- icon={icon}
26
- {...rest}
27
- >
28
- {title}
29
- </AntTag>
30
- );
31
- };
32
-
33
- export default Tag;
34
- Tag.displayName = "Tag";
@@ -1 +0,0 @@
1
- export { default as Tag } from "./Tag";
@@ -1,7 +0,0 @@
1
- export interface TagProps {
2
- className?: string;
3
- type?: "success" | "warning" | "blue" | "processing" | "failed" | undefined;
4
- title?: string;
5
- icon?: React.ReactNode;
6
- size?: string;
7
- }
@@ -1,12 +0,0 @@
1
- .light {
2
- :global(.ant-tooltip-content) {
3
- :global(.ant-tooltip-inner) {
4
- background-color: white !important;
5
- color: #111827;
6
- @apply tw-text-color-border-dark-subtle tw-rounded-lg tw-p-2.5;
7
- }
8
- }
9
- :global(.ant-tooltip-arrow:before) {
10
- background-color: white !important;
11
- }
12
- }
@@ -1,29 +0,0 @@
1
- import { Tooltip as AntTooltip } from "antd";
2
-
3
- import classes from "./Tooltip.module.scss";
4
- import { TooltipProps } from "./types";
5
-
6
- const Tooltip: React.FC<TooltipProps> = ({
7
- children,
8
- title = "",
9
- placement = "top",
10
- color = "#1F2937",
11
- className,
12
- mode = "dark",
13
- ...rest
14
- }) => {
15
- return (
16
- <AntTooltip
17
- className={className}
18
- color={color}
19
- title={title}
20
- placement={placement}
21
- overlayClassName={mode === "light" ? classes.light : ""}
22
- {...rest}
23
- >
24
- {children}
25
- </AntTooltip>
26
- );
27
- };
28
-
29
- export default Tooltip;
@@ -1 +0,0 @@
1
- export { default as Tooltip } from "./Tooltip";
@@ -1,21 +0,0 @@
1
- export interface TooltipProps {
2
- children?: React.ReactNode;
3
- title?: string | undefined;
4
- placement?:
5
- | "top"
6
- | "left"
7
- | "right"
8
- | "bottom"
9
- | "topLeft"
10
- | "topRight"
11
- | "bottomLeft"
12
- | "bottomRight"
13
- | "leftTop"
14
- | "leftBottom"
15
- | "rightTop"
16
- | "rightBottom"
17
- | undefined;
18
- color?: string | undefined;
19
- className?: string | undefined;
20
- mode?: "light" | "dark";
21
- }
@@ -1,8 +0,0 @@
1
- export * from "./Button";
2
- export * from "./Switch";
3
- export * from "./Modal";
4
- export * from "./Tooltip";
5
-
6
- export * from './Checkbox'
7
- export * from './Radio';
8
- export * from './Tag';
package/src/global.d.ts DELETED
@@ -1,6 +0,0 @@
1
- declare module "*.module.css";
2
- // declare module "*.module.scss";
3
- declare module "*.module.scss" {
4
- const classes: { [key: string]: string };
5
- export default classes;
6
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./components";
@@ -1,10 +0,0 @@
1
- // src/types/jest.d.ts
2
- import '@testing-library/jest-dom';
3
-
4
- declare global {
5
- namespace jest {
6
- interface Matchers<R> {
7
- toBeInTheDocument(): R;
8
- }
9
- }
10
- }
@@ -1 +0,0 @@
1
-
package/tsconfig.json DELETED
@@ -1,41 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Language and Environment */
4
- "target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
5
- "jsx": "react-jsx" /* Specify what JSX code is generated. */,
6
-
7
- /* Modules */
8
- "module": "ESNext" /* Specify what module code is generated. */,
9
- "moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */,
10
-
11
- /* JavaScript Support */
12
- "allowJs": false /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
13
- "maxNodeModuleJsDepth": 1 /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */,
14
-
15
- /* Emit */
16
- "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
17
- "emitDeclarationOnly": true /* Only output d.ts files and not JavaScript files. */,
18
- "sourceMap": true /* Create source map files for emitted JavaScript files. */,
19
- "outDir": "dist" /* Specify an output folder for all emitted files. */,
20
- "declarationDir": "dist/types" /* Specify the output directory for generated declaration files. */,
21
-
22
- /* Interop Constraints */
23
- "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
24
- "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
25
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
26
-
27
- /* Type Checking */
28
- "strict": true /* Enable all strict type-checking options. */,
29
- "noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
30
- "noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
31
- "noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
32
- "noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
33
- "noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
34
- "allowUnreachableCode": false /* Disable error reporting for unreachable code. */,
35
-
36
- /* Completeness */
37
- "skipLibCheck": true /* Skip type checking all .d.ts files. */,
38
- // "types": ["@testing-library/jest-dom", "jest"]
39
- },
40
- "include": ["src", "src/types"]
41
- }