@techsio/ui-kit 0.41.2 → 0.42.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 (40) hide show
  1. package/dist/internal/molecules/drawer.context.js +133 -0
  2. package/dist/internal/molecules/drawer.styles.js +107 -0
  3. package/dist/internal/organisms/sidebar.context.js +223 -0
  4. package/dist/internal/organisms/sidebar.focus.js +169 -0
  5. package/dist/internal/organisms/sidebar.styles.js +146 -0
  6. package/dist/molecules/drawer.js +262 -0
  7. package/dist/organisms/sidebar.js +448 -0
  8. package/dist/src/internal/molecules/drawer.context.d.ts +53 -0
  9. package/dist/src/internal/molecules/drawer.context.d.ts.map +1 -0
  10. package/dist/src/internal/molecules/drawer.styles.d.ts +115 -0
  11. package/dist/src/internal/molecules/drawer.styles.d.ts.map +1 -0
  12. package/dist/src/internal/organisms/sidebar.context.d.ts +83 -0
  13. package/dist/src/internal/organisms/sidebar.context.d.ts.map +1 -0
  14. package/dist/src/internal/organisms/sidebar.focus.d.ts +16 -0
  15. package/dist/src/internal/organisms/sidebar.focus.d.ts.map +1 -0
  16. package/dist/src/internal/organisms/sidebar.styles.d.ts +149 -0
  17. package/dist/src/internal/organisms/sidebar.styles.d.ts.map +1 -0
  18. package/dist/src/molecules/drawer.d.ts +112 -0
  19. package/dist/src/molecules/drawer.d.ts.map +1 -0
  20. package/dist/src/molecules/switch.d.ts +3 -3
  21. package/dist/src/molecules/toast.d.ts +6 -6
  22. package/dist/src/organisms/sidebar.d.ts +93 -0
  23. package/dist/src/organisms/sidebar.d.ts.map +1 -0
  24. package/dist/src/types/zag.d.ts +1 -0
  25. package/dist/src/types/zag.d.ts.map +1 -1
  26. package/dist/stories/changelog/changelog.stories.d.ts.map +1 -1
  27. package/dist/stories/molecules/drawer.stories.d.ts +158 -0
  28. package/dist/stories/molecules/drawer.stories.d.ts.map +1 -0
  29. package/dist/stories/organisms/sidebar.stories.d.ts +66 -0
  30. package/dist/stories/organisms/sidebar.stories.d.ts.map +1 -0
  31. package/dist/test/drawer.behavior.spec.d.ts +2 -0
  32. package/dist/test/drawer.behavior.spec.d.ts.map +1 -0
  33. package/dist/test/sidebar.behavior.spec.d.ts +2 -0
  34. package/dist/test/sidebar.behavior.spec.d.ts.map +1 -0
  35. package/dist/test/sidebar.ssr.bun.d.ts +2 -0
  36. package/dist/test/sidebar.ssr.bun.d.ts.map +1 -0
  37. package/package.json +25 -22
  38. package/src/tokens/components/components.css +2 -0
  39. package/src/tokens/components/molecules/_drawer.css +369 -0
  40. package/src/tokens/components/organisms/_sidebar.css +93 -0
