@rovula/ui 0.0.46 → 0.0.47
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/dist/cjs/bundle.css +30 -28
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +1 -0
- package/dist/cjs/types/components/Table/Table.stories.d.ts +2 -0
- package/dist/components/Switch/Switch.js +15 -1
- package/dist/components/Table/Table.js +2 -2
- package/dist/esm/bundle.css +30 -28
- package/dist/esm/bundle.js +2 -2
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +1 -0
- package/dist/esm/types/components/Table/Table.stories.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/src/theme/global.css +1215 -37
- package/dist/theme/global.css +1 -0
- package/dist/theme/themes/SKL/baseline.css +12 -0
- package/dist/theme/themes/SKL/color.css +78 -0
- package/dist/theme/themes/SKL/components/action-button.css +127 -0
- package/dist/theme/themes/SKL/components/button.css +512 -0
- package/dist/theme/themes/SKL/components/dropdown-menu.css +27 -0
- package/dist/theme/themes/SKL/components/loading.css +11 -0
- package/dist/theme/themes/SKL/components/navbar.css +8 -0
- package/dist/theme/themes/SKL/components/progress-bar.css +8 -0
- package/dist/theme/themes/SKL/components/switch.css +30 -0
- package/dist/theme/themes/SKL/palette.css +145 -0
- package/dist/theme/themes/SKL/state.css +86 -0
- package/dist/theme/themes/SKL/transparent.css +68 -0
- package/dist/theme/themes/SKL/typography.css +199 -0
- package/dist/theme/themes/SKL/variables.css +28 -0
- package/dist/theme/tokens/baseline.css +2 -1
- package/dist/theme/tokens/components/switch.css +30 -0
- package/package.json +1 -1
- package/src/components/Switch/Switch.tsx +37 -9
- package/src/components/Table/Table.tsx +7 -2
- package/src/theme/global.css +1 -0
- package/src/theme/themes/SKL/baseline.css +12 -0
- package/src/theme/themes/SKL/color.css +78 -0
- package/src/theme/themes/SKL/components/action-button.css +127 -0
- package/src/theme/themes/SKL/components/button.css +512 -0
- package/src/theme/themes/SKL/components/dropdown-menu.css +27 -0
- package/src/theme/themes/SKL/components/loading.css +11 -0
- package/src/theme/themes/SKL/components/navbar.css +8 -0
- package/src/theme/themes/SKL/components/progress-bar.css +8 -0
- package/src/theme/themes/SKL/components/switch.css +30 -0
- package/src/theme/themes/SKL/palette.css +145 -0
- package/src/theme/themes/SKL/state.css +86 -0
- package/src/theme/themes/SKL/transparent.css +68 -0
- package/src/theme/themes/SKL/typography.css +199 -0
- package/src/theme/themes/SKL/variables.css +28 -0
- package/src/theme/tokens/baseline.css +2 -1
- package/src/theme/tokens/components/switch.css +30 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const Table: React.ForwardRefExoticComponent<{
|
|
3
|
+
rootClassName?: string | undefined;
|
|
3
4
|
rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
|
|
4
5
|
} & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
5
6
|
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: React.ForwardRefExoticComponent<{
|
|
5
|
+
rootClassName?: string | undefined;
|
|
5
6
|
rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
|
|
6
7
|
} & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
7
8
|
tags: string[];
|
|
@@ -9,6 +10,7 @@ declare const meta: {
|
|
|
9
10
|
layout: string;
|
|
10
11
|
};
|
|
11
12
|
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
13
|
+
rootClassName?: string | undefined;
|
|
12
14
|
rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
|
|
13
15
|
defaultChecked?: boolean | undefined;
|
|
14
16
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -14,9 +14,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
16
16
|
import { cn } from "@/utils/cn";
|
|
17
|
+
const switchBaseClasses = "group inline-flex h-3 w-[32px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors";
|
|
18
|
+
const switchStateClasses = {
|
|
19
|
+
unchecked: "data-[state=unchecked]:bg-[var(--switch-default-color)] hover:data-[state=unchecked]:bg-[var(--switch-hover-color)]",
|
|
20
|
+
checked: "data-[state=checked]:bg-[var(--switch-active-color)] hover:data-[state=checked]:bg-[var(--switch-active-hover-color)]",
|
|
21
|
+
disabled: "data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--switch-disabled-color)] data-[disabled]:pointer-events-none",
|
|
22
|
+
};
|
|
23
|
+
const thumbBaseClasses = "block size-4 rounded-full shadow-lg transition-transform";
|
|
24
|
+
const thumbStateClasses = {
|
|
25
|
+
unchecked: "data-[state=unchecked]:bg-[var(--switch-thumb-default-color)] data-[state=unchecked]:-translate-x-[2px]",
|
|
26
|
+
checked: "data-[state=checked]:bg-[var(--switch-thumb-active-color)] data-[state=checked]:translate-x-4",
|
|
27
|
+
hover: "group-hover:ring group-hover:data-[state=checked]:ring-[var(--switch-thumb-active-hover-ring)] group-hover:data-[state=unchecked]:ring-[var(--switch-thumb-hover-ring)]",
|
|
28
|
+
hoverColor: "group-hover:data-[state=checked]:bg-[var(--switch-thumb-active-hover-color)] group-hover:data-[state=unchecked]:bg-[var(--switch-thumb-hover-color)]",
|
|
29
|
+
disabled: "group-disabled:bg-[--switch-thumb-disabled-color]",
|
|
30
|
+
};
|
|
17
31
|
const Switch = React.forwardRef((_a, ref) => {
|
|
18
32
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
19
|
-
return (_jsx(SwitchPrimitives.Root, Object.assign({ className: cn(
|
|
33
|
+
return (_jsx(SwitchPrimitives.Root, Object.assign({ className: cn(switchBaseClasses, switchStateClasses.unchecked, switchStateClasses.checked, switchStateClasses.disabled, className) }, props, { ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn(thumbBaseClasses, thumbStateClasses.unchecked, thumbStateClasses.checked, thumbStateClasses.hover, thumbStateClasses.hoverColor, thumbStateClasses.disabled) }) })));
|
|
20
34
|
});
|
|
21
35
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
22
36
|
export { Switch };
|
|
@@ -13,8 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import { cn } from "@/utils/cn";
|
|
15
15
|
const Table = React.forwardRef((_a, ref) => {
|
|
16
|
-
var { className, rootRef } = _a, props = __rest(_a, ["className", "rootRef"]);
|
|
17
|
-
return (_jsx("div", { className: "relative h-full w-full overflow-auto", ref: rootRef, children: _jsx("table", Object.assign({ ref: ref, className: cn("w-full caption-bottom text-sm border-collapse", className) }, props)) }));
|
|
16
|
+
var { rootClassName, className, rootRef } = _a, props = __rest(_a, ["rootClassName", "className", "rootRef"]);
|
|
17
|
+
return (_jsx("div", { className: cn("relative h-full w-full overflow-auto", rootClassName), ref: rootRef, children: _jsx("table", Object.assign({ ref: ref, className: cn("w-full caption-bottom text-sm border-collapse", className) }, props)) }));
|
|
18
18
|
});
|
|
19
19
|
Table.displayName = "Table";
|
|
20
20
|
const TableHeader = React.forwardRef((_a, ref) => {
|
package/dist/esm/bundle.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
@import "./tokens/baseline.css";
|
|
3
3
|
@import "./themes/xspector/baseline.css";
|
|
4
|
+
@import "./themes/SKL/baseline.css";
|
|
4
5
|
|
|
5
6
|
/*
|
|
6
7
|
! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com
|
|
@@ -2201,10 +2202,6 @@ input[type=number] {
|
|
|
2201
2202
|
--tw-bg-opacity: 1;
|
|
2202
2203
|
background-color: color-mix(in srgb, var(--secondary-ramps-secondary-90) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
2203
2204
|
}
|
|
2204
|
-
.bg-secondary-active{
|
|
2205
|
-
--tw-bg-opacity: 1;
|
|
2206
|
-
background-color: color-mix(in srgb, var(--state-color-secondary-active) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
2207
|
-
}
|
|
2208
2205
|
.bg-secondary-default{
|
|
2209
2206
|
--tw-bg-opacity: 1;
|
|
2210
2207
|
background-color: color-mix(in srgb, var(--state-color-secondary-default) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
@@ -4977,9 +4974,8 @@ input[type=number] {
|
|
|
4977
4974
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
4978
4975
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
4979
4976
|
}
|
|
4980
|
-
.group:disabled .group-disabled\:bg-
|
|
4981
|
-
--
|
|
4982
|
-
background-color: color-mix(in srgb, var(--state-color-disable-solid) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
4977
|
+
.group:disabled .group-disabled\:bg-\[--switch-thumb-disabled-color\]{
|
|
4978
|
+
background-color: var(--switch-thumb-disabled-color);
|
|
4983
4979
|
}
|
|
4984
4980
|
.peer:-moz-placeholder-shown ~ .peer-placeholder-shown\:top-2{
|
|
4985
4981
|
top: 0.5rem;
|
|
@@ -5241,8 +5237,8 @@ input[type=number] {
|
|
|
5241
5237
|
.data-\[disabled\]\:\!bg-\[var\(--dropdown-menu-disabled-bg\)\][data-disabled]{
|
|
5242
5238
|
background-color: var(--dropdown-menu-disabled-bg) !important;
|
|
5243
5239
|
}
|
|
5244
|
-
.data-\[disabled\]\:bg-
|
|
5245
|
-
background-color:
|
|
5240
|
+
.data-\[disabled\]\:bg-\[var\(--switch-disabled-color\)\][data-disabled]{
|
|
5241
|
+
background-color: var(--switch-disabled-color);
|
|
5246
5242
|
}
|
|
5247
5243
|
.data-\[loading\=true\]\:bg-button-error-flat-active[data-loading=true]{
|
|
5248
5244
|
--tw-bg-opacity: 1;
|
|
@@ -5331,13 +5327,16 @@ input[type=number] {
|
|
|
5331
5327
|
.data-\[state\=\'checked\'\]\:bg-\[var\(--dropdown-menu-selected-bg\)\][data-state='checked']{
|
|
5332
5328
|
background-color: var(--dropdown-menu-selected-bg);
|
|
5333
5329
|
}
|
|
5330
|
+
.data-\[state\=checked\]\:bg-\[var\(--switch-active-color\)\][data-state=checked]{
|
|
5331
|
+
background-color: var(--switch-active-color);
|
|
5332
|
+
}
|
|
5333
|
+
.data-\[state\=checked\]\:bg-\[var\(--switch-thumb-active-color\)\][data-state=checked]{
|
|
5334
|
+
background-color: var(--switch-thumb-active-color);
|
|
5335
|
+
}
|
|
5334
5336
|
.data-\[state\=checked\]\:bg-function-active-solid[data-state=checked]{
|
|
5335
5337
|
--tw-bg-opacity: 1;
|
|
5336
5338
|
background-color: color-mix(in srgb, var(--function-active-solid) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
5337
5339
|
}
|
|
5338
|
-
.data-\[state\=checked\]\:bg-secondary-active\/\[0\.32\][data-state=checked]{
|
|
5339
|
-
background-color: color-mix(in srgb, var(--state-color-secondary-active) calc(100% * 0.32), transparent);
|
|
5340
|
-
}
|
|
5341
5340
|
.data-\[state\=open\]\:bg-primary[data-state=open]{
|
|
5342
5341
|
--tw-bg-opacity: 1;
|
|
5343
5342
|
background-color: color-mix(in srgb, var(--state-color-primary-default) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
@@ -5346,12 +5345,11 @@ input[type=number] {
|
|
|
5346
5345
|
--tw-bg-opacity: 1;
|
|
5347
5346
|
background-color: color-mix(in srgb, var(--grey-grey-20) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
5348
5347
|
}
|
|
5349
|
-
.data-\[state\=unchecked\]\:bg-
|
|
5350
|
-
--
|
|
5351
|
-
background-color: color-mix(in srgb, var(--state-color-tertiary-active) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
5348
|
+
.data-\[state\=unchecked\]\:bg-\[var\(--switch-default-color\)\][data-state=unchecked]{
|
|
5349
|
+
background-color: var(--switch-default-color);
|
|
5352
5350
|
}
|
|
5353
|
-
.data-\[state\=unchecked\]\:bg-
|
|
5354
|
-
background-color:
|
|
5351
|
+
.data-\[state\=unchecked\]\:bg-\[var\(--switch-thumb-default-color\)\][data-state=unchecked]{
|
|
5352
|
+
background-color: var(--switch-thumb-default-color);
|
|
5355
5353
|
}
|
|
5356
5354
|
.data-\[disabled\]\:\!fill-state-disable-solid[data-disabled]{
|
|
5357
5355
|
fill: color-mix(in srgb, var(--state-color-disable-solid) calc(100% * 1), transparent) !important;
|
|
@@ -5537,27 +5535,31 @@ input[type=number] {
|
|
|
5537
5535
|
--tw-border-opacity: 1;
|
|
5538
5536
|
border-color: color-mix(in srgb, var(--function-active-hover) calc(100% * var(--tw-border-opacity)), transparent);
|
|
5539
5537
|
}
|
|
5538
|
+
.hover\:data-\[state\=checked\]\:bg-\[var\(--switch-active-hover-color\)\][data-state=checked]:hover{
|
|
5539
|
+
background-color: var(--switch-active-hover-color);
|
|
5540
|
+
}
|
|
5540
5541
|
.hover\:data-\[state\=checked\]\:bg-function-active-hover[data-state=checked]:hover{
|
|
5541
5542
|
--tw-bg-opacity: 1;
|
|
5542
5543
|
background-color: color-mix(in srgb, var(--function-active-hover) calc(100% * var(--tw-bg-opacity)), transparent);
|
|
5543
5544
|
}
|
|
5544
|
-
.hover\:data-\[state\=
|
|
5545
|
-
background-color:
|
|
5546
|
-
}
|
|
5547
|
-
.hover\:data-\[state\=unchecked\]\:bg-tertiary-active\/\[0\.48\][data-state=unchecked]:hover{
|
|
5548
|
-
background-color: color-mix(in srgb, var(--state-color-tertiary-active) calc(100% * 0.48), transparent);
|
|
5545
|
+
.hover\:data-\[state\=unchecked\]\:bg-\[var\(--switch-hover-color\)\][data-state=unchecked]:hover{
|
|
5546
|
+
background-color: var(--switch-hover-color);
|
|
5549
5547
|
}
|
|
5550
5548
|
.hover\:data-\[state\=checked\]\:text-function-active-hover[data-state=checked]:hover{
|
|
5551
5549
|
--tw-text-opacity: 1;
|
|
5552
5550
|
color: color-mix(in srgb, var(--function-active-hover) calc(100% * var(--tw-text-opacity)), transparent);
|
|
5553
5551
|
}
|
|
5554
|
-
.group:hover .group-hover\:data-\[state\=checked\]\:
|
|
5555
|
-
--
|
|
5556
|
-
--tw-ring-color: color-mix(in srgb, var(--state-color-secondary-hover-bg) calc(100% * var(--tw-ring-opacity)), transparent);
|
|
5552
|
+
.group:hover .group-hover\:data-\[state\=checked\]\:bg-\[var\(--switch-thumb-active-hover-color\)\][data-state=checked]{
|
|
5553
|
+
background-color: var(--switch-thumb-active-hover-color);
|
|
5557
5554
|
}
|
|
5558
|
-
.group:hover .group-hover\:data-\[state\=unchecked\]\:
|
|
5559
|
-
--
|
|
5560
|
-
|
|
5555
|
+
.group:hover .group-hover\:data-\[state\=unchecked\]\:bg-\[var\(--switch-thumb-hover-color\)\][data-state=unchecked]{
|
|
5556
|
+
background-color: var(--switch-thumb-hover-color);
|
|
5557
|
+
}
|
|
5558
|
+
.group:hover .group-hover\:data-\[state\=checked\]\:ring-\[var\(--switch-thumb-active-hover-ring\)\][data-state=checked]{
|
|
5559
|
+
--tw-ring-color: var(--switch-thumb-active-hover-ring);
|
|
5560
|
+
}
|
|
5561
|
+
.group:hover .group-hover\:data-\[state\=unchecked\]\:ring-\[var\(--switch-thumb-hover-ring\)\][data-state=unchecked]{
|
|
5562
|
+
--tw-ring-color: var(--switch-thumb-hover-ring);
|
|
5561
5563
|
}
|
|
5562
5564
|
@media (min-width: 640px){
|
|
5563
5565
|
|