@histoire/controls 0.7.8 → 0.8.1

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 (65) hide show
  1. package/dist/components/radio/HstRadio.story.vue.d.ts +2 -0
  2. package/dist/components/radio/HstRadio.vue.d.ts +24 -0
  3. package/dist/components/select/CustomSelect.vue.d.ts +3 -6
  4. package/dist/components/select/HstSelect.vue.d.ts +3 -4
  5. package/dist/index.d.ts +324 -2
  6. package/dist/index.es.js +498 -5133
  7. package/dist/style-standalone.css +31 -0
  8. package/dist/types.d.ts +4 -0
  9. package/package.json +4 -6
  10. package/peeky.config.ts +21 -0
  11. package/src/components/HstWrapper.vue +1 -1
  12. package/src/components/checkbox/HstCheckbox.vue +3 -1
  13. package/src/components/radio/HstRadio.story.vue +47 -0
  14. package/src/components/radio/HstRadio.vue +107 -0
  15. package/src/components/select/CustomSelect.vue +3 -7
  16. package/src/components/select/HstSelect.vue +4 -8
  17. package/src/components/slider/HstSlider.vue +1 -1
  18. package/src/components/text/HstText.vue +1 -1
  19. package/src/components/textarea/HstTextarea.vue +1 -1
  20. package/src/index.ts +15 -11
  21. package/src/types.ts +4 -0
  22. package/tsconfig.json +10 -0
  23. package/vite.config.ts +12 -9
  24. package/.histoire/dist/__sandbox.html +0 -16
  25. package/.histoire/dist/assets/BaseEmpty.c5ebb434.js +0 -11
  26. package/.histoire/dist/assets/HomeView.2d2d0dfe.js +0 -24
  27. package/.histoire/dist/assets/HstCheckbox.story.ccd10161.js +0 -151
  28. package/.histoire/dist/assets/HstColorShades.story.d71deb80.js +0 -540
  29. package/.histoire/dist/assets/HstCopyIcon.ef403c78.js +0 -55
  30. package/.histoire/dist/assets/HstNumber.story.1e0e7b71.js +0 -165
  31. package/.histoire/dist/assets/HstSelect.story.8a2b4741.js +0 -290
  32. package/.histoire/dist/assets/HstSlider.story.4155f6ba.js +0 -153
  33. package/.histoire/dist/assets/HstText.story.43417ceb.js +0 -143
  34. package/.histoire/dist/assets/HstTextarea.story.3e39b89e.js +0 -111
  35. package/.histoire/dist/assets/HstTokenGrid.story.e2f237c4.js +0 -156
  36. package/.histoire/dist/assets/HstTokenList.story.bc7b0288.js +0 -184
  37. package/.histoire/dist/assets/HstWrapper.fee42109.js +0 -61
  38. package/.histoire/dist/assets/SearchPane.37a81ba7.js +0 -426
  39. package/.histoire/dist/assets/StoryView.2c1f1961.js +0 -2262
  40. package/.histoire/dist/assets/bundle-main.c70a2b14.js +0 -1156
  41. package/.histoire/dist/assets/bundle-sandbox.f56c0808.js +0 -84
  42. package/.histoire/dist/assets/const.36730b48.js +0 -717
  43. package/.histoire/dist/assets/global-components.d165b38c.js +0 -5806
  44. package/.histoire/dist/assets/search-docs-data.2e7ad186.js +0 -6
  45. package/.histoire/dist/assets/style.dc851298.css +0 -2574
  46. package/.histoire/dist/assets/vendor.31c91490.js +0 -28973
  47. package/.histoire/dist/histoire.svg +0 -51
  48. package/.histoire/dist/index.html +0 -16
  49. package/histoire-dist/__sandbox.html +0 -15
  50. package/histoire-dist/assets/BaseEmpty.a84c14c8.js +0 -1
  51. package/histoire-dist/assets/HomeView.f524bd4b.js +0 -1
  52. package/histoire-dist/assets/HstCheckbox.story.9f622545.js +0 -1
  53. package/histoire-dist/assets/HstInput.story.945401ce.js +0 -1
  54. package/histoire-dist/assets/SearchModal.76c035f2.js +0 -1
  55. package/histoire-dist/assets/StoryView.e4c41518.js +0 -15
  56. package/histoire-dist/assets/global-components.84d0ab22.js +0 -1
  57. package/histoire-dist/assets/histoire-text-dark.a529813a.svg +0 -89
  58. package/histoire-dist/assets/histoire-text.1d4474b5.svg +0 -89
  59. package/histoire-dist/assets/histoire.8af7bd1f.svg +0 -51
  60. package/histoire-dist/assets/index.58f51dd0.js +0 -1
  61. package/histoire-dist/assets/preview-settings.a634d101.js +0 -1
  62. package/histoire-dist/assets/sandbox.2c60450a.js +0 -1
  63. package/histoire-dist/assets/style.7657d2ac.css +0 -1
  64. package/histoire-dist/assets/vendor.70a554f6.js +0 -9
  65. package/histoire-dist/index.html +0 -15