@@ -0,0 +1,158 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ import { type DrawerRootProps } from "../../src/molecules/drawer.js";
3
+ type DrawerStoryArgs = Omit<DrawerRootProps, "children"> & {
4
+ draggable: boolean;
5
+ triggerLabel: string;
6
+ };
7
+ declare function DrawerStory({ draggable, triggerLabel, ...rootProps }: DrawerStoryArgs): import("react/jsx-runtime").JSX.Element;
8
+ declare const meta: {
9
+ title: string;
10
+ component: typeof DrawerStory;
11
+ tags: string[];
12
+ parameters: {
13
+ layout: string;
14
+ docs: {
15
+ description: {
16
+ component: string;
17
+ };
18
+ };
19
+ };
20
+ argTypes: {
21
+ placement: {
22
+ control: "select";
23
+ options: string[];
24
+ description: string;
25
+ table: {
26
+ defaultValue: {
27
+ summary: string;
28
+ };
29
+ };
30
+ };
31
+ size: {
32
+ control: "select";
33
+ options: string[];
34
+ description: string;
35
+ table: {
36
+ defaultValue: {
37
+ summary: string;
38
+ };
39
+ };
40
+ };
41
+ modal: {
42
+ control: "boolean";
43
+ description: string;
44
+ table: {
45
+ defaultValue: {
46
+ summary: string;
47
+ };
48
+ };
49
+ };
50
+ draggable: {
51
+ control: "boolean";
52
+ description: string;
53
+ table: {
54
+ defaultValue: {
55
+ summary: string;
56
+ };
57
+ };
58
+ };
59
+ closeOnEscape: {
60
+ control: "boolean";
61
+ description: string;
62
+ table: {
63
+ defaultValue: {
64
+ summary: string;
65
+ };
66
+ };
67
+ };
68
+ closeOnInteractOutside: {
69
+ control: "boolean";
70
+ description: string;
71
+ table: {
72
+ defaultValue: {
73
+ summary: string;
74
+ };
75
+ };
76
+ };
77
+ preventScroll: {
78
+ control: "boolean";
79
+ description: string;
80
+ table: {
81
+ defaultValue: {
82
+ summary: string;
83
+ };
84
+ };
85
+ };
86
+ trapFocus: {
87
+ control: "boolean";
88
+ description: string;
89
+ table: {
90
+ defaultValue: {
91
+ summary: string;
92
+ };
93
+ };
94
+ };
95
+ triggerLabel: {
96
+ control: "text";
97
+ description: string;
98
+ };
99
+ ids: {
100
+ table: {
101
+ disable: true;
102
+ };
103
+ };
104
+ initialFocusEl: {
105
+ table: {
106
+ disable: true;
107
+ };
108
+ };
109
+ finalFocusEl: {
110
+ table: {
111
+ disable: true;
112
+ };
113
+ };
114
+ getRootNode: {
115
+ table: {
116
+ disable: true;
117
+ };
118
+ };
119
+ stack: {
120
+ table: {
121
+ disable: true;
122
+ };
123
+ };
124
+ onOpenChange: {
125
+ control: false;
126
+ };
127
+ onSnapPointChange: {
128
+ control: false;
129
+ };
130
+ onTriggerValueChange: {
131
+ control: false;
132
+ };
133
+ };
134
+ args: {
135
+ closeOnEscape: true;
136
+ closeOnInteractOutside: true;
137
+ draggable: true;
138
+ modal: true;
139
+ onOpenChange: import("storybook/test").Mock<(...args: any[]) => any>;
140
+ placement: "end";
141
+ preventScroll: true;
142
+ size: "md";
143
+ trapFocus: true;
144
+ triggerLabel: string;
145
+ };
146
+ };
147
+ export default meta;
148
+ type Story = StoryObj<typeof meta>;
149
+ export declare const Playground: Story;
150
+ export declare const Placements: Story;
151
+ export declare const Sizes: Story;
152
+ export declare const SnapPointsAndSwipe: Story;
153
+ export declare const Controlled: Story;
154
+ export declare const MultipleTriggers: Story;
155
+ export declare const CustomContainer: Story;
156
+ export declare const NonModal: Story;
157
+ export declare const Stack: Story;
158
+ //# sourceMappingURL=drawer.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.stories.d.ts","sourceRoot":"","sources":["../../../stories/molecules/drawer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAKtD,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,4BAA4B,CAAA;AA6DnC,KAAK,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACzD,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,YAAY,EACZ,GAAG,SAAS,EACb,EAAE,eAAe,2CAejB;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiF0B,CAAA;AAEpC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AASnC,eAAO,MAAM,UAAU,EAAE,KAqBxB,CAAA;AAID,eAAO,MAAM,KAAK,EAAE,KAqBnB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAiDhC,CAAA;AAgCD,eAAO,MAAM,UAAU,EAAE,KAGxB,CAAA;AAyCD,eAAO,MAAM,gBAAgB,EAAE,KAG9B,CAAA;AAqCD,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAA;AAoCD,eAAO,MAAM,QAAQ,EAAE,KAGtB,CAAA;AAmCD,eAAO,MAAM,KAAK,EAAE,KAGnB,CAAA"}
@@ -0,0 +1,66 @@
1
+ import type { StoryObj } from "@storybook/react";
2
+ import { Sidebar } from "../../src/organisms/sidebar.js";
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Sidebar;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ };
14
+ };
15
+ args: {
16
+ defaultExpanded: "start"[];
17
+ dir: "ltr";
18
+ onExpandedChange: import("storybook/test").Mock<(...args: any[]) => any>;
19
+ onMobileOpenChange: import("storybook/test").Mock<(...args: any[]) => any>;
20
+ };
21
+ argTypes: {
22
+ defaultExpanded: {
23
+ control: false;
24
+ };
25
+ dir: {
26
+ control: "inline-radio";
27
+ options: string[];
28
+ };
29
+ defaultMobileOpen: {
30
+ control: false;
31
+ };
32
+ collapsible: {
33
+ control: false;
34
+ };
35
+ expanded: {
36
+ control: false;
37
+ };
38
+ id: {
39
+ control: false;
40
+ };
41
+ mobileOpen: {
42
+ control: false;
43
+ };
44
+ onExpandedChange: {
45
+ control: false;
46
+ };
47
+ onMobileOpenChange: {
48
+ control: false;
49
+ };
50
+ ref: {
51
+ control: false;
52
+ };
53
+ };
54
+ };
55
+ export default meta;
56
+ type Story = StoryObj<typeof meta>;
57
+ export declare const Playground: Story;
58
+ export declare const ControlledOffcanvas: Story;
59
+ export declare const BreakpointFocusTransfer: Story;
60
+ export declare const IconCollapseSidebar07: Story;
61
+ export declare const TwoPaneSidebar09: Story;
62
+ export declare const RightSidebar14: Story;
63
+ export declare const LeftAndRightSidebar15: Story;
64
+ export declare const LogicalEdgesRtl: Story;
65
+ export declare const StickySiteHeaderSidebar16: Story;
66
+ //# sourceMappingURL=sidebar.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.stories.d.ts","sourceRoot":"","sources":["../../../stories/organisms/sidebar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAUtD,OAAO,EACL,OAAO,EAER,MAAM,6BAA6B,CAAA;AAqPpC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,UAAU,EAAE,KA2BxB,CAAA;AAgCD,eAAO,MAAM,mBAAmB,EAAE,KAIjC,CAAA;AAkFD,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAWnC,CAAA;AA8HD,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAe5B,CAAA;AAsBD,eAAO,MAAM,qBAAqB,EAAE,KAmBnC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAoB7B,CAAA;AAcD,eAAO,MAAM,yBAAyB,EAAE,KA0BvC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=drawer.behavior.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.behavior.spec.d.ts","sourceRoot":"","sources":["../../test/drawer.behavior.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sidebar.behavior.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.behavior.spec.d.ts","sourceRoot":"","sources":["../../test/sidebar.behavior.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sidebar.ssr.bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.ssr.bun.d.ts","sourceRoot":"","sources":["../../test/sidebar.ssr.bun.tsx"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techsio/ui-kit",
3
- "version": "0.41.2",
3
+ "version": "0.42.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -74,6 +74,7 @@
74
74
  "storybook:a11y": "bash scripts/storybook-a11y.sh",
