@xds/solid 1.0.1 → 1.2.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.
- package/dist/dom/Accordion.js +3 -2
- package/dist/dom/Avatar.js +17 -13
- package/dist/dom/AvatarStack.js +17 -13
- package/dist/dom/Badge.js +12 -10
- package/dist/dom/Banner.js +25 -15
- package/dist/dom/Breadcrumb.js +87 -0
- package/dist/dom/Button.js +10 -3
- package/dist/dom/Card.js +31 -26
- package/dist/dom/Checkbox.js +57 -26
- package/dist/dom/Chip.js +21 -17
- package/dist/dom/ChipBar.js +17 -13
- package/dist/dom/Combobox.js +295 -0
- package/dist/dom/CountBadge.js +28 -23
- package/dist/dom/DatePicker.js +13 -7
- package/dist/dom/DateRangePicker.js +16 -10
- package/dist/dom/Dialog.js +3 -2
- package/dist/dom/Divider.js +12 -10
- package/dist/dom/EmptyState.js +14 -11
- package/dist/dom/Icon.js +30 -19
- package/dist/dom/IconButton.js +10 -3
- package/dist/dom/Labels.js +26 -0
- package/dist/dom/Link.js +62 -0
- package/dist/dom/ListRow.js +34 -28
- package/dist/dom/MediaCard.js +32 -23
- package/dist/dom/Menu.js +18 -15
- package/dist/dom/Pagination.js +132 -0
- package/dist/dom/Popover.js +126 -0
- package/dist/dom/ProgressBar.js +27 -15
- package/dist/dom/RadioGroup.js +44 -23
- package/dist/dom/SearchField.js +58 -32
- package/dist/dom/SectionHeader.js +17 -10
- package/dist/dom/SegmentedControl.js +33 -19
- package/dist/dom/Select.js +91 -51
- package/dist/dom/Sidebar.js +17 -13
- package/dist/dom/Skeleton.js +15 -13
- package/dist/dom/Slider.js +15 -7
- package/dist/dom/Spinner.js +23 -17
- package/dist/dom/Switch.js +49 -24
- package/dist/dom/Table.js +150 -0
- package/dist/dom/Tabs.js +16 -6
- package/dist/dom/Text.js +6 -3
- package/dist/dom/TextField.js +37 -19
- package/dist/dom/Thumbnail.js +21 -14
- package/dist/dom/TimePicker.js +245 -0
- package/dist/dom/Toast.js +19 -20
- package/dist/dom/ToastQueue.js +59 -0
- package/dist/dom/Tooltip.js +10 -6
- package/dist/dom/base.js +16 -0
- package/dist/dom/controllable.js +44 -0
- package/dist/dom/index.js +10 -1
- package/dist/dom/modal-popover.js +2 -2
- package/dist/dom/presence.js +3 -2
- package/dist/dom/preview.js +20 -1
- package/dist/dom/root.js +16 -4
- package/dist/dom/rows.js +13 -0
- package/dist/dom/trigger.js +5 -3
- package/dist/source/Accordion.jsx +3 -2
- package/dist/source/Avatar.d.ts +1 -1
- package/dist/source/Avatar.jsx +2 -1
- package/dist/source/AvatarStack.d.ts +1 -1
- package/dist/source/AvatarStack.jsx +2 -1
- package/dist/source/Badge.d.ts +1 -1
- package/dist/source/Badge.jsx +2 -1
- package/dist/source/Banner.d.ts +1 -1
- package/dist/source/Banner.jsx +5 -2
- package/dist/source/Breadcrumb.d.ts +9 -0
- package/dist/source/Breadcrumb.jsx +26 -0
- package/dist/source/Button.d.ts +5 -1
- package/dist/source/Button.jsx +5 -2
- package/dist/source/Card.d.ts +1 -1
- package/dist/source/Card.jsx +3 -2
- package/dist/source/Checkbox.d.ts +10 -4
- package/dist/source/Checkbox.jsx +26 -8
- package/dist/source/Chip.d.ts +1 -1
- package/dist/source/Chip.jsx +2 -1
- package/dist/source/ChipBar.d.ts +1 -1
- package/dist/source/ChipBar.jsx +2 -1
- package/dist/source/Combobox.d.ts +16 -0
- package/dist/source/Combobox.jsx +137 -0
- package/dist/source/CountBadge.d.ts +1 -1
- package/dist/source/CountBadge.jsx +3 -2
- package/dist/source/DatePicker.jsx +13 -7
- package/dist/source/DateRangePicker.jsx +16 -10
- package/dist/source/Dialog.jsx +3 -2
- package/dist/source/Divider.d.ts +1 -1
- package/dist/source/Divider.jsx +2 -1
- package/dist/source/EmptyState.d.ts +1 -1
- package/dist/source/EmptyState.jsx +2 -1
- package/dist/source/Icon.d.ts +1 -1
- package/dist/source/Icon.jsx +2 -1
- package/dist/source/IconButton.d.ts +5 -1
- package/dist/source/IconButton.jsx +5 -2
- package/dist/source/Labels.d.ts +17 -0
- package/dist/source/Labels.jsx +11 -0
- package/dist/source/Link.d.ts +20 -0
- package/dist/source/Link.jsx +21 -0
- package/dist/source/ListRow.d.ts +1 -1
- package/dist/source/ListRow.jsx +3 -2
- package/dist/source/MediaCard.d.ts +1 -1
- package/dist/source/MediaCard.jsx +3 -2
- package/dist/source/Menu.d.ts +1 -1
- package/dist/source/Menu.jsx +11 -3
- package/dist/source/Pagination.d.ts +12 -0
- package/dist/source/Pagination.jsx +51 -0
- package/dist/source/Popover.d.ts +19 -0
- package/dist/source/Popover.jsx +65 -0
- package/dist/source/ProgressBar.d.ts +1 -1
- package/dist/source/ProgressBar.jsx +2 -1
- package/dist/source/RadioGroup.d.ts +5 -2
- package/dist/source/RadioGroup.jsx +18 -5
- package/dist/source/SearchField.d.ts +11 -3
- package/dist/source/SearchField.jsx +26 -12
- package/dist/source/SectionHeader.d.ts +1 -1
- package/dist/source/SectionHeader.jsx +2 -1
- package/dist/source/SegmentedControl.d.ts +4 -3
- package/dist/source/SegmentedControl.jsx +16 -5
- package/dist/source/Select.d.ts +10 -1
- package/dist/source/Select.jsx +46 -11
- package/dist/source/Sidebar.d.ts +1 -1
- package/dist/source/Sidebar.jsx +2 -1
- package/dist/source/Skeleton.jsx +2 -2
- package/dist/source/Slider.d.ts +2 -2
- package/dist/source/Slider.jsx +14 -6
- package/dist/source/Spinner.d.ts +1 -1
- package/dist/source/Spinner.jsx +2 -1
- package/dist/source/Switch.d.ts +10 -4
- package/dist/source/Switch.jsx +18 -6
- package/dist/source/Table.d.ts +17 -0
- package/dist/source/Table.jsx +46 -0
- package/dist/source/Tabs.d.ts +2 -2
- package/dist/source/Tabs.jsx +16 -5
- package/dist/source/Text.d.ts +1 -1
- package/dist/source/Text.jsx +2 -1
- package/dist/source/TextField.d.ts +12 -3
- package/dist/source/TextField.jsx +24 -9
- package/dist/source/Thumbnail.d.ts +1 -1
- package/dist/source/Thumbnail.jsx +2 -1
- package/dist/source/TimePicker.d.ts +19 -0
- package/dist/source/TimePicker.jsx +137 -0
- package/dist/source/Toast.d.ts +1 -1
- package/dist/source/Toast.jsx +2 -1
- package/dist/source/ToastQueue.d.ts +19 -0
- package/dist/source/ToastQueue.jsx +27 -0
- package/dist/source/Tooltip.jsx +4 -3
- package/dist/source/base.d.ts +15 -0
- package/dist/source/base.js +15 -0
- package/dist/source/controllable.d.ts +30 -0
- package/dist/source/controllable.js +30 -0
- package/dist/source/index.d.ts +10 -1
- package/dist/source/index.js +9 -0
- package/dist/source/modal-popover.js +2 -2
- package/dist/source/presence.js +3 -2
- package/dist/source/preview.d.ts +10 -2
- package/dist/source/preview.jsx +12 -2
- package/dist/source/root.d.ts +14 -4
- package/dist/source/root.js +7 -2
- package/dist/source/rows.d.ts +8 -0
- package/dist/source/rows.js +5 -0
- package/dist/source/trigger.d.ts +4 -2
- package/dist/source/trigger.js +2 -2
- package/eject/files/Accordion.tsx +138 -0
- package/eject/files/Avatar.tsx +48 -0
- package/eject/files/AvatarStack.tsx +51 -0
- package/eject/files/Badge.tsx +39 -0
- package/eject/files/Banner.tsx +80 -0
- package/eject/files/Breadcrumb.tsx +57 -0
- package/eject/files/Button.tsx +90 -0
- package/eject/files/Card.tsx +100 -0
- package/eject/files/Checkbox.tsx +100 -0
- package/eject/files/Chip.tsx +40 -0
- package/eject/files/ChipBar.tsx +34 -0
- package/eject/files/Combobox.tsx +200 -0
- package/eject/files/CountBadge.tsx +55 -0
- package/eject/files/DatePicker.tsx +225 -0
- package/eject/files/DateRangePicker.tsx +319 -0
- package/eject/files/Dialog.tsx +117 -0
- package/eject/files/Divider.tsx +21 -0
- package/eject/files/EmptyState.tsx +39 -0
- package/eject/files/Icon.tsx +37 -0
- package/eject/files/IconButton.tsx +76 -0
- package/eject/files/Link.tsx +61 -0
- package/eject/files/ListRow.tsx +94 -0
- package/eject/files/MediaCard.tsx +116 -0
- package/eject/files/Menu.tsx +190 -0
- package/eject/files/Pagination.tsx +109 -0
- package/eject/files/Popover.tsx +124 -0
- package/eject/files/ProgressBar.tsx +37 -0
- package/eject/files/RadioGroup.tsx +138 -0
- package/eject/files/SearchField.tsx +124 -0
- package/eject/files/SectionHeader.tsx +59 -0
- package/eject/files/SegmentedControl.tsx +79 -0
- package/eject/files/Select.tsx +290 -0
- package/eject/files/Sidebar.tsx +156 -0
- package/eject/files/Skeleton.tsx +33 -0
- package/eject/files/Slider.tsx +131 -0
- package/eject/files/Spinner.tsx +44 -0
- package/eject/files/Switch.tsx +88 -0
- package/eject/files/Table.tsx +98 -0
- package/eject/files/Tabs.tsx +87 -0
- package/eject/files/Text.tsx +38 -0
- package/eject/files/TextField.tsx +171 -0
- package/eject/files/Thumbnail.tsx +84 -0
- package/eject/files/TimePicker.tsx +237 -0
- package/eject/files/Toast.tsx +100 -0
- package/eject/files/ToastQueue.tsx +62 -0
- package/eject/files/Tooltip.tsx +135 -0
- package/eject/files/accordion.css +89 -0
- package/eject/files/accordion.ts +67 -0
- package/eject/files/avatar-stack.ts +57 -0
- package/eject/files/avatar.ts +42 -0
- package/eject/files/badge.ts +30 -0
- package/eject/files/banner.ts +71 -0
- package/eject/files/base.css +38 -0
- package/eject/files/breadcrumb.css +51 -0
- package/eject/files/breadcrumb.ts +42 -0
- package/eject/files/button.css +241 -0
- package/eject/files/button.ts +106 -0
- package/eject/files/card.ts +58 -0
- package/eject/files/checkbox.ts +52 -0
- package/eject/files/chip-bar.ts +16 -0
- package/eject/files/chip.ts +35 -0
- package/eject/files/combobox.css +269 -0
- package/eject/files/combobox.ts +85 -0
- package/eject/files/count-badge.ts +32 -0
- package/eject/files/date-picker.css +375 -0
- package/eject/files/date-picker.ts +280 -0
- package/eject/files/date-range-picker.ts +338 -0
- package/eject/files/dialog.css +139 -0
- package/eject/files/dialog.ts +15 -0
- package/eject/files/divider.ts +5 -0
- package/eject/files/empty-state.ts +22 -0
- package/eject/files/icon.ts +36 -0
- package/eject/files/link.css +64 -0
- package/eject/files/link.ts +63 -0
- package/eject/files/list-row.ts +66 -0
- package/eject/files/media-card.ts +66 -0
- package/eject/files/menu.css +192 -0
- package/eject/files/menu.ts +84 -0
- package/eject/files/overlay.css +40 -0
- package/eject/files/pagination.css +106 -0
- package/eject/files/pagination.ts +68 -0
- package/eject/files/parts.ts +17 -0
- package/eject/files/popover.css +101 -0
- package/eject/files/popover.ts +37 -0
- package/eject/files/progress-bar.ts +26 -0
- package/eject/files/radio-group.css +184 -0
- package/eject/files/radio-group.ts +30 -0
- package/eject/files/section-header.ts +32 -0
- package/eject/files/segmented-control.ts +33 -0
- package/eject/files/select.css +347 -0
- package/eject/files/select.ts +77 -0
- package/eject/files/sidebar.ts +75 -0
- package/eject/files/skeleton.ts +51 -0
- package/eject/files/slider.css +160 -0
- package/eject/files/slider.ts +80 -0
- package/eject/files/spinner.ts +22 -0
- package/eject/files/switch.ts +45 -0
- package/eject/files/table.css +107 -0
- package/eject/files/table.ts +84 -0
- package/eject/files/tabs.css +120 -0
- package/eject/files/tabs.ts +37 -0
- package/eject/files/text-field.css +225 -0
- package/eject/files/text-field.ts +64 -0
- package/eject/files/text.ts +38 -0
- package/eject/files/thumbnail.ts +51 -0
- package/eject/files/time-picker.ts +113 -0
- package/eject/files/toast-queue.ts +64 -0
- package/eject/files/toast.ts +31 -0
- package/eject/files/tooltip.css +111 -0
- package/eject/files/tooltip.ts +21 -0
- package/eject/manifest.json +1027 -0
- package/package.json +12 -4
- package/styles.css +1066 -167
- package/tailwind.css +1295 -218
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createComponent } from "@solidjs/web";
|
|
2
|
+
import { DEFAULT_LABELS, mergeLabels } from "@xds/core";
|
|
3
|
+
import { createContext, createMemo, useContext } from "solid-js";
|
|
4
|
+
// packages/ui-solid/src/Labels.tsx
|
|
5
|
+
var LabelsContext = createContext(() => DEFAULT_LABELS);
|
|
6
|
+
/**
|
|
7
|
+
* Gives the components inside it the names of their own parts in the app's language: a banner's
|
|
8
|
+
* dismiss control, a search field's clear control, a calendar's month buttons. A label passed to
|
|
9
|
+
* a component wins. A Labels inside another keeps the outer one's labels and replaces those it
|
|
10
|
+
* names; a change of `value` reaches every component inside.
|
|
11
|
+
*/
|
|
12
|
+
function Labels(props) {
|
|
13
|
+
const outer = useContext(LabelsContext);
|
|
14
|
+
const merged = createMemo(() => mergeLabels(outer(), props.value));
|
|
15
|
+
return createComponent(LabelsContext, {
|
|
16
|
+
value: merged,
|
|
17
|
+
get children() {
|
|
18
|
+
return props.children;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** The labels the closest Labels gives, read where a label is read so that a change updates it. */
|
|
23
|
+
function useLabels() {
|
|
24
|
+
return useContext(LabelsContext);
|
|
25
|
+
}
|
|
26
|
+
export { Labels, useLabels };
|
package/dist/dom/Link.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { composeRefs } from "./controllable.js";
|
|
2
|
+
import { Icon } from "./Icon.js";
|
|
3
|
+
import { rootAttributes } from "./root.js";
|
|
4
|
+
import { createComponent, dynamic, memo, mergeProps } from "@solidjs/web";
|
|
5
|
+
import { LINK_ICON, LINK_PARTS, classes, linkElement, rootPart } from "@xds/core";
|
|
6
|
+
import { Show, createMemo } from "solid-js";
|
|
7
|
+
// packages/ui-solid/src/Link.tsx
|
|
8
|
+
var ROOT = rootPart("Link");
|
|
9
|
+
/**
|
|
10
|
+
* Text that takes the person somewhere, in the type of the text around it. It is underlined, so
|
|
11
|
+
* it does not depend on color. With `href` it is a native link; without one, a button that
|
|
12
|
+
* assistive technology hears as a link.
|
|
13
|
+
*/
|
|
14
|
+
function Link(props) {
|
|
15
|
+
const element = createMemo(() => linkElement({
|
|
16
|
+
href: props.href,
|
|
17
|
+
external: props.external,
|
|
18
|
+
disabled: props.disabled
|
|
19
|
+
}));
|
|
20
|
+
const Tag = dynamic(() => element().tag);
|
|
21
|
+
const ref = composeRefs(() => {}, () => props.ref);
|
|
22
|
+
return createComponent(Tag, mergeProps({ ref }, () => {
|
|
23
|
+
return rootAttributes(props);
|
|
24
|
+
}, () => {
|
|
25
|
+
return element().attributes;
|
|
26
|
+
}, {
|
|
27
|
+
get "class"() {
|
|
28
|
+
return classes(ROOT, props.class);
|
|
29
|
+
},
|
|
30
|
+
get style() {
|
|
31
|
+
return props.style;
|
|
32
|
+
},
|
|
33
|
+
onClick: () => {
|
|
34
|
+
if (!props.disabled) props.onPress?.();
|
|
35
|
+
},
|
|
36
|
+
onFocus: (event) => props.onFocus?.(event),
|
|
37
|
+
onBlur: (event) => props.onBlur?.(event),
|
|
38
|
+
get children() {
|
|
39
|
+
return [memo(() => {
|
|
40
|
+
return props.children;
|
|
41
|
+
}), createComponent(Show, {
|
|
42
|
+
get when() {
|
|
43
|
+
return props.external;
|
|
44
|
+
},
|
|
45
|
+
get children() {
|
|
46
|
+
return createComponent(Icon, {
|
|
47
|
+
get name() {
|
|
48
|
+
return LINK_ICON.name;
|
|
49
|
+
},
|
|
50
|
+
get size() {
|
|
51
|
+
return LINK_ICON.size;
|
|
52
|
+
},
|
|
53
|
+
get "class"() {
|
|
54
|
+
return LINK_PARTS.icon;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
})];
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
export { Link };
|
package/dist/dom/ListRow.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Icon } from "./Icon.js";
|
|
2
|
-
import {
|
|
2
|
+
import { rootAttributes } from "./root.js";
|
|
3
|
+
import { className, createComponent, effect, insert, memo, mergeProps, readShallow, spread, template } from "@solidjs/web";
|
|
3
4
|
import { LIST_ROW_PARTS, classes, listRowClass, listRowDescriptionClass, listRowTitleClass, rootPart } from "@xds/core";
|
|
4
5
|
import { Show } from "solid-js";
|
|
5
6
|
// packages/ui-solid/src/ListRow.tsx
|
|
6
7
|
var _tmpl$ = /* @__PURE__ */ template(`<span><span>`);
|
|
7
8
|
var _tmpl$2 = /* @__PURE__ */ template(`<span>`);
|
|
8
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<button
|
|
9
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<button>`);
|
|
9
10
|
var _tmpl$4 = /* @__PURE__ */ template(`<div>`);
|
|
10
11
|
var ROOT = rootPart("ListRow");
|
|
11
12
|
/** One line of a list or a settings screen. Separate rows with a Divider. */
|
|
@@ -87,40 +88,45 @@ function PlaceRow(props) {
|
|
|
87
88
|
},
|
|
88
89
|
get fallback() {
|
|
89
90
|
var _el$5 = _tmpl$4();
|
|
91
|
+
spread(_el$5, [() => {
|
|
92
|
+
return rootAttributes(props);
|
|
93
|
+
}, {
|
|
94
|
+
get "aria-current"() {
|
|
95
|
+
return current();
|
|
96
|
+
},
|
|
97
|
+
get "class"() {
|
|
98
|
+
return row();
|
|
99
|
+
},
|
|
100
|
+
get style() {
|
|
101
|
+
return props.style;
|
|
102
|
+
}
|
|
103
|
+
}], true);
|
|
90
104
|
insert(_el$5, content);
|
|
91
|
-
effect(() => {
|
|
92
|
-
return {
|
|
93
|
-
e: current(),
|
|
94
|
-
t: readShallow(row()),
|
|
95
|
-
a: readShallow(props.style)
|
|
96
|
-
};
|
|
97
|
-
}, ({ e, t, a }, _p$) => {
|
|
98
|
-
e !== _p$?.e && setAttribute(_el$5, "aria-current", e);
|
|
99
|
-
className(_el$5, t, _p$?.t);
|
|
100
|
-
style(_el$5, a, _p$?.a);
|
|
101
|
-
});
|
|
102
105
|
return _el$5;
|
|
103
106
|
},
|
|
104
107
|
get children() {
|
|
105
108
|
var _el$4 = _tmpl$3();
|
|
106
|
-
_el$4
|
|
109
|
+
spread(_el$4, [() => {
|
|
110
|
+
return rootAttributes(props);
|
|
111
|
+
}, {
|
|
112
|
+
get "aria-current"() {
|
|
113
|
+
return current();
|
|
114
|
+
},
|
|
115
|
+
type: "button",
|
|
116
|
+
get disabled() {
|
|
117
|
+
return props.disabled;
|
|
118
|
+
},
|
|
119
|
+
onClick: () => props.onPress?.(),
|
|
120
|
+
get "class"() {
|
|
121
|
+
return row();
|
|
122
|
+
},
|
|
123
|
+
get style() {
|
|
124
|
+
return props.style;
|
|
125
|
+
}
|
|
126
|
+
}], true);
|
|
107
127
|
insert(_el$4, content);
|
|
108
|
-
effect(() => {
|
|
109
|
-
return {
|
|
110
|
-
e: current(),
|
|
111
|
-
t: props.disabled,
|
|
112
|
-
a: readShallow(row()),
|
|
113
|
-
o: readShallow(props.style)
|
|
114
|
-
};
|
|
115
|
-
}, ({ e, t, a, o }, _p$) => {
|
|
116
|
-
e !== _p$?.e && setAttribute(_el$4, "aria-current", e);
|
|
117
|
-
t !== _p$?.t && setAttribute(_el$4, "disabled", t);
|
|
118
|
-
className(_el$4, a, _p$?.a);
|
|
119
|
-
style(_el$4, o, _p$?.o);
|
|
120
|
-
});
|
|
121
128
|
return _el$4;
|
|
122
129
|
}
|
|
123
130
|
});
|
|
124
131
|
}
|
|
125
|
-
delegateEvents(["click"]);
|
|
126
132
|
export { ListRow, PlaceRow };
|
package/dist/dom/MediaCard.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useDefaults } from "./Defaults.js";
|
|
2
|
+
import { rootAttributes } from "./root.js";
|
|
2
3
|
import { Thumbnail } from "./Thumbnail.js";
|
|
3
|
-
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, setAttribute,
|
|
4
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, setAttribute, spread, template } from "@solidjs/web";
|
|
4
5
|
import { MEDIA_CARD_PARTS, classes, mediaCardContentClass, mediaCardIds, mediaCardThumbnailClass, rootPart } from "@xds/core";
|
|
5
6
|
import { For, Show, createMemo, createUniqueId } from "solid-js";
|
|
6
7
|
// packages/ui-solid/src/MediaCard.tsx
|
|
@@ -8,7 +9,6 @@ var _tmpl$ = /* @__PURE__ */ template(`<div><span></span><div><span><span></span
|
|
|
8
9
|
var _tmpl$2 = /* @__PURE__ */ template(`<span>`);
|
|
9
10
|
var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
|
|
10
11
|
var _tmpl$4 = /* @__PURE__ */ template(`<div><button type=button>`);
|
|
11
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<div role=group>`);
|
|
12
12
|
var ROOT = rootPart("MediaCard");
|
|
13
13
|
/**
|
|
14
14
|
* A thumbnail with its title and details: a video in a feed, an article in a list.
|
|
@@ -137,38 +137,47 @@ function MediaCard(props) {
|
|
|
137
137
|
return pressable();
|
|
138
138
|
},
|
|
139
139
|
get fallback() {
|
|
140
|
-
var _el$12 = _tmpl$
|
|
140
|
+
var _el$12 = _tmpl$3();
|
|
141
|
+
spread(_el$12, [() => {
|
|
142
|
+
return rootAttributes(props);
|
|
143
|
+
}, {
|
|
144
|
+
role: "group",
|
|
145
|
+
get "aria-labelledby"() {
|
|
146
|
+
return ids().names;
|
|
147
|
+
},
|
|
148
|
+
get "class"() {
|
|
149
|
+
return classes(ROOT, MEDIA_CARD_PARTS.group, props.class);
|
|
150
|
+
},
|
|
151
|
+
get style() {
|
|
152
|
+
return props.style;
|
|
153
|
+
}
|
|
154
|
+
}], true);
|
|
141
155
|
insert(_el$12, content);
|
|
142
|
-
effect(() => {
|
|
143
|
-
return {
|
|
144
|
-
e: ids().names,
|
|
145
|
-
t: readShallow(classes(ROOT, MEDIA_CARD_PARTS.group, props.class)),
|
|
146
|
-
a: readShallow(props.style)
|
|
147
|
-
};
|
|
148
|
-
}, ({ e, t, a }, _p$) => {
|
|
149
|
-
e !== _p$?.e && setAttribute(_el$12, "aria-labelledby", e);
|
|
150
|
-
className(_el$12, t, _p$?.t);
|
|
151
|
-
style(_el$12, a, _p$?.a);
|
|
152
|
-
});
|
|
153
156
|
return _el$12;
|
|
154
157
|
},
|
|
155
158
|
get children() {
|
|
156
159
|
var _el$10 = _tmpl$4();
|
|
157
160
|
var _el$11 = _el$10.firstChild;
|
|
161
|
+
spread(_el$10, [() => {
|
|
162
|
+
return rootAttributes(props);
|
|
163
|
+
}, {
|
|
164
|
+
get "class"() {
|
|
165
|
+
return classes(ROOT, MEDIA_CARD_PARTS.pressable, props.class);
|
|
166
|
+
},
|
|
167
|
+
get style() {
|
|
168
|
+
return props.style;
|
|
169
|
+
}
|
|
170
|
+
}], true);
|
|
158
171
|
_el$11._$$click = () => props.onPress?.();
|
|
159
172
|
insert(_el$10, content, null);
|
|
160
173
|
effect(() => {
|
|
161
174
|
return {
|
|
162
|
-
e:
|
|
163
|
-
t: readShallow(
|
|
164
|
-
a: ids().names,
|
|
165
|
-
o: readShallow(MEDIA_CARD_PARTS.button)
|
|
175
|
+
e: ids().names,
|
|
176
|
+
t: readShallow(MEDIA_CARD_PARTS.button)
|
|
166
177
|
};
|
|
167
|
-
}, ({ e, t
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
a !== _p$?.a && setAttribute(_el$11, "aria-labelledby", a);
|
|
171
|
-
className(_el$11, o, _p$?.o);
|
|
178
|
+
}, ({ e, t }, _p$) => {
|
|
179
|
+
e !== _p$?.e && setAttribute(_el$11, "aria-labelledby", e);
|
|
180
|
+
className(_el$11, t, _p$?.t);
|
|
172
181
|
});
|
|
173
182
|
return _el$10;
|
|
174
183
|
}
|
package/dist/dom/Menu.js
CHANGED
|
@@ -2,6 +2,8 @@ import { Icon } from "./Icon.js";
|
|
|
2
2
|
import { modalPopover } from "./modal-popover.js";
|
|
3
3
|
import { Portal as Portal$1 } from "./portal.js";
|
|
4
4
|
import { createPresence } from "./presence.js";
|
|
5
|
+
import { rootAttributes } from "./root.js";
|
|
6
|
+
import { createItemProps } from "./rows.js";
|
|
5
7
|
import { TriggerContext, provideTrigger } from "./trigger.js";
|
|
6
8
|
import { createComponent, delegateEvents, effect, insert, readShallow, ref, spread, style, template } from "@solidjs/web";
|
|
7
9
|
import { classes, firstMenuValue, keepListKeys, layoutRect, leaveEscapeToFields, menuItemClass, opensOnPress, readCssPx, underlayLayerStyle } from "@xds/core";
|
|
@@ -28,6 +30,7 @@ function Menu(props) {
|
|
|
28
30
|
const id = createUniqueId();
|
|
29
31
|
const service = useMachine(menu.machine, () => ({
|
|
30
32
|
id,
|
|
33
|
+
ids: { content: props.id },
|
|
31
34
|
"aria-label": props.label,
|
|
32
35
|
positioning: {
|
|
33
36
|
placement: `bottom-${props.align ?? "start"}`,
|
|
@@ -71,7 +74,7 @@ function Menu(props) {
|
|
|
71
74
|
let surface;
|
|
72
75
|
modalPopover(() => api().open, () => positioner);
|
|
73
76
|
const present = createPresence(() => api().open, () => [surface]);
|
|
74
|
-
const content = mergeProps$1(() => api().getContentProps(), {
|
|
77
|
+
const content = mergeProps$1(() => api().getContentProps(), rootAttributes(props), {
|
|
75
78
|
onKeyDown: (event) => keepListKeys(event, surface, ".xds-menu__item:not([data-disabled])", (value) => api().setHighlightedValue(value)),
|
|
76
79
|
get style() {
|
|
77
80
|
return props.style;
|
|
@@ -122,22 +125,22 @@ function Menu(props) {
|
|
|
122
125
|
get each() {
|
|
123
126
|
return props.items;
|
|
124
127
|
},
|
|
125
|
-
children: (item, index) =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
children: (item, index) => {
|
|
129
|
+
if (item === "separator") return (() => {
|
|
130
|
+
var _el$4 = _tmpl$3();
|
|
131
|
+
spread(_el$4, [() => {
|
|
132
|
+
return api().getSeparatorProps();
|
|
133
|
+
}, { class: "xds-menu__separator" }], false);
|
|
134
|
+
return _el$4;
|
|
135
|
+
})();
|
|
136
|
+
const itemProps = createItemProps(() => api().getItemProps({
|
|
137
|
+
value: String(index()),
|
|
138
|
+
disabled: item.disabled
|
|
139
|
+
}));
|
|
132
140
|
var _el$5 = _tmpl$4();
|
|
133
141
|
var _el$6 = _el$5.firstChild;
|
|
134
142
|
var _el$7 = _el$6.nextSibling;
|
|
135
|
-
spread(_el$5, [()
|
|
136
|
-
return api().getItemProps({
|
|
137
|
-
value: String(index()),
|
|
138
|
-
disabled: item.disabled
|
|
139
|
-
});
|
|
140
|
-
}, { get "class"() {
|
|
143
|
+
spread(_el$5, [itemProps, { get "class"() {
|
|
141
144
|
return menuItemClass(item.danger);
|
|
142
145
|
} }], true);
|
|
143
146
|
insert(_el$5, createComponent(Show, {
|
|
@@ -168,7 +171,7 @@ function Menu(props) {
|
|
|
168
171
|
}
|
|
169
172
|
}), _el$7);
|
|
170
173
|
return _el$5;
|
|
171
|
-
}
|
|
174
|
+
}
|
|
172
175
|
}));
|
|
173
176
|
return _el$2;
|
|
174
177
|
})()];
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { createControllable } from "./controllable.js";
|
|
2
|
+
import { Icon } from "./Icon.js";
|
|
3
|
+
import { useLabels } from "./Labels.js";
|
|
4
|
+
import { rootAttributes } from "./root.js";
|
|
5
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, readShallow, setAttribute, spread, template } from "@solidjs/web";
|
|
6
|
+
import { PAGINATION_PARTS, PAGINATION_STEPS, clampPage, classes, isControlled, paginationEntries, rootPart } from "@xds/core";
|
|
7
|
+
import { For, Show } from "solid-js";
|
|
8
|
+
// packages/ui-solid/src/Pagination.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<nav><ul><li><button type=button></button></li><li><button type=button>`);
|
|
10
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<li>`);
|
|
11
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<span aria-hidden=true>…`);
|
|
12
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<button type=button>`);
|
|
13
|
+
var ROOT = rootPart("Pagination");
|
|
14
|
+
/**
|
|
15
|
+
* Moves through a list split into pages: a step back, the first and the last pages, the page
|
|
16
|
+
* shown with an ellipsis for those left out, and a step on. A navigation landmark; the page
|
|
17
|
+
* shown is marked as the current page. Without `value` it keeps its own, from `defaultValue`.
|
|
18
|
+
*/
|
|
19
|
+
function Pagination(props) {
|
|
20
|
+
const labels = useLabels();
|
|
21
|
+
const value = createControllable({
|
|
22
|
+
controlled: () => isControlled(props, "value"),
|
|
23
|
+
value: () => props.value,
|
|
24
|
+
defaultValue: () => props.defaultValue ?? 1,
|
|
25
|
+
onChange: (next) => {
|
|
26
|
+
if (next !== void 0) props.onChange?.(next);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const page = () => clampPage(value.value() ?? 1, props.count);
|
|
30
|
+
const last = () => Math.max(1, Math.floor(props.count));
|
|
31
|
+
const go = (next) => {
|
|
32
|
+
if (next !== page() && next >= 1 && next <= last()) value.set(next);
|
|
33
|
+
};
|
|
34
|
+
var _el$ = _tmpl$();
|
|
35
|
+
var _el$2 = _el$.firstChild;
|
|
36
|
+
var _el$3 = _el$2.firstChild;
|
|
37
|
+
var _el$4 = _el$3.firstChild;
|
|
38
|
+
var _el$5 = _el$3.nextSibling;
|
|
39
|
+
var _el$6 = _el$5.firstChild;
|
|
40
|
+
spread(_el$, [() => {
|
|
41
|
+
return rootAttributes(props);
|
|
42
|
+
}, {
|
|
43
|
+
get "aria-label"() {
|
|
44
|
+
return props.label ?? labels().pagination;
|
|
45
|
+
},
|
|
46
|
+
get "class"() {
|
|
47
|
+
return classes(ROOT, props.class);
|
|
48
|
+
},
|
|
49
|
+
get style() {
|
|
50
|
+
return props.style;
|
|
51
|
+
}
|
|
52
|
+
}], true);
|
|
53
|
+
_el$4._$$click = () => go(page() - 1);
|
|
54
|
+
insert(_el$4, createComponent(Icon, {
|
|
55
|
+
get name() {
|
|
56
|
+
return PAGINATION_STEPS.previous;
|
|
57
|
+
},
|
|
58
|
+
get size() {
|
|
59
|
+
return PAGINATION_STEPS.size;
|
|
60
|
+
}
|
|
61
|
+
}));
|
|
62
|
+
insert(_el$2, createComponent(For, {
|
|
63
|
+
get each() {
|
|
64
|
+
return paginationEntries(page(), props.count);
|
|
65
|
+
},
|
|
66
|
+
keyed: false,
|
|
67
|
+
children: (entry) => (() => {
|
|
68
|
+
var _el$7 = _tmpl$2();
|
|
69
|
+
insert(_el$7, createComponent(Show, {
|
|
70
|
+
get when() {
|
|
71
|
+
return memo(() => {
|
|
72
|
+
return entry() !== "gap";
|
|
73
|
+
})() && entry();
|
|
74
|
+
},
|
|
75
|
+
get fallback() {
|
|
76
|
+
var _el$8 = _tmpl$3();
|
|
77
|
+
effect(() => readShallow(PAGINATION_PARTS.gap), (_v$, _$p) => {
|
|
78
|
+
className(_el$8, _v$, _$p);
|
|
79
|
+
});
|
|
80
|
+
return _el$8;
|
|
81
|
+
},
|
|
82
|
+
children: (number) => (() => {
|
|
83
|
+
var _el$9 = _tmpl$4();
|
|
84
|
+
_el$9._$$click = () => go(number());
|
|
85
|
+
insert(_el$9, number);
|
|
86
|
+
effect(() => {
|
|
87
|
+
return {
|
|
88
|
+
e: readShallow(PAGINATION_PARTS.page),
|
|
89
|
+
t: number() === page() ? "page" : void 0
|
|
90
|
+
};
|
|
91
|
+
}, ({ e, t }, _p$) => {
|
|
92
|
+
className(_el$9, e, _p$?.e);
|
|
93
|
+
t !== _p$?.t && setAttribute(_el$9, "aria-current", t);
|
|
94
|
+
});
|
|
95
|
+
return _el$9;
|
|
96
|
+
})()
|
|
97
|
+
}));
|
|
98
|
+
return _el$7;
|
|
99
|
+
})()
|
|
100
|
+
}), _el$5);
|
|
101
|
+
_el$6._$$click = () => go(page() + 1);
|
|
102
|
+
insert(_el$6, createComponent(Icon, {
|
|
103
|
+
get name() {
|
|
104
|
+
return PAGINATION_STEPS.next;
|
|
105
|
+
},
|
|
106
|
+
get size() {
|
|
107
|
+
return PAGINATION_STEPS.size;
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
effect(() => {
|
|
111
|
+
return {
|
|
112
|
+
e: readShallow(PAGINATION_PARTS.list),
|
|
113
|
+
t: readShallow(PAGINATION_PARTS.step),
|
|
114
|
+
a: props.previousLabel ?? labels().previousPage,
|
|
115
|
+
o: page() <= 1 ? "true" : void 0,
|
|
116
|
+
i: readShallow(PAGINATION_PARTS.step),
|
|
117
|
+
n: props.nextLabel ?? labels().nextPage,
|
|
118
|
+
s: page() >= last() ? "true" : void 0
|
|
119
|
+
};
|
|
120
|
+
}, ({ e, t, a, o, i, n, s }, _p$) => {
|
|
121
|
+
className(_el$2, e, _p$?.e);
|
|
122
|
+
className(_el$4, t, _p$?.t);
|
|
123
|
+
a !== _p$?.a && setAttribute(_el$4, "aria-label", a);
|
|
124
|
+
o !== _p$?.o && setAttribute(_el$4, "aria-disabled", o);
|
|
125
|
+
className(_el$6, i, _p$?.i);
|
|
126
|
+
n !== _p$?.n && setAttribute(_el$6, "aria-label", n);
|
|
127
|
+
s !== _p$?.s && setAttribute(_el$6, "aria-disabled", s);
|
|
128
|
+
});
|
|
129
|
+
return _el$;
|
|
130
|
+
}
|
|
131
|
+
delegateEvents(["click"]);
|
|
132
|
+
export { Pagination };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createControllable } from "./controllable.js";
|
|
2
|
+
import { IconButton } from "./IconButton.js";
|
|
3
|
+
import { useLabels } from "./Labels.js";
|
|
4
|
+
import { Portal as Portal$1 } from "./portal.js";
|
|
5
|
+
import { createPresence } from "./presence.js";
|
|
6
|
+
import { rootAttributes, withStyle } from "./root.js";
|
|
7
|
+
import { TriggerContext, provideTrigger } from "./trigger.js";
|
|
8
|
+
import { className, createComponent, effect, insert, readShallow, ref, spread, template } from "@solidjs/web";
|
|
9
|
+
import { POPOVER_PARTS, classes, isControlled, leaveEscapeToFields, readCssPx } from "@xds/core";
|
|
10
|
+
import { mergeProps as mergeProps$1, normalizeProps, useMachine } from "@zag-js/solid";
|
|
11
|
+
import { Show, createMemo, createUniqueId } from "solid-js";
|
|
12
|
+
import { space } from "@xds/tokens";
|
|
13
|
+
import * as popover from "@zag-js/popover";
|
|
14
|
+
// packages/ui-solid/src/Popover.tsx
|
|
15
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
16
|
+
var _tmpl$2 = /* @__PURE__ */ template(`<div><section><div><h2>`);
|
|
17
|
+
/**
|
|
18
|
+
* A surface that opens beside the control that opens it, for details or a short task that do
|
|
19
|
+
* not need the whole screen: a press outside, Escape or its close button closes it, and the
|
|
20
|
+
* focus goes back to the trigger. It is a dialog named by its title, and not modal: the page
|
|
21
|
+
* stays as it is behind it. Without `open` it keeps its own, from `defaultOpen`.
|
|
22
|
+
*/
|
|
23
|
+
function Popover(props) {
|
|
24
|
+
const id = createUniqueId();
|
|
25
|
+
const labels = useLabels();
|
|
26
|
+
const open = createControllable({
|
|
27
|
+
controlled: () => isControlled(props, "open"),
|
|
28
|
+
value: () => props.open,
|
|
29
|
+
defaultValue: () => props.defaultOpen ?? false,
|
|
30
|
+
onChange: (next) => props.onOpenChange?.(next ?? false)
|
|
31
|
+
});
|
|
32
|
+
let content;
|
|
33
|
+
const service = useMachine(popover.machine, () => ({
|
|
34
|
+
id,
|
|
35
|
+
ids: { content: props.id },
|
|
36
|
+
open: open.value() ?? false,
|
|
37
|
+
onOpenChange: (details) => open.set(details.open),
|
|
38
|
+
positioning: {
|
|
39
|
+
placement: props.placement ?? "bottom",
|
|
40
|
+
gutter: readCssPx(null, "--xds-space-1", space[1])
|
|
41
|
+
},
|
|
42
|
+
onEscapeKeyDown: leaveEscapeToFields,
|
|
43
|
+
initialFocusEl: () => content ?? null
|
|
44
|
+
}));
|
|
45
|
+
const api = createMemo(() => popover.connect(service, normalizeProps));
|
|
46
|
+
const trigger = provideTrigger(() => mergeProps$1(api().getTriggerProps(), { class: POPOVER_PARTS.trigger }));
|
|
47
|
+
const contentProps = withStyle(() => api().getContentProps(), () => props.style, rootAttributes(props));
|
|
48
|
+
const present = createPresence(() => api().open, () => [content]);
|
|
49
|
+
return [createComponent(TriggerContext, {
|
|
50
|
+
value: trigger,
|
|
51
|
+
get children() {
|
|
52
|
+
return props.trigger;
|
|
53
|
+
}
|
|
54
|
+
}), createComponent(Show, {
|
|
55
|
+
get when() {
|
|
56
|
+
return present();
|
|
57
|
+
},
|
|
58
|
+
get children() {
|
|
59
|
+
return createComponent(Portal$1, { get children() {
|
|
60
|
+
return createComponent(TriggerContext, {
|
|
61
|
+
value: null,
|
|
62
|
+
get children() {
|
|
63
|
+
var _el$ = _tmpl$2();
|
|
64
|
+
var _el$2 = _el$.firstChild;
|
|
65
|
+
var _el$3 = _el$2.firstChild;
|
|
66
|
+
var _el$4 = _el$3.firstChild;
|
|
67
|
+
spread(_el$, [() => {
|
|
68
|
+
return api().getPositionerProps();
|
|
69
|
+
}, { get "class"() {
|
|
70
|
+
return POPOVER_PARTS.positioner;
|
|
71
|
+
} }], true);
|
|
72
|
+
spread(_el$2, [contentProps, {
|
|
73
|
+
hidden: false,
|
|
74
|
+
get "class"() {
|
|
75
|
+
return classes("xds-popover", props.class);
|
|
76
|
+
}
|
|
77
|
+
}], true);
|
|
78
|
+
ref(() => {
|
|
79
|
+
return (element) => content = element;
|
|
80
|
+
}, _el$2);
|
|
81
|
+
spread(_el$4, [() => {
|
|
82
|
+
return api().getTitleProps();
|
|
83
|
+
}, { get "class"() {
|
|
84
|
+
return POPOVER_PARTS.title;
|
|
85
|
+
} }], true);
|
|
86
|
+
insert(_el$4, () => {
|
|
87
|
+
return props.title;
|
|
88
|
+
});
|
|
89
|
+
insert(_el$3, createComponent(IconButton, {
|
|
90
|
+
icon: "x",
|
|
91
|
+
get label() {
|
|
92
|
+
return props.closeLabel ?? labels().close;
|
|
93
|
+
},
|
|
94
|
+
variant: "ghost",
|
|
95
|
+
size: "sm",
|
|
96
|
+
get "class"() {
|
|
97
|
+
return POPOVER_PARTS.close;
|
|
98
|
+
},
|
|
99
|
+
onPress: () => api().setOpen(false)
|
|
100
|
+
}), null);
|
|
101
|
+
insert(_el$2, createComponent(Show, {
|
|
102
|
+
get when() {
|
|
103
|
+
return props.children != null;
|
|
104
|
+
},
|
|
105
|
+
get children() {
|
|
106
|
+
var _el$5 = _tmpl$();
|
|
107
|
+
insert(_el$5, () => {
|
|
108
|
+
return props.children;
|
|
109
|
+
});
|
|
110
|
+
effect(() => readShallow(POPOVER_PARTS.body), (_v$, _$p) => {
|
|
111
|
+
className(_el$5, _v$, _$p);
|
|
112
|
+
});
|
|
113
|
+
return _el$5;
|
|
114
|
+
}
|
|
115
|
+
}), null);
|
|
116
|
+
effect(() => readShallow(POPOVER_PARTS.header), (_v$, _$p) => {
|
|
117
|
+
className(_el$3, _v$, _$p);
|
|
118
|
+
});
|
|
119
|
+
return _el$;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
} });
|
|
123
|
+
}
|
|
124
|
+
})];
|
|
125
|
+
}
|
|
126
|
+
export { Popover };
|
package/dist/dom/ProgressBar.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rootAttributes } from "./root.js";
|
|
2
|
+
import { className, effect, readShallow, setStyleProperty, spread, template } from "@solidjs/web";
|
|
2
3
|
import { classes, progressBarClass, progressBarFillClass, progressPercent, rootPart } from "@xds/core";
|
|
3
4
|
// packages/ui-solid/src/ProgressBar.tsx
|
|
4
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div
|
|
5
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><div>`);
|
|
5
6
|
var ROOT = rootPart("ProgressBar");
|
|
6
7
|
/**
|
|
7
8
|
* How far along something is, from 0 to 1. For work of unknown length use a Spinner.
|
|
@@ -11,22 +12,33 @@ function ProgressBar(props) {
|
|
|
11
12
|
const percent = () => progressPercent(props.value);
|
|
12
13
|
var _el$ = _tmpl$();
|
|
13
14
|
var _el$2 = _el$.firstChild;
|
|
15
|
+
spread(_el$, [() => {
|
|
16
|
+
return rootAttributes(props);
|
|
17
|
+
}, {
|
|
18
|
+
role: "progressbar",
|
|
19
|
+
get "aria-label"() {
|
|
20
|
+
return props.label;
|
|
21
|
+
},
|
|
22
|
+
"aria-valuemin": 0,
|
|
23
|
+
"aria-valuemax": 100,
|
|
24
|
+
get "aria-valuenow"() {
|
|
25
|
+
return percent();
|
|
26
|
+
},
|
|
27
|
+
get "class"() {
|
|
28
|
+
return classes(ROOT, progressBarClass, props.class);
|
|
29
|
+
},
|
|
30
|
+
get style() {
|
|
31
|
+
return props.style;
|
|
32
|
+
}
|
|
33
|
+
}], true);
|
|
14
34
|
effect(() => {
|
|
15
35
|
return {
|
|
16
|
-
e:
|
|
17
|
-
t: percent()
|
|
18
|
-
a: readShallow(classes(ROOT, progressBarClass, props.class)),
|
|
19
|
-
o: readShallow(props.style),
|
|
20
|
-
i: readShallow(progressBarFillClass),
|
|
21
|
-
n: `${percent()}%`
|
|
36
|
+
e: readShallow(progressBarFillClass),
|
|
37
|
+
t: `${percent()}%`
|
|
22
38
|
};
|
|
23
|
-
}, ({ e, t
|
|
24
|
-
|
|
25
|
-
t !== _p$?.t &&
|
|
26
|
-
className(_el$, a, _p$?.a);
|
|
27
|
-
style(_el$, o, _p$?.o);
|
|
28
|
-
className(_el$2, i, _p$?.i);
|
|
29
|
-
n !== _p$?.n && setStyleProperty(_el$2, "width", n);
|
|
39
|
+
}, ({ e, t }, _p$) => {
|
|
40
|
+
className(_el$2, e, _p$?.e);
|
|
41
|
+
t !== _p$?.t && setStyleProperty(_el$2, "width", t);
|
|
30
42
|
});
|
|
31
43
|
return _el$;
|
|
32
44
|
}
|