@@ -1,151 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { d as defineComponent, r as ref, c as computed, w as watch, ax as _export_sfc, a as openBlock, j as createBlock, k as withCtx, f as renderSlot, e as createBaseVNode, n as normalizeClass, b as createElementBlock, v as withKeys, g as withModifiers, q as resolveComponent, l as createVNode } from "./vendor.31c91490.js";
21
- import { H as HstWrapper } from "./HstWrapper.fee42109.js";
22
- const __default__ = {
23
- name: "HstCheckbox"
24
- };
25
- const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
26
- props: {
27
- modelValue: { type: Boolean, required: true },
28
- title: { type: String, required: false }
29
- },
30
- emits: {
31
- "update:modelValue": (newValue) => true
32
- },
33
- setup(__props, { expose, emit }) {
34
- expose();
35
- const props = __props;
36
- function toggle() {
37
- emit("update:modelValue", !props.modelValue);
38
- animationEnabled.value = true;
39
- }
40
- const path = ref();
41
- const dasharray = ref(0);
42
- const progress = computed(() => props.modelValue ? 1 : 0);
43
- const dashoffset = computed(() => (1 - progress.value) * dasharray.value);
44
- const animationEnabled = ref(false);
45
- watch(path, (value) => {
46
- var _a, _b, _c;
47
- dasharray.value = (_c = (_b = (_a = path.value).getTotalLength) == null ? void 0 : _b.call(_a)) != null ? _c : 21.21;
48
- });
49
- const __returned__ = { props, emit, toggle, path, dasharray, progress, dashoffset, animationEnabled, HstWrapper };
50
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
51
- return __returned__;
52
- }
53
- }));
54
- const _hoisted_1 = { class: "htw-text-white htw-w-[16px] htw-h-[16px] htw-relative" };
55
- const _hoisted_2 = {
56
- width: "16",
57
- height: "16",
58
- viewBox: "0 0 24 24",
59
- class: "htw-relative htw-z-10"
60
- };
61
- const _hoisted_3 = ["stroke-dasharray", "stroke-dashoffset"];
62
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
63
- return openBlock(), createBlock($setup["HstWrapper"], {
64
- role: "checkbox",
65
- tabindex: "0",
66
- class: "htw-cursor-pointer htw-items-center",
67
- title: $props.title,
68
- onClick: _cache[0] || (_cache[0] = ($event) => $setup.toggle()),
69
- onKeydown: [
70
- _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => $setup.toggle(), ["prevent"]), ["enter"])),
71
- _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => $setup.toggle(), ["prevent"]), ["space"]))
72
- ]
73
- }, {
74
- actions: withCtx(() => [
75
- renderSlot(_ctx.$slots, "actions")
76
- ]),
77
- default: withCtx(() => [
78
- createBaseVNode("div", _hoisted_1, [
79
- createBaseVNode("div", {
80
- class: normalizeClass(["htw-border htw-border-solid group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out", [
81
- $props.modelValue ? "htw-border-primary-500 htw-border-8" : "htw-border-black/25 dark:htw-border-white/25 htw-delay-150"
82
- ]])
83
- }, null, 2),
84
- (openBlock(), createElementBlock("svg", _hoisted_2, [
85
- createBaseVNode("path", {
86
- ref: "path",
87
- d: "m 4 12 l 5 5 l 10 -10",
88
- fill: "none",
89
- class: normalizeClass(["htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out", [
90
- $setup.animationEnabled ? "htw-transition-all" : "htw-transition-none",
91
- {
92
- "htw-delay-150": $props.modelValue
93
- }
94
- ]]),
95
- "stroke-dasharray": $setup.dasharray,
96
- "stroke-dashoffset": $setup.dashoffset
97
- }, null, 10, _hoisted_3)
98
- ]))
99
- ])
100
- ]),
101
- _: 3
102
- }, 8, ["title"]);
103
- }
104
- _sfc_main$1.__file = "src/components/checkbox/HstCheckbox.vue";
105
- var HstCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/checkbox/HstCheckbox.vue"]]);
106
- const _sfc_main = /* @__PURE__ */ defineComponent({
107
- name: "HstCheckbox.story",
108
- setup(__props, { expose }) {
109
- expose();
110
- function initState() {
111
- return {
112
- checked: false
113
- };
114
- }
115
- const __returned__ = { initState, HstCheckbox };
116
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
117
- return __returned__;
118
- }
119
- });
120
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
- const _component_Variant = resolveComponent("Variant");
122
- const _component_Story = resolveComponent("Story");
123
- return openBlock(), createBlock(_component_Story, { title: "HstCheckbox" }, {
124
- default: withCtx(() => [
125
- createVNode(_component_Variant, {
126
- title: "playground",
127
- "init-state": $setup.initState
128
- }, {
129
- default: withCtx(({ state }) => [
130
- createVNode($setup["HstCheckbox"], {
131
- modelValue: state.checked,
132
- "onUpdate:modelValue": ($event) => state.checked = $event,
133
- title: "Label"
134
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
135
- ]),
136
- controls: withCtx(({ state }) => [
137
- createVNode($setup["HstCheckbox"], {
138
- modelValue: state.checked,
139
- "onUpdate:modelValue": ($event) => state.checked = $event,
140
- title: "Label"
141
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
142
- ]),
143
- _: 1
144
- })
145
- ]),
146
- _: 1
147
- });
148
- }
149
- _sfc_main.__file = "src/components/checkbox/HstCheckbox.story.vue";
150
- var HstCheckbox_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/checkbox/HstCheckbox.story.vue"]]);
151
- export { HstCheckbox_story as default };
@@ -1,540 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { d as defineComponent, c as computed, r as ref, ax as _export_sfc, ay as VTooltip, a as openBlock, b as createElementBlock, F as Fragment, J as renderList, f as renderSlot, e as createBaseVNode, h as normalizeStyle, M as withDirectives, R as createTextVNode, t as toDisplayString, j as createBlock, m as createCommentVNode, q as resolveComponent, k as withCtx, l as createVNode } from "./vendor.31c91490.js";
21
- import { H as HstCopyIcon } from "./HstCopyIcon.ef403c78.js";
22
- const __default__ = {
23
- name: "HstColorShades"
24
- };
25
- const _sfc_main$1 = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, __default__), {
26
- props: {
27
- shades: { type: Object, required: true },
28
- getName: { type: Function, required: false },
29
- search: { type: String, required: false }
30
- },
31
- setup(__props, { expose }) {
32
- expose();
33
- const props = __props;
34
- const shadesWithName = computed(() => {
35
- const shades = props.shades;
36
- const getName = props.getName;
37
- return Object.entries(shades).map(([key, color]) => {
38
- const name = getName ? getName(key, color) : key;
39
- return {
40
- key,
41
- color,
42
- name
43
- };
44
- });
45
- });
46
- const displayedShades = computed(() => {
47
- let list = shadesWithName.value;
48
- if (props.search) {
49
- const reg = new RegExp(props.search, "i");
50
- list = list.filter(({ name }) => reg.test(name));
51
- }
52
- return list;
53
- });
54
- const hover = ref(null);
55
- const __returned__ = { props, shadesWithName, displayedShades, hover, vTooltip: VTooltip, HstCopyIcon };
56
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
57
- return __returned__;
58
- }
59
- }));
60
- const _hoisted_1 = {
61
- key: 0,
62
- class: "htw-grid htw-gap-4 htw-grid-cols-[repeat(auto-fill,minmax(200px,1fr))] htw-m-4"
63
- };
64
- const _hoisted_2 = ["onMouseenter"];
65
- const _hoisted_3 = { class: "htw-flex htw-gap-1" };
66
- const _hoisted_4 = { class: "htw-my-0 htw-truncate htw-shrink" };
67
- const _hoisted_5 = { class: "htw-flex htw-gap-1" };
68
- const _hoisted_6 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
69
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
70
- return $setup.displayedShades.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
71
- (openBlock(true), createElementBlock(Fragment, null, renderList($setup.displayedShades, (shade) => {
72
- return openBlock(), createElementBlock("div", {
73
- key: shade.key,
74
- class: "htw-flex htw-flex-col htw-gap-2",
75
- onMouseenter: ($event) => $setup.hover = shade.key,
76
- onMouseleave: _cache[0] || (_cache[0] = ($event) => $setup.hover = null)
77
- }, [
78
- renderSlot(_ctx.$slots, "default", {
79
- color: shade.color
80
- }, () => [
81
- createBaseVNode("div", {
82
- class: "htw-rounded-full htw-w-16 htw-h-16",
83
- style: normalizeStyle({
84
- backgroundColor: shade.color
85
- })
86
- }, null, 4)
87
- ]),
88
- createBaseVNode("div", null, [
89
- createBaseVNode("div", _hoisted_3, [
90
- withDirectives((openBlock(), createElementBlock("pre", _hoisted_4, [
91
- createTextVNode(toDisplayString(shade.name), 1)
92
- ])), [
93
- [$setup["vTooltip"], shade.name.length > 23 ? shade.name : ""]
94
- ]),
95
- $setup.hover === shade.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
96
- key: 0,
97
- content: shade.name,
98
- class: "htw-flex-none"
99
- }, null, 8, ["content"])) : createCommentVNode("v-if", true)
100
- ]),
101
- createBaseVNode("div", _hoisted_5, [
102
- withDirectives((openBlock(), createElementBlock("pre", _hoisted_6, [
103
- createTextVNode(toDisplayString(shade.color), 1)
104
- ])), [
105
- [$setup["vTooltip"], shade.color.length > 23 ? shade.color : ""]
106
- ]),
107
- $setup.hover === shade.key ? (openBlock(), createBlock($setup["HstCopyIcon"], {
108
- key: 0,
109
- content: shade.color,
110
- class: "htw-flex-none"
111
- }, null, 8, ["content"])) : createCommentVNode("v-if", true)
112
- ])
113
- ])
114
- ], 40, _hoisted_2);
115
- }), 128))
116
- ])) : createCommentVNode("v-if", true);
117
- }
118
- _sfc_main$1.__file = "src/components/design-tokens/HstColorShades.vue";
119
- var HstColorShades = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstColorShades.vue"]]);
120
- const _sfc_main = /* @__PURE__ */ defineComponent({
121
- name: "HstColorShades.story",
122
- setup(__props, { expose }) {
123
- expose();
124
- const colors = {
125
- slate: {
126
- 50: "#f8fafc",
127
- 100: "#f1f5f9",
128
- 200: "#e2e8f0",
129
- 300: "#cbd5e1",
130
- 400: "#94a3b8",
131
- 500: "#64748b",
132
- 600: "#475569",
133
- 700: "#334155",
134
- 750: "#283548",
135
- 800: "#1e293b",
136
- 850: "#151f32",
137
- 900: "#0f172a",
138
- 950: "#09101f"
139
- },
140
- gray: {
141
- 50: "#f9fafb",
142
- 100: "#f3f4f6",
143
- 200: "#e5e7eb",
144
- 300: "#d1d5db",
145
- 400: "#9ca3af",
146
- 500: "#6b7280",
147
- 600: "#4b5563",
148
- 700: "#374151",
149
- 750: "#2b3546",
150
- 800: "#1f2937",
151
- 850: "#18212f",
152
- 900: "#111827",
153
- 950: "#0c101d"
154
- },
155
- zinc: {
156
- 50: "#fafafa",
157
- 100: "#f4f4f5",
158
- 200: "#e4e4e7",
159
- 300: "#d4d4d8",
160
- 400: "#a1a1aa",
161
- 500: "#71717a",
162
- 600: "#52525b",
163
- 700: "#3f3f46",
164
- 750: "#323238",
165
- 800: "#27272a",
166
- 850: "#1f1f21",
167
- 900: "#18181b",
168
- 950: "#101012"
169
- },
170
- neutral: {
171
- 50: "#fafafa",
172
- 100: "#f5f5f5",
173
- 200: "#e5e5e5",
174
- 300: "#d4d4d4",
175
- 400: "#a3a3a3",
176
- 500: "#737373",
177
- 600: "#525252",
178
- 700: "#404040",
179
- 750: "#333333",
180
- 800: "#262626",
181
- 850: "#1f1f1f",
182
- 900: "#171717",
183
- 950: "#0f0f0f"
184
- },
185
- stone: {
186
- 50: "#fafaf9",
187
- 100: "#f5f5f4",
188
- 200: "#e7e5e4",
189
- 300: "#d6d3d1",
190
- 400: "#a8a29e",
191
- 500: "#78716c",
192
- 600: "#57534e",
193
- 700: "#44403c",
194
- 750: "#363230",
195
- 800: "#292524",
196
- 850: "#211e1c",
197
- 900: "#1c1917",
198
- 950: "#171412"
199
- },
200
- red: {
201
- 50: "#fef2f2",
202
- 100: "#fee2e2",
203
- 200: "#fecaca",
204
- 300: "#fca5a5",
205
- 400: "#f87171",
206
- 500: "#ef4444",
207
- 600: "#dc2626",
208
- 700: "#b91c1c",
209
- 800: "#991b1b",
210
- 900: "#7f1d1d"
211
- },
212
- orange: {
213
- 50: "#fff7ed",
214
- 100: "#ffedd5",
215
- 200: "#fed7aa",
216
- 300: "#fdba74",
217
- 400: "#fb923c",
218
- 500: "#f97316",
219
- 600: "#ea580c",
220
- 700: "#c2410c",
221
- 800: "#9a3412",
222
- 900: "#7c2d12"
223
- },
224
- amber: {
225
- 50: "#fffbeb",
226
- 100: "#fef3c7",
227
- 200: "#fde68a",
228
- 300: "#fcd34d",
229
- 400: "#fbbf24",
230
- 500: "#f59e0b",
231
- 600: "#d97706",
232
- 700: "#b45309",
233
- 800: "#92400e",
234
- 900: "#78350f"
235
- },
236
- yellow: {
237
- 50: "#fefce8",
238
- 100: "#fef9c3",
239
- 200: "#fef08a",
240
- 300: "#fde047",
241
- 400: "#facc15",
242
- 500: "#eab308",
243
- 600: "#ca8a04",
244
- 700: "#a16207",
245
- 800: "#854d0e",
246
- 900: "#713f12"
247
- },
248
- lime: {
249
- 50: "#f7fee7",
250
- 100: "#ecfccb",
251
- 200: "#d9f99d",
252
- 300: "#bef264",
253
- 400: "#a3e635",
254
- 500: "#84cc16",
255
- 600: "#65a30d",
256
- 700: "#4d7c0f",
257
- 800: "#3f6212",
258
- 900: "#365314"
259
- },
260
- green: {
261
- 50: "#f0fdf4",
262
- 100: "#dcfce7",
263
- 200: "#bbf7d0",
264
- 300: "#86efac",
265
- 400: "#4ade80",
266
- 500: "#22c55e",
267
- 600: "#16a34a",
268
- 700: "#15803d",
269
- 800: "#166534",
270
- 900: "#14532d"
271
- },
272
- emerald: {
273
- 50: "#ecfdf5",
274
- 100: "#d1fae5",
275
- 200: "#a7f3d0",
276
- 300: "#6ee7b7",
277
- 400: "#34d399",
278
- 500: "#10b981",
279
- 600: "#059669",
280
- 700: "#047857",
281
- 800: "#065f46",
282
- 900: "#064e3b"
283
- },
284
- teal: {
285
- 50: "#f0fdfa",
286
- 100: "#ccfbf1",
287
- 200: "#99f6e4",
288
- 300: "#5eead4",
289
- 400: "#2dd4bf",
290
- 500: "#14b8a6",
291
- 600: "#0d9488",
292
- 700: "#0f766e",
293
- 800: "#115e59",
294
- 900: "#134e4a"
295
- },
296
- cyan: {
297
- 50: "#ecfeff",
298
- 100: "#cffafe",
299
- 200: "#a5f3fc",
300
- 300: "#67e8f9",
301
- 400: "#22d3ee",
302
- 500: "#06b6d4",
303
- 600: "#0891b2",
304
- 700: "#0e7490",
305
- 800: "#155e75",
306
- 900: "#164e63"
307
- },
308
- sky: {
309
- 50: "#f0f9ff",
310
- 100: "#e0f2fe",
311
- 200: "#bae6fd",
312
- 300: "#7dd3fc",
313
- 400: "#38bdf8",
314
- 500: "#0ea5e9",
315
- 600: "#0284c7",
316
- 700: "#0369a1",
317
- 800: "#075985",
318
- 900: "#0c4a6e"
319
- },
320
- blue: {
321
- 50: "#eff6ff",
322
- 100: "#dbeafe",
323
- 200: "#bfdbfe",
324
- 300: "#93c5fd",
325
- 400: "#60a5fa",
326
- 500: "#3b82f6",
327
- 600: "#2563eb",
328
- 700: "#1d4ed8",
329
- 800: "#1e40af",
330
- 900: "#1e3a8a"
331
- },
332
- indigo: {
333
- 50: "#eef2ff",
334
- 100: "#e0e7ff",
335
- 200: "#c7d2fe",
336
- 300: "#a5b4fc",
337
- 400: "#818cf8",
338
- 500: "#6366f1",
339
- 600: "#4f46e5",
340
- 700: "#4338ca",
341
- 800: "#3730a3",
342
- 900: "#312e81"
343
- },
344
- violet: {
345
- 50: "#f5f3ff",
346
- 100: "#ede9fe",
347
- 200: "#ddd6fe",
348
- 300: "#c4b5fd",
349
- 400: "#a78bfa",
350
- 500: "#8b5cf6",
351
- 600: "#7c3aed",
352
- 700: "#6d28d9",
353
- 800: "#5b21b6",
354
- 900: "#4c1d95"
355
- },
356
- purple: {
357
- 50: "#faf5ff",
358
- 100: "#f3e8ff",
359
- 200: "#e9d5ff",
360
- 300: "#d8b4fe",
361
- 400: "#c084fc",
362
- 500: "#a855f7",
363
- 600: "#9333ea",
364
- 700: "#7e22ce",
365
- 800: "#6b21a8",
366
- 900: "#581c87"
367
- },
368
- fuchsia: {
369
- 50: "#fdf4ff",
370
- 100: "#fae8ff",
371
- 200: "#f5d0fe",
372
- 300: "#f0abfc",
373
- 400: "#e879f9",
374
- 500: "#d946ef",
375
- 600: "#c026d3",
376
- 700: "#a21caf",
377
- 800: "#86198f",
378
- 900: "#701a75"
379
- },
380
- pink: {
381
- 50: "#fdf2f8",
382
- 100: "#fce7f3",
383
- 200: "#fbcfe8",
384
- 300: "#f9a8d4",
385
- 400: "#f472b6",
386
- 500: "#ec4899",
387
- 600: "#db2777",
388
- 700: "#be185d",
389
- 800: "#9d174d",
390
- 900: "#831843"
391
- },
392
- rose: {
393
- 50: "#fff1f2",
394
- 100: "#ffe4e6",
395
- 200: "#fecdd3",
396
- 300: "#fda4af",
397
- 400: "#fb7185",
398
- 500: "#f43f5e",
399
- 600: "#e11d48",
400
- 700: "#be123c",
401
- 800: "#9f1239",
402
- 900: "#881337"
403
- }
404
- };
405
- const __returned__ = { colors, HstColorShades };
406
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
407
- return __returned__;
408
- }
409
- });
410
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
411
- const _component_Variant = resolveComponent("Variant");
412
- const _component_HstText = resolveComponent("HstText");
413
- const _component_Story = resolveComponent("Story");
414
- return openBlock(), createBlock(_component_Story, {
415
- title: "design-tokens/HstColorShades",
416
- "responsive-disabled": ""
417
- }, {
418
- default: withCtx(() => [
419
- createVNode(_component_Variant, { title: "default" }, {
420
- default: withCtx(() => [
421
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
422
- return createVNode($setup["HstColorShades"], {
423
- key,
424
- shades,
425
- "get-name": (shade) => `${key}-${shade}`
426
- }, null, 8, ["shades", "get-name"]);
427
- }), 64))
428
- ]),
429
- _: 1
430
- }),
431
- createVNode(_component_Variant, { title: "background" }, {
432
- default: withCtx(() => [
433
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
434
- return createVNode($setup["HstColorShades"], {
435
- key,
436
- shades,
437
- "get-name": (shade) => `${key}-${shade}`
438
- }, {
439
- default: withCtx(({ color }) => [
440
- createBaseVNode("div", {
441
- class: "htw-rounded htw-h-[100px]",
442
- style: normalizeStyle({
443
- backgroundColor: color
444
- })
445
- }, null, 4)
446
- ]),
447
- _: 2
448
- }, 1032, ["shades", "get-name"]);
449
- }), 64))
450
- ]),
451
- _: 1
452
- }),
453
- createVNode(_component_Variant, { title: "text" }, {
454
- default: withCtx(() => [
455
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
456
- return createVNode($setup["HstColorShades"], {
457
- key,
458
- shades,
459
- "get-name": (shade) => `${key}-${shade}`
460
- }, {
461
- default: withCtx(({ color }) => [
462
- createBaseVNode("div", {
463
- class: "htw-rounded htw-h-[100px] htw-text-5xl htw-flex htw-items-end",
464
- style: normalizeStyle({
465
- color
466
- })
467
- }, " Aa ", 4)
468
- ]),
469
- _: 2
470
- }, 1032, ["shades", "get-name"]);
471
- }), 64))
472
- ]),
473
- _: 1
474
- }),
475
- createVNode(_component_Variant, { title: "border" }, {
476
- default: withCtx(() => [
477
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
478
- return createVNode($setup["HstColorShades"], {
479
- key,
480
- shades,
481
- "get-name": (shade) => `${key}-${shade}`
482
- }, {
483
- default: withCtx(({ color }) => [
484
- createBaseVNode("div", {
485
- class: "htw-rounded htw-h-[100px] htw-border-solid htw-border-2",
486
- style: normalizeStyle({
487
- borderColor: color
488
- })
489
- }, null, 4)
490
- ]),
491
- _: 2
492
- }, 1032, ["shades", "get-name"]);
493
- }), 64))
494
- ]),
495
- _: 1
496
- }),
497
- createVNode(_component_Variant, {
498
- title: "with search",
499
- "init-state": () => ({
500
- search: ""
501
- })
502
- }, {
503
- default: withCtx(({ state }) => [
504
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
505
- return createVNode($setup["HstColorShades"], {
506
- key,
507
- shades,
508
- "get-name": (shade) => `${key}-${shade}`,
509
- search: state.search
510
- }, null, 8, ["shades", "get-name", "search"]);
511
- }), 64))
512
- ]),
513
- controls: withCtx(({ state }) => [
514
- createVNode(_component_HstText, {
515
- modelValue: state.search,
516
- "onUpdate:modelValue": ($event) => state.search = $event,
517
- title: "Filter colors..."
518
- }, null, 8, ["modelValue", "onUpdate:modelValue"])
519
- ]),
520
- _: 1
521
- }, 8, ["init-state"]),
522
- createVNode(_component_Variant, { title: "long names" }, {
523
- default: withCtx(() => [
524
- (openBlock(), createElementBlock(Fragment, null, renderList($setup.colors, (shades, key) => {
525
- return createVNode($setup["HstColorShades"], {
526
- key,
527
- shades,
528
- "get-name": (shade) => `${"'very-".repeat(5)}long-${key}-${shade}`
529
- }, null, 8, ["shades", "get-name"]);
530
- }), 64))
531
- ]),
532
- _: 1
533
- })
534
- ]),
535
- _: 1
536
- });
537
- }
538
- _sfc_main.__file = "src/components/design-tokens/HstColorShades.story.vue";
539
- var HstColorShades_story = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/akryum/Projects/histoire/packages/histoire-controls/src/components/design-tokens/HstColorShades.story.vue"]]);
540
- export { HstColorShades_story as default };