75
75
  "test:components": "node scripts/run-component-tests.mjs",
76
76
  "test:components:update": "node scripts/run-component-tests.mjs --update-snapshots",
77
+ "test:sidebar:ssr": "bun test ./test/sidebar.ssr.bun.tsx",
77
78
  "lint:tailwind": "eslint \"**/*.{js,jsx,ts,tsx}\" --config eslint.config.js",
78
79
  "lint:tailwind:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --config eslint.config.js --fix",
79
80
  "prepare": "node -e \"if (!process.env.RSLIB_CHECK_OUTPUT) require('node:child_process').execSync('pnpm build', { stdio: 'inherit' })\"",
@@ -97,27 +98,29 @@
97
98
  "@tanstack/react-charts": "^0.6.5",
98
99
  "@tanstack/react-table": "^9.1.2",
99
100
  "@tanstack/react-virtual": "^3.14.8",
100
- "@zag-js/accordion": "^1.41.2",
101
- "@zag-js/carousel": "^1.41.2",
102
- "@zag-js/checkbox": "^1.41.2",
103
- "@zag-js/combobox": "^1.41.2",
104
- "@zag-js/dialog": "^1.41.2",
105
- "@zag-js/i18n-utils": "^1.41.2",
106
- "@zag-js/menu": "^1.41.2",
107
- "@zag-js/number-input": "^1.41.2",
108
- "@zag-js/pagination": "^1.41.2",
109
- "@zag-js/popover": "^1.41.2",
110
- "@zag-js/radio-group": "^1.41.2",
111
- "@zag-js/rating-group": "^1.41.2",
112
- "@zag-js/react": "^1.41.2",
113
- "@zag-js/select": "^1.41.2",
114
- "@zag-js/slider": "^1.41.2",
115
- "@zag-js/steps": "^1.41.2",
116
- "@zag-js/switch": "^1.41.2",
117
- "@zag-js/tabs": "^1.41.2",
118
- "@zag-js/toast": "^1.41.2",
119
- "@zag-js/tooltip": "^1.41.2",
120
- "@zag-js/tree-view": "^1.41.2",
101
+ "@zag-js/accordion": "1.43.3",
102
+ "@zag-js/carousel": "1.43.3",
103
+ "@zag-js/checkbox": "1.43.3",
104
+ "@zag-js/combobox": "1.43.3",
105
+ "@zag-js/dialog": "1.43.3",
106
+ "@zag-js/drawer": "1.43.3",
107
+ "@zag-js/i18n-utils": "1.43.3",
108
+ "@zag-js/menu": "1.43.3",
109
+ "@zag-js/number-input": "1.43.3",
110
+ "@zag-js/pagination": "1.43.3",
111
+ "@zag-js/popover": "1.43.3",
112
+ "@zag-js/presence": "1.43.3",
113
+ "@zag-js/radio-group": "1.43.3",
114
+ "@zag-js/rating-group": "1.43.3",
115
+ "@zag-js/react": "1.43.3",
116
+ "@zag-js/select": "1.43.3",
117
+ "@zag-js/slider": "1.43.3",
118
+ "@zag-js/steps": "1.43.3",
119
+ "@zag-js/switch": "1.43.3",
120
+ "@zag-js/tabs": "1.43.3",
121
+ "@zag-js/toast": "1.43.3",
122
+ "@zag-js/tooltip": "1.43.3",
123
+ "@zag-js/tree-view": "1.43.3",
121
124
  "better-themes": "^1.1.0",
122
125
  "d3-scale": "^4.0.2",
123
126
  "d3-shape": "^3.2.0",
@@ -23,6 +23,7 @@
23
23
  @import "./molecules/_color-select.css";
24
24
  @import "./molecules/_combobox.css";
25
25
  @import "./molecules/_dialog.css";
26
+ @import "./molecules/_drawer.css";
26
27
  @import "./molecules/_pagination.css";
27
28
  @import "./molecules/_popover.css";
28
29
  @import "./molecules/_radio-card.css";
@@ -43,3 +44,4 @@
43
44
  @import "./organisms/_footer.css";
44
45
  @import "./organisms/_header.css";
45
46
  @import "./organisms/_gallery.css";
47
+ @import "./organisms/_sidebar.css";